Skip to content

Commit

Permalink
build: migrate to yarn v4
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Dec 6, 2023
1 parent 9f78da2 commit 0faa37e
Show file tree
Hide file tree
Showing 12 changed files with 14,812 additions and 11,200 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
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
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
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
@@ -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
@@ -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
@@ -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
Expand Up @@ -10,7 +10,7 @@
],
"funding": "https://opencollective.com/unts/projects/eslint-import-resolver-ts",
"license": "ISC",
"packageManager": "pnpm@8.7.6",
"packageManager": "yarn@4.0.2",
"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

0 comments on commit 0faa37e

Please sign in to comment.