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

TypeScript 5.0 Support #858

Closed
2 tasks done
SuperchupuDev opened this issue Mar 16, 2023 · 8 comments
Closed
2 tasks done

TypeScript 5.0 Support #858

SuperchupuDev opened this issue Mar 16, 2023 · 8 comments

Comments

@SuperchupuDev
Copy link
Contributor

SuperchupuDev commented Mar 16, 2023

You can't currently install TS 5.0 if you use tsup

npm error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: tsup@6.6.3
npm ERR! Found: typescript@5.0.1-rc
npm ERR! node_modules/typescript
npm ERR!   typescript@"^5.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^4.1.0" from tsup@6.6.3
npm ERR! node_modules/tsup
npm ERR!   dev tsup@"^6.6.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: typescript@4.9.5
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@"^4.1.0" from tsup@6.6.3
npm ERR!   node_modules/tsup

@TheTedAdams
Copy link

TypeScript 5.0 just released a few hours ago.

https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/

I would guess that tsup maintainers will need to test a bit to make sure nothing broke prior to updating their peer dependencies...

@ImLunaHey
Copy link
Contributor

Related #849

@SuperchupuDev
Copy link
Contributor Author

SuperchupuDev commented Mar 18, 2023

I've opened a PR to support the new syntax (the only change needed was to bump deps), which should allow tsup to accept TS 5.0

@egoist
Copy link
Owner

egoist commented Mar 19, 2023

fixed in 6.7.0

@egoist egoist closed this as completed Mar 19, 2023
@josh-hemphill
Copy link

TypeScript 5.0 seems to enforce the use of .d.mts and .d.cts for respective JS files.
Just wanted to mention #760 here, since it's probably going to get a lot more people finding it.

@Mister-Hope
Copy link

Mister-Hope commented Mar 19, 2023

Hi there, our project is still failing with latest tsup and ts5:

packages/shared build$ tsup
packages/shared build: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined
packages/shared build:     at new NodeError (internal/errors.js:322:7)
packages/shared build:     at createRequire (internal/modules/cjs/loader.js:1[21](https://github.com/vuepress/vuepress-next/actions/runs/4460522851/jobs/7833719587?pr=1285#step:6:22)5:11)
packages/shared build:     at Object.<anonymous> (/home/runner/work/vuepress-next/vuepress-next/node_modules/.pnpm/load-tsconfig@0.2.4/node_modules/load-tsconfig/dist/index.cjs:139:107)
packages/shared build:     at Module._compile (internal/modules/cjs/loader.js:1114:14)
packages/shared build:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
packages/shared build:     at Module.load (internal/modules/cjs/loader.js:979:32)
packages/shared build:     at Function.Module._load (internal/modules/cjs/loader.js:819:12)
packages/shared build:     at Module.require (internal/modules/cjs/loader.js:1003:19)
packages/shared build:     at require (internal/modules/cjs/helpers.js:107:18)
packages/shared build:     at Object.<anonymous> (/home/runner/work/vuepress-next/vuepress-next/node_modules/.pnpm/bundle-require@4.0.1_esbuild@0.17.12/node_modules/bundle-require/dist/index.cjs:43:[28](https://github.com/vuepress/vuepress-next/actions/runs/4460522851/jobs/7833719587?pr=1285#step:6:29))
packages/shared build: Failed

This is triggered with tsup > bundle-require > load-tsconfig.

Shall I open a new issue with it? The pr is here vuepress/core#1285


UPDATED: This is caused by load-tsconfig@0.2.4, rolling back to 0.2.3 is ok. @egoist This that package open source ? As I am not finding any repo information here

@egoist
Copy link
Owner

egoist commented Mar 19, 2023

@Mister-Hope should be fixed in load-tsconfig 0.2.5

@Mister-Hope
Copy link

Thanks for the quick fix🎉, I also open a pr at load-tsconfig to add repo field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants