File tree 3 files changed +10
-8
lines changed
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "version": {
3
+ "IN_VERSION_SCRIPT": "true"
4
+ }
5
+ }
Original file line number Diff line number Diff line change 14
14
"lint" : " eslint . --rulesdir eslint-internal-rules" ,
15
15
"lint:fix" : " eslint . --rulesdir eslint-internal-rules --fix" ,
16
16
"tsc" : " tsc" ,
17
- "preversion" : " npm test && npm run update && git add ." ,
18
- "version" : " npm run lint -- --fix && git add ." ,
17
+ "preversion" : " npm test && git add ." ,
18
+ "version" : " env-cmd -e version npm run update && npm run lint -- --fix && git add ." ,
19
19
"update" : " node ./tools/update.js" ,
20
20
"docs:watch" : " vuepress dev docs" ,
21
21
"predocs:build" : " npm run update" ,
66
66
"@typescript-eslint/parser" : " ^3.0.2" ,
67
67
"@vuepress/plugin-pwa" : " ^1.4.1" ,
68
68
"babel-eslint" : " ^10.1.0" ,
69
+ "env-cmd" : " ^10.1.0" ,
69
70
"eslint" : " ^7.0.0" ,
70
71
"eslint-config-prettier" : " ^6.11.0" ,
71
72
"eslint-plugin-eslint-plugin" : " ^2.2.1" ,
Original file line number Diff line number Diff line change @@ -67,12 +67,8 @@ function pickSince(content) {
67
67
return since [ 1 ]
68
68
}
69
69
}
70
- if (
71
- process . env . npm_package_version &&
72
- process . env . npm_package_version !== require ( '../package.json' ) . version
73
- ) {
74
- // Maybe version script
75
- return `v${ process . env . npm_package_version } `
70
+ if ( process . env . IN_VERSION_SCRIPT ) {
71
+ return `v${ require ( '../package.json' ) . version } `
76
72
}
77
73
return null
78
74
}
You can’t perform that action at this time.
0 commit comments