Skip to content

Commit

Permalink
Merge branch 'main' into test-isReactive
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunny-117 authored Feb 4, 2025
2 parents 012fa64 + 22f359b commit cca1d53
Show file tree
Hide file tree
Showing 11 changed files with 643 additions and 776 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
- name: Run prettier
run: pnpm run format

- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
4 changes: 2 additions & 2 deletions .github/workflows/size-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: pnpm install

- name: Download Size Data
uses: dawidd6/action-download-artifact@v6
uses: dawidd6/action-download-artifact@v7
with:
name: size-data
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -56,7 +56,7 @@ jobs:
path: temp/size/base.txt

- name: Download Previous Size Data
uses: dawidd6/action-download-artifact@v6
uses: dawidd6/action-download-artifact@v7
with:
branch: ${{ steps.pr-base.outputs.content }}
workflow: size-data.yml
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"version": "3.5.13",
"packageManager": "[email protected].2",
"packageManager": "[email protected].4",
"type": "module",
"scripts": {
"dev": "node scripts/dev.js",
Expand Down Expand Up @@ -69,23 +69,23 @@
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-replace": "5.0.4",
"@swc/core": "^1.10.3",
"@swc/core": "^1.10.11",
"@types/hash-sum": "^1.0.2",
"@types/node": "^22.10.2",
"@types/node": "^22.12.0",
"@types/semver": "^7.5.8",
"@types/serve-handler": "^6.1.4",
"@vitest/coverage-v8": "^2.1.8",
"@vitest/coverage-v8": "^3.0.2",
"@vue/consolidate": "1.0.0",
"conventional-changelog-cli": "^5.0.0",
"enquirer": "^2.4.1",
"esbuild": "^0.24.2",
"esbuild-plugin-polyfill-node": "^0.3.0",
"eslint": "^9.17.0",
"eslint": "^9.18.0",
"eslint-plugin-import-x": "^4.6.1",
"@vitest/eslint-plugin": "^1.1.20",
"@vitest/eslint-plugin": "^1.1.25",
"estree-walker": "catalog:",
"jsdom": "^25.0.1",
"lint-staged": "^15.2.11",
"jsdom": "^26.0.0",
"lint-staged": "^15.4.1",
"lodash": "^4.17.21",
"magic-string": "^0.30.17",
"markdown-table": "^3.0.4",
Expand All @@ -95,9 +95,9 @@
"prettier": "^3.4.2",
"pretty-bytes": "^6.1.1",
"pug": "^3.0.3",
"puppeteer": "~23.3.0",
"puppeteer": "~24.1.0",
"rimraf": "^6.0.1",
"rollup": "^4.29.1",
"rollup": "^4.32.1",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-polyfill-node": "^0.13.0",
Expand All @@ -108,9 +108,9 @@
"todomvc-app-css": "^2.4.3",
"tslib": "^2.8.1",
"typescript": "~5.6.2",
"typescript-eslint": "^8.18.1",
"typescript-eslint": "^8.20.0",
"vite": "catalog:",
"vitest": "^2.1.8"
"vitest": "^3.0.2"
},
"pnpm": {
"peerDependencyRules": {
Expand Down
2 changes: 1 addition & 1 deletion packages-private/sfc-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"vite": "catalog:"
},
"dependencies": {
"@vue/repl": "^4.4.2",
"@vue/repl": "^4.4.3",
"file-saver": "^2.0.5",
"jszip": "^3.10.1",
"vue": "workspace:*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
"vite": "^6.0.6"
"vite": "^6.0.11"
}
}
6 changes: 3 additions & 3 deletions packages/compiler-sfc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@vue/shared": "workspace:*",
"estree-walker": "catalog:",
"magic-string": "catalog:",
"postcss": "^8.4.49",
"postcss": "^8.5.1",
"source-map-js": "catalog:"
},
"devDependencies": {
Expand All @@ -58,10 +58,10 @@
"hash-sum": "^2.0.0",
"lru-cache": "10.1.0",
"merge-source-map": "^1.1.0",
"minimatch": "~9.0.5",
"minimatch": "~10.0.1",
"postcss-modules": "^6.0.1",
"postcss-selector-parser": "^7.0.0",
"pug": "^3.0.3",
"sass": "^1.83.0"
"sass": "^1.83.4"
}
}
8 changes: 0 additions & 8 deletions packages/compiler-sfc/src/compileScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ export function compileScript(
const scriptLang = script && script.lang
const scriptSetupLang = scriptSetup && scriptSetup.lang

let refBindings: string[] | undefined

if (!scriptSetup) {
if (!script) {
throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`)
Expand Down Expand Up @@ -740,12 +738,6 @@ export function compileScript(
for (const key in setupBindings) {
ctx.bindingMetadata[key] = setupBindings[key]
}
// known ref bindings
if (refBindings) {
for (const key of refBindings) {
ctx.bindingMetadata[key] = BindingTypes.SETUP_REF
}
}

// 7. inject `useCssVars` calls
if (
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/__tests__/e2e/e2eUtils.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import puppeteer, {
type Browser,
type ClickOptions,
type LaunchOptions,
type Page,
type PuppeteerLaunchOptions,
} from 'puppeteer'

export const E2E_TIMEOUT: number = 30 * 1000

const puppeteerOptions: PuppeteerLaunchOptions = {
const puppeteerOptions: LaunchOptions = {
args: process.env.CI ? ['--no-sandbox', '--disable-setuid-sandbox'] : [],
headless: true,
}
Expand Down
13 changes: 9 additions & 4 deletions packages/vue/__tests__/e2e/todomvc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe('e2e: todomvc', () => {
classList,
enterValue,
clearValue,
timeout,
} = setupPuppeteer()

async function removeItemAt(n: number) {
Expand Down Expand Up @@ -101,6 +102,7 @@ describe('e2e: todomvc', () => {

// active filter
await click('.filters li:nth-child(2) a')
await timeout(1)
expect(await count('.todo')).toBe(1)
expect(await count('.todo.completed')).toBe(0)
// add item with filter active
Expand All @@ -109,6 +111,7 @@ describe('e2e: todomvc', () => {

// completed filter
await click('.filters li:nth-child(3) a')
await timeout(1)
expect(await count('.todo')).toBe(2)
expect(await count('.todo.completed')).toBe(2)

Expand All @@ -128,13 +131,15 @@ describe('e2e: todomvc', () => {
await click('.todo .toggle')
expect(await count('.todo')).toBe(1)
await click('.filters li:nth-child(2) a')
await timeout(1)
expect(await count('.todo')).toBe(3)
await click('.todo .toggle')
expect(await count('.todo')).toBe(2)

// editing triggered by blur
await click('.filters li:nth-child(1) a')
await click('.todo:nth-child(1) label', { clickCount: 2 })
await timeout(1)
await click('.todo:nth-child(1) label', { count: 2 })
expect(await count('.todo.editing')).toBe(1)
expect(await isFocused('.todo:nth-child(1) .edit')).toBe(true)
await clearValue('.todo:nth-child(1) .edit')
Expand All @@ -144,21 +149,21 @@ describe('e2e: todomvc', () => {
expect(await text('.todo:nth-child(1) label')).toBe('edited!')

// editing triggered by enter
await click('.todo label', { clickCount: 2 })
await click('.todo label', { count: 2 })
await enterValue('.todo:nth-child(1) .edit', 'edited again!')
expect(await count('.todo.editing')).toBe(0)
expect(await text('.todo:nth-child(1) label')).toBe('edited again!')

// cancel
await click('.todo label', { clickCount: 2 })
await click('.todo label', { count: 2 })
await clearValue('.todo:nth-child(1) .edit')
await page().type('.todo:nth-child(1) .edit', 'edited!')
await page().keyboard.press('Escape')
expect(await count('.todo.editing')).toBe(0)
expect(await text('.todo:nth-child(1) label')).toBe('edited again!')

// empty value should remove
await click('.todo label', { clickCount: 2 })
await click('.todo label', { count: 2 })
await enterValue('.todo:nth-child(1) .edit', ' ')
expect(await count('.todo')).toBe(3)

Expand Down
2 changes: 1 addition & 1 deletion packages/vue/__tests__/e2e/tree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('e2e: tree', () => {
expect(await isVisible('#demo ul')).toBe(true)
expect(await text('#demo li div span')).toContain('[-]')

await click('#demo ul > .item div', { clickCount: 2 })
await click('#demo ul > .item div', { count: 2 })
expect(await count('.item')).toBe(15)
expect(await count('.item > ul')).toBe(5)
expect(await text('#demo ul > .item:nth-child(1)')).toContain('[-]')
Expand Down
Loading

0 comments on commit cca1d53

Please sign in to comment.