From 221eeeb76dbfdb78176b79adc0990a4e656efead Mon Sep 17 00:00:00 2001 From: Justin Wiegmann Date: Tue, 9 Apr 2024 15:25:02 +0200 Subject: [PATCH] feat(shrink proxy): bundles in fsxa-api are large which causes performance problems - fix versioning for proxy package TNG-1347 --- extractVersion.js | 2 ++ package.json | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 extractVersion.js diff --git a/extractVersion.js b/extractVersion.js new file mode 100644 index 0000000..ecb3754 --- /dev/null +++ b/extractVersion.js @@ -0,0 +1,2 @@ +const { version } = require('./package.json') +console.log(version) \ No newline at end of file diff --git a/package.json b/package.json index 05f0226..94c7a20 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "build:remote": "tsc --module commonjs --project tsconfig.build.json", "build:proxy": "tsc --module commonjs --project tsconfig.proxy.json", "build": "tsc --module commonjs --project tsconfig.build.json && tsc --module commonjs --project tsconfig.proxy.json && npm run build:remote && npm run build:proxy && rollup -c rollup.config.ts", - "version:dev": "export NEW_VER=$(npm version prerelease --no-git-tag-version --preid alpha); npm version --workspace proxy ${NEW_VER}", + "version:dev": "npm version prerelease --no-git-tag-version --preid alpha", "build:local": "rimraf fsxa-api-*.tgz && npm run version:dev && npm run build && npm pack && npm pack --workspace proxy", "start": "rollup -c rollup.config.ts -w", "test": "jest --verbose ./src", @@ -48,7 +48,8 @@ "commitmsg": "commitlint -E HUSKY_GIT_PARAMS", "dts": "./node_modules/.bin/npm-dts generate -e ./src/FSXAApi.ts", "dev": "npx nodemon dev/index.ts --ignore ./**/dist", - "postpublish": "npm publish --workspace proxy" + "postpublish": "npm publish --workspace proxy", + "version": "npm version --workspace proxy \"$(node extractVersion.js)\"" }, "lint-staged": { "{src,test}/**/*.ts": [