Skip to content

Commit 4d014dc

Browse files
authored
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 [email protected] does not compile unless it explicitely adds `@types/node@v12` as a dependency and `node` in its own tsconfig types.
1 parent d7ae1d0 commit 4d014dc

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@rollup/plugin-node-resolve": "^7.1.1",
4747
"@rollup/plugin-replace": "^2.2.1",
4848
"@types/jest": "^25.1.4",
49+
"@types/node": "13.11.1",
4950
"@types/puppeteer": "^2.0.0",
5051
"brotli": "^1.3.2",
5152
"chalk": "^2.4.2",

packages/compiler-sfc/src/templateTransformAssetUrl.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ export const transformAssetUrl: NodeTransform = (
6969
}
7070

7171
function getImportsExpressionExp(
72-
path: string | undefined,
73-
hash: string | undefined,
72+
path: string | null,
73+
hash: string | null,
7474
loc: SourceLocation,
7575
context: TransformContext
7676
): ExpressionNode {

packages/reactivity/src/ref.ts

-3
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ type SymbolExtract<T> = (T extends { [Symbol.asyncIterator]: infer V }
151151
(T extends { [Symbol.iterator]: infer V } ? { [Symbol.iterator]: V } : {}) &
152152
(T extends { [Symbol.match]: infer V } ? { [Symbol.match]: V } : {}) &
153153
(T extends { [Symbol.matchAll]: infer V } ? { [Symbol.matchAll]: V } : {}) &
154-
(T extends { [Symbol.observable]: infer V }
155-
? { [Symbol.observable]: V }
156-
: {}) &
157154
(T extends { [Symbol.replace]: infer V } ? { [Symbol.replace]: V } : {}) &
158155
(T extends { [Symbol.search]: infer V } ? { [Symbol.search]: V } : {}) &
159156
(T extends { [Symbol.species]: infer V } ? { [Symbol.species]: V } : {}) &

packages/template-explorer/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ window.init = () => {
9797
}
9898
}
9999

100-
const sharedEditorOptions: m.editor.IEditorConstructionOptions = {
100+
const sharedEditorOptions: m.editor.IStandaloneEditorConstructionOptions = {
101101
theme: 'vs-dark',
102102
fontSize: 14,
103103
wordWrap: 'on',

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,11 @@
843843
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c"
844844
integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg==
845845

846+
847+
version "13.11.1"
848+
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.1.tgz#49a2a83df9d26daacead30d0ccc8762b128d53c7"
849+
integrity sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==
850+
846851
"@types/prettier@^1.19.0":
847852
version "1.19.1"
848853
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f"

0 commit comments

Comments
 (0)