Skip to content

Commit d523d24

Browse files
committed
Merge remote-tracking branch 'origin/main' into minor
2 parents 6f85cba + 93d663a commit d523d24

23 files changed

+942
-821
lines changed

.github/workflows/size-report.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: pnpm install
3838

3939
- name: Download Size Data
40-
uses: dawidd6/action-download-artifact@v7
40+
uses: dawidd6/action-download-artifact@v9
4141
with:
4242
name: size-data
4343
run_id: ${{ github.event.workflow_run.id }}
@@ -56,7 +56,7 @@ jobs:
5656
path: temp/size/base.txt
5757

5858
- name: Download Previous Size Data
59-
uses: dawidd6/action-download-artifact@v7
59+
uses: dawidd6/action-download-artifact@v9
6060
with:
6161
branch: ${{ steps.pr-base.outputs.content }}
6262
workflow: size-data.yml

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ Please make sure to read the [Contributing Guide](https://github.com/vuejs/core/
4444

4545
Thank you to all the people who already contributed to Vue!
4646

47-
<a href="https://github.com/vuejs/core/graphs/contributors"><img src="https://opencollective.com/vuejs/contributors.svg?width=890" /></a>
47+
<a href="https://github.com/vuejs/core/graphs/contributors"><img src="https://opencollective.com/vuejs/contributors.svg?width=890&limit=500" /></a>
48+
49+
<sub>_Note: Showing the first 500 contributors only due to GitHub image size limitations_</sub>
4850

4951
## License
5052

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build.environment]
2-
NODE_VERSION = "18"
2+
NODE_VERSION = "22"
33
NPM_FLAGS = "--version" # prevent Netlify npm install

