mirror of
https://github.com/misskey-dev/misskey
synced 2025-06-29 16:22:50 +02:00
* chore(deps): update node.js to v22.15.0 * chore: determine Jest args from Node.js version * fix * fix: `import.meta.dirname` is not supported in v20.10.0 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: zyoshoka <107108195+zyoshoka@users.noreply.github.com>
20 lines
619 B
JavaScript
20 lines
619 B
JavaScript
#!/usr/bin/env node
|
|
import child_process from 'node:child_process';
|
|
import path from 'node:path';
|
|
import url from 'node:url';
|
|
|
|
import semver from 'semver';
|
|
|
|
const __filename = url.fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
const args = [];
|
|
args.push(...[
|
|
...semver.satisfies(process.version, '^20.17.0 || ^22.0.0') ? ['--no-experimental-require-module'] : [],
|
|
'--experimental-vm-modules',
|
|
'--experimental-import-meta-resolve',
|
|
path.join(__dirname, 'node_modules/jest/bin/jest.js'),
|
|
...process.argv.slice(2),
|
|
]);
|
|
|
|
child_process.spawn(process.execPath, args, { stdio: 'inherit' });
|