Skip to content

Commit 305883a

Browse files
dependabot[bot]pikaxyyx990803
authored
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](microsoft/TypeScript@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] <[email protected]> * 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 <[email protected]> Co-authored-by: Evan You <[email protected]>
1 parent 592cdbd commit 305883a

File tree

25 files changed

+41
-35
lines changed

25 files changed

+41
-35
lines changed

packages/compiler-core/src/transforms/transformExpression.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export function processExpression(
233233
ast = parse(source, {
234234
plugins: [...context.expressionPlugins, ...babelParserDefaultPlugins]
235235
}).program
236-
} catch (e) {
236+
} catch (e: any) {
237237
context.onError(
238238
createCompilerError(
239239
ErrorCodes.X_INVALID_EXPRESSION,

packages/compiler-core/src/validateExpression.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function validateBrowserExpression(
4646
? ` ${exp} `
4747
: `return ${asParams ? `(${exp}) => {}` : `(${exp})`}`
4848
)
49-
} catch (e) {
49+
} catch (e: any) {
5050
let message = e.message
5151
const keywordMatch = exp
5252
.replace(stripStringRE, '')

packages/compiler-sfc/__tests__/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function assertCode(code: string) {
2222
sourceType: 'module',
2323
plugins: [...babelParserDefaultPlugins, 'typescript']
2424
})
25-
} catch (e) {
25+
} catch (e: any) {
2626
console.log(code)
2727
throw e
2828
}

packages/compiler-sfc/src/compileScript.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export function compileScript(
210210
bindings,
211211
scriptAst: scriptAst.body
212212
}
213-
} catch (e) {
213+
} catch (e: any) {
214214
// silently fallback if parse fails since user may be using custom
215215
// babel syntax
216216
return script
@@ -281,7 +281,7 @@ export function compileScript(
281281
): Program {
282282
try {
283283
return _parse(input, options).program
284-
} catch (e) {
284+
} catch (e: any) {
285285
e.message = `[@vue/compiler-sfc] ${e.message}\n\n${
286286
sfc.filename
287287
}\n${generateCodeFrame(source, e.pos + offset, e.pos + offset + 1)}`

packages/compiler-sfc/src/compileStyle.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export function doCompileStyle(
205205
// force synchronous transform (we know we only have sync plugins)
206206
code = result.css
207207
outMap = result.map
208-
} catch (e) {
208+
} catch (e: any) {
209209
errors.push(e)
210210
}
211211

packages/compiler-sfc/src/compileTemplate.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export function compileTemplate(
127127
...options,
128128
source: preprocess(options, preprocessor)
129129
})
130-
} catch (e) {
130+
} catch (e: any) {
131131
return {
132132
code: `export default function render() {}`,
133133
source: options.source,

packages/compiler-sfc/src/stylePreprocessors.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const scss: StylePreprocessor = (source, map, options, load = require) => {
4545
}
4646

4747
return { code: result.css.toString(), errors: [], dependencies }
48-
} catch (e) {
48+
} catch (e: any) {
4949
return { code: '', errors: [e], dependencies: [] }
5050
}
5151
}
@@ -114,7 +114,7 @@ const styl: StylePreprocessor = (source, map, options, load = require) => {
114114
}
115115

116116
return { code: result, errors: [], dependencies }
117-
} catch (e) {
117+
} catch (e: any) {
118118
return { code: '', errors: [e], dependencies: [] }
119119
}
120120
}

packages/ref-transform/__tests__/refTransform.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function assertCode(code: string) {
99
sourceType: 'module',
1010
plugins: [...babelParserDefaultPlugins, 'typescript']
1111
})
12-
} catch (e) {
12+
} catch (e: any) {
1313
console.log(code)
1414
throw e
1515
}

packages/runtime-core/__tests__/apiCreateApp.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('api: createApp', () => {
8484
const bar = inject('bar')
8585
try {
8686
inject('__proto__')
87-
} catch (e) {}
87+
} catch (e: any) {}
8888
return () => `${foo},${bar}`
8989
}
9090
}

