Skip to content

Commit

Permalink
Yarn & Node.js upgrade (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
mutantcornholio authored Jun 20, 2024
1 parent 8c7a284 commit 6132aa2
Show file tree
Hide file tree
Showing 8 changed files with 8,244 additions and 4,792 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/javascript-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable
- run: yarn run ${{ matrix.command }}

conclude:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/node_modules
/dist*
.env
.yarn/install-state.gz

# Editor directories and files
.vscode/*
Expand Down
894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.3.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.3.0.cjs
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
FROM node:20 as Builder
FROM node:22 as Builder

WORKDIR /action

COPY package.json yarn.lock ./
COPY .yarn/ ./.yarn/
COPY package.json yarn.lock .yarnrc.yml ./

RUN yarn install --frozen-lockfile
RUN yarn install --immutable

COPY . .

RUN yarn run build

FROM node:20-slim
FROM node:22-slim

COPY --from=Builder /action/dist /action

Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"build": "ncc build --license LICENSE",
"cli": "ncc build src/cli.ts -o dist-cli && node dist-cli",
"test": "jest",
"fix": "eslint --fix '{src,test}/**/*'",
"lint": "eslint '{src,test}/**/*'"
"fix": "npx eslint --fix 'src/**/*.ts' && npx prettier --write 'src/**/*.{ts,yml}'",
"lint": "npx eslint 'src/**/*.ts' && npx prettier --check 'src/**/*.{ts,yml}'"
},
"engines": {
"node": ">=20.0.0"
"node": ">=22.0.0"
},
"repository": {
"type": "git",
Expand All @@ -25,21 +25,22 @@
},
"homepage": "https://github.com/paritytech/review-bot#readme",
"devDependencies": {
"@eng-automation/js-style": "^2.3.0",
"@eng-automation/js-style": "^3.1.0",
"@octokit/webhooks-types": "^7.3.1",
"@types/jest": "^29.5.11",
"@vercel/ncc": "^0.38.1",
"jest": "^29.7.0",
"jest-mock-extended": "^3.0.5",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
},
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"@eng-automation/js": "^1.0.2",
"@polkadot/api": "^10.13.1",
"joi": "^17.6.4",
"@eng-automation/js": "^2.2.0",
"@polkadot/api": "^11.3.1",
"joi": "^17.13.1",
"yaml": "^2.3.4"
}
},
"packageManager": "[email protected]"
}
12 changes: 6 additions & 6 deletions src/test/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
rules:
- name: CI files
condition:
include:
include:
- ^\.gitlab-ci\.yml
- ^docker/.*
- ^\.github/.*
- ^\.gitlab/.*
- ^\.config/nextest.toml
- ^\.cargo/.*
exclude:
exclude:
- ^./gitlab/pipeline/zombienet.yml$
minApprovals: 2
type: basic
Expand All @@ -19,12 +19,12 @@ rules:
- name: Audit rules
type: basic
condition:
include:
include:
- ^polkadot/runtime\/(kusama|polkadot|common)\/.*
- ^polkadot/primitives/src\/.+\.rs$
- ^substrate/primitives/.*
- ^substrate/frame/.*
exclude:
exclude:
- ^polkadot/runtime\/(kusama|polkadot)\/src\/weights\/.+\.rs$
- ^substrate\/frame\/.+\.md$
minApprovals: 2
Expand Down Expand Up @@ -77,7 +77,7 @@ rules:
# if there are any changes in the bridges subtree (in case of backport changes back to bridges repo)
- name: Bridges subtree files
type: basic
condition:
condition:
include:
- ^cumulus/bridges/.*
minApprovals: 1
Expand All @@ -88,7 +88,7 @@ rules:

- name: FRAME coders substrate
condition:
include:
include:
- ^substrate/frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
type: "and"
reviewers:
Expand Down
Loading

0 comments on commit 6132aa2

Please sign in to comment.