Skip to content

Commit e5cd2a2

Browse files
committed
Changes to pnpm from yarn
- Faster & lighter installs when using worktrees
1 parent d7ddd6b commit e5cd2a2

File tree

14 files changed

+11030
-7894
lines changed

14 files changed

+11030
-7894
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// "forwardPorts": [],
1313

1414
// Use 'postCreateCommand' to run commands after the container is created.
15-
// "postCreateCommand": "yarn install",
15+
// "postCreateCommand": "pnpm install",
1616

1717
// Configure tool-specific properties.
1818
// "customizations": {},

.github/workflows/cd-pre.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,24 @@ jobs:
5454
steps:
5555
- name: Checkout code
5656
uses: actions/checkout@v4
57+
- name: Setup pnpm
58+
uses: pnpm/action-setup@v3
59+
with:
60+
version: 8
5761
- name: Setup node
5862
uses: actions/setup-node@v4
5963
with:
6064
node-version: '20'
6165
- name: Install
62-
run: yarn
66+
run: pnpm install
6367
- name: Apply pre-release patch
64-
run: yarn run patch-pre
68+
run: pnpm run patch-pre
6569
- name: Setup Environment
6670
run: node -e "console.log('PACKAGE_VERSION=' + require('./package.json').version + '\nPACKAGE_NAME=' + require('./package.json').name + '-' + require('./package.json').version)" >> $GITHUB_ENV
6771
- name: Package extension
68-
run: yarn run package --pre-release
72+
run: pnpm run package --pre-release
6973
- name: Publish extension
70-
run: yarn vsce publish --yarn --pre-release --packagePath ./${{ env.PACKAGE_NAME }}.vsix -p ${{ secrets.GITLENS_VSCODE_MARKETPLACE_PAT }}
74+
run: pnpm vsce publish --no-dependencies --pre-release --packagePath ./${{ env.PACKAGE_NAME }}.vsix -p ${{ secrets.GITLENS_VSCODE_MARKETPLACE_PAT }}
7175
- name: Publish artifact
7276
uses: actions/upload-artifact@v4
7377
with:

.github/workflows/cd-stable.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ jobs:
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
17+
- name: Setup pnpm
18+
uses: pnpm/action-setup@v3
19+
with:
20+
version: 8
1721
- name: Setup node
1822
uses: actions/setup-node@v4
1923
with:
@@ -23,11 +27,11 @@ jobs:
2327
- name: Verify versions
2428
run: node -e "if ('refs/tags/v' + '${{ env.PACKAGE_VERSION }}' !== '${{ github.ref }}') { console.log('::error' + 'Version Mismatch. refs/tags/v' + '${{ env.PACKAGE_VERSION }}', '${{ github.ref }}'); throw Error('Version Mismatch')} "
2529
- name: Install
26-
run: yarn
30+
run: pnpm install
2731
- name: Package extension
28-
run: yarn run package
32+
run: pnpm run package
2933
- name: Publish Extension
30-
run: yarn vsce publish --yarn --packagePath ./${{ env.PACKAGE_NAME }}.vsix -p ${{ secrets.GITLENS_VSCODE_MARKETPLACE_PAT }}
34+
run: pnpm vsce publish --no-dependencies --packagePath ./${{ env.PACKAGE_NAME }}.vsix -p ${{ secrets.GITLENS_VSCODE_MARKETPLACE_PAT }}
3135
- name: Generate Changelog
3236
id: changelog
3337
uses: mindsers/changelog-reader-action@v2

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"[html][javascript][json][jsonc][markdown][scss][svg][typescript][typescriptreact]": {
4545
"editor.defaultFormatter": "esbenp.prettier-vscode"
4646
},
47-
"npm.packageManager": "yarn",
4847
"search.exclude": {
4948
"**/dist": true
5049
},

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ CODE_OF_CONDUCT.md
3636
CONTRIBUTING.md
3737
esbuild.mjs
3838
eslint.config.mjs
39+
pnpm-lock.yaml
3940
README.pre.md
4041
svgo.config.js
4142
tsconfig*.json

.yarnrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,39 @@ git clone https://github.com/gitkraken/vscode-gitlens.git
1919
Prerequisites
2020

