Skip to content

Commit c48aa7f

Browse files
authored
Merge pull request #4 from ReforgeHQ/mfaga-yarn
feat: use yarn 4.9.2 going forward
2 parents 85aa084 + 33708cc commit c48aa7f

File tree

12 files changed

+7247
-18146
lines changed

12 files changed

+7247
-18146
lines changed

.github/workflows/release.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,19 @@ jobs:
6060
with:
6161
node-version-file: ".tool-versions"
6262
registry-url: "https://registry.npmjs.org"
63-
- run: npm ci
64-
- run: npm run build
63+
- name: enable corepack
64+
run: |
65+
corepack enable
66+
corepack prepare yarn@4.9.2 --activate
67+
- name: cache yarn dependencies
68+
uses: actions/cache@v4
69+
with:
70+
path: ~/.yarn/cache
71+
key: ${{ runner.os }}-yarn-${{ hashfiles('**/yarn.lock') }}
72+
restore-keys: |
73+
${{ runner.os }}-yarn-
74+
- run: yarn install --immutable
75+
- run: yarn build
6576
- name: Publish to npm
6677
run: |
6778
if [ "${{ needs.check-version.outputs.is-prerelease }}" == "true" ]; then

.github/workflows/test.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,27 @@ jobs:
1212
- uses: actions/setup-node@v4
1313
with:
1414
node-version-file: ".tool-versions"
15+
registry-url: "https://registry.npmjs.org"
16+
- name: enable corepack
17+
run: |
18+
corepack enable
19+
corepack prepare yarn@4.9.2 --activate
20+
- name: cache yarn dependencies
21+
uses: actions/cache@v4
22+
with:
23+
path: ~/.yarn/cache
24+
key: ${{ runner.os }}-yarn-${{ hashfiles('**/yarn.lock') }}
25+
restore-keys: |
26+
${{ runner.os }}-yarn-
1527
16-
- name: Install packages
17-
run: npm ci
28+
- name: Install modules
29+
run: yarn install --immutable
1830

1931
- name: Run prettier
20-
run: npm run prettier
32+
run: yarn prettier
2133

2234
- name: Run lints
23-
run: npm run lint
35+
run: yarn lint
2436

2537
- name: Run tests
26-
run: npm run test
38+
run: yarn test

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
coverage/
44
dist/
55
package.json
6+
.yarnrc.yml

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { reforge, Reforge, ReforgeBootstrap } from "./src/reforge";
22
import { Config } from "./src/config";
33
import Context from "./src/context";
4-
import version from "./src/version";
4+
// eslint-disable-next-line @typescript-eslint/no-var-requires
5+
const { version } = require("./package.json");
56

67
export { reforge, Reforge, Config, Context, version };
78

0 commit comments

Comments
 (0)