Skip to content

Commit

Permalink
Switch to Yarn 4 (Berry) (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachkaev authored Nov 5, 2022
1 parent dc7ac66 commit 88e7385
Show file tree
Hide file tree
Showing 13 changed files with 7,275 additions and 4,445 deletions.
26 changes: 19 additions & 7 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,31 @@
!*.mjs
!*.ts

#########################
## Shared between linters
#########################

fixtures

########################
## Same as in .gitignore
########################

## Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
node_modules

## Misc
.DS_Store
*.log
cache
coverage
dist
node_modules

#########################
## Shared between linters
#########################

.git
.yarn
fixtures
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
node-version: 18

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Run build
run: yarn build
Expand All @@ -44,22 +44,27 @@ jobs:
node-version: 18

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Lint with eslint
if: ${{ success() || failure() }}
run: yarn lint:eslint

- name: Lint with markdownlint
if: ${{ success() || failure() }}
run: yarn lint:markdownlint

- name: Lint with prettier
if: ${{ success() || failure() }}
run: yarn lint:prettier

- name: Lint with tsc
if: ${{ success() || failure() }}
run: yarn lint:tsc

- name: Lint with yarn-deduplicate
run: yarn lint:yarn-deduplicate
- name: Lint with yarn-dedupe
if: ${{ success() || failure() }}
run: yarn lint:yarn-dedupe

unit-tests:
name: Unit tests
Expand Down Expand Up @@ -90,7 +95,7 @@ jobs:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Run unit tests
run: yarn test
Expand Down
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
## Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
node_modules

## Misc
.DS_Store
*.log
cache
coverage
dist
node_modules

2 changes: 1 addition & 1 deletion .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn install --prefer-offline --pure-lockfile
yarn install
2 changes: 1 addition & 1 deletion .husky/post-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn install --prefer-offline --pure-lockfile
yarn install
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn install --prefer-offline --pure-lockfile
yarn install
2 changes: 1 addition & 1 deletion .husky/post-rewrite
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn install --prefer-offline --pure-lockfile
yarn install
26 changes: 19 additions & 7 deletions .markdownlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,31 @@
## Allow certain file types
!*.md

#########################
## Shared between linters
#########################

fixtures

########################
## Same as in .gitignore
########################

## Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
node_modules

## Misc
.DS_Store
*.log
cache
coverage
dist
node_modules

#########################
## Shared between linters
#########################

.git
.yarn
fixtures
26 changes: 19 additions & 7 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,31 @@
!*.ts
!*.yml

#########################
## Shared between linters
#########################

fixtures

########################
## Same as in .gitignore
########################

## Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
node_modules

## Misc
.DS_Store
*.log
cache
coverage
dist
node_modules

#########################
## Shared between linters
#########################

.git
.yarn
fixtures
811 changes: 811 additions & 0 deletions .yarn/releases/yarn-4.0.0-rc.27.cjs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.0.0-rc.27.cjs
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"fix:eslint": "eslint --fix .",
"fix:markdownlint": "markdownlint --fix .",
"fix:prettier": "prettier --write .",
"fix:yarn-deduplicate": "yarn install && yarn-deduplicate --strategy=fewer && yarn install",
"fix:yarn-dedupe": "yarn dedupe",
"lint": "npm-run-all --continue-on-error lint:*",
"lint:markdownlint": "markdownlint .",
"lint:prettier": "prettier --check .",
"lint:tsc": "tsc --noEmit",
"lint:eslint": "eslint --report-unused-disable-directives .",
"lint:yarn-deduplicate": "yarn-deduplicate --fail --list --strategy=fewer",
"lint:yarn-dedupe": "yarn dedupe --check",
"prepare": "husky install",
"prepublishOnly": "yarn lint && yarn test",
"test": "yarn clean && yarn build && jest"
Expand Down Expand Up @@ -62,9 +62,9 @@
"prettier-plugin-packagejson": "^2.3.0",
"rimraf": "^3.0.2",
"sleep-promise": "^9.1.0",
"typescript": "^4.8.4",
"yarn-deduplicate": "^6.0.0"
"typescript": "^4.8.4"
},
"packageManager": "yarn@4.0.0-rc.27",
"engines": {
"node": ">=14.16.0"
}
Expand Down
Loading

0 comments on commit 88e7385

Please sign in to comment.