Skip to content

Commit

Permalink
Update prettier to 2.3.1 (#13460)
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Jun 14, 2021
1 parent 66cbd60 commit ad693cc
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions packages/babel-core/src/config/config-chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,10 @@ function normalizeOptions(opts: ValidatedOptions): ValidatedOptions {
function dedupDescriptors(
items: Array<UnloadedDescriptor>,
): Array<UnloadedDescriptor> {
const map: Map<Function, Map<string | void, { value: UnloadedDescriptor }>> =
new Map();
const map: Map<
Function,
Map<string | void, { value: UnloadedDescriptor }>
> = new Map();

const descriptors = [];

Expand Down
12 changes: 8 additions & 4 deletions packages/babel-core/src/config/full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,14 @@ const makeDescriptorLoader = <Context, API>(
return { value: item, options, dirname, alias };
});

const pluginDescriptorLoader =
makeDescriptorLoader<Context.SimplePlugin, PluginAPI>(makePluginAPI);
const presetDescriptorLoader =
makeDescriptorLoader<Context.SimplePreset, PresetAPI>(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.
Expand Down
10 changes: 7 additions & 3 deletions packages/babel-plugin-transform-typescript/src/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit ad693cc

Please sign in to comment.