tianhao
|
2516a3a36b
|
fix(ci): 修复 YAML 解析失败导致 CI 不触发
CI / test (18.x) (push) Successful in 10m12s
CI / test (20.x) (push) Successful in 10m7s
CI / test (22.x) (push) Successful in 10m8s
CI / test (24.x) (push) Successful in 10m24s
- 根因:'Run tests (coverage gate: lines >= 95%)' 未加引号,
plain scalar 中 'coverage gate:' 的冒号被解析为嵌套 mapping,
整个 workflow 解析失败 → push 不触发(v0.5.0 引入)
- 修复:name 加单引号;runs-on 恢复 debian-latest(runner 实际标签)
- publish.yml 同步恢复 runs-on
- 验证:两个文件 YAML 解析全部通过
|
2026-08-08 15:33:28 +08:00 |
|
tianhao
|
a4a757b15b
|
ci: runs-on 改用 ubuntu-latest(官方 act_runner 默认标签)
|
2026-08-08 15:30:14 +08:00 |
|
tianhao
|
95f5652e9c
|
fix: CJS 产物改 .cjs 扩展名并提升 default 导出 — 修复 require() 兼容性
- 包声明 type:module 时 .js 产物被 Node 按 ESM 解析:Node 16/18 下 require 报 ERR_REQUIRE_ESM,Node 20+ 拿到 namespace 对象(success/version 等属性 undefined)
- dist/metona-toast.cjs.js → .cjs,dist/react.cjs.js → .cjs
- 主包 CJS footer 将 default 提升为 module.exports:require() 直接返回 MeToast(兼容 .default / .MeToast / .Met / .Toast / .VERSION 所有用法)
- 版本 0.5.1(0.5.0 已发布带问题产物)
- 真实消费者验证:CJS/ESM/React 子包四路加载全部正常
|
2026-08-08 15:25:47 +08:00 |
|
tianhao
|
dd061025e0
|
docs: 重写 README 与 site 站点 — 精美酷炫全新视觉
- README 全面更新:对齐 v0.5.0(钩子系统完整表、React 适配器、dragThreshold、工程质量章节)
- site 三页全新设计:深色渐变 + 玻璃拟态 + 光球漂浮 + 网格背景 + 终端风格代码块 + 滚动淡入
- index.html:Hero 自动演示、数据统计条、12 特性卡、环境支持、CTA
- docs.html:28 项 API 导航、滚动高亮、补全钩子系统/React/配置项/动画/主题章节
- demo.html:18 交互卡片、新增钩子拦截/dedupe 去重/自定义动画/拖拽阈值演示、107 图标网格
- jsdom 冒烟验证:三页 MeToast 全局注册、toast 渲染、图标网格/卡片/代码块完整
|
2026-08-08 15:11:04 +08:00 |
|
tianhao
|
1f718c4ef8
|
release: v0.5.0 — 覆盖率96.42%达标、lint零警告、覆盖率门禁、CI强化、发布自动化
- 覆盖率 96.42%(行):新增 59 测试共 385 个,覆盖 DOM 交互事件、对话框按钮交互、Intl/localStorage 异常路径、React 渲染生命周期
- 测试环境重构:SSR 分支用 defineProperty 真正覆盖 document/window;新增 tests/dom.test.ts、tests/setup.ts
- jest 覆盖率门禁 lines >= 95%;CI lint 改必过;新增 publish.yml(v* tag 自动发布到 Gitea registry)
- 修复:Toast.off 空数组残留、Toast.on 取消函数 this 绑定、action close:false 冒泡关闭、use() 重复注册钩子、i18n catch 引用错误
- 删除死代码 autoApplySystemTheme;lint 零警告(no-console 策略 + caughtErrorsIgnorePattern)
|
2026-08-08 15:02:51 +08:00 |
|
tianhao
|
bbff631f4f
|
release: v0.4.0 — React 适配器、loading链式id稳定、dragThreshold、RTL适配、dedupe插件
- React 适配器子包:@metona-team/metona-toast/react — useToast() hook + 声明式 <Toast /> 组件,组件卸载自动清理;react 为 optional peerDependency,主包保持零依赖
- loading 链式转换改原地 update:id 稳定不重建 DOM,转换后 duration 恢复默认自动关闭;update() 支持 duration 变更动态重启计时器
- _emit 幽灵实例修复:beforeShow 拦截后的 toast 不再注册进 _toasts
- dragThreshold 配置项(默认 120px,原硬编码);RTL 容器 dir 属性 + 进度条/side 条/色条镜像
- dedupe 预设插件:相同 type+message 自动去重,支持 uninstall
- jest 环境隔离测试独立成 tests/ssr.test.ts(resetModules 不再污染共享模块状态);新增 tests/setup.ts 补 TextEncoder
- 文档:README/docs.html 补 React 适配器、dedupe、dragThreshold;CHANGELOG 更新;328 测试全过
|
2026-08-08 14:45:19 +08:00 |
|
tianhao
|
2937ce5e2d
|
release: v0.3.0 — 自定义动画真实生效、max超限修复、钩子系统完整化、destroy全量清理
- 自定义动画:animations.register() 注册的动画动态注入 keyframes 真实生效(此前仅存 Map 实际 fallback slide)
- max 超限:通过实例注册表真正 close() 最早的 toast(此前仅删内存记录,DOM 残留)
- 钩子收敛:beforeClose/beforeUpdate 支持返回 false 拦截;接入 click/hover/dragStart/dragEnd/animationStart/animationEnd/progressStart/progressEnd/configChange/themeChange/localeChange/beforeInit/afterInit/beforeDestroy/afterDestroy;HOOK_NAMES 移除永不触发的声明
- destroy() 全量清理:hooks、实例注册表、全部 metona-toast-* 样式标签;动画注册表真正清空
- applyThemeVariables 重复注入修复;init() 支持插件对象并复活 _destroyed;AnimationConfig 类型放宽
- VERSION 统一到 constants.ts 唯一维护;删除失效 scripts;新增 .gitattributes 统一 LF
- docs.html 补 v0.2.1 新 API 文档;CHANGELOG 更新;测试 309 用例全过
|
2026-08-08 14:23:41 +08:00 |
|
tianhao
|
cca2675fb4
|
refactor: 对齐 MetonaEditor — babel-jest 替代 ts-jest
CI / test (18.x) (push) Successful in 9m50s
CI / test (20.x) (push) Successful in 9m49s
CI / test (22.x) (push) Successful in 9m56s
CI / test (24.x) (push) Successful in 9m55s
### Changed
- 测试框架: ts-jest → babel-jest (对齐 MetonaEditor 生产方案)
- jest.config.cjs: babel-jest transform + moduleNameMapper
- test 脚本: jest → jest --coverage (对齐 MetonaEditor)
- 移除 ts-jest, 新增 @babel/core/preset-env/preset-typescript/babel-jest
### Added
- babel.config.cjs (对齐 MetonaEditor)
### Fixed
- 恢复 tslib (@rollup/plugin-typescript 必需依赖)
### Verified
- tsc --noEmit: 零错误
- jest --no-coverage: 136/136 passed
- rollup build: 5 outputs
|
2026-07-25 11:52:01 +08:00 |
|
tianhao
|
32a3bdf86e
|
fix(ci): 修复 Gitea Actions 测试卡死问题
CI / test (20.x) (push) Canceled after 0s
CI / test (22.x) (push) Canceled after 0s
CI / test (24.x) (push) Canceled after 0s
CI / test (18.x) (push) Canceled after 3s
- 移除 --coverage(CI 环境 ts-jest 覆盖率内存爆炸)
- 添加 --forceExit --maxWorkers=2 --no-cache
- 添加 NODE_OPTIONS=--max-old-space-size=4096 防 OOM
|
2026-07-25 11:33:52 +08:00 |
|
tianhao
|
9a6cd33d90
|
release: v0.2.0 — TypeScript 源码重构
CI / test (18.x) (push) Successful in 9m52s
CI / test (22.x) (push) Canceled after 0s
CI / test (24.x) (push) Canceled after 0s
CI / test (20.x) (push) Canceled after 2m49s
### Changed
- 全部源码从 JavaScript 迁移到 TypeScript (strict mode)
- core.js (1244行) 拆分为 toast.ts + api.ts + templates.ts
- 删除手动维护的 types/index.d.ts,类型从源码自动生成
- 构建工具链: Babel → ts-jest, 新增 @rollup/plugin-typescript
- 新增 rollup-plugin-dts 生成合并 .d.ts
### Added
- tsconfig.json (strict: true)
- src/types.ts 核心类型模块 (39 个导出类型)
- .eslintrc.json (@typescript-eslint)
- .gitea/workflows/ci.yml (Node 18/20/22/24 矩阵)
- CHANGELOG.md
### Aligned with metona-starter
- package.json: type:module, engines≥16, prepublishOnly
- rollup.config.js: dts plugin, port 3001
- jest.config.cjs, build.sh, serve.sh, .gitignore (.npmrc)
### Removed
- babel.config.js, types/ 目录, 所有 src/*.js
|
2026-07-25 11:22:07 +08:00 |
|
tianhao
|
a6c6714b54
|
chore: 从git跟踪移除dist目录
|
2026-07-23 20:05:48 +08:00 |
|
tianhao
|
a9a0be8f21
|
chore: .gitignore添加.npmrc排除
|
2026-07-23 20:04:49 +08:00 |
|
tianhao
|
7d268648ae
|
chore: 从git跟踪移除.npmrc,加入.gitignore
|
2026-07-23 20:04:46 +08:00 |
|
tianhao
|
34c749c9c6
|
merge: 合并.npmrc冲突,保留远程registry认证和本地Electron配置
|
2026-07-23 19:27:55 +08:00 |
|
tianhao
|
b85756c7b9
|
fix: 自定义图标按钮改用函数调用,修复onclick引号转义问题
|
2026-06-16 15:35:56 +08:00 |
|
tianhao
|
81a6adc751
|
feat: demo.html添加107种预设图标全展示区块
|
2026-06-16 15:27:09 +08:00 |
|
tianhao
|
1b01bf4b48
|
feat: demo.html扩充到15个功能区块,覆盖项目全部功能
|
2026-06-16 15:23:46 +08:00 |
|
tianhao
|
ea9e2808d6
|
docs: API文档17个方法全部补全参数表、返回值、类型、默认值
|
2026-06-16 15:13:38 +08:00 |
|
tianhao
|
ccd7306f57
|
feat: 生成favicon.ico并添加到所有页面
|
2026-06-16 15:00:08 +08:00 |
|
tianhao
|
f51e609481
|
style: 官网环境支持改为卡片网格布局
|
2026-06-16 14:27:44 +08:00 |
|
tianhao
|
fc36314793
|
chore: 添加MIT LICENSE文件
|
2026-06-16 14:24:22 +08:00 |
|
tianhao
|
50498cb1d6
|
chore: 恢复.npmrc; package.json添加unpkg/jsdelivr字段
|
2026-06-16 14:22:17 +08:00 |
|
tianhao
|
bb3ef7138f
|
dist: 构建产物 v2.0.0 — UMD/ESM/CJS/min/TS声明
|
2026-06-16 13:58:25 +08:00 |
|
tianhao
|
f8f079dd1a
|
docs: README和官网添加环境与版本支持说明
|
2026-06-16 13:57:48 +08:00 |
|
tianhao
|
7dc7df59e0
|
docs: README和官网明确全局仅MeToast和Met两个变量名
|
2026-06-16 13:57:01 +08:00 |
|
tianhao
|
cab5ef1d55
|
fix: 删除非规定别名window.metonaToast,全局仅保留MeToast和Met
|
2026-06-16 13:56:04 +08:00 |
|
tianhao
|
f474b7251a
|
fix: demo页删除非规定的M别名,统一使用MeToast
|
2026-06-16 13:52:18 +08:00 |
|
tianhao
|
a4401c74d2
|
fix: demo页查看数量改用Toast代替alert
|
2026-06-16 13:51:06 +08:00 |
|
tianhao
|
de44c04c35
|
chore: 更新项目地址为gitee.com/thzxx/MetonaToast; author改为thzxx
|
2026-06-16 13:36:17 +08:00 |
|
tianhao
|
3ab10f89a4
|
refactor: examples/→site/ 官网+文档+演示三件套; 更新build.sh/rollup/serve.sh路径
|
2026-06-16 13:32:14 +08:00 |
|
tianhao
|
86bfcc4102
|
fix: 激活gap/offset死配置; 优化style空对象遍历
|
2026-06-16 13:22:33 +08:00 |
|
tianhao
|
b805c89112
|
fix(test): max限制测试适配jsdom mock环境 — 193全通过
|
2026-06-16 13:20:07 +08:00 |
|
tianhao
|
79585178ef
|
fix(test): 测试隔离 — beforeEach清理DOM+钩子; 修复合规性检查
|
2026-06-16 13:15:16 +08:00 |
|
tianhao
|
900e965ae6
|
fix(#24,#25,#26,#27,#30): action按钮顺序; group边界; Notification权限; queue catch; 新增功能测试
|
2026-06-16 13:09:50 +08:00 |
|
tianhao
|
531438cc9c
|
fix(#28,#29): DEFAULTS补全notifyWhenHidden; types补全action/group/QueueControl/ActionButton等新增API类型
|
2026-06-16 13:09:03 +08:00 |
|
tianhao
|
4df6e35d51
|
feat: Toast分组管理 — group()/dismissGroup()
|
2026-06-16 13:02:46 +08:00 |
|
tianhao
|
23745952e5
|
feat: Notification API + 自定义渲染函数 + stack独立配置完善
|
2026-06-16 13:02:23 +08:00 |
|
tianhao
|
88ae899d96
|
feat: RTL布局支持 — close动画方向自动适配语言方向
|
2026-06-16 13:01:25 +08:00 |
|
tianhao
|
fc3132f330
|
feat: Action Toast — 内嵌操作按钮的通知
|
2026-06-16 13:00:48 +08:00 |
|
tianhao
|
25fb1b1d48
|
feat: resetTimerOnUpdate + onUpdate回调 + queue可取消
|
2026-06-16 13:00:10 +08:00 |
|
tianhao
|
34417d0057
|
perf(#21): 简化 themes.js/i18n.js 代理样板 — 290+296行→17+22行
|
2026-06-16 12:53:05 +08:00 |
|
tianhao
|
093dcdebd8
|
fix(#19,#22,#23): 动画取消reject替代resolve; config.style深拷贝; queue消息级duration/onClose优先
|
2026-06-16 12:52:03 +08:00 |
|
tianhao
|
56bac1fa0f
|
fix(#9,#16,#17): 移除未使用import; 合并重复CSS @media print; accessibility从i18n读取类型名
|
2026-06-16 12:42:36 +08:00 |
|
tianhao
|
7bc2bf6ace
|
fix(#3,#4,#6,#8): _palette从THEMES读取颜色; countdown全局替换; queue保留用户onClose; WeakMap→Map并清理
|
2026-06-16 12:41:33 +08:00 |
|
tianhao
|
2e361d40e8
|
fix(#2): Promise泄漏 — confirm/prompt 添加10秒安全超时,防止永不resolve
|
2026-06-16 12:40:39 +08:00 |
|
tianhao
|
9ce1809928
|
fix(#1): XSS — escapeHTML 保护 confirm/prompt 模板中的所有用户输入
|
2026-06-16 12:40:01 +08:00 |
|
tianhao
|
ff9c7cd218
|
init: MetonaToast v2.0.0 基线 — 已完成改进(模板抽象/constants拆分/测试增强)
|
2026-06-16 12:39:36 +08:00 |
|