Skip to content

Commit

Permalink
chore: make sure pnpm7 is used for this repo (#4843)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
  • Loading branch information
dominikg and benmccann authored May 13, 2022
1 parent c75f26c commit 2386534
Show file tree
Hide file tree
Showing 17 changed files with 170 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
- [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check`

### Changesets
- [ ] 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
- [ ] 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
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.23.2
- uses: actions/setup-node@v3
with:
node-version: '14.x'
Expand All @@ -43,8 +41,6 @@ jobs:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.23.2
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.23.2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
link-workspace-packages = true
engine-strict = true
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,12 @@ git config core.hookspath .githooks

### Generating changelogs

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

## Releases

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.

> 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`?
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:

```bash
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,9 @@
"turbo": "^1.2.6",
"typescript": "~4.6.2"
},
"packageManager": "pnpm@7.1.0",
"engines": {
"pnpm": "^7.0.0"
},
"type": "module"
}
1 change: 1 addition & 0 deletions packages/adapter-auto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@sveltejs/adapter-vercel": "workspace:*"
},
"devDependencies": {
"@types/node": "^14.14.20",
"typescript": "^4.6.2"
}
}
1 change: 1 addition & 0 deletions packages/adapter-cloudflare-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
},
"devDependencies": {
"@cloudflare/kv-asset-handler": "^0.2.0",
"@types/node": "^14.14.20",
"typescript": "^4.6.2"
}
}
1 change: 1 addition & 0 deletions packages/adapter-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"worktop": "0.8.0-next.14"
},
"devDependencies": {
"@types/node": "^14.14.20",
"@types/ws": "^8.5.3",
"typescript": "^4.6.2"
},
Expand Down
1 change: 1 addition & 0 deletions packages/adapter-netlify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.0.5",
"@sveltejs/kit": "workspace:*",
"@types/node": "^14.14.20",
"rimraf": "^3.0.2",
"rollup": "^2.58.0",
"typescript": "^4.6.2",
Expand Down
1 change: 1 addition & 0 deletions packages/adapter-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@rollup/plugin-json": "^4.1.0",
"@sveltejs/kit": "workspace:*",
"@types/compression": "^1.7.2",
"@types/node": "^14.14.20",
"c8": "^7.10.0",
"compression": "^1.7.4",
"node-fetch": "^3.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/adapter-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"devDependencies": {
"@sveltejs/kit": "workspace:*",
"@types/node": "^14.14.20",
"playwright-chromium": "^1.21.0",
"port-authority": "^1.1.2",
"sirv": "^2.0.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/adapter-static/test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export function run(app, callback) {
context.server = await create_server(context.port, handler);

context.base = `http://localhost:${context.port}`;
context.browser = await chromium.launch();
context.browser = await chromium.launch({
// use stable chrome from host OS instead of downloading one
// see https://playwright.dev/docs/browsers#google-chrome--microsoft-edge
channel: 'chrome'
});
context.page = await context.browser.newPage();
} catch (e) {
// TODO remove unnecessary try-catch https://github.com/lukeed/uvu/pull/61
Expand Down
1 change: 1 addition & 0 deletions packages/adapter-vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
},
"devDependencies": {
"@sveltejs/kit": "workspace:*",
"@types/node": "^14.14.20",
"typescript": "^4.6.2"
}
}
5 changes: 3 additions & 2 deletions packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@playwright/test": "^1.21.0",
"@rollup/plugin-replace": "^4.0.0",
"@types/amphtml-validator": "^1.0.1",
"@types/connect": "^3.4.35",
"@types/cookie": "^0.5.0",
"@types/marked": "^4.0.1",
"@types/mime": "^2.0.3",
Expand Down Expand Up @@ -64,12 +65,12 @@
"dev": "rollup -cw",
"lint": "eslint --ignore-path .gitignore --ignore-pattern \"src/packaging/test/**\" \"{src,test}/**/*.{ts,mjs,js,svelte}\" && npm run check-format",
"check": "tsc",
"check:all": "tsc && pnpm run -r check --filter ./",
"check:all": "tsc && pnpm -r --filter=\"./**\" check",
"format": "npm run check-format -- --write",
"check-format": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
"prepublishOnly": "npm run build",
"test": "npm run test:unit && npm run test:typings && npm run test:packaging && npm run test:integration",
"test:integration": "pnpm run -r test --workspace-concurrency 1 --filter ./test",
"test:integration": "pnpm run -r --workspace-concurrency 1 --filter=\"./test/**\" test",
"test:unit": "uvu src \"(spec\\.js|test[\\\\/]index\\.js)\" -i packaging",
"test:typings": "tsc --project test/typings",
"test:packaging": "uvu src/packaging \"(spec\\.js|test[\\\\/]index\\.js)\"",
Expand Down
5 changes: 4 additions & 1 deletion packages/kit/test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ export const config = {
],
use: {
screenshot: 'only-on-failure',
trace: 'retain-on-failure'
trace: 'retain-on-failure',
// use stable chrome from host OS instead of downloading one
// see https://playwright.dev/docs/browsers#google-chrome--microsoft-edge
channel: 'chrome'
},
workers: process.env.CI ? 2 : undefined
};
Expand Down
Loading

0 comments on commit 2386534

Please sign in to comment.