File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change
1
+ const { version } = require ( '../package' ) ;
2
+ const changelog = String ( require ( 'fs' ) . readFileSync ( 'CHANGELOG.md' ) ) . split ( '\n' ) ;
3
+ if ( ! changelog . find ( line => line . startsWith ( '### ' + version ) ) ) {
4
+ throw new Error ( `The package.json version ${ version } does not seem to have a matching heading in CHANGELOG.json` ) ;
5
+ }
Original file line number Diff line number Diff line change 39
39
],
40
40
"main" : " ./out/src/extension" ,
41
41
"scripts" : {
42
- "vscode:prepublish" : " npm run lint && npm run compile" ,
42
+ "vscode:prepublish" : " npm run check:version && npm run lint && npm run compile" ,
43
43
"compile" : " tsc -p ./" ,
44
44
"watch" : " tsc -watch -p ./" ,
45
45
"lint" : " tslint --config ./tslint.json './src/**/*.ts'" ,
46
+ "check:version" : " node cmd/check-version.js" ,
46
47
"postinstall" : " node ./node_modules/vscode/bin/install"
47
48
},
48
49
"dependencies" : {
You can’t perform that action at this time.
0 commit comments