Skip to content

Commit 3e2efe0

Browse files
authored
Merge branch 'main' into feat/v-model-details-dialog
2 parents 43839c3 + a95e612 commit 3e2efe0

File tree

213 files changed

+12609
-8986
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+12609
-8986
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,40 @@ jobs:
2626
node-version: 18
2727
cache: 'pnpm'
2828

29-
- run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install
29+
- name: Skip Puppeteer download
30+
run: echo "PUPPETEER_SKIP_DOWNLOAD=1" >> $GITHUB_ENV
31+
32+
- run: pnpm install
3033

3134
- name: Run unit tests
3235
run: pnpm run test-unit
3336

37+
unit-test-windows:
38+
runs-on: windows-latest
39+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
40+
steps:
41+
- uses: actions/checkout@v3
42+
43+
- name: Install pnpm
44+
uses: pnpm/action-setup@v2
45+
46+
- name: Set node version to 18
47+
uses: actions/setup-node@v3
48+
with:
49+
node-version: 18
50+
cache: 'pnpm'
51+
52+
- name: Skip Puppeteer download
53+
run: echo "PUPPETEER_SKIP_DOWNLOAD=1" >> $env:GITHUB_ENV
54+
55+
- run: pnpm install
56+
57+
- name: Run compiler unit tests
58+
run: pnpm run test-unit compiler
59+
60+
- name: Run ssr unit tests
61+
run: pnpm run test-unit server-renderer
62+
3463
e2e-test:
3564
runs-on: ubuntu-latest
3665
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
@@ -72,7 +101,10 @@ jobs:
72101
node-version: 18
73102
cache: 'pnpm'
74103

75-
- run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install
104+
- name: Skip Puppeteer download
105+
run: echo "PUPPETEER_SKIP_DOWNLOAD=1" >> $GITHUB_ENV
106+
107+
- run: pnpm install
76108

77109
- name: Run eslint
78110
run: pnpm run lint

CHANGELOG.md

Lines changed: 200 additions & 2960 deletions
Large diffs are not rendered by default.

changelogs/CHANGELOG-3.0.md

Lines changed: 1617 additions & 0 deletions
Large diffs are not rendered by default.

changelogs/CHANGELOG-3.1.md

Lines changed: 320 additions & 0 deletions
Large diffs are not rendered by default.

changelogs/CHANGELOG-3.2.md

Lines changed: 1067 additions & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
3-
"version": "3.3.0-alpha.9",
4-
"packageManager": "pnpm@7.26.0",
3+
"version": "3.3.4",
4+
"packageManager": "pnpm@8.4.0",
55
"type": "module",
66
"scripts": {
77
"dev": "node scripts/dev.js",
@@ -57,7 +57,6 @@
5757
"devDependencies": {
5858
"@babel/parser": "^7.21.3",
5959
"@babel/types": "^7.21.3",
60-
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
6160
"@rollup/plugin-alias": "^4.0.3",
6261
"@rollup/plugin-commonjs": "^24.0.1",
6362
"@rollup/plugin-json": "^6.0.0",
@@ -69,11 +68,11 @@
6968
"@typescript-eslint/parser": "^5.56.0",
7069
"@vitest/coverage-istanbul": "^0.29.7",
7170
"@vue/consolidate": "0.17.3",
72-
"brotli": "^1.3.2",
7371
"chalk": "^4.1.0",
7472
"conventional-changelog-cli": "^2.0.31",
7573
"enquirer": "^2.3.2",
7674
"esbuild": "^0.17.4",
75+
"esbuild-plugin-polyfill-node": "^0.2.0",
7776
"eslint": "^8.33.0",
7877
"eslint-plugin-jest": "^27.2.1",
7978
"estree-walker": "^2.0.2",
@@ -99,7 +98,7 @@
9998
"todomvc-app-css": "^2.3.0",
10099
"tslib": "^2.5.0",
101100
"typescript": "^5.0.0",
102-
"vite": "^4.2.0",
103-
"vitest": "^0.29.7"
101+
"vite": "^4.3.0",
102+
"vitest": "^0.30.1"
104103
}
105104
}

