Skip to content

Commit

Permalink
switch to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Jul 28, 2023
1 parent 3f14ee2 commit 757fda0
Show file tree
Hide file tree
Showing 40 changed files with 18,271 additions and 16,261 deletions.
35 changes: 21 additions & 14 deletions .github/actions/install-deps/action.yml
Expand Up @@ -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
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
@@ -1,6 +1,6 @@
{
"version": "11.0.0",
"npmClient": "yarn",
"npmClient": "yapnpmrn",
"packages": [
"packages/*",
"plugins/*"
Expand Down
11 changes: 6 additions & 5 deletions package.json
Expand Up @@ -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": {
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -92,7 +93,7 @@
],
"*.{ts,tsx}": [
"prettier --parser typescript --write",
"yarn lint --fix"
"pnpm lint --fix"
]
},
"jest": {
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/package.json
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions plugins/all-contributors/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/brew/package.json
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion plugins/chrome/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/cocoapods/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/conventional-commits/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/crates/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/docker/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/exec/package.json
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions plugins/first-time-contributor/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/gem/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/gh-pages/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/git-tag/package.json
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/gradle/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/jira/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/magic-zero/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/maven/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/microsoft-teams/package.json
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions plugins/npm/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugins/omit-commits/package.json
Expand Up @@ -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"
Expand Down

0 comments on commit 757fda0

Please sign in to comment.