Skip to content

Commit cdfa2a0

Browse files
committed
yarn -> pnpm
1 parent dd63769 commit cdfa2a0

File tree

12 files changed

+10013
-6848
lines changed

12 files changed

+10013
-6848
lines changed

.github/CONTRIBUTING.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ When submitting a PR, please fill out the template that is presented by GitHub w
3333
1. Install prerequisites:
3434
- [Visual Studio Code](https://code.visualstudio.com/), latest stable or insiders
3535
- [Node.js](https://nodejs.org/) v20.x or higher
36-
- [Yarn](https://classic.yarnpkg.com/) v1.x
36+
- [pnpm](https://pnpm.io/installation) v10.x or higher
3737
- _Optional_: [Docker Community Edition](https://store.docker.com/search?type=edition&offering=community) 🐋
3838

3939
2. Fork and clone repository:
@@ -47,15 +47,15 @@ When submitting a PR, please fill out the template that is presented by GitHub w
4747

4848
```bash
4949
# Install the dependencies
50-
yarn install
50+
pnpm install
5151

5252
# Open in VS Code
5353
code .
5454

5555
# Build with one of these...
56-
yarn build-dev # Fast build for development
57-
yarn build # Slow build for release
58-
yarn watch # Fast build whenever a file changes
56+
pnpm build-dev # Fast build for development
57+
pnpm build # Slow build for release
58+
pnpm watch # Fast build whenever a file changes
5959
```
6060

6161
4. Run extension using VS Code's "Run and Debug" menu
@@ -64,21 +64,20 @@ When submitting a PR, please fill out the template that is presented by GitHub w
6464

6565
```bash
6666
# If Docker is installed and running:
67-
npx gulp test # Run tests inside Docker container
68-
npx gulp test --grep <REGEX> # Run only tests/suites matching <REGEX> inside Docker container
67+
pnpm gulp test # Run tests inside Docker container
68+
pnpm gulp test --grep <REGEX> # Run only tests/suites matching <REGEX> inside Docker container
6969

7070
# Otherwise, build and run the tests locally:
71-
yarn build # Build
72-
yarn build-test # Build tests
73-
yarn test # Test (must close all instances of VS Code)
71+
pnpm build-test # Build tests
72+
pnpm test # Test (must close all instances of VS Code)
7473
```
7574

7675
6. Package and install extension:
7776

7877
```bash
7978
# Package extension into `vim-<MAJOR>.<MINOR>.<PATCH>.vsix`
8079
# (This can be opened and inspected like a .zip file)
81-
yarn package
80+
pnpm package
8281

8382
# Install packaged extension to your local VS Code installation
8483
code --install-extension vim-<MAJOR>.<MINOR>.<PATCH>.vsix --force
@@ -126,7 +125,7 @@ Before you push a release, be sure to make sure the changelog is updated!
126125
To push a release:
127126

128127
```bash
129-
npx gulp release --semver [SEMVER]
128+
pnpm gulp release --semver [SEMVER]
130129
git push --follow-tags
131130
```
132131

@@ -142,7 +141,7 @@ In addition to building and testing the extension, when a tag is applied to the
142141

143142
### VS Code Slowdown
144143

145-
If you notice a slowdown and have ever run `yarn test` in the past instead of running tests through VSCode, you might find a `.vscode-test/` folder, which VSCode is continually consuming CPU cycles to index. Long story short, you can speed up VSCode by:
144+
If you notice a slowdown and have ever run `pnpm test` in the past instead of running tests through VSCode, you might find a `.vscode-test/` folder, which VSCode is continually consuming CPU cycles to index. Long story short, you can speed up VSCode by:
146145

147146
```bash
148147
rm -rf .vscode-test/

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
## Developer Workflows
1919

20-
- **Build:** Use `yarn build-dev` (or the VS Code task) to build the extension. See `package.json` and `gulpfile.js` for all tasks.
21-
- **Test:** Run tests with `yarn build-test` then `yarn test`. Tests are in `test/` and mirror the structure of `src/`.
20+
- **Build:** Use `pnpm build-dev` (or the VS Code task) to build the extension. See `package.json` and `gulpfile.js` for all tasks.
21+
- **Test:** Run tests with `pnpm build-test` then `pnpm test`. Tests are in `test/` and mirror the structure of `src/`.
2222
- **Debug:** Launch the extension in the Extension Development Host via VS Code's debugger. Use breakpoints in TypeScript files.
2323
- **Release:** Versioning and release tasks are managed via Gulp (`gulpfile.js`).
2424

.github/workflows/build.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,38 @@ jobs:
1515
- name: Checkout VSCodeVim
1616
uses: actions/checkout@v6
1717

18+
- name: Set up pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
version: 10
22+
1823
- name: Set up Node.js
1924
uses: actions/setup-node@v6
2025
with:
2126
node-version: 20
22-
cache: yarn
27+
cache: pnpm
2328

2429
- name: Install dependencies
25-
run: yarn install --frozen-lockfile
30+
run: pnpm install
2631

2732
- name: Prettier
2833
if: matrix.os != 'windows-latest'
29-
run: yarn prettier:check
34+
run: pnpm prettier:check
3035

3136
- name: Lint
32-
run: yarn lint
37+
run: pnpm lint
3338

3439
- name: Build
35-
run: yarn build
40+
run: pnpm build
3641

3742
- name: Test on ubuntu-latest
3843
if: matrix.os != 'windows-latest'
3944
run: |
40-
yarn build-test
41-
xvfb-run -a yarn test
45+
pnpm build-test
46+
xvfb-run -a pnpm test
4247
4348
- name: Test on windows-latest
4449
if: matrix.os == 'windows-latest'
4550
run: |
46-
yarn build-test
47-
yarn test
51+
pnpm build-test
52+
pnpm test

.github/workflows/pull_request.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,30 @@ jobs:
1515
- name: Checkout VSCodeVim
1616
uses: actions/checkout@v6
1717

18+
- name: Set up pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
version: 10
22+
1823
- name: Set up Node.js
1924
uses: actions/setup-node@v6
2025
with:
2126
node-version: 20
22-
cache: yarn
27+
cache: pnpm
2328

2429
- name: Install dependencies
25-
run: yarn install --frozen-lockfile
30+
run: pnpm install
2631

2732
- name: Prettier
28-
run: yarn prettier:check
33+
run: pnpm prettier:check
2934

3035
- name: Lint
31-
run: yarn lint
36+
run: pnpm lint
3237

3338
- name: Build
34-
run: yarn build
39+
run: pnpm build
3540

3641
- name: Test
3742
run: |
38-
yarn build-test
39-
xvfb-run -a yarn test
43+
pnpm build-test
44+
xvfb-run -a pnpm test

.github/workflows/release.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,35 @@ jobs:
1212
- name: Checkout VSCodeVim
1313
uses: actions/checkout@v6
1414

15+
- name: Set up pnpm
16+
uses: pnpm/action-setup@v4
17+
with:
18+
version: 10
19+
1520
- name: Set up Node.js
1621
uses: actions/setup-node@v6
1722
with:
1823
node-version: 20
19-
cache: yarn
24+
cache: pnpm
2025

2126
- name: Install dependencies
22-
run: yarn install --frozen-lockfile
27+
run: pnpm install
2328

2429
- name: Lint
25-
run: yarn lint
30+
run: pnpm lint
2631

2732
- name: Build
28-
run: yarn build
33+
run: pnpm build
2934

3035
- name: Test
3136
run: |
32-
yarn build-test
33-
xvfb-run -a yarn test
37+
pnpm build-test
38+
xvfb-run -a pnpm test
3439
3540
- name: Build extension package
3641
id: build_vsix
3742
run: |
38-
yarn package;
43+
pnpm package;
3944
echo ::set-output name=vsix_path::$(ls *.vsix);
4045
4146
- name: Create release on GitHub
@@ -60,7 +65,7 @@ jobs:
6065
asset_content_type: application/zip
6166

6267
- name: Publish to VSCode Extension Marketplace
63-
run: yarn run vsce publish --yarn
68+
run: pnpm vsce publish
6469
env:
6570
VSCE_PAT: ${{ secrets.VSCE_PAT }}
6671

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx lint-staged
1+
pnpm lint-staged

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ tsconfig.json
2424
webpack.*.js
2525
gulpfile.js
2626
renovate.json
27+
pnpm-lock.yaml

gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function updateVersion(done) {
4040
var options = minimist(process.argv.slice(2), releaseOptions);
4141

4242
return gulp
43-
.src(['./package.json', './yarn.lock'])
43+
.src(['./package.json', './pnpm-lock.yaml'])
4444
.pipe(bump({ type: options.semver }))
4545
.pipe(gulp.dest('./'))
4646
.on('end', () => {
@@ -157,4 +157,4 @@ gulp.task(
157157
createGitTag,
158158
),
159159
);
160-
gulp.task('default', shell.task('yarn build-dev'));
160+
gulp.task('default', shell.task('pnpm build-dev'));

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,18 +1178,18 @@
11781178
]
11791179
},
11801180
"scripts": {
1181-
"vscode:prepublish": "yarn build",
1181+
"vscode:prepublish": "pnpm build",
11821182
"build": "webpack -c webpack.config.js && npm run commit-hash",
11831183
"build-dev": "webpack -c webpack.dev.js && npm run commit-hash",
11841184
"build-test": "gulp prepare-test",
11851185
"commit-hash": "git rev-parse HEAD > out/version.txt",
11861186
"test": "node ./out/test/runTest.js",
11871187
"lint": "eslint .",
11881188
"lint:fix": "eslint . --fix",
1189-
"prettier": "npx prettier --write .",
1190-
"prettier:check": "npx prettier --check .",
1189+
"prettier": "prettier --write .",
1190+
"prettier:check": "prettier --check .",
11911191
"watch": "webpack -c webpack.dev.js --watch",
1192-
"package": "yarn run vsce package --yarn --allow-star-activation",
1192+
"package": "vsce package --allow-star-activation",
11931193
"prepare": "husky"
11941194
},
11951195
"dependencies": {

0 commit comments

Comments
 (0)