Skip to content

Commit e42c759

Browse files
authored
chore: upgrade to pnpm v7 (#8041)
1 parent 68459fb commit e42c759

File tree

10 files changed

+34
-10
lines changed

10 files changed

+34
-10
lines changed

.github/workflows/ci.yml

+9
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ jobs:
4242
# node_version: 18
4343
fail-fast: false
4444

45+
env:
46+
# Install playwright's binray under node_modules so it will be cached together
47+
PLAYWRIGHT_BROWSERS_PATH: "0"
48+
4549
name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}"
4650
steps:
4751
- name: Checkout
@@ -59,6 +63,9 @@ jobs:
5963
- name: Install deps
6064
run: pnpm install
6165

66+
- name: Install Playwright
67+
run: pnpm playwright install
68+
6269
- name: Build vite
6370
run: pnpm run ci-build-vite
6471

@@ -97,6 +104,8 @@ jobs:
97104

98105
- name: Install deps
99106
run: pnpm install
107+
env:
108+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
100109

101110
- name: Prepare
102111
run: |

.github/workflows/publish.yml

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131

3232
- name: Install deps
3333
run: pnpm install
34+
env:
35+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
3436

3537
- name: Publish package
3638
run: pnpm run ci-publish -- ${{ github.ref_name }}

.npmrc

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
hoist-pattern[]=*eslint*
22
hoist-pattern[]=*babel*
3-
hoist-pattern[]=*jest*
43
hoist-pattern[]=@emotion/*
54
hoist-pattern[]=postcss
65
hoist-pattern[]=pug

package.json

+16-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,23 @@
3838
"devDependencies": {
3939
"@microsoft/api-extractor": "^7.23.1",
4040
"@types/babel__core": "^7.1.19",
41+
"@types/convert-source-map": "^1.5.2",
42+
"@types/cross-spawn": "^6.0.2",
43+
"@types/debug": "^4.1.7",
44+
"@types/estree": "^0.0.51",
45+
"@types/etag": "^1.8.1",
4146
"@types/fs-extra": "^9.0.13",
47+
"@types/hash-sum": "^1.0.0",
48+
"@types/less": "^3.0.3",
49+
"@types/micromatch": "^4.0.2",
50+
"@types/mime": "^2.0.3",
4251
"@types/node": "^17.0.31",
4352
"@types/prompts": "^2.4.0",
53+
"@types/resolve": "^1.20.2",
54+
"@types/sass": "~1.43.1",
4455
"@types/semver": "^7.3.9",
56+
"@types/stylus": "^0.48.37",
57+
"@types/ws": "^8.5.3",
4558
"@typescript-eslint/eslint-plugin": "^5.22.0",
4659
"@typescript-eslint/parser": "^5.22.0",
4760
"conventional-changelog-cli": "^2.2.2",
@@ -71,7 +84,8 @@
7184
"typescript": "^4.6.4",
7285
"vite": "workspace:*",
7386
"vitepress": "^0.22.4",
74-
"vitest": "^0.12.4"
87+
"vitest": "^0.12.4",
88+
"vue": "^3.2.33"
7589
},
7690
"simple-git-hooks": {
7791
"pre-commit": "pnpm exec lint-staged --concurrent false",
@@ -91,7 +105,7 @@
91105
"eslint --fix"
92106
]
93107
},
94-
"packageManager": "pnpm@6.32.11",
108+
"packageManager": "pnpm@7.0.1",
95109
"pnpm": {
96110
"overrides": {
97111
"vite": "workspace:*",

packages/plugin-vue/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
},
3737
"devDependencies": {
3838
"@rollup/pluginutils": "^4.2.1",
39-
"@types/hash-sum": "^1.0.0",
4039
"debug": "^4.3.4",
4140
"hash-sum": "^2.0.0",
4241
"rollup": "^2.72.1",

playground/ssr-vue/__tests__/serve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export async function serve(root, isProd) {
1414
// client build
1515
await build({
1616
root,
17-
logLevel: 'silent', // exceptions are logged by Jest
17+
logLevel: 'silent', // exceptions are logged by Vitest
1818
build: {
1919
target: 'esnext',
2020
minify: false,

playground/ssr-vue/src/App.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
<router-link to="/about">About</router-link>
55
<router-view v-slot="{ Component }">
66
<Suspense>
7-
<component :is="Component" />
7+
<div>
8+
<component :is="Component" />
9+
</div>
810
</Suspense>
911
</router-view>
1012
</div>

playground/ssr-vue/src/pages/About.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default {
1111
async setup() {
1212
const url = import.meta.env.SSR
1313
? import.meta.url
14-
: document.querySelector('.import-meta-url').textContent
14+
: document.querySelector('.import-meta-url')?.textContent
1515
return {
1616
msg: 'About',
1717
url

playground/ssr-vue/src/pages/Home.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ function load(file) {
3333
}
3434
const url = import.meta.env.SSR
3535
? import.meta.url
36-
: document.querySelector('.import-meta-url').textContent
37-
const protocol = new URL(url).protocol
36+
: document.querySelector('.import-meta-url')?.textContent
37+
const protocol = url ? new URL(url).protocol : undefined
3838
3939
const state = reactive({
4040
count: 0,

playground/vitestSetup.ts

-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ beforeAll(async (s) => {
184184
// If the page remains open, a command like `await page.click(...)` produces
185185
// a timeout with an exception that hides the real error in the console.
186186
await page.close()
187-
188187
beforeAllError = e
189188
}
190189

0 commit comments

Comments
 (0)