]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
build(deps-dev): bump typescript from 4.3.5 to 4.4.2 (#4482)
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Thu, 2 Sep 2021 13:53:57 +0000 (09:53 -0400)
committerGitHub <noreply@github.com>
Thu, 2 Sep 2021 13:53:57 +0000 (09:53 -0400)
* 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] <support@github.com>
* 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 <carlos@hypermob.co.uk>
Co-authored-by: Evan You <yyx990803@gmail.com>
25 files changed:
packages/compiler-core/src/transforms/transformExpression.ts
packages/compiler-core/src/validateExpression.ts
packages/compiler-sfc/__tests__/utils.ts
packages/compiler-sfc/src/compileScript.ts
packages/compiler-sfc/src/compileStyle.ts
packages/compiler-sfc/src/compileTemplate.ts
packages/compiler-sfc/src/stylePreprocessors.ts
packages/ref-transform/__tests__/refTransform.spec.ts
packages/runtime-core/__tests__/apiCreateApp.spec.ts
packages/runtime-core/__tests__/apiSetupHelpers.spec.ts
packages/runtime-core/__tests__/errorHandling.spec.ts
packages/runtime-core/__tests__/scheduler.spec.ts
packages/runtime-core/src/apiDefineComponent.ts
packages/runtime-core/src/compat/global.ts
packages/runtime-core/src/hmr.ts
packages/runtime-dom/__tests__/nodeOps.spec.ts
packages/runtime-dom/src/modules/props.ts
packages/server-renderer/__tests__/render.spec.ts
packages/server-renderer/src/renderToStream.ts
packages/sfc-playground/src/output/Preview.vue
packages/sfc-playground/src/output/srcdoc.html
packages/sfc-playground/src/transform.ts
packages/template-explorer/src/index.ts
scripts/release.js
yarn.lock

index 21e962683805651199456bc4bf0800ebe12273da..285c07e2bb714479bd051c2648ebca980da3733c 100644 (file)
@@ -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,
index fce56773b27d1063980425a98fd5cc9371d8bed8..dc6ecef0340567a025637e94d9e2b5aeb1319005 100644 (file)
@@ -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, '')
index 407442740ead0f00e972635fe6454511f69bc376..1ae9ee15876c4dc345ed73b0847d579b3a1329e4 100644 (file)
@@ -22,7 +22,7 @@ export function assertCode(code: string) {
       sourceType: 'module',
       plugins: [...babelParserDefaultPlugins, 'typescript']
     })
-  } catch (e) {
+  } catch (e: any) {
     console.log(code)
     throw e
   }
