Skip to content

Commit d64e86a

Browse files
authored
chore: switch from npm to pnpm (#8514)
1 parent be64520 commit d64e86a

File tree

10 files changed

+3376
-9499
lines changed

10 files changed

+3376
-9499
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,26 @@ jobs:
2424
os: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@v3
27+
- uses: pnpm/[email protected]
2728
- uses: actions/setup-node@v3
2829
with:
2930
node-version: ${{ matrix.node-version }}
30-
cache: npm
31-
- run: npm install
32-
- run: npm run test:integration
31+
cache: pnpm
32+
- run: pnpm install --frozen-lockfile
33+
- run: node node_modules/puppeteer/install.js
34+
- run: pnpm test:integration
3335
env:
3436
CI: true
3537
Lint:
3638
runs-on: ubuntu-latest
3739
timeout-minutes: 5
3840
steps:
3941
- uses: actions/checkout@v3
42+
- uses: pnpm/[email protected]
4043
- uses: actions/setup-node@v3
4144
with:
42-
cache: npm
43-
- run: 'npm i && npm run lint'
45+
cache: pnpm
46+
- run: 'pnpm i && pnpm lint'
4447
Unit:
4548
runs-on: ${{ matrix.os }}
4649
timeout-minutes: 10
@@ -59,10 +62,11 @@ jobs:
5962
os: ubuntu-latest
6063
steps:
6164
- uses: actions/checkout@v3
65+
- uses: pnpm/[email protected]
6266
- uses: actions/setup-node@v3
6367
with:
64-
cache: npm
65-
- run: npm install
68+
cache: pnpm
69+
- run: pnpm install
6670
env:
6771
SKIP_PREPARE: true
68-
- run: npm run test:unit
72+
- run: pnpm test:unit

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ Small pull requests are much easier to review and more likely to get merged.
7272

7373
### Installation
7474

75-
1. Ensure you have [npm](https://www.npmjs.com/get-npm) installed.
76-
1. After cloning the repository, run `npm install` in the root of the repository.
77-
1. To start a development server, run `npm run dev`.
75+
1. Ensure you have [pnpm](https://pnpm.io/installation) installed.
76+
1. After cloning the repository, run `pnpm install` in the root of the repository.
77+
1. To compile in watch mode, run `pnpm dev`.
7878

7979
### Creating a branch
8080

@@ -94,8 +94,8 @@ Test samples are kept in `/test/xxx/samples` folder.
9494

9595
#### Running tests
9696

97-
1. To run test, run `npm run test`.
98-
1. To run test for a specific feature, you can use the `-g` (aka `--grep`) option. For example, to only run test involving transitions, run `npm run test -- -g transition`.
97+
1. To run test, run `pnpm test`.
98+
1. To run test for a specific feature, you can use the `-g` (aka `--grep`) option. For example, to only run test involving transitions, run `pnpm test -- -g transition`.
9999

100100
##### Running solo test
101101

@@ -106,11 +106,11 @@ Test samples are kept in `/test/xxx/samples` folder.
106106
##### Updating `.expected` files
107107

108108
1. Tests suites like `css`, `js`, `server-side-rendering` asserts that the generated output has to match the content in the `.expected` file. For example, in the `js` test suites, the generated js code is compared against the content in `expected.js`.
109-
1. To update the content of the `.expected` file, run the test with `--update` flag. (`npm run test --update`)
109+
1. To update the content of the `.expected` file, run the test with `--update` flag. (`pnpm test --update`)
110110

111111
### Style guide
112112

113-
[Eslint](https://eslint.org) will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running `npm run lint`.
113+
[Eslint](https://eslint.org) will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running `pnpm lint`.
114114

115115
#### Code conventions
116116

@@ -122,8 +122,8 @@ Test samples are kept in `/test/xxx/samples` folder.
122122
Please make sure the following is done when submitting a pull request:
123123

124124
1. Describe your **test plan** in your pull request description. Make sure to test your changes.
125-
1. Make sure your code lints (`npm run lint`).
126-
1. Make sure your tests pass (`npm run test`).
125+
1. Make sure your code lints (`pnpm lint`).
126+
1. Make sure your tests pass (`pnpm test`).
127127

128128
All pull requests should be opened against the `master` branch. Make sure the PR does only one thing, otherwise please split it.
129129

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ To install and work on Svelte locally:
3434
```bash
3535
git clone https://github.com/sveltejs/svelte.git
3636
cd svelte
37-
npm install
37+
pnpm install
3838
```
3939

4040
> Do not use Yarn to install the dependencies, as the specific package versions in `package-lock.json` are used to build and test Svelte.
4141
4242
To build the compiler and all the other modules included in the package:
4343

4444
```bash
45-
npm run build
45+
pnpm build
4646
```
4747

48-
To watch for changes and continually rebuild the package (this is useful if you're using [npm link](https://docs.npmjs.com/cli/link.html) to test out changes in a project locally):
48+
To watch for changes and continually rebuild the package (this is useful if you're using [`pnpm link`](https://pnpm.io/cli/link) to test out changes in a project locally):
4949

5050
```bash
51-
npm run dev
51+
pnpm dev
5252
```
5353

5454
The compiler is written in [TypeScript](https://www.typescriptlang.org/), but don't let that put you off — it's basically just JavaScript with type annotations. You'll pick it up in no time. If you're using an editor other than [Visual Studio Code](https://code.visualstudio.com/), you may need to install a plugin in order to get syntax highlighting and code hints, etc.
@@ -57,13 +57,13 @@ The compiler is written in [TypeScript](https://www.typescriptlang.org/), but do
5757
### Running Tests
5858

5959
```bash
60-
npm run test
60+
pnpm test
6161
```
6262

6363
To filter tests, use `-g` (aka `--grep`). For example, to only run tests involving transitions:
6464

6565
```bash
66-
npm run test -- -g transition
66+
pnpm test -- -g transition
6767
```
6868

6969

0 commit comments

Comments
 (0)