packages/runtime-core/__tests__/apiSetupHelpers.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ describe('SFC <script setup> helpers', () => {
179179
)
180180
__temp = await __temp
181181
__restore()
182-
} catch (e) {
182+
} catch (e: any) {
183183
// ignore
184184
}
185185
// register the lifecycle after an await statement

packages/runtime-core/__tests__/errorHandling.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ describe('error handling', () => {
490490

491491
try {
492492
await Promise.all(res)
493-
} catch (e) {
493+
} catch (e: any) {
494494
expect(e).toBe(err)
495495
}
496496
expect(fn).toHaveBeenCalledWith(err, 'component event handler')

packages/runtime-core/__tests__/scheduler.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ describe('scheduler', () => {
489489
})
490490
try {
491491
await nextTick()
492-
} catch (e) {
492+
} catch (e: any) {
493493
expect(e).toBe(err)
494494
}
495495
expect(

packages/runtime-core/src/apiDefineComponent.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ export type DefineComponent<
3838
M extends MethodOptions = MethodOptions,
3939
Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
4040
Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
41-
E extends EmitsOptions = Record<string, any>,
41+
E extends EmitsOptions = {},
4242
EE extends string = string,
4343
PP = PublicProps,
44-
Props = Readonly<ExtractPropTypes<PropsOrPropOptions>> & EmitsToProps<E>,
44+
Props = Readonly<ExtractPropTypes<PropsOrPropOptions>> &
45+
({} extends E ? {} : EmitsToProps<E>),
4546
Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>
4647
> = ComponentPublicInstanceConstructor<
4748
CreateComponentPublicInstance<

packages/runtime-core/src/compat/global.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ function defineReactive(obj: any, key: string, val: any) {
619619
Object.keys(val).forEach(key => {
620620
try {
621621
defineReactiveSimple(val, key, val[key])
622-
} catch (e) {}
622+
} catch (e: any) {}
623623
})
624624
}
625625
}

packages/runtime-core/src/hmr.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function tryWrap(fn: (id: string, arg: any) => any): Function {
169169
return (id: string, arg: any) => {
170170
try {
171171
return fn(id, arg)
172-
} catch (e) {
172+
} catch (e: any) {
173173
console.error(e)
174174
console.warn(
175175
`[HMR] Something went wrong during Vue component hot-reload. ` +

packages/runtime-dom/__tests__/nodeOps.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ describe('runtime-dom: node-ops', () => {
6060
expect(parent.innerHTML).toBe(content)
6161
expect(first).toBe(parent.firstChild)
6262
expect(last).toBe(parent.lastChild)
63-
expect(first.namespaceURI).toMatch('svg')
64-
expect(last.namespaceURI).toMatch('svg')
63+
expect((first as Element).namespaceURI).toMatch('svg')
64+
expect((last as Element).namespaceURI).toMatch('svg')
6565
})
6666

6767
test('fresh insertion as svg, with anchor', () => {
@@ -79,8 +79,8 @@ describe('runtime-dom: node-ops', () => {
7979
expect(parent.innerHTML).toBe(content + existing)
8080
expect(first).toBe(parent.firstChild)
8181
expect(last).toBe(parent.childNodes[parent.childNodes.length - 2])
82-
expect(first.namespaceURI).toMatch('svg')
83-
expect(last.namespaceURI).toMatch('svg')
82+
expect((first as Element).namespaceURI).toMatch('svg')
83+
expect((last as Element).namespaceURI).toMatch('svg')
8484
})
8585
})
8686
})

packages/runtime-dom/src/modules/props.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function patchDOMProp(
8787
// some properties perform value validation and throw
8888
try {
8989
el[key] = value
90-
} catch (e) {
90+
} catch (e: any) {
9191
if (__DEV__) {
9292
warn(
9393
`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +

packages/server-renderer/__tests__/render.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ function testRender(type: string, render: typeof renderToString) {
10781078

10791079
try {
10801080
await render(app)
1081-
} catch (e) {
1081+
} catch (e: any) {
10821082
renderError = e
10831083
}
10841084
expect(renderError).toBe(null)

packages/server-renderer/src/renderToStream.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function pipeToWebWritable(
182182
let hasReady = false
183183
try {
184184
hasReady = isPromise(writer.ready)
185-
} catch (e) {}
185+
} catch (e: any) {}
186186

187187
renderToSimpleStream(input, context, {
188188
async push(content) {

packages/sfc-playground/src/output/Preview.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ watch(
4949
]
5050
}
5151
createSandbox()
52-
} catch (e) {
52+
} catch (e: any) {
5353
store.errors = [e as Error]
5454
return
5555
}
@@ -89,7 +89,7 @@ function createSandbox() {
8989
let importMap: Record<string, any>
9090
try {
9191
importMap = JSON.parse(store.importMap || `{}`)
92-
} catch (e) {
92+
} catch (e: any) {
9393
store.errors = [`Syntax error in import-map.json: ${(e as Error).message}`]
9494
return
9595
}
@@ -193,7 +193,7 @@ async function updatePreview() {
193193
app.config.errorHandler = e => console.error(e)
194194
app.mount('#app')`.trim()
195195
])
196-
} catch (e) {
196+
} catch (e: any) {
197197
runtimeError.value = (e as Error).message
198198
}
199199
}

packages/sfc-playground/src/output/srcdoc.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
}
6262
window.__next__ = undefined
6363
send_ok()
64-
} catch (e) {
64+
} catch (e: any) {
6565
send_error(e.message, e.stack);
6666
}
6767
}
@@ -109,7 +109,7 @@
109109
}
110110
try {
111111
parent.postMessage({ action: 'error', value: error }, '*');
112-
} catch (e) {
112+
} catch (e: any) {
113113
parent.postMessage({ action: 'error', value: msg }, '*');
114114
}
115115
}
@@ -121,7 +121,7 @@
121121
}
122122
try {
123123
parent.postMessage({ action: 'unhandledrejection', value: event.reason }, '*');
124-
} catch (e) {
124+
} catch (e: any) {
125125
parent.postMessage({ action: 'unhandledrejection', value: event.reason.message }, '*');
126126
}
127127
});

