diff --git a/build.config.ts b/build.config.ts index 50ef8cc6..69561dba 100644 --- a/build.config.ts +++ b/build.config.ts @@ -5,6 +5,7 @@ import { defineBuildConfig, type Config } from '#src' import pathe from '@flex-development/pathe' +import { at } from '@flex-development/tutils' import pkg from './package.json' assert { type: 'json' } import tsconfig from './tsconfig.build.json' assert { type: 'json' } @@ -64,7 +65,7 @@ const config: Config = defineBuildConfig({ minifySyntax: true, sourceRoot: 'file' + pathe.delimiter + pathe.sep.repeat(2), target: [ - pkg.engines.node.replace(/^\D+/, 'node'), + 'node' + at(/([\d.]+)/.exec(pkg.engines.node), 0, ''), tsconfig.compilerOptions.target ], tsconfig: 'tsconfig.build.json' diff --git a/package.json b/package.json index c57b9a45..928f0ca9 100644 --- a/package.json +++ b/package.json @@ -201,7 +201,7 @@ "esbuild": "0.19.2" }, "engines": { - "node": ">=16.20.0", + "node": ">=16.20.0 <20.6.0 || >20.6.0", "yarn": "4.0.0-rc.50" }, "packageManager": "yarn@4.0.0-rc.50", diff --git a/src/internal/__tests__/create-context.spec.ts b/src/internal/__tests__/create-context.spec.ts index 8774c6fe..eefdcc29 100644 --- a/src/internal/__tests__/create-context.spec.ts +++ b/src/internal/__tests__/create-context.spec.ts @@ -17,7 +17,7 @@ describe('unit:internal/createContext', () => { ignore: ['cli/**'], sourcemap: true, sourcesContent: false, - target: pkg.engines.node.replace(/^\D+/, 'node'), + target: 'node16.20.0', tsconfig: 'tsconfig.build.json' }