-
Notifications
You must be signed in to change notification settings - Fork 507
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
Support Typescript 4 #926
Comments
Hmm.. So the linting portion duplicates #810 which just recently got unblocked by a new release of But oddly enough #810 doesn't report issues with any TS syntax. Perhaps there's a subset that's compatible but some of it isn't, per the TS release notes. TSDX normally uses whatever version of TS is available in To respond to the request though, a breaking upgrade to TS v4, ESLint v7, Prettier v2, etc etc (one dep upgrade requires another dep upgrade requires another etc 😕 ) is already scheduled for v0.16.0. Because this dep upgade it's so breaking, I've planned it to occur when there are no other breaking changes occurring for the least possible confusion and to space out planned/required breakage. Also thanks for providing the workaround with resolutions and confirming that it works. |
This comment has been minimized.
This comment has been minimized.
@JustFly1984 please read the comments. This is already scheduled for v0.16.0, is very breaking and requires updates of several deps (one of which only recently updated), and has workarounds available... I'm not sure what you mean by you can't build a new version... this is not a blocker as it has a workaround, and current TSDX can build. |
In addition to the TS4 support, i'd like to say that the new TS4.1 template string types are not working properly. I'm not capable of saing the extension of the problem, but it would be really cool if you could also target this issue. |
@viniciusflv if the |
Workaround will be removed in upcoming tsdx version: jaredpalmer/tsdx#926
For anyone interested, here's the updated I'm using it in a new project and everything seems to be working fine; I'll update if anything breaks. "resolutions": {
"**/@typescript-eslint/eslint-plugin": "^4.11.1",
"**/@typescript-eslint/parser": "^4.11.1",
"**/jest": "^26.6.3",
"**/ts-jest": "^26.4.4",
"**/typescript": "^4.1.3"
} |
See jaredpalmer/tsdx#926 Note that this solution is only possible with yarn
Resolutions needed b/c of jaredpalmer/tsdx#926
* Update TSDX deps * Update TypeScript Resolutions needed b/c of jaredpalmer/tsdx#926 * Update Husky * Update MongoDB
The implementation comes from jaredpalmer/tsdx#926 (comment)
We're prototyping a new project on tsdx and after an ~hour of fighting "why does All of the projects in our company are on TS 4.x and prettier 2.x, so kinda surprised to see tsdx behind on these. Granted, it's open source / it's free / etc. :-), so I'm looking forward to liking/using tsdx going forward, but just reporting back today's frustrations from the field. |
* Setup chromatic. * Use babel-preset-css-prop instead of per-file pragmas. * Get jsxImportSource working, move to yarn to get TS 4.x See: jaredpalmer/tsdx#926 * More yarn. * Fix node version. * Use exit once uploaded. * Pass auto-accept-changes on main. * Use a local jest.config.js so that Webstorm works. * Use local semantic-release. * Update comment. * Remove babel-plugin b/c the preset adds it for us.
@stephenh I also looked to this lib, but it has phantom dependencies all over the place and thus is incompatible out-of-the-box with Rush with pnpm. I tried to fix this myself, but when it took more then several days with no luck - I quit. |
This comment has been minimized.
This comment has been minimized.
TSDX does not appear to be maintained on this front: jaredpalmer/tsdx#926
In case anyone is using pnpm >= 5.10.1 you can use overrides (https://pnpm.io/package_json#pnpmoverrides): "pnpm": {
"overrides": {
"typescript": "^4.3.0"
}
} |
just released a fork @weiran.zsd/tsdx, the main changes are:
|
I have used "resolutions": {
"**/@typescript-eslint/eslint-plugin": "^5.4.0",
"**/@typescript-eslint/parser": "^5.4.0",
"**/jest": "^27.3.1",
"**/ts-jest": "^27.0.7",
"**/typescript": "^4.4.4"
} |
The resolutions suggestions above did not fix my issue, which was a build error being thrown by babel anywhere that I attempted to leverage typescript template literals. What ended up fixing that issue was upgrading @babel/core
|
to fix compat issues with tsdx see jaredpalmer/tsdx#926 (comment)
to fix compat issues with tsdx see jaredpalmer/tsdx#926 (comment)
To add on the previous comments, yarn 3 does not support glob patterns in resolutions (**/). This fixed the issue for me:
|
Current Behavior
Creating a new project with the example code from the official release notes doesn't work:
$ yarn build semantic error TS1256: A rest element must be last in a tuple type.
Workaround
For the moment I managed to work around it by updating
typescript
andtypescript-eslint
and forcing the resolutions:The text was updated successfully, but these errors were encountered: