With Node 22.1.0 (tried with 10.3.0 as that’s mentioned in the benchmarks but also got an error).
Clone trouter
npm i
npm test
Result:
> trouter@4.0.0 test
> uvu -r esm test
(node:3170012) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
/var/home/aral/Projects/kitten/forks/trouter/test/index.js:1
(function (exports, require, module, __filename, __dirname) { import { test } from 'uvu';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at makeContextifyScript (node:internal/vm:185:14)
at wrapSafe (node:internal/modules/cjs/loader:1362:20)
at Module._compile (node:internal/modules/cjs/loader:1425:20)
at Module._extensions..js (node:internal/modules/cjs/loader:1564:10)
at Module.load (node:internal/modules/cjs/loader:1287:32)
at Module._load (node:internal/modules/cjs/loader:1103:12)
at Module.require (node:internal/modules/cjs/loader:1310:19)
at require (node:internal/modules/helpers:179:18)
at /var/home/aral/Projects/kitten/forks/trouter/node_modules/uvu/run/index.js:9:3
at Array.forEach (<anonymous>)
With Node 22.1.0 (tried with 10.3.0 as that’s mentioned in the benchmarks but also got an error).
npm i
npm test
Result: