Skip to content

Commit 8661b6a

Browse files
authored
chore: Setup volta (#107)
* chore: Setup volta * chore(ci): make CI use volta
1 parent 46ba891 commit 8661b6a

File tree

11 files changed

+54
-28
lines changed

11 files changed

+54
-28
lines changed

.github/workflows/checks.yml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,13 @@ on:
77
- release/**
88
pull_request:
99

10-
env:
11-
# We pin the exact version to enforce reproducable builds with node + npm.
12-
DEFAULT_NODE_VERSION: "16.15.1"
13-
1410
jobs:
1511
build:
1612
name: Build packages
1713
runs-on: ubuntu-latest
1814
steps:
1915
- uses: actions/checkout@v3
20-
- uses: actions/setup-node@v3
21-
with:
22-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
16+
- uses: volta-cli/action@v3
2317
- run: yarn --frozen-lockfile
2418
- run: yarn build
2519

@@ -29,9 +23,7 @@ jobs:
2923
runs-on: ubuntu-latest
3024
steps:
3125
- uses: actions/checkout@v3
32-
- uses: actions/setup-node@v3
33-
with:
34-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
26+
- uses: volta-cli/action@v3
3527
- run: yarn --frozen-lockfile
3628
- run: yarn check:types
3729

@@ -40,9 +32,7 @@ jobs:
4032
runs-on: ubuntu-latest
4133
steps:
4234
- uses: actions/checkout@v3
43-
- uses: actions/setup-node@v3
44-
with:
45-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
35+
- uses: volta-cli/action@v3
4636
- run: yarn --frozen-lockfile
4737
- run: yarn check:formatting
4838

@@ -52,9 +42,7 @@ jobs:
5242
runs-on: ubuntu-latest
5343
steps:
5444
- uses: actions/checkout@v3
55-
- uses: actions/setup-node@v3
56-
with:
57-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
45+
- uses: volta-cli/action@v3
5846
- run: yarn --frozen-lockfile
5947
- run: yarn test:unit
6048

@@ -64,9 +52,7 @@ jobs:
6452
runs-on: ubuntu-latest
6553
steps:
6654
- uses: actions/checkout@v3
67-
- uses: actions/setup-node@v3
68-
with:
69-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
55+
- uses: volta-cli/action@v3
7056
- run: yarn --frozen-lockfile
7157
- run: yarn test:integration
7258

@@ -78,9 +64,7 @@ jobs:
7864
SENTRY_AUTH_TOKEN: ${{ secrets.E2E_TESTS_SENTRY_AUTH_TOKEN }}
7965
steps:
8066
- uses: actions/checkout@v3
81-
- uses: actions/setup-node@v3
82-
with:
83-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
67+
- uses: volta-cli/action@v3
8468
- run: yarn --frozen-lockfile
8569
- run: yarn test:e2e
8670

@@ -90,9 +74,7 @@ jobs:
9074
runs-on: ubuntu-latest
9175
steps:
9276
- uses: actions/checkout@v3
93-
- uses: actions/setup-node@v3
94-
with:
95-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
77+
- uses: volta-cli/action@v3
9678
- run: yarn --frozen-lockfile
9779
- run: yarn lint
9880

@@ -104,9 +86,7 @@ jobs:
10486
if: startsWith(github.ref, 'refs/heads/release/')
10587
steps:
10688
- uses: actions/checkout@v3
107-
- uses: actions/setup-node@v3
108-
with:
109-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
89+
- uses: volta-cli/action@v3
11090
# - name: Check dependency cache
11191
# uses: actions/cache@v3
11292
# with:

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,9 @@
3535
"prettier": "^2.7.1",
3636
"pretty-quick": "^3.1.3",
3737
"npm-run-all": "^4.1.5"
38+
},
39+
"volta": {
40+
"node": "14.21.1",
41+
"yarn": "1.22.19"
3842
}
3943
}

packages/bundler-plugin-core/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,11 @@
6666
"rimraf": "^3.0.2",
6767
"rollup": "2.75.7",
6868
"typescript": "^4.7.4"
69+
},
70+
"volta": {
71+
"extends": "../../package.json"
72+
},
73+
"engines": {
74+
"node": ">= 10"
6975
}
7076
}

packages/e2e-tests/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@
3838
"vite": "3.0.0",
3939
"webpack": "5.74.0",
4040
"webpack4": "npm:[email protected]"
41+
},
42+
"volta": {
43+
"extends": "../../package.json"
4144
}
4245
}

packages/esbuild-plugin/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,11 @@
6161
"rimraf": "^3.0.2",
6262
"rollup": "2.75.7",
6363
"typescript": "^4.7.4"
64+
},
65+
"volta": {
66+
"extends": "../../package.json"
67+
},
68+
"engines": {
69+
"node": ">= 10"
6470
}
6571
}

packages/eslint-configs/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@
2020
"scripts": {
2121
"clean:all": "run-s clean:deps",
2222
"clean:deps": "rimraf node_modules"
23+
},
24+
"volta": {
25+
"extends": "../../package.json"
2326
}
2427
}

packages/integration-tests/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@
2929
"vite": "3.0.0",
3030
"webpack": "5.74.0",
3131
"webpack4": "npm:[email protected]"
32+
},
33+
"volta": {
34+
"extends": "../../package.json"
3235
}
3336
}

packages/playground/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@
3030
"vite": "3.0.0",
3131
"webpack": "5.74.0",
3232
"webpack4": "npm:[email protected]"
33+
},
34+
"volta": {
35+
"extends": "../../package.json"
3336
}
3437
}

packages/rollup-plugin/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,11 @@
6262
"rimraf": "^3.0.2",
6363
"rollup": "2.75.7",
6464
"typescript": "^4.7.4"
65+
},
66+
"volta": {
67+
"extends": "../../package.json"
68+
},
69+
"engines": {
70+
"node": ">= 10"
6571
}
6672
}

packages/vite-plugin/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,11 @@
6161
"rimraf": "^3.0.2",
6262
"rollup": "2.75.7",
6363
"typescript": "^4.7.4"
64+
},
65+
"volta": {
66+
"extends": "../../package.json"
67+
},
68+
"engines": {
69+
"node": ">= 10"
6470
}
6571
}

0 commit comments

Comments
 (0)