Skip to content

Commit abf8907

Browse files
authored
build: use pnpm as manager, yarn pnp is still supported (#136)
1 parent 2ec7aaf commit abf8907

20 files changed

+16781
-52330
lines changed

.changeset/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json",
2+
"$schema": "https://unpkg.com/@changesets/config/schema.json",
33
"changelog": [
44
"@changesets/changelog-github",
55
{

.changeset/metal-worms-tell.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-import-resolver-typescript": patch
3+
---
4+
5+
build: use pnpm as manager, yarn pnp is still supported

.eslintignore

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
!.*.cjs
2-
.pnp.*
3-
.yarn
4-
.yarnrc.yml
51
dist
62
lib
73
CHANGELOG.md
4+
/pnpm-*.yml
5+
!/.*.cjs
6+
!/.changeset/*.json

.eslintrc

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
},
99
"extends": [
1010
"plugin:prettier/recommended",
11+
"plugin:jsonc/recommended-with-json",
12+
"plugin:json-schema-validator/recommended",
1113
"plugin:mdx/recommended"
1214
]
1315
}

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ patreon: 1stG
99
custom:
1010
- https://opencollective.com/1stG
1111
- https://opencollective.com/rxts
12+
- https://afdian.net/@JounQin

.github/workflows/ci.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,22 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v3
2222

23-
- uses: actions/setup-node@v3
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v2
25+
with:
26+
version: latest
27+
28+
- name: Setup Node.js ${{ matrix.node }}
29+
uses: actions/setup-node@v3
2430
with:
2531
node-version: ${{ matrix.node }}
26-
cache: yarn
32+
cache: pnpm
2733

2834
- name: Install Dependencies
29-
run: yarn --frozen-lockfile
35+
run: pnpm i
3036

3137
- name: Build, Lint and Test
32-
run: yarn run-s build lint test
33-
# typecov
38+
run: pnpm run-s build lint test typecov
3439
env:
3540
EFF_NO_LINK_RULES: true
3641
PARSER_NO_WATCH: true

.github/workflows/pkg-size.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: Package Size Report
33
on:
44
pull_request:
55
branches:
6-
- master
6+
- develop
7+
# - master # disable because it sucks for pnpm...
78

89
jobs:
910
pkg-size-report:
@@ -14,14 +15,20 @@ jobs:
1415
- name: Checkout
1516
uses: actions/checkout@v3
1617

18+
- name: Setup pnpm
19+
uses: pnpm/action-setup@v2
20+
with:
21+
version: latest
22+
1723
- name: Setup Node.js
1824
uses: actions/setup-node@v3
1925
with:
2026
node-version: 16
27+
cache: pnpm
2128

2229
- name: Package Size Report
2330
uses: pkg-size/action@v1
2431
with:
25-
build-command: yarn build
32+
build-command: pnpm build
2633
env:
2734
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,19 @@ 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
21+
with:
22+
version: latest
23+
1924
- name: Setup Node.js 16
2025
uses: actions/setup-node@v3
2126
with:
2227
node-version: 16
23-
cache: yarn
28+
cache: pnpm
2429

2530
- name: Install Dependencies
26-
run: yarn --immutable
27-
28-
- name: Prepare Git Hooks
29-
run: yarn prepare
31+
run: pnpm i
3032

3133
- name: Prerelease
3234
run: yarn prerelease
@@ -35,9 +37,8 @@ jobs:
3537
id: changesets
3638
uses: changesets/action@v1
3739
with:
38-
version: yarn changeset version
3940
# This expects you to have a script called release which does a build for your packages and calls changeset publish
40-
publish: yarn release
41+
publish: pnpm release
4142
commit: 'chore: release eslint-import-resolver-typescript'
4243
title: 'chore: release eslint-import-resolver-typescript'
4344
env:

.gitignore

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1+
.*cache
12
.type-coverage
23
lib
34
node_modules
45
*.log
5-
.eslintcache
6-
!.pnp.*
7-
.yarn
8-
!.yarn/patches
9-
!.yarn/plugins
10-
!.yarn/releases
11-
!.yarn/versions

.npmrc

+13-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
package-lock=false
1+
enable-pre-post-scripts=true
2+
; https://github.com/pkg-size/action/pull/45
3+
; package-lock=false
4+
public-hoist-pattern[]=@1stg/*
5+
public-hoist-pattern[]=@pkgr/*
6+
public-hoist-pattern[]=@commitlint/*
7+
public-hoist-pattern[]=*eslint*
8+
public-hoist-pattern[]=npm-run-all
9+
public-hoist-pattern[]=lint-staged
10+
public-hoist-pattern[]=json5
11+
public-hoist-pattern[]=*prettier*
12+
public-hoist-pattern[]=simple-git-hooks
13+
strict-peer-dependencies=false

0 commit comments

Comments
 (0)