diff --git a/bin/release.ts b/bin/release.ts index ac60ce6d4..22decc301 100644 --- a/bin/release.ts +++ b/bin/release.ts @@ -152,15 +152,9 @@ try { writeJson('./src/package.json', pkg); // run npm version `release` where release is patch, minor or major - run('npm install --package-lock-only', {cwd: 'src/'}); + run('pnpm install', {cwd: 'src/'}); // run npm install --package-lock-only <-- required??? - // Many users will be using the latest LTS version of npm, and the latest LTS version of npm uses - // lockfileVersion 1. Enforce v1 so that users don't see a (benign) compatibility warning. - const pkglock = readJson('./src/package-lock.json'); - pkglock.lockfileVersion = 1; - writeJson('./src/package-lock.json', pkglock); - run('git add src/package.json'); run('git add src/package-lock.json'); run('git commit -m "bump version"'); @@ -201,7 +195,7 @@ try { run('git pull --ff-only', {cwd: '../ether.github.com/'}); console.log('Committing documentation...'); run(`cp -R out/doc/ ../ether.github.com/public/doc/v'${newVersion}'`); - run(`npm version ${newVersion}`, {cwd: '../ether.github.com'}); + run(`pnpm version ${newVersion}`, {cwd: '../ether.github.com'}); run('git add .', {cwd: '../ether.github.com/'}); run(`git commit -m '${newVersion} docs'`, {cwd: '../ether.github.com/'}); } catch (err:any) { diff --git a/src/node/server.ts b/src/node/server.ts index 13d35a226..df6d21ffb 100755 --- a/src/node/server.ts +++ b/src/node/server.ts @@ -25,7 +25,7 @@ import {PluginType} from "./types/Plugin"; import {ErrorCaused} from "./types/ErrorCaused"; import log4js from 'log4js'; - +import pkg from '../package.json'; import {checkForMigration} from "../static/js/pluginfw/installer"; const settings = require('./utils/Settings'); @@ -42,8 +42,8 @@ if (settings.dumpOnUncleanExit) { * any modules that require newer versions of NodeJS */ const NodeVersion = require('./utils/NodeVersion'); -NodeVersion.enforceMinNodeVersion('12.17.0'); -NodeVersion.checkDeprecationStatus('12.17.0', '1.9.0'); +NodeVersion.enforceMinNodeVersion(pkg.engines.node.replace(">=", "")); +NodeVersion.checkDeprecationStatus(pkg.engines.node.replace(">=", ""), '2.1.0'); const UpdateCheck = require('./utils/UpdateCheck'); const db = require('./db/DB'); diff --git a/src/tsconfig.json b/src/tsconfig.json index a42ef0188..a7e5d6dc2 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -10,6 +10,7 @@ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ /* Type Checking */ + "resolvePackageJsonImports": true, "strict": true, /* Enable all strict type-checking options. */ /* Completeness */ "skipLibCheck": true /* Skip type checking all .d.ts files. */,