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: migrate to yarn v2 #655

Merged
merged 2 commits into from
Aug 31, 2020
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
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ubuntu-latest-node-12.x-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
ubuntu-latest-node-12.x-yarn-
- uses: actions/[email protected]
with:
node-version: 12.x
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ubuntu-latest-node-12.x-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
ubuntu-latest-node-12.x-yarn-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -53,6 +62,17 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key:
${{ runner.os }}-node-${{ matrix.node-version }}-yarn-${{
hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-yarn-
- uses: actions/[email protected]
with:
node-version: 12.x
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ubuntu-latest-node-12.x-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
ubuntu-latest-node-12.x-yarn-
- uses: actions/[email protected]
with:
node-version: '12.x'
node-version: 12.x
- name: install
run: yarn
- name: run prettier
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ node_modules/
coverage/
lib/
*.log
.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
38 changes: 38 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions .yarn/releases/yarn-sources.cjs

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


lastUpdateCheck 1576854265612
yarn-path ".yarn/releases/yarn-sources.cjs"
9 changes: 9 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
enableGlobalCache: true

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'

yarnPath: .yarn/releases/yarn-sources.cjs
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
"lib/"
],
"scripts": {
"build": "babel --extensions .js,.ts src --out-dir lib --copy-files",
"postbuild": "rimraf lib/__tests__ lib/**/__tests__",
"build": "babel --extensions .js,.ts src --out-dir lib --copy-files && rimraf lib/__tests__ 'lib/**/__tests__'",
"lint": "eslint . --ignore-pattern '!.eslintrc.js' --ext js,ts",
"prepack": "yarn build",
"prettier:check": "prettier --check docs/**/*.md README.md .github/** package.json tsconfig.json src/globals.json",
"prettier:write": "prettier --write docs/**/*.md README.md .github/** package.json tsconfig.json src/globals.json",
"prepack": "rimraf lib && yarn build",
"prettier:check": "prettier --check 'docs/**/*.md' README.md '.github/**' package.json tsconfig.json src/globals.json .yarnrc.yml",
"prettier:write": "prettier --write 'docs/**/*.md' README.md '.github/**' package.json tsconfig.json src/globals.json .yarnrc.yml",
"test": "jest",
"tools:regenerate-docs": "ts-node -T tools/regenerate-docs",
"typecheck": "tsc -p ."
Expand All @@ -43,7 +42,7 @@
},
"lint-staged": {
"*.{js,ts}": "eslint --fix",
"*.{md,json}": "prettier --write"
"*.{md,json,yml}": "prettier --write"
},
"prettier": {
"arrowParens": "avoid",
Expand Down
Loading