Skip to content

Commit cecec35

Browse files
authored
build: migrate to yarn v4 (#260)
1 parent 9f78da2 commit cecec35

File tree

12 files changed

+14812
-11200
lines changed

12 files changed

+14812
-11200
lines changed

.github/workflows/ci.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
node:
1212
- 16
1313
- 18
14+
- 20
1415
os:
1516
# - macOS-latest
1617
# - windows-latest # I don't have a Windows machine to debug
@@ -19,20 +20,25 @@ jobs:
1920
steps:
2021
- uses: actions/checkout@v4
2122

22-
- name: Setup pnpm
23-
uses: pnpm/action-setup@v2
23+
- name: Enable Corepack
24+
run: corepack enable
2425

2526
- name: Setup Node.js ${{ matrix.node }}
2627
uses: actions/setup-node@v4
2728
with:
2829
node-version: ${{ matrix.node }}
29-
cache: pnpm
30+
cache: yarn
31+
env:
32+
YARN_IGNORE_NODE: 1
3033

3134
- name: Install Dependencies
32-
run: pnpm i
35+
run: yarn --immutable
36+
env:
37+
YARN_IGNORE_NODE: 1
3338

3439
- name: Build, Lint and Test
35-
run: pnpm run-s build lint test typecov
40+
run: yarn run-s build lint test typecov
3641
env:
3742
EFF_NO_LINK_RULES: true
3843
PARSER_NO_WATCH: true
44+
YARN_IGNORE_NODE: 1

.github/workflows/release.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ jobs:
1616
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1717
fetch-depth: 0
1818

19-
- name: Setup pnpm
20-
uses: pnpm/action-setup@v2
19+
- name: Enable Corepack
20+
run: corepack enable
2121

2222
- name: Setup Node.js LTS
2323
uses: actions/setup-node@v4
2424
with:
2525
node-version: lts/*
26-
cache: pnpm
26+
cache: yarn
2727

2828
- name: Install Dependencies
29-
run: pnpm i
29+
run: yarn --immutable
3030

3131
- name: Build
32-
run: pnpm build
32+
run: yarn build
3333

3434
- name: Create Release Pull Request or Publish to npm
3535
id: changesets
3636
uses: changesets/action@v1
3737
with:
3838
# This expects you to have a script called release which does a build for your packages and calls changeset publish
39-
publish: pnpm release
39+
publish: yarn release
4040
commit: 'chore: release eslint-import-resolver-typescript'
4141
title: 'chore: release eslint-import-resolver-typescript'
4242
env:

.github/workflows/size-limit.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18-
- name: Setup pnpm
19-
uses: pnpm/action-setup@v2
18+
- name: Enable Corepack
19+
run: corepack enable
2020

2121
- name: Setup Node.js LTS
2222
uses: actions/setup-node@v4
2323
with:
2424
node-version: lts/*
25-
cache: pnpm
25+
cache: yarn
2626

2727
- name: Install Dependencies
28-
run: pnpm i
28+
run: yarn --immutable
2929

3030
- uses: andresz1/size-limit-action@v1
3131
with:
3232
github_token: ${{ secrets.GITHUB_TOKEN }}
3333
skip_step: install
34-
script: pnpm size-limit --json
34+
script: yarn size-limit --json

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.*cache
22
.type-coverage
3+
.yarn/*
4+
!.yarn/plugins
35
lib
46
node_modules
57
*.log

.npmrc

-11
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports={name:"plugin-prepare-lifecycle",factory:e=>({hooks:{afterAllInstalled(r){if(!r.topLevelWorkspace.manifest.scripts.get("prepare"))return;e("@yarnpkg/shell").execute("yarn prepare")}}})};

.yarnrc.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
compressionLevel: mixed
2+
3+
nodeLinker: node-modules
4+
5+
plugins:
6+
- checksum: 37b2361b1502b2054e6779788c0e9bdd6a90ce49852a8cad2feda79b0614ec94f06fb6e78951f5f95429c610d7934dd077caa47413a0227378a102c55161616d
7+
path: .yarn/plugins/plugin-prepare-lifecycle.cjs
8+
spec: "https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js"

package.json

+30-22
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"funding": "https://opencollective.com/unts/projects/eslint-import-resolver-ts",
1212
"license": "ISC",
13-
"packageManager": "pnpm@8.7.6",
13+
"packageManager": "yarn@4.0.2",
1414
"engines": {
1515
"node": "^14.18.0 || >=16.0.0"
1616
},
@@ -42,15 +42,15 @@
4242
"plugin"
4343
],
4444
"scripts": {
45-
"build": "run-p build:*",
45+
"build": "run-p 'build:*'",
4646
"build:r": "r -f cjs,es2020",
4747
"build:ts": "tsc -b",
48-
"lint": "run-p lint:*",
48+
"lint": "run-p 'lint:*'",
4949
"lint:es": "eslint src --cache -f friendly",
5050
"lint:tsc": "tsc --noEmit",
5151
"prepare": "simple-git-hooks",
5252
"release": "changeset publish",
53-
"test": "run-p test:*",
53+
"test": "run-p 'test:*'",
5454
"test:multipleEslintrcs": "eslint --ext ts,tsx tests/multipleEslintrcs",
5555
"test:multipleTsconfigs": "eslint --ext ts,tsx tests/multipleTsconfigs",
5656
"test:withJsExtension": "node tests/withJsExtension/test.js && eslint --ext ts,tsx tests/withJsExtension",
@@ -67,34 +67,42 @@
6767
},
6868
"dependencies": {
6969
"debug": "^4.3.4",
70-
"enhanced-resolve": "^5.12.0",
71-
"eslint-module-utils": "^2.7.4",
72-
"fast-glob": "^3.3.1",
73-
"get-tsconfig": "^4.5.0",
74-
"is-core-module": "^2.11.0",
70+
"enhanced-resolve": "^5.15.0",
71+
"eslint-module-utils": "^2.8.0",
72+
"fast-glob": "^3.3.2",
73+
"get-tsconfig": "^4.7.2",
74+
"is-core-module": "^2.13.1",
7575
"is-glob": "^4.0.3"
7676
},
7777
"devDependencies": {
78-
"@1stg/lib-config": "^11.0.1",
79-
"@changesets/changelog-github": "^0.4.8",
80-
"@changesets/cli": "^2.26.2",
81-
"@mozilla/glean": "^1.3.0",
82-
"@types/debug": "^4.1.7",
83-
"@types/is-core-module": "^2.2.0",
78+
"@1stg/lib-config": "^12.0.0",
79+
"@changesets/changelog-github": "^0.5.0",
80+
"@changesets/cli": "^2.27.1",
81+
"@commitlint/cli": "^17.8.1",
82+
"@mozilla/glean": "^3.0.0",
83+
"@pkgr/rollup": "^4.1.3",
84+
"@types/debug": "^4.1.12",
85+
"@types/is-core-module": "^2.2.2",
8486
"@types/is-glob": "^4.0.4",
85-
"@types/node": "^18.18.8",
87+
"@types/node": "^18.19.2",
8688
"@types/unist": "^2.0.10",
8789
"dummy.js": "link:dummy.js",
90+
"eslint": "^8.55.0",
91+
"eslint-import-resolver-typescript": "link:.",
92+
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.0",
93+
"lint-staged": "^13.3.0",
94+
"npm-run-all": "^4.1.5",
95+
"prettier": "^2.8.8",
8896
"react": "^18.2.0",
89-
"size-limit": "^8.2.6",
90-
"size-limit-preset-node-lib": "^0.2.0",
91-
"type-coverage": "^2.25.0",
92-
"typescript": "^5.0.4"
97+
"simple-git-hooks": "^2.9.0",
98+
"size-limit": "^11.0.0",
99+
"size-limit-preset-node-lib": "^0.3.0",
100+
"type-coverage": "^2.27.0",
101+
"typescript": "^5.3.2"
93102
},
94103
"resolutions": {
95104
"eslint-import-resolver-typescript": "link:.",
96-
"eslint-plugin-import": "^2.29.0",
97-
"prettier": "^2.8.7"
105+
"prettier": "^2.8.8"
98106
},
99107
"typeCoverage": {
100108
"atLeast": 100,

0 commit comments

Comments
 (0)