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

v11 beta #2077

Open
cspotcode opened this issue Oct 17, 2023 · 7 comments
Open

v11 beta #2077

cspotcode opened this issue Oct 17, 2023 · 7 comments

Comments

@cspotcode
Copy link
Collaborator

cspotcode commented Oct 17, 2023

v11 beta has been published to npm.

https://www.npmjs.com/package/ts-node/v/11.0.0-beta.1

npm install ts-node will not give you the beta by default.

You must do npm install ts-node@beta to install the beta tag.

I haven't had time to prepare release notes yet. They will accompany the v11 stable release. Until then, the commit log will have to suffice. It links to PRs which describe their changes, though their descriptions will not be as easy to read as documentation.

v10.9.1...v11.0.0-beta.1

@cspotcode cspotcode pinned this issue Oct 17, 2023
@meyfa
Copy link

meyfa commented Oct 17, 2023

I just tried the beta together with SWC and it works great, thank you!

@hornta
Copy link

hornta commented Oct 18, 2023

What's new in this version?

@cspotcode
Copy link
Collaborator Author

I haven't had time to prepare release notes yet. They will accompany the v11 stable release. Until then, the commit log will have to suffice. It links to PRs which describe their changes, though their descriptions will not be as easy to read as documentation.

v10.9.1...v11.0.0-beta.1

@ggascoigne
Copy link

I just tried the beta together with SWC and it works great, thank you!

I generally hate adding "me too" type comments, but I think that with a beta they have some value. I'd also run into issue with incompatibilities caused by changing swc behavior, simply upgrading from 10.9.1 to the new beta was seamless and worked perfectly. Thank you.

@stefandoorn
Copy link

Works good here with regards to #2000 as well.

@bbrzoska
Copy link

bbrzoska commented Nov 9, 2023

Works great, however when I specify moduleTypes to override files outside of the project, like this:

  "ts-node": {
    "swc": true,
    "transpileOnly": true,
    "experimentalSpecifierResolution": "node",
    "moduleTypes": {
      "../**/*": "mjs"
    }
  }

I'm getting this error:

TypeError [Error]: Cannot destructure property 'moduleType' of 'tsNodeService.moduleTypeClassifier.classifyModuleByModuleTypeOverrides(...)' as it is undefined.
    at getFormat (node_modules/ts-node/src/esm.ts:360:15)
    at async node_modules/ts-node/src/esm.ts:245:11
    at async addShortCircuitFlag (node_modules/ts-node/src/esm.ts:409:15)

The solution for me was to patch-package ts-node, and add a fallback for when classifyModuleByModuleTypeOverrides returns undefined, to return {moduleType: 'esm'} instead.

@blakeembrey
Copy link
Member

blakeembrey commented Dec 8, 2023

@cspotcode Would it be worth doing a sweep through the repo and remove any dead code or tech debt for v11 release? Some examples that come to mind would be:

  1. Bump minimum supported node.js version
  2. Bump minimum supported TypeScript version
  3. Combine ts-node/esm and ts-node/register into a single --import allowed for node 20
  4. Review any other hard to maintain features, such as the REPL?
  5. Clean up configuration into package.json? I see some issues around extends inheritance with TypeScript.
  6. Is including SWC support too much overhead to maintain?
  7. Fix exports to only exported the expected pieces? Remove the proxying to ./dist in ts-node/transpilers.

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

7 participants