mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 14:19:58 +00:00
use engines config in order to support nix-shell (#5521)
* add shell.nix * use engines * fix engine range * fix
This commit is contained in:
parent
9e1e05a8c3
commit
ac0dd5e4b3
5
package-lock.json
generated
5
package-lock.json
generated
@ -7,7 +7,6 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "insomnia",
|
"name": "insomnia",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"hasInstallScript": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@jest/globals": "^28.1.0",
|
"@jest/globals": "^28.1.0",
|
||||||
@ -37,6 +36,10 @@
|
|||||||
"ts-jest": "^28.0.1",
|
"ts-jest": "^28.0.1",
|
||||||
"type-fest": "^2.12.0",
|
"type-fest": "^2.12.0",
|
||||||
"typescript": "^4.5.5"
|
"typescript": "^4.5.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16.17 <17",
|
||||||
|
"npm": ">=8.15.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
|
@ -10,12 +10,16 @@
|
|||||||
"url": "https://github.com/kong/insomnia/issues"
|
"url": "https://github.com/kong/insomnia/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/kong/insomnia#readme",
|
"homepage": "https://github.com/kong/insomnia#readme",
|
||||||
|
"engines":{
|
||||||
|
"node": ">=16.17 <17",
|
||||||
|
"npm": ">=8.15.0"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "lerna run build --parallel",
|
"build": "lerna run build --parallel",
|
||||||
"lint": "lerna run lint --stream --no-bail",
|
"lint": "lerna run lint --stream --no-bail",
|
||||||
"lint:markdown": "markdownlint-cli2 \"**/*.md\" \"#**/node_modules\"",
|
"lint:markdown": "markdownlint-cli2 \"**/*.md\" \"#**/node_modules\"",
|
||||||
"lint:fix": "lerna run lint:fix --stream --no-bail",
|
"lint:fix": "lerna run lint:fix --stream --no-bail",
|
||||||
"bootstrap": "npm install && lerna bootstrap && lerna run --stream bootstrap",
|
"bootstrap": " npx -y check-engine && npm install && lerna bootstrap && lerna run --stream bootstrap",
|
||||||
"version": "lerna version",
|
"version": "lerna version",
|
||||||
"clean": "lerna run clean --parallel --stream && lerna clean --yes && rimraf node_modules **/*.tsbuildinfo",
|
"clean": "lerna run clean --parallel --stream && lerna clean --yes && rimraf node_modules **/*.tsbuildinfo",
|
||||||
"test": "lerna run --stream --parallel test",
|
"test": "lerna run --stream --parallel test",
|
||||||
@ -28,7 +32,6 @@
|
|||||||
"app-build": "npm run build --prefix packages/insomnia",
|
"app-build": "npm run build --prefix packages/insomnia",
|
||||||
"app-package": "npm run build --prefix packages/insomnia && npm run package --prefix packages/insomnia",
|
"app-package": "npm run build --prefix packages/insomnia && npm run package --prefix packages/insomnia",
|
||||||
"app-bump-version": "npm run bump-version --prefix packages/insomnia",
|
"app-bump-version": "npm run bump-version --prefix packages/insomnia",
|
||||||
"preinstall": "node ./scripts/check-version.js",
|
|
||||||
"test:smoke:dev": "npm run test:dev --prefix packages/insomnia-smoke-test -- --project=Smoke",
|
"test:smoke:dev": "npm run test:dev --prefix packages/insomnia-smoke-test -- --project=Smoke",
|
||||||
"test:smoke:build": "npm run test:build --prefix packages/insomnia-smoke-test -- --project=Smoke",
|
"test:smoke:build": "npm run test:build --prefix packages/insomnia-smoke-test -- --project=Smoke",
|
||||||
"test:smoke:package": "npm run test:package --prefix packages/insomnia-smoke-test -- --project=Smoke",
|
"test:smoke:package": "npm run test:package --prefix packages/insomnia-smoke-test -- --project=Smoke",
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
// TODO(TSCONVERSION) convert to TypeScript?
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
const GREEN_FG = '\x1b[32m';
|
|
||||||
const RED_FG = '\x1b[31m';
|
|
||||||
const YELLOW_FG = '\x1b[33m';
|
|
||||||
const UNDERSCORE = '\x1b[4m';
|
|
||||||
const BRIGHT = '\x1b[1m';
|
|
||||||
const RESET = '\x1b[0m';
|
|
||||||
|
|
||||||
const foundNodeVersion = process.versions.node;
|
|
||||||
const expectedNodeVersion = fs
|
|
||||||
.readFileSync('.nvmrc')
|
|
||||||
.toString()
|
|
||||||
.trim();
|
|
||||||
|
|
||||||
if (foundNodeVersion !== expectedNodeVersion) {
|
|
||||||
console.log(`${BRIGHT}${RED_FG}Incorrect node version installed ...${RESET}\n`);
|
|
||||||
console.log(`Current node version -> ${RED_FG}${foundNodeVersion}${RESET}`);
|
|
||||||
console.log(`Expected node version -> ${GREEN_FG}${expectedNodeVersion}${RESET}`);
|
|
||||||
console.log();
|
|
||||||
console.log(
|
|
||||||
`One solution to manage multiple versions of node is nvm, visit ${UNDERSCORE}https://github.com/nvm-sh/nvm${RESET}`,
|
|
||||||
);
|
|
||||||
console.log();
|
|
||||||
console.log(
|
|
||||||
`${BRIGHT}${YELLOW_FG}Remember to 'npm run clean && npm run bootstrap' after installing the expected version.${RESET}`,
|
|
||||||
);
|
|
||||||
console.log();
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user