Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove merge helper and add more type declarations. #5649

Merged
merged 1 commit into from Apr 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions lib/third-party-libs.js.flow
Expand Up @@ -7,3 +7,27 @@ declare module "micromatch" {
nocase: boolean,
}): Array<string>;
}

declare module "resolve" {
declare export default {
sync: (string, {| basedir: string |}) => string;
};
}

declare module "json5" {
declare export default {
parse: (string) => mixed,
};
}

declare module "lodash/defaults" {
declare export default <T: Object>(T, Object) => T;
}

declare module "lodash/clone" {
declare export default <T>(obj: T) => T;
}

declare module "lodash/merge" {
declare export default <T: Object>(T, Object) => T;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I thought about it, but it only has declarations for the root lodash module, so since we use the lodash/merge and such, it didn't work. If we switch over to the global module we definitely can use flow-typed eventually though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

21 changes: 0 additions & 21 deletions packages/babel-core/src/config/helpers/merge.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/babel-core/src/config/option-manager.js
Expand Up @@ -4,7 +4,7 @@ import * as context from "../index";
import Plugin from "./plugin";
import * as messages from "babel-messages";
import defaults from "lodash/defaults";
import merge from "./helpers/merge";
import merge from "lodash/merge";
import removed from "./removed";
import buildConfigChain from "./build-config-chain";
import path from "path";
Expand Down