internal: upgrade to TypeScript ^5.7.0#1894
Conversation
| 'error', | ||
| { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }, | ||
| ], | ||
| '@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }], |
There was a problem hiding this comment.
enabled auto-fixing import { FooType } from './foo' to import type { FooType } from './foo' which TS now cares about
There was a problem hiding this comment.
Typescript should not require this afaik unless verbatimModuleSyntax is enabled 🤔
But it's a good practice anyway, so 👍
There was a problem hiding this comment.
I think I was getting *.d.ts is not a module errors, but actually fixed that in tsconfig with "moduleResolution": "node16"
but agree this is best practice/we should do it anyway 👍
| "build": "next build && next export", | ||
| "deploy": "rm -rf out && yarn build && cd out && touch .nojekyll && git init && git add . && git commit -m \"Deploy commit\" && git remote add origin git@github.com:airbnb/visx.git && git push -f origin master:gh-pages", | ||
| "dev": "next", | ||
| "dev": "NODE_OPTIONS=--openssl-legacy-provider next", |
There was a problem hiding this comment.
may need to update next, minimally need to add this same option to the build. don't fully understand why there is an error without this, because our version of next should be using webpack 5 by default 🤔
There was a problem hiding this comment.
I've tried to upgrade next to the latest version using npx @next/codemod upgrade back when I made #1889 in an attempt to verify all components with react 19, but when I tried react-docgen-typescript-loader did not work anymore (everything else did though), so I didn't continue working on it.
I can try again in the next few days based on this branch, maybe some other dependency upgrade made it work in the meantime, or maybe there is an easy replacement for that dependency...
| import type { OrientationType } from '../constants/orientation'; | ||
| import Orientation from '../constants/orientation'; |
There was a problem hiding this comment.
FYI, instead of splitting those lines up you can also do this:
| import type { OrientationType } from '../constants/orientation'; | |
| import Orientation from '../constants/orientation'; | |
| import Orientation, { type OrientationType } from '../constants/orientation'; |
There was a problem hiding this comment.
had just used the eslint autofix here. this doesn't seem to be configurable https://typescript-eslint.io/rules/consistent-type-imports/. no strong opinion from me.
Size Changes
View raw build statsPrevious (master){
"visx-annotation": {
"esm": 30333,
"lib": 40419
},
"visx-axis": {
"esm": 20709,
"lib": 25153
},
"visx-bounds": {
"esm": 2661,
"lib": 3136
},
"visx-brush": {
"esm": 55492,
"lib": 59763
},
"visx-chord": {
"esm": 3301,
"lib": 4484
},
"visx-clip-path": {
"esm": 3993,
"lib": 5491
},
"visx-curve": {
"esm": 323,
"lib": 1462
},
"visx-delaunay": {
"esm": 2422,
"lib": 3231
},
"visx-demo": {
"esm": 0,
"lib": 36814
},
"visx-drag": {
"esm": 12570,
"lib": 14176
},
"visx-event": {
"esm": 3815,
"lib": 5091
},
"visx-geo": {
"esm": 12930,
"lib": 16196
},
"visx-glyph": {
"esm": 13761,
"lib": 18476
},
"visx-gradient": {
"esm": 16078,
"lib": 20593
},
"visx-grid": {
"esm": 18097,
"lib": 21710
},
"visx-group": {
"esm": 1471,
"lib": 2070
},
"visx-heatmap": {
"esm": 7040,
"lib": 8347
},
"visx-hierarchy": {
"esm": 12093,
"lib": 17820
},
"visx-legend": {
"esm": 25546,
"lib": 32474
},
"visx-marker": {
"esm": 8204,
"lib": 10332
},
"visx-mock-data": {
"esm": 326036,
"lib": 329336
},
"visx-network": {
"esm": 4497,
"lib": 6572
},
"visx-pattern": {
"esm": 11689,
"lib": 15673
},
"visx-point": {
"esm": 1003,
"lib": 1781
},
"visx-react-spring": {
"esm": 13253,
"lib": 16586
},
"visx-responsive": {
"esm": 15936,
"lib": 18296
},
"visx-sankey": {
"esm": 3543,
"lib": 4594
},
"visx-scale": {
"esm": 18870,
"lib": 29896
},
"visx-shape": {
"esm": 81766,
"lib": 102573
},
"visx-stats": {
"esm": 13498,
"lib": 15050
},
"visx-text": {
"esm": 8276,
"lib": 9773
},
"visx-threshold": {
"esm": 2844,
"lib": 3723
},
"visx-tooltip": {
"esm": 14383,
"lib": 19715
},
"visx-vendor": {
"esm": 2492,
"lib": 2702
},
"visx-visx": {
"esm": 1524,
"lib": 4155
},
"visx-voronoi": {
"esm": 2137,
"lib": 2824
},
"visx-wordcloud": {
"esm": 2506,
"lib": 3311
},
"visx-xychart": {
"esm": 173440,
"lib": 225481
},
"visx-zoom": {
"esm": 16176,
"lib": 18872
}
}Current{
"visx-annotation": {
"esm": 30333,
"lib": 40419
},
"visx-axis": {
"esm": 20709,
"lib": 25153
},
"visx-bounds": {
"esm": 2662,
"lib": 3136
},
"visx-brush": {
"esm": 55698,
"lib": 59969
},
"visx-chord": {
"esm": 3301,
"lib": 4484
},
"visx-clip-path": {
"esm": 3993,
"lib": 5491
},
"visx-curve": {
"esm": 323,
"lib": 1462
},
"visx-delaunay": {
"esm": 2422,
"lib": 3231
},
"visx-demo": {
"esm": 0,
"lib": 0
},
"visx-drag": {
"esm": 12570,
"lib": 14176
},
"visx-event": {
"esm": 3815,
"lib": 5091
},
"visx-geo": {
"esm": 12930,
"lib": 16196
},
"visx-glyph": {
"esm": 13761,
"lib": 18476
},
"visx-gradient": {
"esm": 16078,
"lib": 20593
},
"visx-grid": {
"esm": 18097,
"lib": 21710
},
"visx-group": {
"esm": 1471,
"lib": 2070
},
"visx-heatmap": {
"esm": 7040,
"lib": 8347
},
"visx-hierarchy": {
"esm": 12093,
"lib": 17820
},
"visx-legend": {
"esm": 25546,
"lib": 32474
},
"visx-marker": {
"esm": 8204,
"lib": 10332
},
"visx-mock-data": {
"esm": 326036,
"lib": 329336
},
"visx-network": {
"esm": 4497,
"lib": 6572
},
"visx-pattern": {
"esm": 11689,
"lib": 15673
},
"visx-point": {
"esm": 1003,
"lib": 1781
},
"visx-react-spring": {
"esm": 13253,
"lib": 16586
},
"visx-responsive": {
"esm": 15936,
"lib": 18296
},
"visx-sankey": {
"esm": 3543,
"lib": 4594
},
"visx-scale": {
"esm": 18891,
"lib": 29917
},
"visx-shape": {
"esm": 81787,
"lib": 102594
},
"visx-stats": {
"esm": 13498,
"lib": 15050
},
"visx-text": {
"esm": 8297,
"lib": 9794
},
"visx-threshold": {
"esm": 2844,
"lib": 3723
},
"visx-tooltip": {
"esm": 14383,
"lib": 19715
},
"visx-vendor": {
"esm": 2492,
"lib": 2702
},
"visx-visx": {
"esm": 1524,
"lib": 4155
},
"visx-voronoi": {
"esm": 2137,
"lib": 2824
},
"visx-wordcloud": {
"esm": 2506,
"lib": 3324
},
"visx-xychart": {
"esm": 174826,
"lib": 225920
},
"visx-zoom": {
"esm": 16176,
"lib": 18872
}
} |
|
everything is good except the typescript -> docs is broken. may not land this until after the holidays. |
I briefly tried to look into fixing the docs and wrote everything down in #1897. |
|
Also would be great to get this also landed in the next stable release along with React v19 support! 🤞@williaster |
|
Yes apologies - we are blocked by the broken documentation which I haven't had time to investigate further unfortunately. if someone from the community has the expertise and interest in helping it would be very much appreciated! |
|
What about usind Typedoc: https://typedoc.org/ as documentation generator for TypeScript projects instead of react-docgen-typescript-loader or react-docgen-typescript-plugin? Typedoc is active and well maintained |
|
Is there an update on this? Are we still gated on the typescript generation? |
Came here for React19 support. |
|
Any updates on this? Almost a year no update for this library, it is so good, but Airbnb abandoned it? |
|
Hello @williaster , @skevy could you please take a look at the atttempt from @pergamonster that wanted to solve your issue? So we can finally get a new version with react 19 |
|
Hi all, I'm working on getting this across the finish line. |
|
Closing in favor of #1938 |
🏠 Internal
Working toward
react@19(#1883), this PRreact@19usesqueueMicrotaskwhich is not supported by our 5 year old version of jest3.8to5.7because upgradingjestdependencies couldn't compile@typescript-eslint/eslint-pluginso we can use@typescript-eslint/consistent-type-importsto auto fiximport type { FooType } from './foo';required inTypeScript@^5.4@react-spring/webpeer deps to^9.7.5which should fix TypeError: (0 , _web.useTransition) is not a function #1725node >= 16.13.0tonode >= 18.8.0@visx/xychart'swithRegisteredDataHOC because the compiled types were so complex they became invalid (similar to [regression - 5.4] Generated.d.tsfile contains invalid types microsoft/TypeScript#57843)