Skip to content
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

build: use pnpm as manager, yarn pnp is still supported #136

Merged
merged 5 commits into from Jul 8, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
@@ -1,5 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json",
"$schema": "https://unpkg.com/@changesets/config/schema.json",
"changelog": [
"@changesets/changelog-github",
{
Expand Down
5 changes: 5 additions & 0 deletions .changeset/metal-worms-tell.md
@@ -0,0 +1,5 @@
---
"eslint-import-resolver-typescript": patch
---

build: use pnpm as manager, yarn pnp is still supported
7 changes: 3 additions & 4 deletions .eslintignore
@@ -1,7 +1,6 @@
!.*.cjs
.pnp.*
.yarn
.yarnrc.yml
dist
lib
CHANGELOG.md
/pnpm-*.yml
!/.*.cjs
!/.changeset/*.json
2 changes: 2 additions & 0 deletions .eslintrc
Expand Up @@ -8,6 +8,8 @@
},
"extends": [
"plugin:prettier/recommended",
"plugin:jsonc/recommended-with-json",
"plugin:json-schema-validator/recommended",
"plugin:mdx/recommended"
]
}
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Expand Up @@ -9,3 +9,4 @@ patreon: 1stG
custom:
- https://opencollective.com/1stG
- https://opencollective.com/rxts
- https://afdian.net/@JounQin
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -20,17 +20,22 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest

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

- name: Install Dependencies
run: yarn --frozen-lockfile
run: pnpm i

- name: Build, Lint and Test
run: yarn run-s build lint test
# typecov
run: pnpm run-s build lint test typecov
env:
EFF_NO_LINK_RULES: true
PARSER_NO_WATCH: true
11 changes: 9 additions & 2 deletions .github/workflows/pkg-size.yml
Expand Up @@ -3,7 +3,8 @@ name: Package Size Report
on:
pull_request:
branches:
- master
- develop
# - master # disable because it sucks for pnpm...

jobs:
pkg-size-report:
Expand All @@ -14,14 +15,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm

- name: Package Size Report
uses: pkg-size/action@v1
with:
build-command: yarn build
build-command: pnpm build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Expand Up @@ -16,17 +16,19 @@ 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
with:
version: latest

- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
cache: pnpm

- name: Install Dependencies
run: yarn --immutable

- name: Prepare Git Hooks
run: yarn prepare
run: pnpm i

- name: Prerelease
run: yarn prerelease
Expand All @@ -35,9 +37,8 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
version: yarn changeset version
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
publish: pnpm release
commit: 'chore: release eslint-import-resolver-typescript'
title: 'chore: release eslint-import-resolver-typescript'
env:
Expand Down
8 changes: 1 addition & 7 deletions .gitignore
@@ -1,11 +1,5 @@
.*cache
.type-coverage
lib
node_modules
*.log
.eslintcache
!.pnp.*
.yarn
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions
14 changes: 13 additions & 1 deletion .npmrc
@@ -1 +1,13 @@
package-lock=false
enable-pre-post-scripts=true
; https://github.com/pkg-size/action/pull/45
; package-lock=false
public-hoist-pattern[]=@1stg/*
public-hoist-pattern[]=@pkgr/*
public-hoist-pattern[]=@commitlint/*
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=npm-run-all
public-hoist-pattern[]=lint-staged
public-hoist-pattern[]=json5
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=simple-git-hooks
strict-peer-dependencies=false