Skip to content

Commit f35080d

Browse files
committed
chore: Merge branch 'main' into minor
2 parents d14a11c + 0b8ba63 commit f35080d

File tree

21 files changed

+931
-721
lines changed

21 files changed

+931
-721
lines changed

.github/contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
8282

8383
## Development Setup
8484

85-
You will need [Node.js](https://nodejs.org) **version 18.12+**, and [PNPM](https://pnpm.io) **version 8+**.
85+
You will need [Node.js](https://nodejs.org) with minimum version as specified in the [`.node-version`](https://github.com/vuejs/core/blob/main/.node-version) file, and [PNPM](https://pnpm.io) with minimum version as specified in the [`"packageManager"` field in `package.json`](https://github.com/vuejs/core/blob/main/package.json#L4).
8686

8787
We also recommend installing [@antfu/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.
8888

.github/workflows/autofix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
- name: Run prettier
3232
run: pnpm run format
3333

34-
- uses: autofix-ci/action@2891949f3779a1cafafae1523058501de3d4e944
34+
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c

CHANGELOG.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1-
# [3.5.0-alpha.4](https://github.com/vuejs/core/compare/v3.4.34...v3.5.0-alpha.4) (2024-07-24)
1+
## [3.4.35](https://github.com/vuejs/core/compare/v3.4.34...v3.4.35) (2024-07-31)
2+
3+
4+
### Bug Fixes
5+
6+
* **teleport/ssr:** fix Teleport hydration regression due to targetStart anchor addition ([7b18cdb](https://github.com/vuejs/core/commit/7b18cdb0b53a94007ca6a3675bf41b5d3153fec6))
7+
* **teleport/ssr:** ensure targetAnchor and targetStart not null during hydration ([#11456](https://github.com/vuejs/core/issues/11456)) ([12667da](https://github.com/vuejs/core/commit/12667da4879f980dcf2c50e36f3642d085a87d71)), closes [#11400](https://github.com/vuejs/core/issues/11400)
8+
* **types/ref:** allow getter and setter types to be unrelated ([#11442](https://github.com/vuejs/core/issues/11442)) ([e0b2975](https://github.com/vuejs/core/commit/e0b2975ef65ae6a0be0aa0a0df43fb887c665251))
9+
210

11+
### Performance Improvements
12+
13+
* **runtime-core:** improve efficiency of normalizePropsOptions ([#11409](https://github.com/vuejs/core/issues/11409)) ([5680142](https://github.com/vuejs/core/commit/5680142e68096c42e66da9f4c6220d040d7c56ba)), closes [#9739](https://github.com/vuejs/core/issues/9739)
14+
15+
16+
17+
# [3.5.0-alpha.4](https://github.com/vuejs/core/compare/v3.4.34...v3.5.0-alpha.4) (2024-07-24)
318

419
### Bug Fixes
520

package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"version": "3.5.0-alpha.4",
4-
"packageManager": "pnpm@9.5.0",
4+
"packageManager": "pnpm@9.6.0",
55
"type": "module",
66
"scripts": {
77
"dev": "node scripts/dev.js",
@@ -66,45 +66,45 @@
6666
"@rollup/plugin-json": "^6.1.0",
6767
"@rollup/plugin-node-resolve": "^15.2.3",
6868
"@rollup/plugin-replace": "5.0.4",
69-
"@swc/core": "^1.6.13",
69+
"@swc/core": "^1.7.3",
7070
"@types/hash-sum": "^1.0.2",
71-
"@types/node": "^20.14.10",
71+
"@types/node": "^20.14.13",
7272
"@types/semver": "^7.5.8",
7373
"@vitest/coverage-istanbul": "^1.6.0",
7474
"@vue/consolidate": "1.0.0",
75-
"conventional-changelog-cli": "^4.1.0",
75+
"conventional-changelog-cli": "^5.0.0",
7676
"enquirer": "^2.4.1",
7777
"esbuild": "^0.23.0",
7878
"esbuild-plugin-polyfill-node": "^0.3.0",
79-
"eslint": "^9.6.0",
80-
"eslint-plugin-import-x": "^0.5.3",
79+
"eslint": "^9.8.0",
80+
"eslint-plugin-import-x": "^3.1.0",
8181
"eslint-plugin-vitest": "^0.5.4",
8282
"estree-walker": "catalog:",
83-
"jsdom": "^24.1.0",
83+
"jsdom": "^24.1.1",
8484
"lint-staged": "^15.2.7",
8585
"lodash": "^4.17.21",
8686
"magic-string": "^0.30.10",
8787
"markdown-table": "^3.0.3",
8888
"marked": "^12.0.2",
8989
"npm-run-all2": "^6.2.2",
9090
"picocolors": "^1.0.1",
91-
"prettier": "^3.3.2",
91+
"prettier": "^3.3.3",
9292
"pretty-bytes": "^6.1.1",
9393
"pug": "^3.0.3",
94-
"puppeteer": "~22.12.1",
94+
"puppeteer": "~22.14.0",
9595
"rimraf": "^5.0.9",
96-
"rollup": "^4.18.1",
96+
"rollup": "^4.19.1",
9797
"rollup-plugin-dts": "^6.1.1",
9898
"rollup-plugin-esbuild": "^6.1.1",
9999
"rollup-plugin-polyfill-node": "^0.13.0",
100-
"semver": "^7.6.2",
100+
"semver": "^7.6.3",
101101
"serve": "^14.2.3",
102102
"simple-git-hooks": "^2.11.1",
103103
"todomvc-app-css": "^2.4.3",
104104
"tslib": "^2.6.3",
105105
"tsx": "^4.16.2",
106106
"typescript": "~5.4.5",
107-
"typescript-eslint": "^7.15.0",
107+
"typescript-eslint": "^7.17.0",
108108
"vite": "catalog:",
109109
"vitest": "^1.6.0"
110110
},

packages/compiler-sfc/package.json

+2-2
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.4.39",
52+
"postcss": "^8.4.40",
5353
"source-map-js": "catalog:"
5454
},
5555
"devDependencies": {
@@ -60,7 +60,7 @@
6060
"merge-source-map": "^1.1.0",
6161
"minimatch": "^9.0.5",
6262
"postcss-modules": "^6.0.0",
63-
"postcss-selector-parser": "^6.1.0",
63+
"postcss-selector-parser": "^6.1.1",
6464
"pug": "^3.0.3",
6565
"sass": "^1.77.8"
6666
}

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

+10
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,16 @@ describe('ref with generic', <T extends { name: string }>() => {
173173
expectType<string>(ss.value.name)
174174
})
175175

176+
describe('allow getter and setter types to be unrelated', <T>() => {
177+
const a = { b: ref(0) }
178+
const c = ref(a)
179+
c.value = a
180+
181+
const d = {} as T
182+
const e = ref(d)
183+
e.value = d
184+
})
185+
176186
// shallowRef
177187
type Status = 'initial' | 'ready' | 'invalidating'
178188
const shallowStatus = shallowRef<Status>('initial')

packages/dts-test/watch.test-d.ts

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
type ComputedRef,
3+
type MaybeRef,
34
type Ref,
45
computed,
56
defineComponent,
@@ -203,3 +204,10 @@ defineComponent({
203204
expectType<{ foo: string }>(value)
204205
})
205206
}
207+
208+
{
209+
const css: MaybeRef<string> = ''
210+
watch(ref(css), value => {
211+
expectType<string>(value)
212+
})
213+
}

packages/reactivity/src/collectionHandlers.ts

+1-14
Original file line numberDiff line numberDiff line change
@@ -169,19 +169,6 @@ function createForEach(isReadonly: boolean, isShallow: boolean) {
169169
}
170170
}
171171

172-
interface Iterable {
173-
[Symbol.iterator](): Iterator
174-
}
175-
176-
interface Iterator {
177-
next(value?: any): IterationResult
178-
}
179-
180-
interface IterationResult {
181-
value: any
182-
done: boolean
183-
}
184-
185172
function createIterableMethod(
186173
method: string | symbol,
187174
isReadonly: boolean,
@@ -190,7 +177,7 @@ function createIterableMethod(
190177
return function (
191178
this: IterableCollections,
192179
...args: unknown[]
193-
): Iterable & Iterator {
180+
): Iterable<unknown> & Iterator<unknown> {
194181
const target = this[ReactiveFlags.RAW]
195182
const rawTarget = toRaw(target)
196183
const targetIsMap = isMap(rawTarget)

packages/reactivity/src/ref.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ import { warn } from './warning'
2323
declare const RefSymbol: unique symbol
2424
export declare const RawSymbol: unique symbol
2525

26-
export interface Ref<T = any> {
27-
value: T
26+
export interface Ref<T = any, S = T> {
27+
get value(): T
28+
set value(_: S)
2829
/**
2930
* Type differentiator only.
3031
* We need this to be in public d.ts but don't want it to show up in IDE
@@ -51,7 +52,7 @@ export function isRef(r: any): r is Ref {
5152
* @param value - The object to wrap in the ref.
5253
* @see {@link https://vuejs.org/api/reactivity-core.html#ref}
5354
*/
54-
export function ref<T>(value: T): Ref<UnwrapRef<T>>
55+
export function ref<T>(value: T): Ref<UnwrapRef<T>, UnwrapRef<T> | T>
5556
export function ref<T = any>(): Ref<T | undefined>
5657
export function ref(value?: unknown) {
5758
return createRef(value, false)

0 commit comments

Comments
 (0)