Skip to content

Commit

Permalink
chore: upgrade to pnpm v7 (#8041)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 11, 2022
1 parent 68459fb commit e42c759
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -42,6 +42,10 @@ jobs:
# node_version: 18
fail-fast: false

env:
# Install playwright's binray under node_modules so it will be cached together
PLAYWRIGHT_BROWSERS_PATH: "0"

name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}"
steps:
- name: Checkout
Expand All @@ -59,6 +63,9 @@ jobs:
- name: Install deps
run: pnpm install

- name: Install Playwright
run: pnpm playwright install

- name: Build vite
run: pnpm run ci-build-vite

Expand Down Expand Up @@ -97,6 +104,8 @@ jobs:

- name: Install deps
run: pnpm install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"

- name: Prepare
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Expand Up @@ -31,6 +31,8 @@ jobs:

- name: Install deps
run: pnpm install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"

- name: Publish package
run: pnpm run ci-publish -- ${{ github.ref_name }}
Expand Down
1 change: 0 additions & 1 deletion .npmrc
@@ -1,6 +1,5 @@
hoist-pattern[]=*eslint*
hoist-pattern[]=*babel*
hoist-pattern[]=*jest*
hoist-pattern[]=@emotion/*
hoist-pattern[]=postcss
hoist-pattern[]=pug
Expand Down
18 changes: 16 additions & 2 deletions package.json
Expand Up @@ -38,10 +38,23 @@
"devDependencies": {
"@microsoft/api-extractor": "^7.23.1",
"@types/babel__core": "^7.1.19",
"@types/convert-source-map": "^1.5.2",
"@types/cross-spawn": "^6.0.2",
"@types/debug": "^4.1.7",
"@types/estree": "^0.0.51",
"@types/etag": "^1.8.1",
"@types/fs-extra": "^9.0.13",
"@types/hash-sum": "^1.0.0",
"@types/less": "^3.0.3",
"@types/micromatch": "^4.0.2",
"@types/mime": "^2.0.3",
"@types/node": "^17.0.31",
"@types/prompts": "^2.4.0",
"@types/resolve": "^1.20.2",
"@types/sass": "~1.43.1",
"@types/semver": "^7.3.9",
"@types/stylus": "^0.48.37",
"@types/ws": "^8.5.3",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"conventional-changelog-cli": "^2.2.2",
Expand Down Expand Up @@ -71,7 +84,8 @@
"typescript": "^4.6.4",
"vite": "workspace:*",
"vitepress": "^0.22.4",
"vitest": "^0.12.4"
"vitest": "^0.12.4",
"vue": "^3.2.33"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --concurrent false",
Expand All @@ -91,7 +105,7 @@
"eslint --fix"
]
},
"packageManager": "pnpm@6.32.11",
"packageManager": "pnpm@7.0.1",
"pnpm": {
"overrides": {
"vite": "workspace:*",
Expand Down
1 change: 0 additions & 1 deletion packages/plugin-vue/package.json
Expand Up @@ -36,7 +36,6 @@
},
"devDependencies": {
"@rollup/pluginutils": "^4.2.1",
"@types/hash-sum": "^1.0.0",
"debug": "^4.3.4",
"hash-sum": "^2.0.0",
"rollup": "^2.72.1",
Expand Down
2 changes: 1 addition & 1 deletion playground/ssr-vue/__tests__/serve.ts
Expand Up @@ -14,7 +14,7 @@ export async function serve(root, isProd) {
// client build
await build({
root,
logLevel: 'silent', // exceptions are logged by Jest
logLevel: 'silent', // exceptions are logged by Vitest
build: {
target: 'esnext',
minify: false,
Expand Down
4 changes: 3 additions & 1 deletion playground/ssr-vue/src/App.vue
Expand Up @@ -4,7 +4,9 @@
<router-link to="/about">About</router-link>
<router-view v-slot="{ Component }">
<Suspense>
<component :is="Component" />
<div>
<component :is="Component" />
</div>
</Suspense>
</router-view>
</div>
Expand Down
2 changes: 1 addition & 1 deletion playground/ssr-vue/src/pages/About.vue
Expand Up @@ -11,7 +11,7 @@ export default {
async setup() {
const url = import.meta.env.SSR
? import.meta.url
: document.querySelector('.import-meta-url').textContent
: document.querySelector('.import-meta-url')?.textContent
return {
msg: 'About',
url
Expand Down
4 changes: 2 additions & 2 deletions playground/ssr-vue/src/pages/Home.vue
Expand Up @@ -33,8 +33,8 @@ function load(file) {
}
const url = import.meta.env.SSR
? import.meta.url
: document.querySelector('.import-meta-url').textContent
const protocol = new URL(url).protocol
: document.querySelector('.import-meta-url')?.textContent
const protocol = url ? new URL(url).protocol : undefined
const state = reactive({
count: 0,
Expand Down
1 change: 0 additions & 1 deletion playground/vitestSetup.ts
Expand Up @@ -184,7 +184,6 @@ beforeAll(async (s) => {
// If the page remains open, a command like `await page.click(...)` produces
// a timeout with an exception that hides the real error in the console.
await page.close()

beforeAllError = e
}

Expand Down

0 comments on commit e42c759

Please sign in to comment.