index 648cd019a5cceb1f85c7360d233cf14101c7bf7e..6a8d17968447ac30cad089412de071349494820b 100644 (file)
@@ -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)}`
index 2d918938a5e1b2566232f01ff6b2fc0f4d83d285..41280aa90473744ae580313c87a413191d19f38d 100644 (file)
@@ -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)
   }
 
index b980cc3c154117c710d41b690e68ac280b552c1b..bf078ef95e4a9e07ab745f52463af1c3b1a47451 100644 (file)
@@ -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,
index 1a4e7b7c87fa10eaf5ac5db6059df6c94fe63c3e..218ebfdb43066618f438efe52926aa181d673682 100644 (file)
@@ -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: [] }
   }
 }
index 57cba4f05b2ad643bb9b40416cc15ae7b4319ca9..b4b3473741c74dcbd4e7975953a0610e48506096 100644 (file)
@@ -9,7 +9,7 @@ function assertCode(code: string) {
       sourceType: 'module',
       plugins: [...babelParserDefaultPlugins, 'typescript']
     })
-  } catch (e) {
+  } catch (e: any) {
     console.log(code)
     throw e
   }
index bed6c0b11fc09a7b1a3826c809df3bf84c9e6871..3dfc040b70773c1edc700cab1df2be00d6a642f2 100644 (file)
@@ -84,7 +84,7 @@ describe('api: createApp', () => {
         const bar = inject('bar')
         try {
           inject('__proto__')
-        } catch (e) {}
+        } catch (e: any) {}
         return () => `${foo},${bar}`
       }
     }
index 1f2852d5a490cebdc907e1ed9aad8c80a2eeb73c..728cd8e732a81e1c7ea2d5481c5e54a9c67bdaea 100644 (file)
@@ -179,7 +179,7 @@ describe('SFC <script setup> helpers', () => {
             )
             __temp = await __temp
             __restore()
-          } catch (e) {
+          } catch (e: any) {
             // ignore
           }
           // register the lifecycle after an await statement
index 10d28e441eab048951d1ce0b7b2d53d71d0be3ba..d1d6969104e3f7e83c83d2c19fc8570ac4e25836 100644 (file)
@@ -490,7 +490,7 @@ describe('error handling', () => {
 
     try {
       await Promise.all(res)
-    } catch (e) {
+    } catch (e: any) {
       expect(e).toBe(err)
     }
     expect(fn).toHaveBeenCalledWith(err, 'component event handler')
index 750a2ed19b5fb8f9f7ecc1004d9804773764d01a..fbea3e7773f570b8f60df59f1e799373849cd180 100644 (file)
@@ -489,7 +489,7 @@ describe('scheduler', () => {
     })
     try {
       await nextTick()
-    } catch (e) {
+    } catch (e: any) {
       expect(e).toBe(err)
     }
     expect(
index f6793da5f305333c0849063496813304d2ecec26..4e40b14d505aadf3a4dc85099fa9206fd244f918 100644 (file)
@@ -38,10 +38,11 @@ export type DefineComponent<
   M extends MethodOptions = MethodOptions,
   Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
   Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
-  E extends EmitsOptions = Record<string, any>,
+  E extends EmitsOptions = {},
   EE extends string = string,
   PP = PublicProps,
-  Props = Readonly<ExtractPropTypes<PropsOrPropOptions>> & EmitsToProps<E>,
+  Props = Readonly<ExtractPropTypes<PropsOrPropOptions>> &
+    ({} extends E ? {} : EmitsToProps<E>),
   Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>
 > = ComponentPublicInstanceConstructor<
   CreateComponentPublicInstance<
index 7f66e5dad596f1f64fddb46cbad94cb4deb38b13..e0c847d33ae4a3296e43291604f2676da4ebb10b 100644 (file)
@@ -619,7 +619,7 @@ function defineReactive(obj: any, key: string, val: any) {
       Object.keys(val).forEach(key => {
         try {
           defineReactiveSimple(val, key, val[key])
-        } catch (e) {}
+        } catch (e: any) {}
       })
     }
   }
index eb6ab8080bbba4481a1b943eb5e6e7c0a1db861b..c2fbee65afe70848d469dbc6676ea5d8a9d5df0f 100644 (file)
@@ -169,7 +169,7 @@ function tryWrap(fn: (id: string, arg: any) => any): Function {
   return (id: string, arg: any) => {
     try {
       return fn(id, arg)
-    } catch (e) {
+    } catch (e: any) {
       console.error(e)
       console.warn(
         `[HMR] Something went wrong during Vue component hot-reload. ` +
index 0e46ebfc9b4fd913e1219c759a86bb95bb121c6b..1944bf0e4f443d9bae3a77c8d198ead67f570209 100644 (file)
@@ -60,8 +60,8 @@ describe('runtime-dom: node-ops', () => {
       expect(parent.innerHTML).toBe(content)
       expect(first).toBe(parent.firstChild)
       expect(last).toBe(parent.lastChild)
-      expect(first.namespaceURI).toMatch('svg')
-      expect(last.namespaceURI).toMatch('svg')
+      expect((first as Element).namespaceURI).toMatch('svg')
+      expect((last as Element).namespaceURI).toMatch('svg')
     })
 
     test('fresh insertion as svg, with anchor', () => {
@@ -79,8 +79,8 @@ describe('runtime-dom: node-ops', () => {
       expect(parent.innerHTML).toBe(content + existing)
       expect(first).toBe(parent.firstChild)
       expect(last).toBe(parent.childNodes[parent.childNodes.length - 2])
-      expect(first.namespaceURI).toMatch('svg')
-      expect(last.namespaceURI).toMatch('svg')
+      expect((first as Element).namespaceURI).toMatch('svg')
+      expect((last as Element).namespaceURI).toMatch('svg')
     })
   })
 })
index aff6909f8864b23b2bd88808725a06725e0a6eb9..d706923966f12ecb33f79598edc626eb77544157 100644 (file)
@@ -87,7 +87,7 @@ export function patchDOMProp(
   // some properties perform value validation and throw
   try {
     el[key] = value
-  } catch (e) {
+  } catch (e: any) {
     if (__DEV__) {
       warn(
         `Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
