From 305883a12fcda6a6d9d4fdef2eaaadd7ea764aee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Sep 2021 09:53:57 -0400 Subject: [PATCH] build(deps-dev): bump typescript from 4.3.5 to 4.4.2 (#4482) * build(deps-dev): bump typescript from 4.3.5 to 4.4.2 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.4.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * build(deps-dev): bump typescript from 4.3.5 to 4.4.2 * test: fix nodeOps types Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Carlos Rodrigues Co-authored-by: Evan You --- .../compiler-core/src/transforms/transformExpression.ts | 2 +- packages/compiler-core/src/validateExpression.ts | 2 +- packages/compiler-sfc/__tests__/utils.ts | 2 +- packages/compiler-sfc/src/compileScript.ts | 4 ++-- packages/compiler-sfc/src/compileStyle.ts | 2 +- packages/compiler-sfc/src/compileTemplate.ts | 2 +- packages/compiler-sfc/src/stylePreprocessors.ts | 4 ++-- packages/ref-transform/__tests__/refTransform.spec.ts | 2 +- packages/runtime-core/__tests__/apiCreateApp.spec.ts | 2 +- packages/runtime-core/__tests__/apiSetupHelpers.spec.ts | 2 +- packages/runtime-core/__tests__/errorHandling.spec.ts | 2 +- packages/runtime-core/__tests__/scheduler.spec.ts | 2 +- packages/runtime-core/src/apiDefineComponent.ts | 5 +++-- packages/runtime-core/src/compat/global.ts | 2 +- packages/runtime-core/src/hmr.ts | 2 +- packages/runtime-dom/__tests__/nodeOps.spec.ts | 8 ++++---- packages/runtime-dom/src/modules/props.ts | 2 +- packages/server-renderer/__tests__/render.spec.ts | 2 +- packages/server-renderer/src/renderToStream.ts | 2 +- packages/sfc-playground/src/output/Preview.vue | 6 +++--- packages/sfc-playground/src/output/srcdoc.html | 6 +++--- packages/sfc-playground/src/transform.ts | 2 +- packages/template-explorer/src/index.ts | 2 +- scripts/release.js | 2 +- yarn.lock | 7 ++++++- 25 files changed, 41 insertions(+), 35 deletions(-) diff --git a/packages/compiler-core/src/transforms/transformExpression.ts b/packages/compiler-core/src/transforms/transformExpression.ts index 21e96268..285c07e2 100644 --- a/packages/compiler-core/src/transforms/transformExpression.ts +++ b/packages/compiler-core/src/transforms/transformExpression.ts @@ -233,7 +233,7 @@ export function processExpression( ast = parse(source, { plugins: [...context.expressionPlugins, ...babelParserDefaultPlugins] }).program - } catch (e) { + } catch (e: any) { context.onError( createCompilerError( ErrorCodes.X_INVALID_EXPRESSION, diff --git a/packages/compiler-core/src/validateExpression.ts b/packages/compiler-core/src/validateExpression.ts index fce56773..dc6ecef0 100644 --- a/packages/compiler-core/src/validateExpression.ts +++ b/packages/compiler-core/src/validateExpression.ts @@ -46,7 +46,7 @@ export function validateBrowserExpression( ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` ) - } catch (e) { + } catch (e: any) { let message = e.message const keywordMatch = exp .replace(stripStringRE, '') diff --git a/packages/compiler-sfc/__tests__/utils.ts b/packages/compiler-sfc/__tests__/utils.ts index 40744274..1ae9ee15 100644 --- a/packages/compiler-sfc/__tests__/utils.ts +++ b/packages/compiler-sfc/__tests__/utils.ts @@ -22,7 +22,7 @@ export function assertCode(code: string) { sourceType: 'module', plugins: [...babelParserDefaultPlugins, 'typescript'] }) - } catch (e) { + } catch (e: any) { console.log(code) throw e } diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index 648cd019..6a8d1796 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -210,7 +210,7 @@ export function compileScript( bindings, scriptAst: scriptAst.body } - } catch (e) { + } catch (e: any) { // silently fallback if parse fails since user may be using custom // babel syntax return script @@ -281,7 +281,7 @@ export function compileScript( ): Program { try { return _parse(input, options).program - } catch (e) { + } catch (e: any) { e.message = `[@vue/compiler-sfc] ${e.message}\n\n${ sfc.filename }\n${generateCodeFrame(source, e.pos + offset, e.pos + offset + 1)}` diff --git a/packages/compiler-sfc/src/compileStyle.ts b/packages/compiler-sfc/src/compileStyle.ts index 2d918938..41280aa9 100644 --- a/packages/compiler-sfc/src/compileStyle.ts +++ b/packages/compiler-sfc/src/compileStyle.ts @@ -205,7 +205,7 @@ export function doCompileStyle( // force synchronous transform (we know we only have sync plugins) code = result.css outMap = result.map - } catch (e) { + } catch (e: any) { errors.push(e) } diff --git a/packages/compiler-sfc/src/compileTemplate.ts b/packages/compiler-sfc/src/compileTemplate.ts index b980cc3c..bf078ef9 100644 --- a/packages/compiler-sfc/src/compileTemplate.ts +++ b/packages/compiler-sfc/src/compileTemplate.ts @@ -127,7 +127,7 @@ export function compileTemplate( ...options, source: preprocess(options, preprocessor) }) - } catch (e) { + } catch (e: any) { return { code: `export default function render() {}`, source: options.source, diff --git a/packages/compiler-sfc/src/stylePreprocessors.ts b/packages/compiler-sfc/src/stylePreprocessors.ts index 1a4e7b7c..218ebfdb 100644 --- a/packages/compiler-sfc/src/stylePreprocessors.ts +++ b/packages/compiler-sfc/src/stylePreprocessors.ts @@ -45,7 +45,7 @@ const scss: StylePreprocessor = (source, map, options, load = require) => { } return { code: result.css.toString(), errors: [], dependencies } - } catch (e) { + } catch (e: any) { return { code: '', errors: [e], dependencies: [] } } } @@ -114,7 +114,7 @@ const styl: StylePreprocessor = (source, map, options, load = require) => { } return { code: result, errors: [], dependencies } - } catch (e) { + } catch (e: any) { return { code: '', errors: [e], dependencies: [] } } } diff --git a/packages/ref-transform/__tests__/refTransform.spec.ts b/packages/ref-transform/__tests__/refTransform.spec.ts index 57cba4f0..b4b34737 100644 --- a/packages/ref-transform/__tests__/refTransform.spec.ts +++ b/packages/ref-transform/__tests__/refTransform.spec.ts @@ -9,7 +9,7 @@ function assertCode(code: string) { sourceType: 'module', plugins: [...babelParserDefaultPlugins, 'typescript'] }) - } catch (e) { + } catch (e: any) { console.log(code) throw e } diff --git a/packages/runtime-core/__tests__/apiCreateApp.spec.ts b/packages/runtime-core/__tests__/apiCreateApp.spec.ts index bed6c0b1..3dfc040b 100644 --- a/packages/runtime-core/__tests__/apiCreateApp.spec.ts +++ b/packages/runtime-core/__tests__/apiCreateApp.spec.ts @@ -84,7 +84,7 @@ describe('api: createApp', () => { const bar = inject('bar') try { inject('__proto__') - } catch (e) {} + } catch (e: any) {} return () => `${foo},${bar}` } } diff --git a/packages/runtime-core/__tests__/apiSetupHelpers.spec.ts b/packages/runtime-core/__tests__/apiSetupHelpers.spec.ts index 1f2852d5..728cd8e7 100644 --- a/packages/runtime-core/__tests__/apiSetupHelpers.spec.ts +++ b/packages/runtime-core/__tests__/apiSetupHelpers.spec.ts @@ -179,7 +179,7 @@ describe('SFC