Skip to content

Commit

Permalink
adds lavamoat allow scripts, adds setup command to use instead of ins…
Browse files Browse the repository at this point in the history
…tall
  • Loading branch information
aristidesstaffieri committed Jul 21, 2023
1 parent 8ca74b5 commit bb00b8b
Show file tree
Hide file tree
Showing 7 changed files with 632 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/runTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 16.14.0
- run: yarn install
- run: yarn setup
- run: yarn build:freighter-api
- run: yarn test:ci
2 changes: 1 addition & 1 deletion .github/workflows/submitBeta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: "16.14"
- run: yarn install && yarn build:freighter-api && yarn build:extension:production
- run: yarn setup && yarn build:freighter-api && yarn build:extension:production
- name: Use BETA icons
run: |
rm -rf ./extension/build/images
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/submitProduction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: "16.14"
- run: yarn install && yarn build:freighter-api && yarn build:extension:production --define 'process.env.AMPLITUDE_KEY="${{ secrets.AMPLITUDE_KEY }}"' --define 'process.env.SENTRY_KEY="${{ secrets.SENTRY_KEY }}"'
- run: yarn setup && yarn build:freighter-api && yarn build:extension:production --define 'process.env.AMPLITUDE_KEY="${{ secrets.AMPLITUDE_KEY }}"' --define 'process.env.SENTRY_KEY="${{ secrets.SENTRY_KEY }}"'
- name: Install zip
uses: montudor/action-zip@c25e01d7489d0274569440a2f0281b4569df16bc #v0.1.1
- name: Zip extension build
Expand Down
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-scripts true
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enableScripts: false
17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"**/terser-webpack-plugin": "^1.4.3"
},
"scripts": {
"setup": "yarn install && yarn allow-scripts",
"build": "run-p --print-label build:freighter-api build:docs build:extension",
"build:netlify": "cd docs && npm i && npm run build",
"build:extension-preview": "run-s build:freighter-api build:extension:experimental",
Expand All @@ -32,7 +33,7 @@
"start:extension": "yarn workspace extension start",
"start:extension:experimental": "yarn workspace extension start:experimental",
"start:unpacked": "yarn workspace extension start:unpacked-extension",
"install-if-package-changed": "git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep --quiet yarn.lock && yarn install || exit 0",
"install-if-package-changed": "git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep --quiet yarn.lock && yarn setup || exit 0",
"test:ci": "jest --ci",
"test": "jest -o --watch",
"prepare": "husky install"
Expand Down Expand Up @@ -84,6 +85,7 @@
"babel-loader": "^8.3.0",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-polyfill": "6.26.0",
"can-i-ignore-scripts": "^0.1.9",
"eslint": "7.12.1",
"eslint-config-prettier": "^6.10.0",
"eslint-config-react-app": "^5.2.1",
Expand Down Expand Up @@ -113,5 +115,18 @@
"webpack-cli": "3.3.10",
"webpack-dev-server": "3.10.3",
"webpack-merge": "4.2.2"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^2.3.1",
"@lavamoat/preinstall-always-fail": "^1.0.0"
},
"lavamoat": {
"allowScripts": {
"@lavamoat/preinstall-always-fail": false,
"@testing-library/dom>aria-query>@babel/runtime-corejs3>core-js-pure": false,
"babel-polyfill>core-js": false,
"webpack-dev-server>chokidar>fsevents": true,
"webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": true
}
}
}
Loading

0 comments on commit bb00b8b

Please sign in to comment.