Evan You
6b33cc4229
feat(watch): support directly watching reactive object with deep default
...
Also warn invalid watch sources
close #1110
2020-05-04 09:27:28 -04:00
Evan You
64ef7c76bf
feat(types): re-expose resolve asset utitlies and registerRuntimeCompiler in type definitions
...
close #1109
2020-05-04 08:52:59 -04:00
Evan You
bc1f097e29
fix(types/reactivity): fix ref type inference on nested reactive properties with .value
...
fix #1111
2020-05-04 08:51:17 -04:00
Evan You
f40f3a0e95
fix(reactivity): avoid polluting Object prototype
2020-05-04 08:51:17 -04:00
Jackliu
42a99d28ae
chore: typo ( #1113 )
2020-05-04 10:30:24 +02:00
Evan You
6be2b73f8a
fix(reactivity): check own property for existing proxy of target
...
fix #1107
2020-05-03 15:36:19 -04:00
XinPing Wang
8bab78b648
test: reactive proto
2020-05-03 15:36:19 -04:00
Evan You
01b7e90eac
fix(hmr): handle cases where instances with same id having different definitions
2020-05-03 13:52:09 -04:00
Evan You
0c48558f4c
chore: remove commented stale code [ci skip]
2020-05-02 17:08:54 -04:00
Evan You
0dc44a6a86
release: v3.0.0-beta.7
2020-05-02 17:06:16 -04:00
Evan You
d901b6bea8
refactor(reactivity): use more efficient reactive checks
...
WeakSets and WeakMaps shows degrading performance as the amount of
observed objects increases. Using hidden keys result in better
performance especially when repeatedly creating large amounts of
reactive proxies.
This also makes it possible to more efficiently declare non-reactive
objects in userland.
2020-05-02 16:58:17 -04:00
Evan You
36972c20b5
feat(compiler-sfc): add transformAssetUrlsBase option
2020-05-02 16:58:17 -04:00
Eduardo San Martin Morote
71a942b25a
fix(warn): cast symbols to strings ( #1103 )
2020-05-02 10:26:32 -04:00
Evan You
583ba0c172
feat(types): re-expose withDirectives
as public type
2020-05-02 10:19:40 -04:00
Evan You
b570287dfe
release: v3.0.0-beta.6
2020-05-01 18:56:53 -04:00
HiiTea
f0d52d5428
chore: code comment formatting ( #1089 ) [ci skip]
2020-05-01 18:48:44 -04:00
Evan You
98bee596bd
fix(runtime-core): should catch dom prop set TypeErrors
...
based on #1051
2020-05-01 18:47:27 -04:00
Evan You
c5e7d8b532
fix(compiler-core): hoist pure annotations should apply to all nested calls
2020-05-01 18:36:34 -04:00
Evan You
cad25d95a3
fix(compiler-core): hoisted vnode calls and scoped id calls should be marked pure
...
Otherwise they cannot be tree-shaken
2020-05-01 17:34:11 -04:00
Evan You
6c60ce13e0
fix(compiler-ssr): handle comments codegen + refactor ssr codegen transform
2020-05-01 17:04:36 -04:00
underfin
8b85aaeea9
fix(runtime-core): should call Suspense fallback unmount hook ( #1061 )
...
fix #1059
2020-05-01 16:20:16 -04:00
Evan You
b40fcbc4c6
fix(types): augment ref unwrap bail types in appropriate packages
...
Packages can now augment the ref unwrap bail types in their own `d.ts`.
Also updated the build script to auto concat any files in a package's
`types` directory to the final generated `d.ts`.
- `@vue/reactivity` should no longer require `libs: ["DOM"]` in tsconfig
- Properly bail on `VNode` and `ComponentPublicInstance` in runtime-core
2020-05-01 16:14:30 -04:00
Evan You
7f23555356
fix(teleport): teleport should always be tracked as dynamic child for unmount
...
fix #1088
2020-05-01 15:12:07 -04:00
Evan You
08bf7e3607
fix(runtime-core): cloned vnodes with extra props should de-opt
2020-05-01 14:55:27 -04:00
Evan You
ac6a6f11ac
fix(runtime-core): fix slot fragment bail check
2020-05-01 14:16:55 -04:00
Evan You
11f38d8a85
perf: instance public proxy should never be observed
2020-05-01 13:24:38 -04:00
Evan You
62336085f4
fix(runtime-core): avoid infinite warning loop for isRef check on component public proxy
...
fix #1091
2020-05-01 13:23:59 -04:00
Evan You
5b09e743a0
fix(ssr): fix escape and handling for raw Text, Comment and Static vnodes
2020-05-01 11:52:40 -04:00
Evan You
1bddeea247
feat(runtime-core): warn against user properties with reserved prefixes
2020-05-01 11:23:22 -04:00
Evan You
20bc7ba1c5
fix(runtime-dom): should not coerce nullish values to empty strings for non-string dom props
...
fix #1049
close #1092 , close #1093 , close #1094
2020-05-01 11:06:24 -04:00
Evan You
68e1ce8b66
refactor(types): mark more internal APIs
2020-05-01 10:37:40 -04:00
HiiTea
22717772dd
chore: fix typos ( #1090 )
2020-05-01 09:42:58 -04:00
Evan You
127e96a993
types: fix internal exports from @vue/shared
2020-05-01 09:19:30 -04:00
Evan You
c9bf7ded2e
refactor(types): mark internal API exports and exclude from d.ts
...
BREAKING CHANGE: Internal APIs are now excluded from type decalrations.
2020-04-30 17:04:35 -04:00
Evan You
a5bb1d02b7
release: v3.0.0-beta.5
2020-04-30 16:20:25 -04:00
underfin
8ed3455251
fix(transition-group): should collect raw children with Fragment ( #1046 )
...
fix #1045
2020-04-30 15:06:50 -04:00
Bas van Meurs
ba240eb497
feat(runtime-core): export queuePostFlushCb ( #1078 )
2020-04-30 14:58:50 -04:00
Carlos Rodrigues
239270c38a
fix(keep-alive): do not invoke onVnodeBeforeUnmount if is KeepAlive component ( #1079 )
2020-04-30 14:52:03 -04:00
Evan You
352c369704
chore: remove stale _isVue checks
2020-04-30 14:45:25 -04:00
Evan You
386b093554
fix(hmr): support hmr for static nodes
2020-04-30 14:45:25 -04:00
Evan You
e087b4e024
fix(hydration): fix text mismatch warning
2020-04-29 17:07:41 -04:00
Evan You
08b4e8815d
fix(compiler-ssr): avoid unnecessary withCtx import
2020-04-29 16:21:54 -04:00
Evan You
a0e2c12874
fix(warning): always check for component instance presence when formatting traces
2020-04-29 14:41:22 -04:00
Evan You
892fb6d229
types: use more consistent naming for apiWatch type exports
...
BREAKING CHANGE: Some watch API types are renamed.
- `BaseWatchOptions` -> `WatchOptionsBase`
- `StopHandle` -> `WatchStopHandle`
2020-04-27 13:33:57 -04:00
Evan You
8ab44e1f80
types: expose ComponentOptionsBase
2020-04-27 13:31:40 -04:00
Evan You
bd0f7da2c6
build: add browser builds for @vue/compiler-sfc
2020-04-26 01:24:25 -04:00
Evan You
0bb1f67d12
types(compiler-sfc): expose SFCAsyncStyleCompileOptions
2020-04-24 17:11:41 -04:00
Evan You
d29aefcf99
release: v3.0.0-beta.4
2020-04-24 16:20:20 -04:00
Evan You
ca84f46cd0
chore: add tip about Suspense being experimental
2020-04-24 16:13:44 -04:00
Evan You
ded92f93b4
fix(runtime-core): dynamic component should support falsy values without warning
2020-04-24 15:32:47 -04:00
Carlos Rodrigues
f3a9b516bd
fix(types): make return type of defineComponent
assignable to Component
type ( #1032 )
...
fix #993
2020-04-24 13:22:58 -04:00
Carlos Rodrigues
28b4c317b4
feat(types): expose ToRefs
type ( #1037 )
2020-04-24 13:10:16 -04:00
Evan You
c9f10be9de
refactor(runtime-core): extract key/ref normalization logic
2020-04-24 13:06:56 -04:00
susiwen8
ad2b940c17
chore: remove unnecessary export ( #1044 ) [ci skip]
2020-04-24 13:02:44 -04:00
Evan You
d7379c7647
fix(runtime-core): fix key/ref resolution for cloneVNode
...
fix #1041
2020-04-24 12:42:46 -04:00
Evan You
dcf2458fa8
fix(runtime-core): fix dynamic node tracking in dynamic component that resolves to plain elements
...
fix #1039
2020-04-24 12:18:51 -04:00
Evan You
fa216a0c3a
feat(compiler-sfc): built-in support for css modules
2020-04-24 09:59:52 -04:00
Evan You
20d425fb19
feat(compiler-sfc): add preprocessCustomRequire option
2020-04-24 09:28:03 -04:00
Evan You
2acf3e84b9
feat(reactivity): add triggerRef API
...
Also make shallowRef assignment behavior consistent with normal ref
2020-04-22 18:00:10 -04:00
underfin
2b19965bcf
fix(slots): compiled slot fallback should be functions ( #1030 )
...
This avoids it being collected as dynamic children when it's not used.
fix #1021
2020-04-22 16:52:41 -04:00
Evan You
ff4d1fcd81
fix(runtime-core): mixin options that rely on this context should be deferred
...
Also ensure consistent option apply order with Vue 2, close #1016 , close #1029
2020-04-22 16:36:18 -04:00
Evan You
b0d4df9743
perf(reactivity): ref should not trigger if value did not change
...
Note: shallowRef will always trigger on assignment because it does not
account for deep mutations
close #1012
2020-04-22 15:11:01 -04:00
Evan You
7d858a9001
test(compiler-core): test dynamic component block
2020-04-22 14:47:31 -04:00
Evan You
7d0ab3392a
fix(compiler-core): dynamic component should always be made blocks
...
since it can potentially resolve to plain elements
fix #1018
2020-04-22 14:45:00 -04:00
Carlos Rodrigues
0bdd889156
fix(types): fix ref(false) type to Ref<boolean> ( #1028 )
2020-04-22 11:54:54 -04:00
Evan You
e422b8b082
fix(runtime-core): only infer component name for object components
...
close #1023
2020-04-22 04:39:12 -04:00
Evan You
6fefeafe98
release: v3.0.0-beta.3
2020-04-20 17:00:26 -04:00
Andrew Talbot
cebad64d22
feat(runtime-core): improve warning for extraneous event listeners ( #1005 )
...
fix #1001
2020-04-20 16:40:59 -04:00
Evan You
dece6102aa
feat(warn): infer anonymous component named based on resolve name
2020-04-20 16:17:29 -04:00
Evan You
0278992f78
fix(warn): fix component name inference in warning trace
2020-04-20 16:06:51 -04:00
Andrew Talbot
054ccecd58
perf(core): use startsWith
instead of indexOf
( #989 )
2020-04-20 15:44:20 -04:00
Evan You
ab844fd169
feat(runtime-core): more specific warning for failed v-on fallthrough
...
close #1001
2020-04-20 15:32:21 -04:00
Evan You
e954ba21f0
feat(build): provide more specific warnings for runtime compilation
...
close #1004
2020-04-20 15:23:26 -04:00
Evan You
171cfa404f
fix(runtime-core): should not cast prop value if prop did not change
...
fix #999
2020-04-20 14:16:25 -04:00
Evan You
36d77f9a9e
refactor(hmr): simplify usage
2020-04-20 13:39:47 -04:00
Evan You
19223f5462
build: remove __BUNLDER__ flag so that HMR is available for all builds
2020-04-20 13:39:47 -04:00
limichange
fa40d1ef3a
refactor(reactivity): simplify if condition ( #1002 )
2020-04-20 13:39:35 -04:00
Evan You
218e6e1667
build: adjust build formats
...
- Rename `esm` to `esm-browser`
- Add runtime-only build for `esm-browser`
- Add default CDN alias for jsdelivr
2020-04-19 18:43:21 -04:00
Jian Zhang
a51b052672
chore: remove a dead if branch ( #986 )
2020-04-17 18:41:33 -04:00
Evan You
c1a85cb124
release: v3.0.0-beta.2
2020-04-17 11:01:01 -04:00
Evan You
d7ca1c5c6e
fix(runtime-core): fix user attched public instance properties that start with "$"
2020-04-17 10:23:10 -04:00
Carlos Rodrigues
99fd158d09
fix(watch): fix deep watchers on refs containing primitives ( #984 )
2020-04-17 09:55:41 -04:00
Evan You
c0adb67c2e
feat(types): expose ComponentCustomOptions for declaring custom options
2020-04-17 09:41:36 -04:00
Evan You
be21cfb1db
feat(types): feat(types): add ComponentCustomProperties
interface ( #982 )
2020-04-17 09:12:50 -04:00
Cédric Exbrayat
4cf5e07608
feat(types): expose ExtractPropTypes ( #983 )
2020-04-17 09:00:25 -04:00
扩散性百万甜面包
70c8c58be2
test(compiler-core): expect onError to be called ( #976 )
2020-04-17 08:58:38 -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
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