Skip to content

Commit 387ee27

Browse files
authored
Fix version file update on publish (#513)
When we publish the JavaScript packages the `version.ts` file in the JavaScript package wasn't being updated. This was because the `versionfile` script wasn't run on publish causing the reported version of the last few releases to be stuck on 1.3.12. This should work because mono will update the `package.json` before the build step with the new version. Updating the `version.ts` file after the build should be fine, could also be done beforehand, it should not matter. (The publish step will also call `yarn publish` with the `--new-version #.#.#` option, and attempt to update the `package.json` with the new version, but this doesn't do anything as mono already updated the `package.json` with the new version beforehand.) Fixes #512
1 parent 46f731a commit 387ee27

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
bump: "patch"
3+
---
4+
5+
Fix the reported library version of the JavaScript package. This was stuck on 1.3.12 for the last few releases.

packages/javascript/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"license": "MIT",
99
"scripts": {
1010
"build": "yarn build:cjs && yarn build:esm",
11+
"postbuild": "yarn versionfile",
1112
"build:esm": "tsc -p tsconfig.esm.json",
1213
"build:esm:watch": "tsc -p tsconfig.esm.json -w --preserveWatchOutput",
1314
"build:cjs": "tsc -p tsconfig.cjs.json",

packages/javascript/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Do not touch this file, auto-generated by scripts/create-version
2-
export const VERSION = "1.3.12"
2+
export const VERSION = "1.3.18"

0 commit comments

Comments
 (0)