Skip to content

Commit e69964d

Browse files
authored
Merge branch 'minor' into bwsy/feat/compilerSearchElm
2 parents 1148901 + 06ad749 commit e69964d

Some content is hidden

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

49 files changed

+789
-647
lines changed

.github/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
5757

5858
## Development Setup
5959

60-
You will need [Node.js](https://nodejs.org) **version 16+**, and [PNPM](https://pnpm.io) **version 8+**.
60+
You will need [Node.js](https://nodejs.org) **version 18.12+**, and [PNPM](https://pnpm.io) **version 8+**.
6161

6262
We also recommend installing [ni](https://github.com/antfu/ni) to help switching between repos using different package managers. `ni` also provides the handy `nr` command which running npm scripts easier.
6363

.github/renovate.json5

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
'typescript',
4646

4747
// ESM only
48-
'chalk',
4948
'estree-walker'
5049
]
5150
}

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
- name: Run prettier
3131
run: pnpm run format
3232

33-
- uses: autofix-ci/action@8caa572fd27b0019a65e4c695447089c8d3138b9
33+
- uses: autofix-ci/action@d3e591514b99d0fca6779455ff8338516663f7cc

.github/workflows/canary.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- name: Install pnpm
1818
uses: pnpm/action-setup@v2
1919

20-
- name: Set node version to 18
20+
- name: Install Node.js
2121
uses: actions/setup-node@v3
2222
with:
23-
node-version: 18
23+
node-version-file: '.node-version'
2424
registry-url: 'https://registry.npmjs.org'
2525
cache: 'pnpm'
2626

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
- name: Install pnpm
2323
uses: pnpm/action-setup@v2
2424

25-
- name: Set node version to 18
25+
- name: Install Node.js
2626
uses: actions/setup-node@v3
2727
with:
28-
node-version: 18
28+
node-version-file: '.node-version'
2929
cache: 'pnpm'
3030

3131
- run: pnpm install
@@ -44,10 +44,10 @@ jobs:
4444
- name: Install pnpm
4545
uses: pnpm/action-setup@v2
4646

47-
- name: Set node version to 18
47+
- name: Install Node.js
4848
uses: actions/setup-node@v3
4949
with:
50-
node-version: 18
50+
node-version-file: '.node-version'
5151
cache: 'pnpm'
5252

5353
- run: pnpm install
@@ -73,10 +73,10 @@ jobs:
7373
- name: Install pnpm
7474
uses: pnpm/action-setup@v2
7575

76-
- name: Set node version to 18
76+
- name: Install Node.js
7777
uses: actions/setup-node@v3
7878
with:
79-
node-version: 18
79+
node-version-file: '.node-version'
8080
cache: 'pnpm'
8181

8282
- run: pnpm install
@@ -96,10 +96,10 @@ jobs:
9696
- name: Install pnpm
9797
uses: pnpm/action-setup@v2
9898

99-
- name: Set node version to 18
99+
- name: Install Node.js
100100
uses: actions/setup-node@v3
101101
with:
102-
node-version: 18
102+
node-version-file: '.node-version'
103103
cache: 'pnpm'
104104

105105
- run: pnpm install

.github/workflows/size-data.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
- name: Install pnpm
2525
uses: pnpm/action-setup@v2
2626

27-
- name: Set node version to LTS
27+
- name: Install Node.js
2828
uses: actions/setup-node@v3
2929
with:
30-
node-version: lts/*
30+
node-version-file: '.node-version'
3131
cache: pnpm
3232

3333
- name: Install dependencies

.github/workflows/size-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
- name: Install pnpm
2727
uses: pnpm/action-setup@v2
2828

29-
- name: Set node version to LTS
29+
- name: Install Node.js
3030
uses: actions/setup-node@v3
3131
with:
32-
node-version: lts/*
32+
node-version-file: '.node-version'
3333
cache: pnpm
3434

3535
- name: Install dependencies

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
## [3.3.5](https://github.com/vuejs/core/compare/v3.3.4...v3.3.5) (2023-10-20)
2+
3+
4+
### Bug Fixes
5+
6+
* add isGloballyWhitelisted back, but deprecated ([#8556](https://github.com/vuejs/core/issues/8556)) ([63dfe8e](https://github.com/vuejs/core/commit/63dfe8eab499979bcc2f7829e82464e13899c895)), closes [#8416](https://github.com/vuejs/core/issues/8416)
7+
* **build:** disable useDefineForClassFields in esbuild ([#9252](https://github.com/vuejs/core/issues/9252)) ([6d14fa8](https://github.com/vuejs/core/commit/6d14fa88e85d4c9e264be394ddb37a54ca6738a8))
8+
* **compat:** return value of vue compat set() ([#9377](https://github.com/vuejs/core/issues/9377)) ([e3c2d69](https://github.com/vuejs/core/commit/e3c2d699f694d9500ddee78571172a24f0e3b17a))
9+
* **compiler-sfc:** don't hoist props and emit ([#8535](https://github.com/vuejs/core/issues/8535)) ([24db951](https://github.com/vuejs/core/commit/24db9516d8b4857182ec1a3af86cb7346691679b)), closes [#7805](https://github.com/vuejs/core/issues/7805) [#7812](https://github.com/vuejs/core/issues/7812)
10+
* **compiler-sfc:** don't registerTS when bundling for browsers ([#8582](https://github.com/vuejs/core/issues/8582)) ([6f45f76](https://github.com/vuejs/core/commit/6f45f76df2c43796b35067ef8f8b9a7bca454040))
11+
* **compiler-sfc:** fix using imported ref as template ref during dev ([#7593](https://github.com/vuejs/core/issues/7593)) ([776ebf2](https://github.com/vuejs/core/commit/776ebf25b2e7570e78ac1c148fc45c823c21a542)), closes [#7567](https://github.com/vuejs/core/issues/7567)
12+
* **compiler-sfc:** handle dynamic directive arguments in template usage check ([#8538](https://github.com/vuejs/core/issues/8538)) ([e404a69](https://github.com/vuejs/core/commit/e404a699f48ae5c5a5da947f42679343192158c7)), closes [#8537](https://github.com/vuejs/core/issues/8537)
13+
* **compiler-sfc:** ignore style v-bind in double slash comments ([#5409](https://github.com/vuejs/core/issues/5409)) ([381b497](https://github.com/vuejs/core/commit/381b4977af25ba5392704f72ec6b3f2394d87ae7))
14+
* **compiler-sfc:** pass options directly to stylus ([#3848](https://github.com/vuejs/core/issues/3848)) ([d6446a6](https://github.com/vuejs/core/commit/d6446a6d40774b79045a9ddba7b5fd5201d51450))
15+
* **compiler-sfc:** support resolve multiple re-export /w same source type name ([#8365](https://github.com/vuejs/core/issues/8365)) ([4fa8da8](https://github.com/vuejs/core/commit/4fa8da8576717c619e1e8c04d19038488c75fbea)), closes [#8364](https://github.com/vuejs/core/issues/8364)
16+
* **compiler-sfc:** typo in experimental feature warnings ([#8513](https://github.com/vuejs/core/issues/8513)) ([fd1a3f9](https://github.com/vuejs/core/commit/fd1a3f95990d7c372fa1c0c40c55caca761a33a4))
17+
* **deps:** update dependency monaco-editor to ^0.44.0 ([#9237](https://github.com/vuejs/core/issues/9237)) ([8611874](https://github.com/vuejs/core/commit/8611874e09a827b6491173836c8942284d5de22c))
18+
* **deps:** update playground ([#9154](https://github.com/vuejs/core/issues/9154)) ([c8566a2](https://github.com/vuejs/core/commit/c8566a22b7cf37e6aefab7bad7b97ce2db9fae4c))
19+
* **playground:** fix github button style ([#7722](https://github.com/vuejs/core/issues/7722)) ([5ee992c](https://github.com/vuejs/core/commit/5ee992cfeabc6c4b871980c6057d0ac7140ad2fa))
20+
* **runtime-core:** swap client/server debug labels ([#9089](https://github.com/vuejs/core/issues/9089)) ([8f311c6](https://github.com/vuejs/core/commit/8f311c6f823f6776ca1c49bfbbbf8c7d9dea9cf1))
21+
* **ssr:** render correct initial selected state for select with v-model ([#7432](https://github.com/vuejs/core/issues/7432)) ([201c46d](https://github.com/vuejs/core/commit/201c46df07a38f3c2b73f384e8e6846dc62f224e)), closes [#7392](https://github.com/vuejs/core/issues/7392)
22+
* **ssr:** reset current instance if setting up options component errors ([#7743](https://github.com/vuejs/core/issues/7743)) ([020851e](https://github.com/vuejs/core/commit/020851e57d9a9f727c6ea07e9c1575430af02b73)), closes [#7733](https://github.com/vuejs/core/issues/7733)
23+
* **teleport:** handle target change while disabled ([#7837](https://github.com/vuejs/core/issues/7837)) ([140a89b](https://github.com/vuejs/core/commit/140a89b833bceed60838182b875d2953c70af114)), closes [#7835](https://github.com/vuejs/core/issues/7835)
24+
* **transition:** handle possible auto value for transition/animation durations ([96c76fa](https://github.com/vuejs/core/commit/96c76facb7de37fc241ccd55e121fd60a49a1452)), closes [#8409](https://github.com/vuejs/core/issues/8409)
25+
* **types/jsx:** add `inert` attribute and missing `hidden` values ([#8090](https://github.com/vuejs/core/issues/8090)) ([ceb0732](https://github.com/vuejs/core/commit/ceb0732e0b1bb4c8c505d80e97ff6fc89035fa90))
26+
* **types/jsx:** add missing loading attr for img element ([#6160](https://github.com/vuejs/core/issues/6160)) ([68d6b43](https://github.com/vuejs/core/commit/68d6b43f7e29b76aab2c6c1882885380a43fa3e3))
27+
* **types:** correct withDefaults return type for boolean prop with undefined default value ([#8602](https://github.com/vuejs/core/issues/8602)) ([f07cb18](https://github.com/vuejs/core/commit/f07cb18fedf9a446545aadf76bcdfb957c7ebcbd))
28+
* **types:** ensure nextTick return type reflect correct Promise value ([#8406](https://github.com/vuejs/core/issues/8406)) ([6a22b1f](https://github.com/vuejs/core/commit/6a22b1f6c287b60eda385df8a514335af8e040ea))
29+
* **types:** support correct types for style on svg elements ([#6322](https://github.com/vuejs/core/issues/6322)) ([364dc53](https://github.com/vuejs/core/commit/364dc53c7cc6f97d812ad175199c698faa92538e))
30+
31+
32+
### Performance Improvements
33+
34+
* **compiler-sfc:** lazy require typescript ([d2c3d8b](https://github.com/vuejs/core/commit/d2c3d8b70b2df6e16f053a7ac58e6b04e7b2078f))
35+
* **custom-element:** cancel `MutationObserver` listener when disconnected ([#8666](https://github.com/vuejs/core/issues/8666)) ([24d98f0](https://github.com/vuejs/core/commit/24d98f03276de5b0fbced5a4c9d61b24e7d9d084))
36+
* mark `defineComponent` as side-effects-free ([#8512](https://github.com/vuejs/core/issues/8512)) ([438027c](https://github.com/vuejs/core/commit/438027cf9ecb63260f59d3027e0b188717694795))
37+
38+
39+
140
## [3.3.4](https://github.com/vuejs/core/compare/v3.3.3...v3.3.4) (2023-05-18)
241

342

package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
3-
"version": "3.3.4",
4-
"packageManager": "pnpm@8.7.6",
3+
"version": "3.3.5",
4+
"packageManager": "pnpm@8.9.2",
55
"type": "module",
66
"scripts": {
77
"dev": "node scripts/dev.js",
@@ -32,8 +32,8 @@
3232
"dev-sfc-run": "run-p \"dev compiler-sfc -f esm-browser\" \"dev vue -if esm-bundler-runtime\" \"dev server-renderer -if esm-bundler\" dev-sfc-serve",
3333
"serve": "serve",
3434
"open": "open http://localhost:3000/packages/template-explorer/local.html",
35-
"build-sfc-playground": "run-s build-compiler-cjs build-runtime-esm build-ssr-esm build-sfc-playground-self",
36-
"build-compiler-cjs": "node scripts/build.js compiler reactivity-transform shared -af cjs",
35+
"build-sfc-playground": "run-s build-all-cjs build-runtime-esm build-ssr-esm build-sfc-playground-self",
36+
"build-all-cjs": "node scripts/build.js vue runtime compiler reactivity reactivity-transform shared -af cjs",
3737
"build-runtime-esm": "node scripts/build.js runtime reactivity shared -af esm-bundler && node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js vue -f esm-browser-runtime",
3838
"build-ssr-esm": "node scripts/build.js compiler-sfc server-renderer -f esm-browser",
3939
"build-sfc-playground-self": "cd packages/sfc-playground && npm run build",
@@ -54,55 +54,55 @@
5454
]
5555
},
5656
"engines": {
57-
"node": ">=16.14.0"
57+
"node": ">=18.12.0"
5858
},
5959
"devDependencies": {
60-
"@babel/parser": "^7.22.16",
61-
"@babel/types": "^7.22.19",
62-
"@rollup/plugin-alias": "^5.0.0",
63-
"@rollup/plugin-commonjs": "^25.0.4",
64-
"@rollup/plugin-json": "^6.0.0",
65-
"@rollup/plugin-node-resolve": "^15.2.1",
66-
"@rollup/plugin-replace": "^5.0.2",
67-
"@rollup/plugin-terser": "^0.4.3",
68-
"@types/hash-sum": "^1.0.0",
69-
"@types/node": "^18.18.5",
70-
"@typescript-eslint/parser": "^6.7.2",
60+
"@babel/parser": "^7.23.0",
61+
"@babel/types": "^7.23.0",
62+
"@rollup/plugin-alias": "^5.0.1",
63+
"@rollup/plugin-commonjs": "^25.0.7",
64+
"@rollup/plugin-json": "^6.0.1",
65+
"@rollup/plugin-node-resolve": "^15.2.3",
66+
"@rollup/plugin-replace": "^5.0.4",
67+
"@rollup/plugin-terser": "^0.4.4",
68+
"@types/hash-sum": "^1.0.1",
69+
"@types/node": "^18.18.6",
70+
"@typescript-eslint/parser": "^6.8.0",
7171
"@vitest/coverage-istanbul": "^0.34.4",
7272
"@vue/consolidate": "0.17.3",
73-
"chalk": "^4.1.0",
7473
"conventional-changelog-cli": "^4.1.0",
7574
"enquirer": "^2.4.1",
76-
"esbuild": "^0.19.3",
75+
"esbuild": "^0.19.5",
7776
"esbuild-plugin-polyfill-node": "^0.3.0",
78-
"eslint": "^8.49.0",
79-
"eslint-plugin-jest": "^27.4.0",
77+
"eslint": "^8.51.0",
78+
"eslint-plugin-jest": "^27.4.2",
8079
"estree-walker": "^2.0.2",
8180
"execa": "^8.0.1",
8281
"jsdom": "^22.1.0",
83-
"lint-staged": "^14.0.1",
82+
"lint-staged": "^15.0.2",
8483
"lodash": "^4.17.21",
85-
"magic-string": "^0.30.3",
84+
"magic-string": "^0.30.5",
8685
"markdown-table": "^3.0.3",
87-
"marked": "^9.1.1",
86+
"marked": "^9.1.2",
8887
"minimist": "^1.2.8",
8988
"npm-run-all": "^4.1.5",
89+
"picocolors": "^1.0.0",
9090
"prettier": "^3.0.3",
9191
"pretty-bytes": "^6.1.1",
9292
"pug": "^3.0.2",
9393
"puppeteer": "~21.2.1",
94-
"rimraf": "^5.0.1",
95-
"rollup": "^3.29.2",
96-
"rollup-plugin-dts": "^6.0.2",
97-
"rollup-plugin-esbuild": "^6.0.0",
94+
"rimraf": "^5.0.5",
95+
"rollup": "^3.29.4",
96+
"rollup-plugin-dts": "^6.1.0",
97+
"rollup-plugin-esbuild": "^6.1.0",
9898
"rollup-plugin-polyfill-node": "^0.12.0",
9999
"semver": "^7.5.4",
100100
"serve": "^14.2.1",
101101
"simple-git-hooks": "^2.9.0",
102-
"terser": "^5.19.4",
102+
"terser": "^5.22.0",
103103
"todomvc-app-css": "^2.4.2",
104104
"tslib": "^2.6.2",
105-
"tsx": "^3.12.10",
105+
"tsx": "^3.14.0",
106106
"typescript": "^5.1.6",
107107
"vite": "^4.3.0",
108108
"vitest": "^0.34.4"

packages/compiler-core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-core",
3-
"version": "3.3.4",
3+
"version": "3.3.5",
44
"description": "@vue/compiler-core",
55
"main": "index.js",
66
"module": "dist/compiler-core.esm-bundler.js",
@@ -32,12 +32,12 @@
3232
},
3333
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
3434
"dependencies": {
35-
"@babel/parser": "^7.22.16",
36-
"@vue/shared": "3.3.4",
35+
"@babel/parser": "^7.23.0",
36+
"@vue/shared": "3.3.5",
3737
"estree-walker": "^2.0.2",
3838
"source-map-js": "^1.0.2"
3939
},
4040
"devDependencies": {
41-
"@babel/types": "^7.22.19"
41+
"@babel/types": "^7.23.0"
4242
}
4343
}

packages/compiler-core/src/transform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export interface TransformContext
117117
removeIdentifiers(exp: ExpressionNode | string): void
118118
hoist(exp: string | JSChildNode | ArrayExpression): SimpleExpressionNode
119119
cache<T extends JSChildNode>(exp: T, isVNode?: boolean): CacheExpression | T
120-
constantCache: Map<TemplateChildNode, ConstantTypes>
120+
constantCache: WeakMap<TemplateChildNode, ConstantTypes>
121121

122122
// 2.x Compat only
123123
filters?: Set<string>
@@ -181,7 +181,7 @@ export function createTransformContext(
181181
directives: new Set(),
182182
hoists: [],
183183
imports: [],
184-
constantCache: new Map(),
184+
constantCache: new WeakMap(),
185185
temps: 0,
186186
cached: 0,
187187
identifiers: Object.create(null),

packages/compiler-dom/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-dom",
3-
"version": "3.3.4",
3+
"version": "3.3.5",
44
"description": "@vue/compiler-dom",
55
"main": "index.js",
66
"module": "dist/compiler-dom.esm-bundler.js",
@@ -37,7 +37,7 @@
3737
},
3838
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme",
3939
"dependencies": {
40-
"@vue/shared": "3.3.4",
41-
"@vue/compiler-core": "3.3.4"
40+
"@vue/shared": "3.3.5",
41+
"@vue/compiler-core": "3.3.5"
4242
}
4343
}

packages/compiler-sfc/__tests__/templateTransformAssetUrl.spec.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,34 @@ describe('compiler sfc: transform asset url', () => {
166166
expect(code).toMatch(`_createStaticVNode`)
167167
expect(code).toMatchSnapshot()
168168
})
169+
170+
test('transform with stringify with space in absolute filename', () => {
171+
const { code } = compileWithAssetUrls(
172+
`<div><img src="/foo bar.png"/></div>`,
173+
{
174+
includeAbsolute: true
175+
},
176+
{
177+
hoistStatic: true,
178+
transformHoist: stringifyStatic
179+
}
180+
)
181+
expect(code).toMatch(`_createElementVNode`)
182+
expect(code).toContain(`import _imports_0 from '/foo bar.png'`)
183+
})
184+
185+
test('transform with stringify with space in relative filename', () => {
186+
const { code } = compileWithAssetUrls(
187+
`<div><img src="./foo bar.png"/></div>`,
188+
{
189+
includeAbsolute: true
190+
},
191+
{
192+
hoistStatic: true,
193+
transformHoist: stringifyStatic
194+
}
195+
)
196+
expect(code).toMatch(`_createElementVNode`)
197+
expect(code).toContain(`import _imports_0 from './foo bar.png'`)
198+
})
169199
})

0 commit comments

Comments
 (0)