2121
- [Git](https://git-scm.com/), `>= 2.7.2`
22-
- [NodeJS](https://nodejs.org/), `>= 20`
23-
- [yarn](https://yarnpkg.com/), `>= 1.22.22`
22+
- [NodeJS](https://nodejs.org/), `>= v20.11.1`
23+
- [pnpm](https://pnpm.io/), `>= 8.x` (install using [corepack](https://nodejs.org/docs/latest-v20.x/api/corepack.html))
2424

2525
### Dependencies
2626

2727
From a terminal, where you have cloned the repository, execute the following command to install the required dependencies:
2828

2929
```
30-
yarn
30+
pnpm install
3131
```
3232

3333
### Build
3434

3535
From a terminal, where you have cloned the repository, execute the following command to re-build the project from scratch:
3636

3737
```
38-
yarn run rebuild
38+
pnpm run rebuild
3939
```
4040

4141
👉 **NOTE!** This will run a complete rebuild of the project.
4242

4343
Or to just run a quick build, use:
4444

4545
```
46-
yarn run build
46+
pnpm run build
4747
```
4848

4949
### Watch
5050

5151
During development you can use a watcher to make builds on changes quick and easy. From a terminal, where you have cloned the repository, execute the following command:
5252

5353
```
54-
yarn run watch
54+
pnpm run watch
5555
```
5656

5757
Or use the provided `watch` task in VS Code, execute the following from the command palette (be sure there is no `>` at the start):
@@ -68,7 +68,7 @@ This will first do an initial full build and then watch for file changes, compil
6868

6969
### Formatting
7070

71-
This project uses [prettier](https://prettier.io/) for code formatting. You can run prettier across the code by calling `yarn run pretty` from a terminal.
71+
This project uses [prettier](https://prettier.io/) for code formatting. You can run prettier across the code by calling `pnpm run pretty` from a terminal.
7272

7373
To format the code as you make changes you can install the [Prettier - Code formatter](https://marketplace.visualstudio.com/items/esbenp.prettier-vscode) extension.
7474

@@ -80,7 +80,7 @@ Add the following to your User Settings to run prettier:
8080

8181
### Linting
8282

83-
This project uses [ESLint](https://eslint.org/) for code linting. You can run ESLint across the code by calling `yarn run lint` from a terminal. Warnings from ESLint show up in the `Errors and Warnings` quick box and you can navigate to them from inside VS Code.
83+
This project uses [ESLint](https://eslint.org/) for code linting. You can run ESLint across the code by calling `pnpm run lint` from a terminal. Warnings from ESLint show up in the `Errors and Warnings` quick box and you can navigate to them from inside VS Code.
8484

8585
To lint the code as you make changes you can install the [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extension.
8686

@@ -89,13 +89,13 @@ To lint the code as you make changes you can install the [ESLint](https://market
8989
To generate a production bundle (without packaging) run the following from a terminal:
9090

9191
```
92-
yarn run bundle
92+
pnpm run bundle
9393
```
9494

9595
To generate a VSIX (installation package) run the following from a terminal:
9696

9797
```
98-
yarn run package
98+
pnpm run package
9999
```
100100

101101
### Debugging
@@ -202,13 +202,13 @@ Then, use the [prep-release](scripts/prep-release.js) script to prepare a new re
202202

203203
1. Ensure you are on the `main` branch and have a clean working tree
204204
2. Ensure the [CHANGELOG.md](CHANGELOG.md) has been updated with the release notes
205-
3. Run `yarn run prep-release` and enter the desired `{major}.{minor}.{patch}` version when prompted
205+
3. Run `pnpm run prep-release` and enter the desired `{major}.{minor}.{patch}` version when prompted
206206
4. Review the `Bumps to v{major}.{minor}.{patch}` commit
207207
5. Run `git push --follow-tags` to push the commit and tag
208208

209209
Pushing the `v{major}.{minor}.{patch}` tag will trigger the [Publish Stable workflow](.github/workflows/cd-stable.yml) to automatically package the extension, create a [GitHub release](https://github.com/gitkraken/vscode-gitlens/releases/latest), and deploy it to the [VS Marketplace](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens).
210210

211-
If the action fails and retries are unsuccessful, the VSIX can be built locally with `yarn package` and uploaded manually to the marketplace. A GitHub release can also be [created manually](https://github.com/gitkraken/vscode-gitlens/releases/new) using `v{major}.{minor}.{patch}` as the title and the notes from the [CHANGELOG.md](CHANGELOG.md) with the VSIX attached.
211+
If the action fails and retries are unsuccessful, the VSIX can be built locally with `pnpm run package` and uploaded manually to the marketplace. A GitHub release can also be [created manually](https://github.com/gitkraken/vscode-gitlens/releases/new) using `v{major}.{minor}.{patch}` as the title and the notes from the [CHANGELOG.md](CHANGELOG.md) with the VSIX attached.
212212

213213
#### Preparing a Patch Release
214214

@@ -240,8 +240,8 @@ To add new icons to the GL Icons font follow the steps below:
240240
- Optimize and build the icons by running the following from a terminal:
241241

242242
```
243-
yarn run icons:svgo
244-
yarn run build:icons
243+
pnpm run icons:svgo
244+
pnpm run build:icons
245245
246246
```
247247

0 commit comments

Comments
 (0)