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

Fix CI by upgrading ts-node #1424

Merged
merged 1 commit into from
May 15, 2023
Merged

Conversation

NullVoxPopuli
Copy link
Collaborator

@NullVoxPopuli NullVoxPopuli commented May 12, 2023

The older version of ts-node was throwing errors related to some internal TS APIs,

Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.
    at Object.resolveTypeReferenceDirective (<repo>/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:43495:18)
    at <repo>/node_modules/.pnpm/[email protected][email protected]/node_modules/ts-node/src/index.ts:623:55
    at Array.map (<anonymous>)
    at Object.resolveTypeReferenceDirectives (<repo>/node_modules/.pnpm/[email protected][email protected]/node_modules/ts-node/src/index.ts:622:33)
    at actualResolveTypeReferenceDirectiveNamesWorker (<repo>/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:119374:163)
    at resolveTypeReferenceDirectiveNamesWorker (<repo>/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:119674:26)
    at processTypeReferenceDirectives (<repo>/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:121177:31)
    at findSourceFileWorker (<repo>/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:121062:21)
    at findSourceFile (<repo>/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:120914:26)
    at processImportedModules (<repo>/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:121323:25)
    at makeError (<repo>/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:59:11)
    at handlePromise (<repo>/node_modules/.pnpm/[email protected]/node_modules/execa/index.js:114:26)

This was preventing CI from running as the list of scenarios could not be generated.

The breaking changes for v10 are around ESM, internal stuff, and loading the compiler nearest the tsconfig.json: https://github.com/TypeStrong/ts-node/releases/tag/v10.0.0

  • We aren't using ESM (all node code is emitted and interpreted as CJS, afaict)
  • We aren't using the mentioned internal stuff
  • And using the compiler closest to the tsconfig.json is what we want in this repo

"lodash": "^4.17.20",
"qunit": "^2.16.0",
"resolve": "^1.20.0",
"scenario-tester": "^2.1.2",
"semver": "^7.3.8",
"ts-node": "^9.1.1"
"ts-node": "^10.9.1"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i bumped this via pnpm up -iL -- looks like pnpm sorted everything

Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@NullVoxPopuli NullVoxPopuli merged commit 16dc72c into embroider-build:main May 15, 2023
@NullVoxPopuli NullVoxPopuli deleted the fix-ci branch May 15, 2023 16:45
@ef4 ef4 added the bug Something isn't working label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants