Commit Graph

2551 Commits

Author SHA1 Message Date
Evan You
e59a809f3f chore: update readme [ci skip] 2020-04-16 16:40:46 -04:00
Evan You
ca6912554c release: v3.0.0-beta.1 2020-04-16 15:45:04 -04:00
Evan You
370fc820cc refactor(runtime-core): refactor instance public proxy context object 2020-04-16 12:49:50 -04:00
Evan You
b2662a62c5 wip: separate setupState 2020-04-16 11:50:33 -04:00
Evan You
0709380c5f feat(runtime-core): skip emit warn if has equivalent onXXX prop 2020-04-16 11:27:52 -04:00
Evan You
bfd6744fb1 perf(runtime-core): use raw context on component options init 2020-04-16 10:39:51 -04:00
Evan You
24e5ab33f5 refactor(runtime-core): remove need for internal instance sink 2020-04-16 10:09:20 -04:00
Cédric Exbrayat
4d014dc3d3
fix(reactivity): remove Symbol.observable (#968)
* chore: add @types/node as an explicit dependency

As `tsconfig.json` references it, it should be listed in the dependencies.
It currently uses an older version: this commit also bumps to the latest v12 version, and fixes a typing issue.

* fix(reactivity): remove Symbol.observable

`Symbol.observable` is brought by `@types/node@12` and is not a "well-known" typescript symbol https://www.typescriptlang.org/docs/handbook/symbols.html that can be find in lib.es20xx like the others. It has been removed in `@types/node@v13`.
It means that an application using vue@3.0.0-alpha.13 does not compile unless it explicitely adds `@types/node@v12` as a dependency and `node` in its own tsconfig types.
2020-04-16 09:33:30 -04:00
Carlos Rodrigues
d7ae1d0244
test(reactivity): add tests for object with symbols (#969) 2020-04-16 09:24:46 -04:00
Evan You
09b4202a22 refactor(reactivity): adjust APIs
BREAKING CHANGE: Reactivity APIs adjustments:

- `readonly` is now non-tracking if called on plain objects.
  `lock` and `unlock` have been removed. A `readonly` proxy can no
  longer be directly mutated. However, it can still wrap an already
  reactive object and track changes to the source reactive object.

- `isReactive` now only returns true for proxies created by `reactive`,
   or a `readonly` proxy that wraps a `reactive` proxy.

- A new utility `isProxy` is introduced, which returns true for both
  reactive or readonly proxies.

- `markNonReactive` has been renamed to `markRaw`.
2020-04-15 16:45:20 -04:00
Evan You
11654a6e50 release: v3.0.0-alpha.13 2020-04-15 12:46:26 -04:00
Carlos Rodrigues
acfcc55aac
types(ref): fix dts test for ref (#965) 2020-04-15 12:15:13 -04:00
Evan You
e33291bd0e
types: improve UnwrapRef (#579) 2020-04-15 11:26:41 -04:00
pikax
8a74260b70 types: remove tuple check and add type check for tuple 2020-04-15 16:22:44 +01:00
Carlos Rodrigues
70b55d797f
Apply suggestions from code review
Co-Authored-By: Evan You <yyx990803@gmail.com>
2020-04-15 16:07:07 +01:00
pikax
dcb5985c00 Merge remote-tracking branch 'github/master' into changing_unwrap_ref 2020-04-15 15:54:26 +01:00
Evan You
1068212cb2 chore: run prettier 2020-04-15 10:51:07 -04:00
Evan You
d45e47569d fix(runtime-dom/v-on): support event.stopImmediatePropagation on multiple listeners
close #916
2020-04-15 10:35:34 -04:00
Evan You
3178504273 refactor(reactivity): make readonly non-tracking 2020-04-14 23:49:46 -04:00
Evan You
09b44e07cb refactor(reactivity): move array ref handling into getter 2020-04-14 22:18:58 -04:00
Evan You
486dc188fe feat(reactivity): add support for toRef API 2020-04-14 20:49:18 -04:00
Evan You
b83c580131 feat(reactivity): add support for customRef API 2020-04-14 20:45:46 -04:00
Evan You
4046f0bc03 chore: revert debugging dev flag 2020-04-14 18:32:27 -04:00
Evan You
8ae362400e types: fix public instance $root and $parent type 2020-04-14 18:13:53 -04:00
Evan You
2e06f5bbe8 feat(runtime-core): detect and warn against components made reactive
close #962
2020-04-14 18:07:47 -04:00
Evan You
3e7bb7d110 feat(runtime-core): warn async data() 2020-04-14 17:40:41 -04:00
Evan You
78977c3997 fix(scheduler): sort jobs before flushing
This fixes the case where a child component is added to the queue before
its parent, but should be invalidated by its parent's update. Same logic
was present in Vue 2.

Properly fixes #910
ref: https://github.com/vuejs/vue-next/issues/910#issuecomment-613097539
2020-04-14 17:31:35 -04:00
Evan You
c80b857eb5 fix(runtime-core): should resolve value instead of delete for dynamic props with options 2020-04-14 16:17:35 -04:00
Evan You
0869443d01 chore: import toRaw from @vue/reactivity 2020-04-14 09:59:02 -04:00
Evan You
e8a866ec99 refactor(reactivity): remove stale API markReadonly
BREAKING CHANGE: `markReadonly` has been removed.
2020-04-13 17:39:48 -04:00
Evan You
9e9d264412
Revert "feat(reactivity): add effect to public api (#909)" (#961)
This reverts commit 6fba241850.
2020-04-13 17:13:06 -04:00
Claudio Eyzaguirre
a35e2970b2
chore: fix typo in Chagelog.md (#960) [ci skip] 2020-04-13 14:43:57 -04:00
pikax
6a66b7b60a Merge remote-tracking branch 'github/master' into changing_unwrap_ref 2020-04-13 18:32:14 +01:00
Evan You
7cbf684611 fix(runtime-core): fix kebab-case props update
fix #955
2020-04-13 12:37:31 -04:00
likui
27b5c71944
fix(runtime-dom): should patch svg innerHtml (#956) 2020-04-13 12:13:37 -04:00
Thorsten Lünborg
33ccfc0a8b
fix(types): UnwrapRef should bail on DOM element types (#952)
fix #951
2020-04-13 11:51:32 -04:00
Evan You
5968cff3a8 refactor: make sure setupContext.emit always reference current emit on instance
This is dev only and for internal use by vue-test-utils.
2020-04-13 10:06:51 -04:00
King
4e54243189
chore: fix changelog typo (#953) [ci skip] 2020-04-13 09:39:42 -04:00
dependabot-preview[bot]
29718e4836 build(deps-dev): bump @rollup/plugin-node-resolve from 7.1.1 to 7.1.3
Bumps [@rollup/plugin-node-resolve](https://github.com/rollup/plugins) from 7.1.1 to 7.1.3.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Commits](https://github.com/rollup/plugins/compare/node-resolve-v7.1.1...node-resolve-v7.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-13 08:16:07 +00:00
dependabot-preview[bot]
e2e30344cc build(deps-dev): bump rollup from 2.4.0 to 2.6.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.4.0 to 2.6.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.4.0...v2.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-13 08:15:12 +00:00
dependabot-preview[bot]
7346e189a4 build(deps-dev): bump @rollup/plugin-commonjs from 11.0.2 to 11.1.0
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins) from 11.0.2 to 11.1.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Commits](https://github.com/rollup/plugins/compare/commonjs-v11.0.2...commonjs-v11.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-13 08:09:40 +00:00
pikax
c20d8af8c0 types: add symbolExtract to extract all known symbols
#951
2020-04-12 11:45:56 +01:00
Evan You
ab16a065a8 refactor: adjust runtime-dom test structure + tests for dom props 2020-04-10 15:37:30 -04:00
Evan You
ed235f16de refactor: simplify runtime-dom class tests 2020-04-10 15:23:01 -04:00
Evan You
6eb3399311 fix(runtime-dom): fix patching for attributes starting with on
fix #949

BREAKING CHANGE: Only props starting with `on` followed by an uppercase
letter or a non-letter character are considered event listeners.
2020-04-10 11:57:07 -04:00
Evan You
55566e8f52 refactor(runtime-core): remove emit return value
BREAKING CHANGE: this.$emit() and setupContext.emit() no longer
return values. For logic that relies on return value of listeners,
the listener should be declared as an `onXXX` prop and be called
directly. This still allows the parent component to pass in
a handler using `v-on`, since `v-on:foo` internally compiles
to `onFoo`.

    ref: https://github.com/vuejs/rfcs/pull/16
2020-04-10 10:59:46 -04:00
Evan You
a6e2b1052a fix(compiler-core): should not generate CLASS/STYLE patch flags on components
ref #677
2020-04-10 10:19:26 -04:00
Evan You
cda50ea788 refactor(runtime-core): move updateCompnent into separate function 2020-04-10 10:19:26 -04:00
dependabot-preview[bot]
2fb0adda50 build(deps-dev): bump rollup from 2.3.4 to 2.4.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.3.4 to 2.4.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.3.4...v2.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-10 07:57:26 +00:00
David Bernegger
d511bdbb8f
chore: show non-breaking space in changelog [ci skip] (#947) 2020-04-09 08:53:53 -04:00