Closed tegefaulkes closed 1 year ago
Looks like almost everything is working. All but two tests are failing.
parallelized batch put and del
parallelized get and put and del
With the following errors.
GLOBAL SETUP
/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/dist/transpilers/swc.js:202
throw new Error(`${swcDepName} threw an error when attempting to validate swc compiler options.\n` +
^
Error: @swc/core threw an error when attempting to validate swc compiler options.
You may be using an old version of swc which does not support the options used by ts-node.
Try upgrading to the latest version of swc.
Error message from swc:
Failed to deserialize buffer as swc::config::Options
JSON: {"sourceMaps":true,"module":{"noInterop":false,"type":"commonjs","strictMode":true,"ignoreDynamic":false},"swcrc":false,"jsc":{"parser":{"syntax":"typescript","tsx":false,"decorators":true,"dynamicImport":true,"importAssertions":true},"target":"es2022","transform":{"legacyDecorator":true,"react":{"throwIfNamespace":false,"useBuiltins":false}},"keepClassNames":true,"experimental":{"keepImportAssertions":true}}}
Caused by:
unknown field `keepImportAssertions`, expected one of `plugins`, `keepImportAttributes`, `emitAssertForImportAttributes`, `cacheRoot`, `disableBuiltinTransformsForInternalTesting` at line 1 column 413
at createVariant (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/transpilers/swc.ts:262:13)
at createSwcOptions (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/transpilers/swc.ts:211:25)
at create (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/transpilers/swc.ts:56:41)
at createTranspiler (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/index.ts:784:16)
at createTranspileOnlyGetOutputFunction (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/index.ts:1341:28)
at createFromPreloadedConfig (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/index.ts:1404:34)
at create (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/index.ts:624:10)
at Object.register (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/index.ts:591:15)
at Object.<anonymous> (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/register/transpile-only.js:1:16)
at Module._compile (node:internal/modules/cjs/loader:1233:14)
/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/dist/transpilers/swc.js:202
throw new Error(`${swcDepName} threw an error when attempting to validate swc compiler options.\n` +
^
Error: @swc/core threw an error when attempting to validate swc compiler options.
You may be using an old version of swc which does not support the options used by ts-node.
Try upgrading to the latest version of swc.
Error message from swc:
Failed to deserialize buffer as swc::config::Options
JSON: {"sourceMaps":true,"module":{"noInterop":false,"type":"commonjs","strictMode":true,"ignoreDynamic":false},"swcrc":false,"jsc":{"parser":{"syntax":"typescript","tsx":false,"decorators":true,"dynamicImport":true,"importAssertions":true},"target":"es2022","transform":{"legacyDecorator":true,"react":{"throwIfNamespace":false,"useBuiltins":false}},"keepClassNames":true,"experimental":{"keepImportAssertions":true}}}
Caused by:
unknown field `keepImportAssertions`, expected one of `plugins`, `keepImportAttributes`, `emitAssertForImportAttributes`, `cacheRoot`, `disableBuiltinTransformsForInternalTesting` at line 1 column 413
at createVariant (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/transpilers/swc.ts:262:13)
at createSwcOptions (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/transpilers/swc.ts:211:25)
at create (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/transpilers/swc.ts:56:41)
at createTranspiler (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/index.ts:784:16)
at createTranspileOnlyGetOutputFunction (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/index.ts:1341:28)
at createFromPreloadedConfig (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/index.ts:1404:34)
at create (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/index.ts:624:10)
at Object.register (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/src/index.ts:591:15)
at Object.<anonymous> (/home/faulkes/matrixcode/polykey/js-db/node_modules/ts-node/register/transpile-only.js:1:16)
at Module._compile (node:internal/modules/cjs/loader:1233:14)
I'm still looking into this.
You also need to update all scripts to support node 20 too. See https://github.com/MatrixAI/js-async-init/commit/300d01ee3a6bd20e701397b998f4433459cbc6dc
Should also update .eslintrc
https://github.com/MatrixAI/js-async-init/commit/7679c5b94768a26bda39ed4632b829de952473ed
You also need to update js-errors
:
"@matrixai/errors": "^1.2.0",
The js-async-init
staging is on ESM. Use the 1.9.x
series.
The js-errors
staging is on ESM. Use the 1.2.x
series.
If your swc is broken, try:
rm -rf ./node_modules
rm package-lock.json
exit
nix-shell
If that doesn't work, do the same thing but also delete rm -rf ~/.npm
.
AS per https://github.com/MatrixAI/js-workers/pull/13, @swc/core
needs to be pinned to 1.3.82
Looks good, merging. I'll update the `js-workers dep in staging. getting a headstart on CI.
Nice!
Description
In this PR we are updating to node 20. This includes nix changes and package updates.
Issues Fixed
Tasks
js-quic
as reference.Final checklist