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

switch to pnpm #2379

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Next Next commit
switch to pnpm
hipstersmoothie committed Jul 28, 2023
commit 757fda097dd4ed83bcdc42b25adacd7e5d975fde
35 changes: 21 additions & 14 deletions .github/actions/install-deps/action.yml
Original file line number Diff line number Diff line change
@@ -9,34 +9,41 @@ runs:
with:
node-version: 16.18

- name: restore workspace cache
uses: actions/cache@v3
id: node_modules
- uses: pnpm/action-setup@v2
with:
version: 8.1.0
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: |
node_modules
packages/*/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock', 'patches/*.patch') }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
node-modules-${{ runner.os }}-
${{ runner.os }}-pnpm-store-

- run: yarn install --frozen-lockfile --network-timeout 9000000
if: steps.node_modules.outputs.cache-hit != 'true'
- name: Install dependencies
shell: bash
run: pnpm install

- name: restore pkg cache
uses: actions/cache@v3
id: pkg
with:
path: ~/.pkg-cache
key: pkg-cache-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
key: pkg-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
pkg-cache-${{ runner.os }}-

- name: Install pkg node binaries
if: steps.pkg.outputs.cache-hit != 'true'
shell: bash
run: |
yarn pkg-fetch -n node16 -p macos -a x64
yarn pkg-fetch -n node16 -p win -a x64
yarn pkg-fetch -n node16 -p linux -a x64
pnpm pkg-fetch -n node16 -p macos -a x64
pnpm pkg-fetch -n node16 -p win -a x64
pnpm pkg-fetch -n node16 -p linux -a x64
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -82,29 +82,29 @@ Auto has an extensive plugin system and wide variety of official plugins. Make a
To get set up, fork and clone the project then run the following command:

```bash
yarn
pnpm
```

### Build/Typecheck

You must build at least once before running the tests or lint.

```bash
yarn build
pnpm build
```

In watch mode:

```bash
yarn start
pnpm start
```

### Installing the binary

Install the bundled binary onto your system. This requires the project to be built or in watch mode.

```bash
yarn install-mac
pnpm install-mac
```

If running this for the first time you may also have to run the following command.
@@ -116,25 +116,25 @@ chmod +x /usr/local/bin/auto
### Cleaning

```bash
yarn clean
pnpm clean
```

### Linting

```bash
yarn lint
pnpm lint
```

### Testing

```bash
yarn test
pnpm test
```

### Run the docs

```bash
yarn docs
pnpm docs
```

### Create a new plugin
@@ -147,7 +147,7 @@ The two arguments are:
2. A description

```bash
yarn create:plugin my-plugin "Do something really cool"
pnpm create:plugin my-plugin "Do something really cool"
```

### Create a new package
@@ -160,7 +160,7 @@ The two arguments are:
2. A description

```bash
yarn create:package my-package "Do something really cool"
pnpm create:package my-package "Do something really cool"
```

## :beers: Contributing :beers:
@@ -324,7 +324,7 @@ This project follows the [all-contributors](https://github.com/kentcdodds/all-co

### Adding a Contributor

To add a contributor run `yarn contributors:add`, choose "Add new contributor or edit contribution type" and follow the prompts.
To add a contributor run `pnpm contributors:add`, choose "Add new contributor or edit contribution type" and follow the prompts.

## License

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "11.0.0",
"npmClient": "yarn",
"npmClient": "yapnpmrn",
"packages": [
"packages/*",
"plugins/*"
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -31,12 +31,12 @@
"auto": "chmod +x ./packages/cli/dist/bin/auto.js && ./packages/cli/dist/bin/auto.js",
"contributors:add": "all-contributors",
"contributors:generate": "all-contributors generate",
"docs": "yarn docs:generate && ignite dev",
"docs": "pnpm docs:generate && ignite dev",
"docs:generate": "./docs/generate-command-docs.js",
"docs:build": "yarn docs:generate && ignite build",
"docs:build": "pnpm docs:generate && ignite build",
"create:plugin": "./scripts/create-plugin.js",
"create:package": "./scripts/create-package.js",
"install-mac": "yarn lerna run bundle --scope=auto && gunzip -c ./packages/cli/binary/auto-macos.gz > /usr/local/bin/auto",
"install-mac": "pnpm lerna run bundle --scope=auto && gunzip -c ./packages/cli/binary/auto-macos.gz > /usr/local/bin/auto",
"postinstall": "patch-package"
},
"devDependencies": {
@@ -51,7 +51,7 @@
"@typescript-eslint/eslint-plugin": "^4.1.1",
"@typescript-eslint/parser": "^4.1.1",
"all-contributors-cli": "^6.4.0",
"change-case": "^4.0.0",
"change-case": "^4.1.2",
"command-line-docs": "^0.0.6",
"copy-template-dir": "^1.4.0",
"endent": "^2.1.0",
@@ -72,6 +72,7 @@
"mock-fs": "^5.1.2",
"next-ignite": "^0.10.11",
"patch-package": "^6.2.2",
"pkg-fetch": "^3.5.2",
"prettier": "^2.2.1",
"push-dir": "^0.4.1",
"rimraf": "^3.0.0",
@@ -92,7 +93,7 @@
],
"*.{ts,tsx}": [
"prettier --parser typescript --write",
"yarn lint --fix"
"pnpm lint --fix"
]
},
"jest": {
10 changes: 5 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -43,16 +43,16 @@
"start": "npm run build -- -w",
"lint": "eslint src --ext .ts",
"test": "jest --maxWorkers=2",
"bundle": "yarn inject-version && yarn package && yarn gzip",
"bundle": "pnpm inject-version && pnpm package && pnpm gzip",
"inject-version": "node scripts/inject-version.js",
"package": "rimraf binary && pkg . --out-path binary",
"gzip": "ls binary/auto* | xargs gzip"
},
"dependencies": {
"@auto-it/core": "link:../core",
"@auto-it/npm": "link:../../plugins/npm",
"@auto-it/released": "link:../../plugins/released",
"@auto-it/version-file": "link:../../plugins/version-file",
"@auto-it/core": "workspace:*",
"@auto-it/npm": "workspace:*",
"@auto-it/released": "workspace:*",
"@auto-it/version-file": "workspace:*",
"await-to-js": "^3.0.0",
"chalk": "^4.0.0",
"command-line-application": "^0.10.1",
4 changes: 2 additions & 2 deletions plugins/all-contributors/package.json
Original file line number Diff line number Diff line change
@@ -37,8 +37,8 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/bot-list": "link:../../packages/bot-list",
"@auto-it/core": "link:../../packages/core",
"@auto-it/bot-list": "workspace:*",
"@auto-it/core": "workspace:*",
"@octokit/rest": "^18.12.0",
"all-contributors-cli": "6.19.0",
"anymatch": "^3.1.1",
2 changes: 1 addition & 1 deletion plugins/brew/package.json
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"fp-ts": "^2.5.3",
"io-ts": "^2.1.2",
"tslib": "2.1.0"
2 changes: 1 addition & 1 deletion plugins/chrome/package.json
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"chrome-webstore-upload-cli": "^1.2.0",
"fp-ts": "^2.5.3",
"io-ts": "^2.1.2",
2 changes: 1 addition & 1 deletion plugins/cocoapods/package.json
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"fp-ts": "^2.5.3",
"io-ts": "^2.1.2",
"semver": "^7.1.3",
2 changes: 1 addition & 1 deletion plugins/conventional-commits/package.json
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"array.prototype.flatmap": "^1.2.2",
"conventional-changelog-core": "^4.2.0",
"conventional-changelog-preset-loader": "^2.3.4",
2 changes: 1 addition & 1 deletion plugins/crates/package.json
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"env-ci": "^5.0.1",
"semver": "^7.0.0",
"toml": "^3.0.0",
2 changes: 1 addition & 1 deletion plugins/docker/package.json
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"fp-ts": "^2.5.3",
"io-ts": "^2.1.2",
"semver": "^7.0.0",
2 changes: 1 addition & 1 deletion plugins/exec/package.json
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"endent": "^2.1.0",
"fp-ts": "^2.5.3",
"fromentries": "^1.2.0",
4 changes: 2 additions & 2 deletions plugins/first-time-contributor/package.json
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/bot-list": "link:../../packages/bot-list",
"@auto-it/core": "link:../../packages/core",
"@auto-it/bot-list": "workspace:*",
"@auto-it/core": "workspace:*",
"array.prototype.flatmap": "^1.2.2",
"endent": "^2.1.0",
"tslib": "2.1.0",
2 changes: 1 addition & 1 deletion plugins/gem/package.json
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"endent": "^2.1.0",
"env-ci": "^5.0.1",
"fast-glob": "^3.1.1",
2 changes: 1 addition & 1 deletion plugins/gh-pages/package.json
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"endent": "^2.1.0",
"fp-ts": "^2.5.3",
"io-ts": "^2.1.2",
2 changes: 1 addition & 1 deletion plugins/git-tag/package.json
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"semver": "^7.0.0",
"tslib": "2.1.0"
},
2 changes: 1 addition & 1 deletion plugins/gradle/package.json
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"fp-ts": "^2.5.3",
"io-ts": "^2.1.2",
"semver": "^7.0.0",
2 changes: 1 addition & 1 deletion plugins/jira/package.json
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"enquirer": "^2.3.4",
"fp-ts": "^2.5.3",
"io-ts": "^2.1.2",
2 changes: 1 addition & 1 deletion plugins/magic-zero/package.json
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"fp-ts": "^2.5.3",
"io-ts": "^2.1.2",
"semver": "^7.0.0",
2 changes: 1 addition & 1 deletion plugins/maven/package.json
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"fast-glob": "^3.1.1",
"fp-ts": "^2.5.3",
"io-ts": "^2.1.2",
2 changes: 1 addition & 1 deletion plugins/microsoft-teams/package.json
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"fp-ts": "^2.5.3",
"https-proxy-agent": "^5.0.0",
"io-ts": "^2.1.2",
4 changes: 2 additions & 2 deletions plugins/npm/package.json
Original file line number Diff line number Diff line change
@@ -38,8 +38,8 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/package-json-utils": "link:../../packages/package-json-utils",
"@auto-it/core": "workspace:*",
"@auto-it/package-json-utils": "workspace:*",
"await-to-js": "^3.0.0",
"endent": "^2.1.0",
"env-ci": "^5.0.1",
2 changes: 1 addition & 1 deletion plugins/omit-commits/package.json
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@
"test": "jest --maxWorkers=2 --config ../../package.json"
},
"dependencies": {
"@auto-it/core": "link:../../packages/core",
"@auto-it/core": "workspace:*",
"fp-ts": "^2.5.3",
"io-ts": "^2.1.2",
"tslib": "2.1.0"
Loading