packages/sfc-playground/src/transform.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ async function doCompileScript(
233233
}
234234

235235
return [code, compiledScript.bindings]
236-
} catch (e) {
236+
} catch (e: any) {
237237
store.errors = [e.stack.split('\n').slice(0, 12).join('\n')]
238238
return
239239
}

packages/template-explorer/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ window.init = () => {
7171
lastSuccessfulCode = code + `\n\n// Check the console for the AST`
7272
lastSuccessfulMap = new SourceMapConsumer(map!)
7373
lastSuccessfulMap!.computeColumnSpans()
74-
} catch (e) {
74+
} catch (e: any) {
7575
lastSuccessfulCode = `/* ERROR: ${e.message} (see console for more info) */`
7676
console.error(e)
7777
}

scripts/release.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ async function publishPackage(pkgName, version, runIfNotDry) {
220220
}
221221
)
222222
console.log(chalk.green(`Successfully published ${pkgName}@${version}`))
223-
} catch (e) {
223+
} catch (e: any) {
224224
if (e.stderr.match(/previously published/)) {
225225
console.log(chalk.red(`Skipping already published: ${pkgName}`))
226226
} else {

yarn.lock

+6-1
Original file line numberDiff line numberDiff line change
@@ -6318,7 +6318,12 @@ typedarray@^0.0.6:
63186318
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
63196319
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
63206320

6321-
typescript@^4.2.2, typescript@~4.3.5:
6321+
typescript@^4.2.2:
6322+
version "4.4.2"
6323+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86"
6324+
integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==
6325+
6326+
typescript@~4.3.5:
63226327
version "4.3.5"
63236328
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
63246329
integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==

0 commit comments

Comments
 (0)