From d3c1b205bc4ba03696f9fecf9ca1dfd6d1d768a5 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Thu, 16 Apr 2020 09:32:09 +0200 Subject: [PATCH 1/2] 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. --- package.json | 1 + packages/compiler-sfc/src/templateTransformAssetUrl.ts | 4 ++-- packages/template-explorer/src/index.ts | 2 +- yarn.lock | 5 +++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c89aebf0f18..5ed31e38289 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "@rollup/plugin-node-resolve": "^7.1.1", "@rollup/plugin-replace": "^2.2.1", "@types/jest": "^25.1.4", + "@types/node": "12.12.35", "@types/puppeteer": "^2.0.0", "brotli": "^1.3.2", "chalk": "^2.4.2", diff --git a/packages/compiler-sfc/src/templateTransformAssetUrl.ts b/packages/compiler-sfc/src/templateTransformAssetUrl.ts index 3232c15bb35..b981bf67071 100644 --- a/packages/compiler-sfc/src/templateTransformAssetUrl.ts +++ b/packages/compiler-sfc/src/templateTransformAssetUrl.ts @@ -69,8 +69,8 @@ export const transformAssetUrl: NodeTransform = ( } function getImportsExpressionExp( - path: string | undefined, - hash: string | undefined, + path: string | null, + hash: string | null, loc: SourceLocation, context: TransformContext ): ExpressionNode { diff --git a/packages/template-explorer/src/index.ts b/packages/template-explorer/src/index.ts index f5579fbd6bf..e16c1b62571 100644 --- a/packages/template-explorer/src/index.ts +++ b/packages/template-explorer/src/index.ts @@ -97,7 +97,7 @@ window.init = () => { } } - const sharedEditorOptions: m.editor.IEditorConstructionOptions = { + const sharedEditorOptions: m.editor.IStandaloneEditorConstructionOptions = { theme: 'vs-dark', fontSize: 14, wordWrap: 'on', diff --git a/yarn.lock b/yarn.lock index 46783b009b6..f87a568941b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -843,6 +843,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== +"@types/node@12.12.35": + version "12.12.35" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.35.tgz#1e61b226c14380f4384f70cfe49a65c2c553ad2b" + integrity sha512-ASYsaKecA7TUsDrqIGPNk3JeEox0z/0XR/WsJJ8BIX/9+SkMSImQXKWfU/yBrSyc7ZSE/NPqLu36Nur0miCFfQ== + "@types/prettier@^1.19.0": version "1.19.1" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" From 0171facb4cd3691fd6350e94fbbc113f8c12cc1a Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Thu, 16 Apr 2020 09:41:33 +0200 Subject: [PATCH 2/2] 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. --- package.json | 2 +- packages/reactivity/src/ref.ts | 3 --- yarn.lock | 8 ++++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 5ed31e38289..39dbfdf47e9 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@rollup/plugin-node-resolve": "^7.1.1", "@rollup/plugin-replace": "^2.2.1", "@types/jest": "^25.1.4", - "@types/node": "12.12.35", + "@types/node": "13.11.1", "@types/puppeteer": "^2.0.0", "brotli": "^1.3.2", "chalk": "^2.4.2", diff --git a/packages/reactivity/src/ref.ts b/packages/reactivity/src/ref.ts index 39d7414a11f..5b26aec108b 100644 --- a/packages/reactivity/src/ref.ts +++ b/packages/reactivity/src/ref.ts @@ -151,9 +151,6 @@ type SymbolExtract = (T extends { [Symbol.asyncIterator]: infer V } (T extends { [Symbol.iterator]: infer V } ? { [Symbol.iterator]: V } : {}) & (T extends { [Symbol.match]: infer V } ? { [Symbol.match]: V } : {}) & (T extends { [Symbol.matchAll]: infer V } ? { [Symbol.matchAll]: V } : {}) & - (T extends { [Symbol.observable]: infer V } - ? { [Symbol.observable]: V } - : {}) & (T extends { [Symbol.replace]: infer V } ? { [Symbol.replace]: V } : {}) & (T extends { [Symbol.search]: infer V } ? { [Symbol.search]: V } : {}) & (T extends { [Symbol.species]: infer V } ? { [Symbol.species]: V } : {}) & diff --git a/yarn.lock b/yarn.lock index f87a568941b..8be1b15114b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -843,10 +843,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== -"@types/node@12.12.35": - version "12.12.35" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.35.tgz#1e61b226c14380f4384f70cfe49a65c2c553ad2b" - integrity sha512-ASYsaKecA7TUsDrqIGPNk3JeEox0z/0XR/WsJJ8BIX/9+SkMSImQXKWfU/yBrSyc7ZSE/NPqLu36Nur0miCFfQ== +"@types/node@13.11.1": + version "13.11.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.1.tgz#49a2a83df9d26daacead30d0ccc8762b128d53c7" + integrity sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g== "@types/prettier@^1.19.0": version "1.19.1"