diff --git a/package.json b/package.json index 72386546bb..fd46586a1a 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "lint-staged": "^9.2.0", "lodash": "^4.17.21", "mergeiterator": "^1.2.5", - "prettier": "2.3.0", + "prettier": "2.3.1", "rollup": "^2.47.0", "rollup-plugin-dts": "^2.0.0", "rollup-plugin-node-polyfills": "^0.2.1", diff --git a/packages/babel-core/src/config/config-chain.ts b/packages/babel-core/src/config/config-chain.ts index 9af4cf4514..0ebf606312 100644 --- a/packages/babel-core/src/config/config-chain.ts +++ b/packages/babel-core/src/config/config-chain.ts @@ -717,8 +717,10 @@ function normalizeOptions(opts: ValidatedOptions): ValidatedOptions { function dedupDescriptors( items: Array, ): Array { - const map: Map> = - new Map(); + const map: Map< + Function, + Map + > = new Map(); const descriptors = []; diff --git a/packages/babel-core/src/config/full.ts b/packages/babel-core/src/config/full.ts index 0e8a333918..286b16e791 100644 --- a/packages/babel-core/src/config/full.ts +++ b/packages/babel-core/src/config/full.ts @@ -283,10 +283,14 @@ const makeDescriptorLoader = ( return { value: item, options, dirname, alias }; }); -const pluginDescriptorLoader = - makeDescriptorLoader(makePluginAPI); -const presetDescriptorLoader = - makeDescriptorLoader(makePresetAPI); +const pluginDescriptorLoader = makeDescriptorLoader< + Context.SimplePlugin, + PluginAPI +>(makePluginAPI); +const presetDescriptorLoader = makeDescriptorLoader< + Context.SimplePreset, + PresetAPI +>(makePresetAPI); /** * Instantiate a plugin for the given descriptor, returning the plugin/options pair. diff --git a/packages/babel-plugin-transform-typescript/src/namespace.ts b/packages/babel-plugin-transform-typescript/src/namespace.ts index 84ea984864..4392467c10 100644 --- a/packages/babel-plugin-transform-typescript/src/namespace.ts +++ b/packages/babel-plugin-transform-typescript/src/namespace.ts @@ -68,9 +68,13 @@ function handleVariableDeclaration( } const { declarations } = node; if ( - declarations.every((declarator): declarator is t.VariableDeclarator & { - id: t.Identifier; - } => t.isIdentifier(declarator.id)) + declarations.every( + ( + declarator, + ): declarator is t.VariableDeclarator & { + id: t.Identifier; + } => t.isIdentifier(declarator.id), + ) ) { // `export const a = 1` transforms to `const a = N.a = 1`, the output // is smaller than `const a = 1; N.a = a`; diff --git a/yarn.lock b/yarn.lock index f127721b26..d1a25c37a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5773,7 +5773,7 @@ __metadata: lint-staged: ^9.2.0 lodash: ^4.17.21 mergeiterator: ^1.2.5 - prettier: 2.3.0 + prettier: 2.3.1 rollup: ^2.47.0 rollup-plugin-dts: ^2.0.0 rollup-plugin-node-polyfills: ^0.2.1 @@ -12605,12 +12605,12 @@ fsevents@^1.2.7: languageName: node linkType: hard -"prettier@npm:2.3.0": - version: 2.3.0 - resolution: "prettier@npm:2.3.0" +"prettier@npm:2.3.1": + version: 2.3.1 + resolution: "prettier@npm:2.3.1" bin: prettier: bin-prettier.js - checksum: 652640cc8b71bc5277cfb8bf6f161783ca588efcf683c3d630837b39da8d57fef35c9e00ae5855a8e3c75136c42274046c913cc2b2d2968558315f31c6a26981 + checksum: 9b4a695b87ce5f510fc20feec01cce7371f0fa0b92ffe79d543f6be52e2004c532861629de4d7ab1c577e1f649dce3cfccd62cb2ca6526b1da8d9c63eb84bf36 languageName: node linkType: hard