Skip to content

Commit ff57abc

Browse files
arpitjain099styfle
andcommitted
ci: declare minimum permissions on PR title workflow
The Lint PR workflow only reads the pull request to validate its title via amannn/action-semantic-pull-request, so scope GITHUB_TOKEN to pull-requests: read. Co-authored-by: Steven <steven@ceriously.com> Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
1 parent b196fdf commit ff57abc

18 files changed

Lines changed: 6691 additions & 6295 deletions

.github/workflows/main.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,28 @@ jobs:
2323
with:
2424
node-version: 20.x
2525

26-
- name: Enable pnpm
27-
run: corepack enable pnpm
28-
2926
- name: Install dependencies
30-
run: pnpm install --frozen-lockfile
27+
run: yarn install --frozen-lockfile
3128
env:
3229
CI: true
3330

3431
- name: Build
35-
run: pnpm build
32+
run: yarn build
3633
env:
3734
CI: true
3835

3936
- name: Lint
40-
run: pnpm lint
37+
run: yarn lint
4138
env:
4239
CI: true
4340

4441
- name: Test
45-
run: pnpm test
42+
run: yarn test
4643
env:
4744
CI: true
4845

4946
- name: Test types
50-
run: pnpm test-types
47+
run: yarn test-types
5148
env:
5249
CI: true
5350

@@ -56,4 +53,4 @@ jobs:
5653
env:
5754
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5855
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
59-
run: pnpm semantic-release
56+
run: yarn semantic-release

.github/workflows/prs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- edited
77
- synchronize
88

9+
permissions:
10+
pull-requests: read
11+
912
jobs:
1013
main:
1114
runs-on: ubuntu-latest

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
package-lock=false
12
save-exact = true

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
"typings": "./index.d.ts",
2525
"scripts": {
2626
"build-babel": "bunchee src/babel.js -f cjs -e babel-plugin-macros --runtime node -o dist/babel/index.js",
27-
"build": "rm -rf dist && rm -rf out && pnpm build-webpack && pnpm build-index && pnpm build-babel",
27+
"build": "rm -rf dist && rm -rf out && yarn build-webpack && yarn build-index && yarn build-babel",
2828
"build-webpack": "bunchee src/webpack.js -f cjs --runtime node -o dist/webpack/index.js",
2929
"build-index": "bunchee src/index.js -f cjs --runtime node -o dist/index/index.js",
3030
"test": "ava",
3131
"test-types": "tsc --project tsconfig.json --noEmit",
3232
"lint": "eslint ./src",
3333
"format": "prettier --write \"./{src,test}/**/*.{js,css}\"",
34-
"prepublishOnly": "pnpm build && pnpm test && pnpm lint --quiet"
34+
"prepublishOnly": "yarn build && yarn test && yarn lint --quiet"
3535
},
3636
"husky": {
3737
"hooks": {
@@ -129,5 +129,5 @@
129129
"dependencies": {
130130
"client-only": "0.0.1"
131131
},
132-
"packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319"
132+
"packageManager": "yarn@1.22.22"
133133
}

0 commit comments

Comments
 (0)