Skip to content

Commit 7323de4

Browse files
author
Linearb CI
committed
refactor: freeze dependencies for plugins and move it from runtime to build time
1 parent 22cbb9f commit 7323de4

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

action.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,11 @@ runs:
117117
shell: bash
118118
run: mv gitstream code
119119

120-
- name: Clear npm cache
121-
shell: bash
122-
run: npm cache clean --force
123-
124-
- name: Install Dependencies for plugins
125-
shell: bash
126-
continue-on-error: true
127-
run: npm i --ignore-scripts moment@2.30.1 lodash@4.18.1 axios@1.14.0 @octokit/rest@20.1.1
128-
129120
- name: Run RulesEngine
130121
shell: bash
131122
run: node ${{ github.action_path }}/dist/index.js
132123
env:
124+
NODE_PATH: ${{ github.action_path }}/dist/node_modules
133125
HEAD_REF: ${{ steps.safe-strings.outputs.head_ref }}
134126
BASE_REF: ${{ steps.safe-strings.outputs.base_ref }}
135127
CLIENT_PAYLOAD: ${{ steps.safe-strings.outputs.client_payload }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"format:check": "prettier --check .",
3131
"lint": "eslint .",
3232
"copy-wasm": "mkdir -p dist/node_modules/@wasm-fmt && cp -r node_modules/@wasm-fmt/ruff_fmt dist/node_modules/@wasm-fmt/",
33-
"package": "ncc build --minify src/index.ts -o dist --license licenses.txt --external @wasm-fmt/ruff_fmt --external isolated-vm && npm run copy-wasm",
33+
"vendor-plugins": "npm install --prefix dist --ignore-scripts --no-save moment@2.30.1 lodash@4.18.1 axios@1.14.0 @octokit/rest@20.1.1",
34+
"package": "ncc build --minify src/index.ts -o dist --license licenses.txt --external @wasm-fmt/ruff_fmt --external isolated-vm && npm run copy-wasm && npm run vendor-plugins",
3435
"test": "jest",
3536
"all": "npm run format:write && npm run lint && npm run test && npm run package",
3637
"create-tag": "./scripts/tag-version.sh",

0 commit comments

Comments
 (0)