Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(decorators): update decorators to new ECMAScript proposal #572

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

favna
Copy link
Member

@favna favna commented Mar 28, 2023

Warning
Blocked by a more stable implementation of decorators in V8 / Node / TypeScript

  • TypeScript types do not represent the ECMAScript spec
  • TypeScript types do not match the runtime right now
  • V8 doesn't have decorators support, TS outputs code with tslib
  • Unit tests don't work at all because those use esbuild which also doesn't have ES decorators yet.

Warning
Targets the feat/typescript-v5 branch but separate for easier reviewing

BREAKING CHANGE: DO NOT attempt to use this version with TypeScript 4.x, it will not work!
BREAKING CHANGE: EnumerableMethod is gone, it never really worked anyway
BREAKING CHANGE: Enumerable now has to be applied to both fields and classes for it to work
BREAKING CHANGE: Typings have generally overall changed

favna added 21 commits March 28, 2023 23:12
BREAKING CHANGE: @sapphire/ts-config now relies on TypeScript v5.x.
DO NOT attempt to use this version with TypeScript v4.x or lower.
DO NOT attempt to use a previous major with TypeScript v5.x.
BREAKING CHANGE: the config `@sapphire/ts-config/extra-strict-without-decorators` has been removed
this because decorators are now a core part of TypeScript and are no longer experimental
replace your extends with `@sapphire/ts-config/extra-strict` to regain the same functionality
BREAKING CHANGE: The previous version had `"module": "CommonJS"` whereas this one has
`"module": "Node16"`. Refer to the TypeScript documentation for the differences
This was exposed by `verbatimModuleSyntax`
This was exposed by `verbatimModuleSyntax`
BREAKING CHANGE: the config `@sapphire/ts-config/without-decorators` has been removed
this because decorators are now a core part of TypeScript and are no longer experimental
replace your extends with `@sapphire/ts-config` to regain the same functionality
This was exposed by `verbatimModuleSyntax`
This was exposed by `verbatimModuleSyntax`
BREAKING CHANGE: DO NOT attempt to use this version with TypeScript 4.x, it will not work!
BREAKING CHANGE: `EnumerableMethod` is gone, it never really worked anyway
BREAKING CHANGE: `Enumerable` now has to be applied to both fields and classes for it to work
BREAKING CHANGE: Typings have generally overall changed
@favna favna force-pushed the feat/typescript-v5 branch 2 times, most recently from d2cebb4 to 3bacf70 Compare April 2, 2023 16:56
@favna favna force-pushed the feat/typescript-v5 branch 4 times, most recently from 298bd78 to 6a2b3cb Compare April 10, 2023 13:58
Base automatically changed from feat/typescript-v5 to main April 10, 2023 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant