* 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.
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`.
The next version of Typescript disallows 'this' parameter annotations on
accessors, which causes vue-next to fail to compile.
This PR removes the annotation and adds a cast instead.
Fixes#800
BREAKING CHANGE: reactive arrays no longer unwraps contained refs
When reactive arrays contain refs, especially a mix of refs and
plain values, Array prototype methods will fail to function
properly - e.g. sort() or reverse() will overwrite the ref's value
instead of moving it (see #737).
Ensuring correct behavior for all possible Array methods while
retaining the ref unwrapping behavior is exceedinly complicated; In
addition, even if Vue handles the built-in methods internally, it
would still break when the user attempts to use a 3rd party utility
functioon (e.g. lodash) on a reactive array containing refs.
After this commit, similar to other collection types like Map and
Set, Arrays will no longer automatically unwrap contained refs.
The usage of mixed refs and plain values in Arrays should be rare in
practice. In cases where this is necessary, the user can create a
computed property that performs the unwrapping.