You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this codebase, running make tests (essentially, npx mocha) runs unit tests over some TypeScript code, and completes successfully. The codebase has ts-node configured matching semver ^9.1.1.
After upgrading the package.jsonts-node entry to 10.0.0 in package.json file, and running npm install --also=dev, unit tests should continue to pass.
Actual Behavior
After the upgrade, unit tests fail:
TS_NODE_IGNORE='node_modules/(?!document-prev)' npx mocha
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/jka/Documents/reciperadar/document/src/index.spec.ts
at new NodeError (node:internal/errors:363:5)
at Loader.defaultGetFormat [as _getFormat] (node:internal/modules/esm/get_format:71:15)
at Loader.getFormat (node:internal/modules/esm/loader:105:42)
at Loader.getModuleJob (node:internal/modules/esm/loader:243:31)
at Loader.import (node:internal/modules/esm/loader:177:17)
at importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
at formattedImport (/home/jka/Documents/reciperadar/document/node_modules/mocha/lib/esm-utils.js:7:14)
at Object.exports.loadFilesAsync (/home/jka/Documents/reciperadar/document/node_modules/mocha/lib/esm-utils.js:55:20)
at singleRun (/home/jka/Documents/reciperadar/document/node_modules/mocha/lib/cli/run-helpers.js:125:3)
at Object.exports.handler (/home/jka/Documents/reciperadar/document/node_modules/mocha/lib/cli/run.js:362:5)
make: *** [Makefile:9: tests] Error 1
Steps to reproduce the problem
Update the devDependency entry for ts-node, reinstall dependencies (including dev), and then run make tests.
Minimal reproduction
I'll attempt to narrow this down and fill in the minimal repro case soon.
Not a regression, it's an improvement in our behavior to more closely align with nodejs, which is forcing you to use our ESM loader when your project uses "type": "module".
I believe that covers all the bases. If you need anything else, I recommend either the TypeScript Community Discord or our discussion forum. Both are linked from the navigation bar of our website: https://typestrong.org/ts-node
Expected Behavior
For this codebase, running
make tests
(essentially,npx mocha
) runs unit tests over some TypeScript code, and completes successfully. The codebase hasts-node
configured matching semver^9.1.1
.After upgrading the
package.json
ts-node
entry to 10.0.0 inpackage.json
file, and runningnpm install --also=dev
, unit tests should continue to pass.Actual Behavior
After the upgrade, unit tests fail:
Steps to reproduce the problem
Update the
devDependency
entry forts-node
, reinstall dependencies (including dev), and then runmake tests
.Minimal reproduction
I'll attempt to narrow this down and fill in the minimal repro case soon.
Specifications
The text was updated successfully, but these errors were encountered: