parse5
parse5 copied to clipboard
7.2.0 throws a TS error TS1383: Only named exports may use 'export type'
The exact error is:
node_modules/parse5/dist/index.d.ts(5,1): error TS1383: Only named exports may use 'export type'.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
My temporary solution was to create a package.json resolutions entry for 7.1.2 since this package is a dependency of another package and not a direct dependency. That was after upgrading Node to 21 and TS to 5.4.3.
this is very strange
export type * should work in 5.x of typescript
locally I can reproduce the error in 4.9.5 but not in any 5.x version. could you double check the version your editor is using (of typescript) is actually >=5?
and if it is, let us know which one exactly so I can try reproduce
https://github.com/inikulin/parse5/releases/tag/v7.2.0 mentions upgrading typescript 4 to 5, I guess it's intentional to no longer support typescript 4?
mentions upgrading typescript 4 to 5
This is a breaking change, why is this a minor version bump and not v8.0.0? We are using jsdom package that has dependency "parse5": "^7.1.2" which broke our build because it installs version 7.2.0.
The version bump was correct. It wasn't intentional
We can just update the export to work with 4.x I think
For yarn users, setting the following in your package.json should get you by until a patch is released.
"resolutions": { "parse5": "7.1.2" }