Skip to content

Commit

Permalink
chore: update version check script
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Nov 26, 2021
1 parent 76e3a1a commit ad51ca9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
13 changes: 7 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"is-ci": "^3.0.1",
"lint-staged": "^12.1.2",
"mocha": "^9.1.3",
"picocolors": "^1.0.0",
"process": "^0.11.10",
"ts-loader": "^9.2.6",
"typescript": "^4.5.2",
Expand Down
7 changes: 5 additions & 2 deletions scripts/check-engine.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
const color = require('picocolors');

const pkg = require('../package.json');
const pkgLock = require('../package-lock.json');

const vscodeVersion = parseFloat(pkg.engines.vscode.substring(1));
const typesVscodeVersion = parseFloat(pkg.devDependencies['@types/vscode'].substring(1));

if (vscodeVersion !== typesVscodeVersion) {
console.error('Err: Vscode Engines version and \'@types/vscode\' version doesn\'t match');
const msg = color.red('Err: Version specified in engines.vscode and \'@types/vscode\' doesn\'t match');
console.error(msg);
process.exit(1);
}

if (pkg.version !== pkgLock.version) {
console.error('Err: Manifest and lock file version mismatch');
console.error(color.red('Err: Manifest and lock file version mismatch'));
process.exit(1);
}

0 comments on commit ad51ca9

Please sign in to comment.