Skip to content

Commit 2386534

Browse files
dominikgbenmccann
andauthored
chore: make sure pnpm7 is used for this repo (sveltejs#4843)
Co-authored-by: Ben McCann <[email protected]>
1 parent c75f26c commit 2386534

File tree

17 files changed

+170
-48
lines changed

17 files changed

+170
-48
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
- [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check`
88

99
### Changesets
10-
- [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpx changeset` and following the prompts. All changesets should be `patch` until SvelteKit 1.0
10+
- [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. All changesets should be `patch` until SvelteKit 1.0

.github/workflows/ci.yml

-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v3
1818
- uses: pnpm/[email protected]
19-
with:
20-
version: 6.23.2
2119
- uses: actions/setup-node@v3
2220
with:
2321
node-version: '14.x'
@@ -43,8 +41,6 @@ jobs:
4341
- run: git config --global core.autocrlf false
4442
- uses: actions/checkout@v3
4543
- uses: pnpm/[email protected]
46-
with:
47-
version: 6.23.2
4844
- uses: actions/setup-node@v3
4945
with:
5046
node-version: ${{ matrix.node-version }}

.github/workflows/release.yml

-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
2424
fetch-depth: 0
2525
- uses: pnpm/[email protected]
26-
with:
27-
version: 6.23.2
2826
- name: Setup Node.js
2927
uses: actions/setup-node@v3
3028
with:

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
link-workspace-packages = true
2+
engine-strict = true

CONTRIBUTING.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,12 @@ git config core.hookspath .githooks
8888

8989
### Generating changelogs
9090

91-
For changes to be reflected in package changelogs, run `pnpx changeset` and follow the prompts. All changesets should be `patch` until SvelteKit 1.0
91+
For changes to be reflected in package changelogs, run `pnpm changeset` and follow the prompts. All changesets should be `patch` until SvelteKit 1.0
9292

9393
## Releases
9494

9595
The [Changesets GitHub action](https://github.com/changesets/action#with-publishing) will create and update a PR that applies changesets and publishes new versions of changed packages to npm.
9696

97-
> It uses `pnpm publish` rather than `pnpx changeset publish` so that we can use the `--filter` and (while in beta) `--tag` flags — though perhaps they work with `pnpx changeset publish`?
98-
9997
New packages will need to be published manually the first time if they are scoped to the `@sveltejs` organisation, by running this from the package directory:
10098

10199
```bash

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,9 @@
4040
"turbo": "^1.2.6",
4141
"typescript": "~4.6.2"
4242
},
43+
"packageManager": "[email protected]",
44+
"engines": {
45+
"pnpm": "^7.0.0"
46+
},
4347
"type": "module"
4448
}

packages/adapter-auto/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@sveltejs/adapter-vercel": "workspace:*"
3636
},
3737
"devDependencies": {
38+
"@types/node": "^14.14.20",
3839
"typescript": "^4.6.2"
3940
}
4041
}

packages/adapter-cloudflare-workers/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
},
3434
"devDependencies": {
3535
"@cloudflare/kv-asset-handler": "^0.2.0",
36+
"@types/node": "^14.14.20",
3637
"typescript": "^4.6.2"
3738
}
3839
}

packages/adapter-cloudflare/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"worktop": "0.8.0-next.14"
3636
},
3737
"devDependencies": {
38+
"@types/node": "^14.14.20",
3839
"@types/ws": "^8.5.3",
3940
"typescript": "^4.6.2"
4041
},

packages/adapter-netlify/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@rollup/plugin-json": "^4.1.0",
4343
"@rollup/plugin-node-resolve": "^13.0.5",
4444
"@sveltejs/kit": "workspace:*",
45+
"@types/node": "^14.14.20",
4546
"rimraf": "^3.0.2",
4647
"rollup": "^2.58.0",
4748
"typescript": "^4.6.2",

packages/adapter-node/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@rollup/plugin-json": "^4.1.0",
3939
"@sveltejs/kit": "workspace:*",
4040
"@types/compression": "^1.7.2",
41+
"@types/node": "^14.14.20",
4142
"c8": "^7.10.0",
4243
"compression": "^1.7.4",
4344
"node-fetch": "^3.1.0",

packages/adapter-static/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
},
3030
"devDependencies": {
3131
"@sveltejs/kit": "workspace:*",
32+
"@types/node": "^14.14.20",
3233
"playwright-chromium": "^1.21.0",
3334
"port-authority": "^1.1.2",
3435
"sirv": "^2.0.0",

packages/adapter-static/test/utils.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ export function run(app, callback) {
4848
context.server = await create_server(context.port, handler);
4949

5050
context.base = `http://localhost:${context.port}`;
51-
context.browser = await chromium.launch();
51+
context.browser = await chromium.launch({
52+
// use stable chrome from host OS instead of downloading one
53+
// see https://playwright.dev/docs/browsers#google-chrome--microsoft-edge
54+
channel: 'chrome'
55+
});
5256
context.page = await context.browser.newPage();
5357
} catch (e) {
5458
// TODO remove unnecessary try-catch https://github.com/lukeed/uvu/pull/61

packages/adapter-vercel/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
},
3333
"devDependencies": {
3434
"@sveltejs/kit": "workspace:*",
35+
"@types/node": "^14.14.20",
3536
"typescript": "^4.6.2"
3637
}
3738
}

packages/kit/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@playwright/test": "^1.21.0",
2020
"@rollup/plugin-replace": "^4.0.0",
2121
"@types/amphtml-validator": "^1.0.1",
22+
"@types/connect": "^3.4.35",
2223
"@types/cookie": "^0.5.0",
2324
"@types/marked": "^4.0.1",
2425
"@types/mime": "^2.0.3",
@@ -64,12 +65,12 @@
6465
"dev": "rollup -cw",
6566
"lint": "eslint --ignore-path .gitignore --ignore-pattern \"src/packaging/test/**\" \"{src,test}/**/*.{ts,mjs,js,svelte}\" && npm run check-format",
6667
"check": "tsc",
67-
"check:all": "tsc && pnpm run -r check --filter ./",
68+
"check:all": "tsc && pnpm -r --filter=\"./**\" check",
6869
"format": "npm run check-format -- --write",
6970
"check-format": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
7071
"prepublishOnly": "npm run build",
7172
"test": "npm run test:unit && npm run test:typings && npm run test:packaging && npm run test:integration",
72-
"test:integration": "pnpm run -r test --workspace-concurrency 1 --filter ./test",
73+
"test:integration": "pnpm run -r --workspace-concurrency 1 --filter=\"./test/**\" test",
7374
"test:unit": "uvu src \"(spec\\.js|test[\\\\/]index\\.js)\" -i packaging",
7475
"test:typings": "tsc --project test/typings",
7576
"test:packaging": "uvu src/packaging \"(spec\\.js|test[\\\\/]index\\.js)\"",

packages/kit/test/utils.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ export const config = {
162162
],
163163
use: {
164164
screenshot: 'only-on-failure',
165-
trace: 'retain-on-failure'
165+
trace: 'retain-on-failure',
166+
// use stable chrome from host OS instead of downloading one
167+
// see https://playwright.dev/docs/browsers#google-chrome--microsoft-edge
168+
channel: 'chrome'
166169
},
167170
workers: process.env.CI ? 2 : undefined
168171
};

0 commit comments

Comments
 (0)