Skip to content

build: migrate to yarn v4 #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
node:
- 16
- 18
- 20
os:
# - macOS-latest
# - windows-latest # I don't have a Windows machine to debug
Expand All @@ -19,20 +20,25 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm
cache: yarn
env:
YARN_IGNORE_NODE: 1

- name: Install Dependencies
run: pnpm i
run: yarn --immutable
env:
YARN_IGNORE_NODE: 1

- name: Build, Lint and Test
run: pnpm run-s build lint test typecov
run: yarn run-s build lint test typecov
env:
EFF_NO_LINK_RULES: true
PARSER_NO_WATCH: true
YARN_IGNORE_NODE: 1
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

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

- name: Setup Node.js LTS
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
cache: yarn

- name: Install Dependencies
run: pnpm i
run: yarn --immutable

- name: Build
run: pnpm build
run: yarn build

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
publish: yarn release
commit: 'chore: release eslint-import-resolver-typescript'
title: 'chore: release eslint-import-resolver-typescript'
env:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- name: Setup Node.js LTS
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
cache: yarn

- name: Install Dependencies
run: pnpm i
run: yarn --immutable

- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_step: install
script: pnpm size-limit --json
script: yarn size-limit --json
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.*cache
.type-coverage
.yarn/*
!.yarn/plugins
lib
node_modules
*.log
11 changes: 0 additions & 11 deletions .npmrc

This file was deleted.

1 change: 1 addition & 0 deletions .yarn/plugins/plugin-prepare-lifecycle.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +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")}}})};
8 changes: 8 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
compressionLevel: mixed

nodeLinker: node-modules

plugins:
- checksum: 37b2361b1502b2054e6779788c0e9bdd6a90ce49852a8cad2feda79b0614ec94f06fb6e78951f5f95429c610d7934dd077caa47413a0227378a102c55161616d
path: .yarn/plugins/plugin-prepare-lifecycle.cjs
spec: "https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js"
52 changes: 30 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"funding": "https://opencollective.com/unts/projects/eslint-import-resolver-ts",
"license": "ISC",
"packageManager": "[email protected]",
"packageManager": "[email protected]",
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
Expand Down Expand Up @@ -42,15 +42,15 @@
"plugin"
],
"scripts": {
"build": "run-p build:*",
"build": "run-p 'build:*'",
"build:r": "r -f cjs,es2020",
"build:ts": "tsc -b",
"lint": "run-p lint:*",
"lint": "run-p 'lint:*'",
"lint:es": "eslint src --cache -f friendly",
"lint:tsc": "tsc --noEmit",
"prepare": "simple-git-hooks",
"release": "changeset publish",
"test": "run-p test:*",
"test": "run-p 'test:*'",
"test:multipleEslintrcs": "eslint --ext ts,tsx tests/multipleEslintrcs",
"test:multipleTsconfigs": "eslint --ext ts,tsx tests/multipleTsconfigs",
"test:withJsExtension": "node tests/withJsExtension/test.js && eslint --ext ts,tsx tests/withJsExtension",
Expand All @@ -67,34 +67,42 @@
},
"dependencies": {
"debug": "^4.3.4",
"enhanced-resolve": "^5.12.0",
"eslint-module-utils": "^2.7.4",
"fast-glob": "^3.3.1",
"get-tsconfig": "^4.5.0",
"is-core-module": "^2.11.0",
"enhanced-resolve": "^5.15.0",
"eslint-module-utils": "^2.8.0",
"fast-glob": "^3.3.2",
"get-tsconfig": "^4.7.2",
"is-core-module": "^2.13.1",
"is-glob": "^4.0.3"
},
"devDependencies": {
"@1stg/lib-config": "^11.0.1",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@mozilla/glean": "^1.3.0",
"@types/debug": "^4.1.7",
"@types/is-core-module": "^2.2.0",
"@1stg/lib-config": "^12.0.0",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@commitlint/cli": "^17.8.1",
"@mozilla/glean": "^3.0.0",
"@pkgr/rollup": "^4.1.3",
"@types/debug": "^4.1.12",
"@types/is-core-module": "^2.2.2",
"@types/is-glob": "^4.0.4",
"@types/node": "^18.18.8",
"@types/node": "^18.19.2",
"@types/unist": "^2.0.10",
"dummy.js": "link:dummy.js",
"eslint": "^8.55.0",
"eslint-import-resolver-typescript": "link:.",
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.0",
"lint-staged": "^13.3.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"react": "^18.2.0",
"size-limit": "^8.2.6",
"size-limit-preset-node-lib": "^0.2.0",
"type-coverage": "^2.25.0",
"typescript": "^5.0.4"
"simple-git-hooks": "^2.9.0",
"size-limit": "^11.0.0",
"size-limit-preset-node-lib": "^0.3.0",
"type-coverage": "^2.27.0",
"typescript": "^5.3.2"
},
"resolutions": {
"eslint-import-resolver-typescript": "link:.",
"eslint-plugin-import": "^2.29.0",
"prettier": "^2.8.7"
"prettier": "^2.8.8"
},
"typeCoverage": {
"atLeast": 100,
Expand Down
Loading