package.json

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"version": "3.5.13",
4-
"packageManager": "pnpm@10.4.1",
4+
"packageManager": "pnpm@10.6.5",
55
"type": "module",
66
"scripts": {
77
"dev": "node scripts/dev.js",
@@ -65,52 +65,52 @@
6565
"@babel/parser": "catalog:",
6666
"@babel/types": "catalog:",
6767
"@rollup/plugin-alias": "^5.1.1",
68-
"@rollup/plugin-commonjs": "^28.0.2",
68+
"@rollup/plugin-commonjs": "^28.0.3",
6969
"@rollup/plugin-json": "^6.1.0",
70-
"@rollup/plugin-node-resolve": "^16.0.0",
70+
"@rollup/plugin-node-resolve": "^16.0.1",
7171
"@rollup/plugin-replace": "5.0.4",
72-
"@swc/core": "^1.10.16",
72+
"@swc/core": "^1.11.12",
7373
"@types/hash-sum": "^1.0.2",
74-
"@types/node": "^22.13.4",
74+
"@types/node": "^22.13.13",
7575
"@types/semver": "^7.5.8",
7676
"@types/serve-handler": "^6.1.4",
77-
"@vitest/coverage-v8": "^3.0.5",
78-
"@vitest/eslint-plugin": "^1.1.31",
77+
"@vitest/coverage-v8": "^3.0.9",
78+
"@vitest/eslint-plugin": "^1.1.38",
7979
"@vue/consolidate": "1.0.0",
8080
"conventional-changelog-cli": "^5.0.0",
8181
"enquirer": "^2.4.1",
82-
"esbuild": "^0.25.0",
82+
"esbuild": "^0.25.1",
8383
"esbuild-plugin-polyfill-node": "^0.3.0",
84-
"eslint": "^9.20.1",
85-
"eslint-plugin-import-x": "^4.6.1",
84+
"eslint": "^9.23.0",
85+
"eslint-plugin-import-x": "^4.9.1",
8686
"estree-walker": "catalog:",
8787
"jsdom": "^26.0.0",
88-
"lint-staged": "^15.4.3",
88+
"lint-staged": "^15.5.0",
8989
"lodash": "^4.17.21",
9090
"magic-string": "^0.30.17",
9191
"markdown-table": "^3.0.4",
9292
"marked": "13.0.3",
9393
"npm-run-all2": "^7.0.2",
9494
"picocolors": "^1.1.1",
95-
"prettier": "^3.5.1",
95+
"prettier": "^3.5.3",
9696
"pretty-bytes": "^6.1.1",
9797
"pug": "^3.0.3",
98-
"puppeteer": "~24.2.1",
98+
"puppeteer": "~24.4.0",
9999
"rimraf": "^6.0.1",
100-
"rollup": "^4.34.7",
101-
"rollup-plugin-dts": "^6.1.1",
102-
"rollup-plugin-esbuild": "^6.2.0",
100+
"rollup": "^4.37.0",
101+
"rollup-plugin-dts": "^6.2.1",
102+
"rollup-plugin-esbuild": "^6.2.1",
103103
"rollup-plugin-polyfill-node": "^0.13.0",
104104
"semver": "^7.7.1",
105105
"serve": "^14.2.4",
106106
"serve-handler": "^6.1.6",
107-
"simple-git-hooks": "^2.11.1",
107+
"simple-git-hooks": "^2.12.1",
108108
"todomvc-app-css": "^2.4.3",
109109
"tslib": "^2.8.1",
110110
"typescript": "~5.6.2",
111-
"typescript-eslint": "^8.24.0",
111+
"typescript-eslint": "^8.27.0",
112112
"vite": "catalog:",
113-
"vitest": "^3.0.5"
113+
"vitest": "^3.0.9"
114114
},
115115
"pnpm": {
116116
"peerDependencyRules": {

packages-private/dts-test/appDirective.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ app.directive<HTMLElement, string, 'prevent' | 'stop', 'arg1' | 'arg2'>(
99
mounted(el, binding) {
1010
expectType<HTMLElement>(el)
1111
expectType<string>(binding.value)
12-
expectType<{ prevent: boolean; stop: boolean }>(binding.modifiers)
12+
expectType<{ prevent?: boolean; stop?: boolean }>(binding.modifiers)
1313
expectType<'arg1' | 'arg2'>(binding.arg!)
1414

1515
// @ts-expect-error not any

packages-private/dts-test/appUse.test-d.ts

+38-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ app.use(PluginWithoutType, 2)
1212
app.use(PluginWithoutType, { anything: 'goes' }, true)
1313

1414
type PluginOptions = {
15+
/** option1 */
1516
option1?: string
17+
/** option2 */
1618
option2: number
19+
/** option3 */
1720
option3: boolean
1821
}
1922

@@ -25,6 +28,20 @@ const PluginWithObjectOptions = {
2528
},
2629
}
2730

31+
const objectPluginOptional = {
32+
install(app: App, options?: PluginOptions) {},
33+
}
34+
app.use(objectPluginOptional)
35+
app.use(
36+
objectPluginOptional,
37+
// Test JSDoc and `go to definition` for options
38+
{
39+
option1: 'foo',
40+
option2: 1,
41+
option3: true,
42+
},
43+
)
44+
2845
for (const Plugin of [
2946
PluginWithObjectOptions,
3047
PluginWithObjectOptions.install,
@@ -92,7 +109,27 @@ const PluginTyped: Plugin<PluginOptions> = (app, options) => {}
92109

93110
// @ts-expect-error: needs options
94111
app.use(PluginTyped)
95-
app.use(PluginTyped, { option2: 2, option3: true })
112+
app.use(
113+
PluginTyped,
114+
// Test autocomplete for options
115+
{
116+
option1: '',
117+
option2: 2,
118+
option3: true,
119+
},
120+
)
121+
122+
const functionPluginOptional = (app: App, options?: PluginOptions) => {}
123+
app.use(functionPluginOptional)
124+
app.use(functionPluginOptional, { option2: 2, option3: true })
125+
126+
// type optional params
127+
const functionPluginOptional2: Plugin<[options?: PluginOptions]> = (
128+
app,
129+
options,
130+
) => {}
131+
app.use(functionPluginOptional2)
132+
app.use(functionPluginOptional2, { option2: 2, option3: true })
96133

97134
// vuetify usage
98135
const key: string = ''

packages-private/dts-test/directives.test-d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('custom', () => {
2929
value: number
3030
oldValue: number | null
3131
arg?: 'Arg'
32-
modifiers: Record<'a' | 'b', boolean>
32+
modifiers: Partial<Record<'a' | 'b', boolean>>
3333
}>(testDirective<number, 'a' | 'b', 'Arg'>())
3434

3535
expectType<{

packages-private/dts-test/ref.test-d.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
type MaybeRefOrGetter,
55
type Ref,
66
type ShallowRef,
7+
type TemplateRef,
78
type ToRefs,
89
type WritableComputedRef,
910
computed,
@@ -535,7 +536,7 @@ expectType<string>(toValue(unref2))
535536

536537
// useTemplateRef
537538
const tRef = useTemplateRef('foo')
538-
expectType<Readonly<ShallowRef<unknown>>>(tRef)
539+
expectType<TemplateRef>(tRef)
539540

540541
const tRef2 = useTemplateRef<HTMLElement>('bar')
541-
expectType<Readonly<ShallowRef<HTMLElement | null>>>(tRef2)
542+
expectType<TemplateRef<HTMLElement>>(tRef2)

packages-private/sfc-playground/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"vite": "catalog:"
1414
},
1515
"dependencies": {
16-
"@vue/repl": "^4.4.3",
16+
"@vue/repl": "^4.5.1",
1717
"file-saver": "^2.0.5",
1818
"jszip": "^3.10.1",
1919
"vue": "workspace:*"

packages-private/sfc-playground/src/download/download.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ export async function downloadProject(store: ReplStore) {
1717

1818
// basic structure
1919
zip.file('index.html', index)
20-
zip.file('package.json', pkg)
20+
zip.file(
21+
'package.json',
22+
pkg.replace(`"vue": "latest"`, `"vue": "${store.vueVersion || 'latest'}"`),
23+
)
2124
zip.file('vite.config.js', config)
2225
zip.file('README.md', readme)
2326

packages-private/sfc-playground/src/download/template/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"serve": "vite preview"
99
},
1010
"dependencies": {
11-
"vue": "^3.4.0"
11+
"vue": "latest"
1212
},
1313
"devDependencies": {
14-
"@vitejs/plugin-vue": "^5.2.1",
15-
"vite": "^6.1.0"
14+
"@vitejs/plugin-vue": "^5.2.3",
15+
"vite": "^6.2.2"
1616
}
1717
}

packages/compiler-sfc/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@vue/shared": "workspace:*",
5050
"estree-walker": "catalog:",
5151
"magic-string": "catalog:",
52-
"postcss": "^8.5.1",
52+
"postcss": "^8.5.3",
5353
"source-map-js": "catalog:"
5454
},
5555
"devDependencies": {
@@ -60,8 +60,8 @@
6060
"merge-source-map": "^1.1.0",
6161
"minimatch": "~10.0.1",
6262
"postcss-modules": "^6.0.1",
63-
"postcss-selector-parser": "^7.0.0",
63+
"postcss-selector-parser": "^7.1.0",
6464
"pug": "^3.0.3",
65-
"sass": "^1.85.0"
65+
"sass": "^1.86.0"
6666
}
6767
}

packages/reactivity/__tests__/reactive.spec.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isRef, ref } from '../src/ref'
1+
import { isRef, ref, shallowRef } from '../src/ref'
22
import {
33
isProxy,
44
isReactive,
@@ -426,4 +426,17 @@ describe('reactivity/reactive', () => {
426426
map.set(void 0, 1)
427427
expect(c.value).toBe(1)
428428
})
429+
430+
test('should return true for reactive objects', () => {
431+
expect(isReactive(reactive({}))).toBe(true)
432+
expect(isReactive(readonly(reactive({})))).toBe(true)
433+
expect(isReactive(ref({}).value)).toBe(true)
434+
expect(isReactive(readonly(ref({})).value)).toBe(true)
435+
expect(isReactive(shallowReactive({}))).toBe(true)
436+
})
437+
438+
test('should return false for non-reactive objects', () => {
439+
expect(isReactive(ref(true))).toBe(false)
440+
expect(isReactive(shallowRef({}).value)).toBe(false)
441+
})
429442
})

packages/reactivity/src/reactive.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ export declare const ShallowReactiveMarker: unique symbol
108108
export type ShallowReactive<T> = T & { [ShallowReactiveMarker]?: true }
109109

110110
/**
111-
* Shallow version of {@link reactive()}.
111+
* Shallow version of {@link reactive}.
112112
*
113-
* Unlike {@link reactive()}, there is no deep conversion: only root-level
113+
* Unlike {@link reactive}, there is no deep conversion: only root-level
114114
* properties are reactive for a shallow reactive object. Property values are
115115
* stored and exposed as-is - this also means properties with ref values will
116116
* not be automatically unwrapped.
@@ -178,7 +178,7 @@ export type DeepReadonly<T> = T extends Builtin
178178
* the original.
179179
*
180180
* A readonly proxy is deep: any nested property accessed will be readonly as
181-
* well. It also has the same ref-unwrapping behavior as {@link reactive()},
181+
* well. It also has the same ref-unwrapping behavior as {@link reactive},
182182
* except the unwrapped values will also be made readonly.
183183
*
184184
* @example
@@ -215,9 +215,9 @@ export function readonly<T extends object>(
215215
}
216216

217217
/**
218-
* Shallow version of {@link readonly()}.
218+
* Shallow version of {@link readonly}.
219219
*
220-
* Unlike {@link readonly()}, there is no deep conversion: only root-level
220+
* Unlike {@link readonly}, there is no deep conversion: only root-level
221221
* properties are made readonly. Property values are stored and exposed as-is -
222222
* this also means properties with ref values will not be automatically
223223
* unwrapped.
@@ -298,8 +298,8 @@ function createReactiveObject(
298298
}
299299

300300
/**
301-
* Checks if an object is a proxy created by {@link reactive()} or
302-
* {@link shallowReactive()} (or {@link ref()} in some cases).
301+
* Checks if an object is a proxy created by {@link reactive} or
302+
* {@link shallowReactive} (or {@link ref} in some cases).
303303
*
304304
* @example
305305
* ```js
@@ -327,7 +327,7 @@ export function isReactive(value: unknown): boolean {
327327
* readonly object can change, but they can't be assigned directly via the
328328
* passed object.
329329
*
330-
* The proxies created by {@link readonly()} and {@link shallowReadonly()} are
330+
* The proxies created by {@link readonly} and {@link shallowReadonly} are
331331
* both considered readonly, as is a computed ref without a set function.
332332
*
333333
* @param value - The value to check.
@@ -343,7 +343,7 @@ export function isShallow(value: unknown): boolean {
343343

344344
/**
345345
* Checks if an object is a proxy created by {@link reactive},
346-
* {@link readonly}, {@link shallowReactive} or {@link shallowReadonly()}.
346+
* {@link readonly}, {@link shallowReactive} or {@link shallowReadonly}.
347347
*
348348
* @param value - The value to check.
349349
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
@@ -356,8 +356,8 @@ export function isProxy(value: any): boolean {
356356
* Returns the raw, original object of a Vue-created proxy.
357357
*
358358
* `toRaw()` can return the original object from proxies created by
359-
* {@link reactive()}, {@link readonly()}, {@link shallowReactive()} or
360-
* {@link shallowReadonly()}.
359+
* {@link reactive}, {@link readonly}, {@link shallowReactive} or
360+
* {@link shallowReadonly}.
361361
*
362362
* This is an escape hatch that can be used to temporarily read without
363363
* incurring proxy access / tracking overhead or write without triggering
@@ -397,7 +397,7 @@ export type Raw<T> = T & { [RawSymbol]?: true }
397397
* ```
398398
*
399399
* **Warning:** `markRaw()` together with the shallow APIs such as
400-
* {@link shallowReactive()} allow you to selectively opt-out of the default
400+
* {@link shallowReactive} allow you to selectively opt-out of the default
401401
* deep reactive/readonly conversion and embed raw, non-proxied objects in your
402402
* state graph.
403403
*

packages/reactivity/src/ref.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export type ShallowRef<T = any, S = T> = Ref<T, S> & {
7070
}
7171

7272
/**
73-
* Shallow version of {@link ref()}.
73+
* Shallow version of {@link ref}.
7474
*
7575
* @example
7676
* ```js
@@ -237,7 +237,7 @@ export function unref<T>(ref: MaybeRef<T> | ComputedRef<T>): T {
237237

238238
/**
239239
* Normalizes values / refs / getters to values.
240-
* This is similar to {@link unref()}, except that it also normalizes getters.
240+
* This is similar to {@link unref}, except that it also normalizes getters.
241241
* If the argument is a getter, it will be invoked and its return value will
242242
* be returned.
243243
*
@@ -347,7 +347,7 @@ export type ToRefs<T = any> = {
347347
/**
348348
* Converts a reactive object to a plain object where each property of the
349349
* resulting object is a ref pointing to the corresponding property of the
350-
* original object. Each individual ref is created using {@link toRef()}.
350+
* original object. Each individual ref is created using {@link toRef}.
351351
*
352352
* @param object - Reactive object to be made into an object of linked refs.
353353
* @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}

0 commit comments

Comments
 (0)