index 1079a29a6c2358703d3d693cdbb20a325a611993..5f3a5699fa747632a132015b3b67773a1fdb7265 100644 (file)
@@ -1078,7 +1078,7 @@ function testRender(type: string, render: typeof renderToString) {
 
       try {
         await render(app)
-      } catch (e) {
+      } catch (e: any) {
         renderError = e
       }
       expect(renderError).toBe(null)
index 2c51da77ecdb2759eb5b7b098e7dd831331b6c2e..0644fb0a05a901375d155801d263c225fd94336e 100644 (file)
@@ -182,7 +182,7 @@ export function pipeToWebWritable(
   let hasReady = false
   try {
     hasReady = isPromise(writer.ready)
-  } catch (e) {}
+  } catch (e: any) {}
 
   renderToSimpleStream(input, context, {
     async push(content) {
index a63acc062f7aef8c97c4303b41e3733b9c5c4a6c..04f6860c7221e5dd5ce5e8f6aa06629dc3e08e01 100644 (file)
@@ -49,7 +49,7 @@ watch(
         ]
       }
       createSandbox()
-    } catch (e) {
+    } catch (e: any) {
       store.errors = [e as Error]
       return
     }
@@ -89,7 +89,7 @@ function createSandbox() {
   let importMap: Record<string, any>
   try {
     importMap = JSON.parse(store.importMap || `{}`)
-  } catch (e) {
+  } catch (e: any) {
     store.errors = [`Syntax error in import-map.json: ${(e as Error).message}`]
     return
   }
@@ -193,7 +193,7 @@ async function updatePreview() {
   app.config.errorHandler = e => console.error(e)
   app.mount('#app')`.trim()
     ])
-  } catch (e) {
+  } catch (e: any) {
     runtimeError.value = (e as Error).message
   }
 }
index 91dd9e1adc1a85e8b70cccdcefa0139da7719b10..d42b506ee17af0004781c3bf9c0f0ff00a67a1cd 100644 (file)
@@ -61,7 +61,7 @@
                                                        }
                                                        window.__next__ = undefined
                                                        send_ok()
-                                               } catch (e) {
+                                               } catch (e: any) {
                                                        send_error(e.message, e.stack);
                                                }
                                        }
                                        }
                                        try {
                                                parent.postMessage({ action: 'error', value: error }, '*');
-                                       } catch (e) {
+                                       } catch (e: any) {
                                                parent.postMessage({ action: 'error', value: msg }, '*');
                                        }
                                }
                                        }
                                        try {
                                                parent.postMessage({ action: 'unhandledrejection', value: event.reason }, '*');
-                                       } catch (e) {
+                                       } catch (e: any) {
                                                parent.postMessage({ action: 'unhandledrejection', value: event.reason.message }, '*');
                                        }
                                });
index 57517f9c34267cc4029adb94bb0a0575dc04a998..478744d12a94936eeec964694d8567088e1387d6 100644 (file)
@@ -233,7 +233,7 @@ async function doCompileScript(
       }
 
       return [code, compiledScript.bindings]
-    } catch (e) {
+    } catch (e: any) {
       store.errors = [e.stack.split('\n').slice(0, 12).join('\n')]
       return
     }
index 683bf0452be8417864b84bb44dd5cadf02ed8aa8..d083d35ca4e950948d2ed889f8fd0da207527b46 100644 (file)
@@ -71,7 +71,7 @@ window.init = () => {
       lastSuccessfulCode = code + `\n\n// Check the console for the AST`
       lastSuccessfulMap = new SourceMapConsumer(map!)
       lastSuccessfulMap!.computeColumnSpans()
-    } catch (e) {
+    } catch (e: any) {
       lastSuccessfulCode = `/* ERROR: ${e.message} (see console for more info) */`
       console.error(e)
     }
index 482367a01c1827ecbf97f651a9849b213a965de5..7f3ea402b1083d80621064bcf4a8ea87f89416ac 100644 (file)
@@ -220,7 +220,7 @@ async function publishPackage(pkgName, version, runIfNotDry) {
       }
     )
     console.log(chalk.green(`Successfully published ${pkgName}@${version}`))
-  } catch (e) {
+  } catch (e: any) {
     if (e.stderr.match(/previously published/)) {
       console.log(chalk.red(`Skipping already published: ${pkgName}`))
     } else {
index 0bcbb4c3a8b8646870bb563c0b2e8e8cb02b066a..1faa04312253d5c767f2db12d8a29afed8a3db6a 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -6318,7 +6318,12 @@ typedarray@^0.0.6:
   resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
   integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
 
-typescript@^4.2.2, typescript@~4.3.5:
+typescript@^4.2.2:
+  version "4.4.2"
+  resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86"
+  integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==
+
+typescript@~4.3.5:
   version "4.3.5"
   resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
   integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==