Skip to content

Commit

Permalink
Switch to pnpm (#1151)
Browse files Browse the repository at this point in the history
* Use pnpm

* Update package.json's

* Add pnpm-lock.yaml to prettierignore

* Define packages for lerna

* Fix build

* Fix build

* Fix build

* Fix build

* Fix build

* Fix build

* Update

* Fix build

* Fix build

* Fix build

* Try specific version

* Try different specific version

* Test

* Skip for now
  • Loading branch information
Methuselah96 committed May 8, 2022
1 parent dce4dee commit 3b36826
Show file tree
Hide file tree
Showing 58 changed files with 24,299 additions and 29,816 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ build
coverage
node_modules
__snapshots__
.yarn/*
storybook-static
.vscode/*
15 changes: 8 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'yarn'
- run: yarn install
- run: yarn format:check
- run: yarn build:all
- run: yarn lint:all
- name: Run yarn test:all
cache: 'pnpm'
- run: pnpm install
- run: pnpm run format:check
- run: pnpm run build:all
- run: pnpm run lint:all
- name: Run pnpm test:all
uses: GabrielBB/xvfb-action@v1
with:
run: yarn test:all
run: pnpm run test:all
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,23 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- uses: pnpm/action-setup@v2

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

- name: Install Dependencies
run: yarn install
run: pnpm install

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: yarn changeset version
publish: yarn release
version: pnpm changeset version
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,3 @@ coverage
.idea
.eslintcache
!packages/redux-devtools-slider-monitor/examples/todomvc/dist/index.html
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ coverage
node_modules
__snapshots__
dev
.yarn/*
.pnp.*
**/demo/public/**
storybook-static
.vscode/*
pnpm-lock.yaml
10 changes: 0 additions & 10 deletions .vscode/settings.json

This file was deleted.

768 changes: 0 additions & 768 deletions .yarn/releases/yarn-3.1.1.cjs

This file was deleted.

20 changes: 0 additions & 20 deletions .yarn/sdks/eslint/bin/eslint.js

This file was deleted.

6 changes: 0 additions & 6 deletions .yarn/sdks/eslint/package.json

This file was deleted.

5 changes: 0 additions & 5 deletions .yarn/sdks/integrations.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .yarn/sdks/prettier/index.js

This file was deleted.

6 changes: 0 additions & 6 deletions .yarn/sdks/prettier/package.json

This file was deleted.

20 changes: 0 additions & 20 deletions .yarn/sdks/typescript/bin/tsc

This file was deleted.

20 changes: 0 additions & 20 deletions .yarn/sdks/typescript/bin/tsserver

This file was deleted.

6 changes: 0 additions & 6 deletions .yarn/sdks/typescript/package.json

This file was deleted.

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

This file was deleted.

7 changes: 0 additions & 7 deletions extension/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,3 @@ build/
dev/
tmp/
_book
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
18 changes: 0 additions & 18 deletions extension/appveyor.yml

This file was deleted.

10 changes: 5 additions & 5 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
},
"scripts": {
"start": "webpack --config webpack/dev.config.babel.js",
"build": "yarn run build:extension && yarn run build:firefox",
"build": "pnpm run build:extension && pnpm run build:firefox",
"build:extension": "rimraf build/extension && webpack --config webpack/wrap.config.babel.js && webpack --config webpack/prod.config.babel.js",
"build:firefox": "webpack --config webpack/prod.firefox.config.babel.js",
"build:examples": "babel-node examples/buildAll.js",
"precompress:extension": "yarn run lint && yarn run test:app && yarn run build:extension && yarn run test:chrome && yarn run test:electron",
"precompress:firefox": "yarn run lint && yarn run build:firefox && yarn run test:app",
"precompress:extension": "pnpm run lint && pnpm run test:app && pnpm run build:extension && pnpm run test:chrome && pnpm run test:electron",
"precompress:firefox": "pnpm run lint && pnpm run build:firefox && pnpm run test:app",
"compress:extension": "bestzip build/extension.zip build/extension",
"compress:firefox": "bestzip build/extension.zip build/extension",
"clean": "rimraf build && rimraf dev",
"test:app": "cross-env BABEL_ENV=test jest test/app",
"test:chrome": "jest test/chrome",
"test:electron": "yarn run build:test:electron:fixture && jest test/electron",
"test": "yarn run test:app && yarn run build:extension && yarn run test:chrome && yarn run test:electron",
"test:electron": "pnpm run build:test:electron:fixture && jest test/electron",
"test": "pnpm run test:app && pnpm run build:extension && pnpm run test:chrome && pnpm run test:electron",
"build:test:electron:fixture": "webpack --config test/electron/fixture/webpack.config.js",
"type-check": "tsc --noEmit"
},
Expand Down
20 changes: 15 additions & 5 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
{
"lerna": "3.4.2",
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClient": "pnpm",
"packages": [
"extension",
"packages/*",
"packages/d3-state-visualizer/examples/tree",
"packages/react-dock/demo",
"packages/react-json-tree/examples",
"packages/redux-devtools/examples/counter",
"packages/redux-devtools/examples/todomvc",
"packages/redux-devtools-inspector-monitor/demo",
"packages/redux-devtools-inspector-monitor-test-tab/demo",
"packages/redux-devtools-rtk-query-monitor/demo",
"packages/redux-devtools-slider-monitor/examples/todomvc"
],
"command": {
"publish": {
"allowBranch": "main"
}
},
"ignoreChanges": ["**/test/**", "**/examples/**", "**/*.md"]
}
}
25 changes: 7 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,12 @@
"lint:all": "lerna run lint",
"test:all": "lerna run test",
"format:check": "prettier --check .",
"release": "yarn build:all && changeset publish"
"release": "pnpm build:all && changeset publish"
},
"workspaces": [
"extension",
"packages/*",
"packages/d3-state-visualizer/examples/tree",
"packages/react-dock/demo",
"packages/react-json-tree/examples",
"packages/redux-devtools/examples/counter",
"packages/redux-devtools/examples/todomvc",
"packages/redux-devtools-inspector-monitor/demo",
"packages/redux-devtools-inspector-monitor-test-tab/demo",
"packages/redux-devtools-rtk-query-monitor/demo",
"packages/redux-devtools-slider-monitor/examples/todomvc"
],
"resolutions": {
"@babel/highlight/chalk": "Methuselah96/chalk#head=v2-without-process"
},
"packageManager": "yarn@3.2.0"
"packageManager": "pnpm@7.0.1",
"pnpm": {
"overrides": {
"@babel/highlight>chalk": "Methuselah96/chalk#v2-without-process"
}
}
}
6 changes: 3 additions & 3 deletions packages/d3-state-visualizer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
"url": "https://github.com/reduxjs/redux-devtools.git"
},
"scripts": {
"build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd",
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types && pnpm run build:umd",
"build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"build:umd": "rollup -c",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build",
"prepublish": "yarn run type-check && yarn run lint"
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint"
},
"dependencies": {
"@babel/runtime": "^7.17.9",
Expand Down
6 changes: 3 additions & 3 deletions packages/d3tooltip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
"url": "https://github.com/reduxjs/redux-devtools.git"
},
"scripts": {
"build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd",
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types && pnpm run build:umd",
"build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"build:umd": "rollup -c",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build",
"prepublish": "yarn run type-check && yarn run lint"
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint"
},
"dependencies": {
"@babel/runtime": "^7.17.9",
Expand Down
6 changes: 3 additions & 3 deletions packages/map2tree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"url": "https://github.com/reduxjs/redux-devtools.git"
},
"scripts": {
"build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd",
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types && pnpm run build:umd",
"build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
Expand All @@ -38,8 +38,8 @@
"test": "jest",
"lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build",
"prepublish": "yarn run type-check && yarn run lint && yarn run test"
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
},
"dependencies": {
"@babel/runtime": "^7.17.9",
Expand Down

0 comments on commit 3b36826

Please sign in to comment.