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

chore: setup pnpm and changeset #502

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
31 changes: 10 additions & 21 deletions .github/workflows/main.yml
Expand Up @@ -14,40 +14,29 @@ jobs:
- name: Begin CI...
uses: actions/checkout@v2

- name: Use Node 12
uses: actions/setup-node@v1
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 12.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 16.x
cache: 'pnpm'

- name: Install dependencies
run: yarn install --immutable
run: pnpm install

- name: Lint
run: yarn workspace react-responsive-modal lint
run: pnpm run lint --filter react-responsive-modal

- name: Test
run: yarn workspace react-responsive-modal test --ci --coverage --maxWorkers=2
run: pnpm run lint test --ci --coverage --maxWorkers=2 --filter react-responsive-modal

- name: Report coverage
uses: codecov/codecov-action@v1

- name: Build
run: yarn workspace react-responsive-modal build
run: pnpm run build --filter react-responsive-modal

- name: Build docs
run: yarn workspace website build
run: pnpm run build --filter website

- name: Cypress run
uses: cypress-io/github-action@v2
Expand All @@ -56,4 +45,4 @@ jobs:
install: false
# Use monorepo
project: ./react-responsive-modal
start: yarn workspace website start -p 3000
start: pnpm run start -p 3000 --filter website
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpx lint-staged
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
strict-peer-dependencies=false
546 changes: 0 additions & 546 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

786 changes: 0 additions & 786 deletions .yarn/releases/yarn-3.2.1.cjs

This file was deleted.

11 changes: 0 additions & 11 deletions .yarnrc.yml

This file was deleted.

22 changes: 7 additions & 15 deletions package.json
Expand Up @@ -3,26 +3,18 @@
"scripts": {
"prettier": "prettier --write \"**/*.{js,ts,tsx,css,scss,json,md,mdx,yml}\""
},
"workspaces": [
"react-responsive-modal",
"website"
],
"prettier": {
"singleQuote": true
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,ts,tsx,css,scss,json,md,mdx,yml}": "prettier --write"
"*.{js,ts,tsx,css,scss,json,md,mdx,yml}": [
"prettier --write",
"git add"
]
},
"devDependencies": {
"husky": "4.3.0",
"lint-staged": "10.5.1",
"husky": "7.0.4",
"lint-staged": "12.1.7",
"prettier": "2.1.2"
},
"version": "6.3.2",
"packageManager": "yarn@3.2.1"
}
}