packages/compiler-core/__tests__/compile.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { baseCompile as compile } from '../src'
2-
import { SourceMapConsumer, RawSourceMap } from 'source-map'
2+
import { SourceMapConsumer, RawSourceMap } from 'source-map-js'
33

44
describe('compiler: integration tests', () => {
55
const source = `

packages/compiler-core/__tests__/parse.spec.ts

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { vi } from 'vitest'
21
import { ParserOptions } from '../src/options'
32
import { baseParse, TextModes } from '../src/parse'
43
import { ErrorCodes } from '../src/errors'
@@ -11,7 +10,8 @@ import {
1110
Position,
1211
TextNode,
1312
InterpolationNode,
14-
ConstantTypes
13+
ConstantTypes,
14+
DirectiveNode
1515
} from '../src/ast'
1616

1717
describe('compiler: parse', () => {
@@ -1164,6 +1164,34 @@ describe('compiler: parse', () => {
11641164
})
11651165
})
11661166

1167+
// #3494
1168+
test('directive argument edge case', () => {
1169+
const ast = baseParse('<div v-slot:slot />')
1170+
const directive = (ast.children[0] as ElementNode)
1171+
.props[0] as DirectiveNode
1172+
expect(directive.arg).toMatchObject({
1173+
loc: {
1174+
start: { offset: 12, line: 1, column: 13 },
1175+
end: { offset: 16, line: 1, column: 17 },
1176+
source: 'slot'
1177+
}
1178+
})
1179+
})
1180+
1181+
// https://github.com/vuejs/language-tools/issues/2710
1182+
test('directive argument edge case (2)', () => {
1183+
const ast = baseParse('<div #item.item />')
1184+
const directive = (ast.children[0] as ElementNode)
1185+
.props[0] as DirectiveNode
1186+
expect(directive.arg).toMatchObject({
1187+
loc: {
1188+
start: { offset: 6, line: 1, column: 7 },
1189+
end: { offset: 15, line: 1, column: 16 },
1190+
source: 'item.item'
1191+
}
1192+
})
1193+
})
1194+
11671195
test('directive with dynamic argument', () => {
11681196
const ast = baseParse('<div v-on:[event]/>')
11691197
const directive = (ast.children[0] as ElementNode).props[0]

packages/compiler-core/__tests__/transform.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { vi } from 'vitest'
21
import { baseParse } from '../src/parse'
32
import { transform, NodeTransform } from '../src/transform'
43
import {

packages/compiler-core/__tests__/transforms/transformElement.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { vi } from 'vitest'
21
import {
32
CompilerOptions,
43
baseParse as parse,
@@ -998,7 +997,7 @@ describe('compiler: element transform', () => {
998997
})
999998

1000999
test('NEED_PATCH (vnode hooks)', () => {
1001-
const root = baseCompile(`<div @vnodeUpdated="foo" />`, {
1000+
const root = baseCompile(`<div @vue:updated="foo" />`, {
10021001
prefixIdentifiers: true,
10031002
cacheHandlers: true
10041003
}).ast
@@ -1184,6 +1183,7 @@ describe('compiler: element transform', () => {
11841183
})
11851184
})
11861185

1186+
// TODO remove in 3.4
11871187
test('v-is', () => {
11881188
const { node, root } = parseWithBind(`<div v-is="'foo'" />`)
11891189
expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT)
@@ -1201,6 +1201,7 @@ describe('compiler: element transform', () => {
12011201
// should skip v-is runtime check
12021202
directives: undefined
12031203
})
1204+
expect('v-is="component-name" has been deprecated').toHaveBeenWarned()
12041205
})
12051206

12061207
// #3934

0 commit comments

Comments
 (0)