fix(decorators): Add Symbol.metadata polyfill and import it at entry to ensure decorator metadata is available

This commit is contained in:
2025-11-28 09:16:52 +00:00
parent 23aa29a5b8
commit 0a349180b2
5 changed files with 22 additions and 6 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## 2025-11-28 - 7.0.4 - fix(decorators)
Add Symbol.metadata polyfill and import it at entry to ensure decorator metadata is available
- Add ts/shim.ts: defines Symbol.metadata when missing (polyfill for TC39 Stage 3 decorator metadata).
- Import './shim.js' at the very top of ts/index.ts so the polyfill runs before any decorator code or exports are evaluated.
- Prevents runtime errors when decorators rely on Symbol.metadata and improves compatibility across runtimes/environments.
## 2025-11-28 - 7.0.3 - fix(build)
Bump devDependency @git.zone/tsbuild to ^3.1.2