-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Node.js 20 support #46
Comments
@lukeed seems like the issue is between Could be related with nodejs/node#44710 |
Until it's fixed, you can use $ node -v
v20.0.0 $ cat package.json
{
"scripts": {
"test": "node -r tsm index.test.ts"
},
"devDependencies": {
"tsm": "^2.3.0",
"uvu": "^0.5.6"
}
} $ cat index.test.ts
import { test } from 'uvu'; test('one', () => {}); test.run() $ npm run test
> test
> node -r tsm index.test.ts
• (1 / 1)
Total: 1
Passed: 1
Skipped: 0
Duration: 0.36ms
|
My previous answer was incorrect. Perhaps, I didn't understand the problem right away. When I used $ cat package.json
{
"type": "module",
"scripts": {
"test": "node --loader tsm index.test.ts"
},
"devDependencies": {
"tsm": "^2.3.0",
"uvu": "^0.5.6"
}
} $ npm run test
> test
> node --loader tsm index.test.ts
(node:19810) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:19810) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:19810) DeprecationWarning: Obsolete loader hook(s) supplied and will be ignored: getFormat, transformSource |
Fixed in Node.js 20.1.0 |
Closing as it appears to have been a Node thing |
Still a Node issue. 🙄 ESM loaders in 20.x lost access to Also reverting #47 for the time being |
Still seeings problems with node v20.11.1
package.json {
"name": "x-x-x-x",
"version": "0.1.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"dev": "node --require dotenv/config --loader tsm src/index.ts",
"test": "node --test .",
"lint": "eslint . --max-warnings 0"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@kaching-hq/typescript-config": "workspace:^",
"dotenv": "^16.4.5",
"tsm": "^2.3.0",
"typescript": "^5.4.2"
},
"dependencies": {
"firebase-admin": "^12.0.0",
"googleapis": "^134.0.0"
}
}
|
Reproduction:
Node.js 19.9.0 output:
Node.js 20.0.0 output:
The text was updated successfully, but these errors were encountered: