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

Allow legacy targets to be used when manually specified #457

Merged
merged 2 commits into from
Jun 28, 2018

Conversation

shadaj
Copy link
Contributor

@shadaj shadaj commented Jun 28, 2018

No description provided.

@shadaj shadaj self-assigned this Jun 28, 2018
@@ -81,7 +81,7 @@ export default class Generate extends Command {

let inferredTarget: TargetType = "" as TargetType;
if (flags.target) {
if (["swift", "typescript", "flow", "scala"].includes(flags.target)) {
if (["swift", "typescript", "ts", "flow", "scala", "typescript-legacy", "ts-legacy", "flow-legacy"].includes(flags.target)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should get rid of the ts aliases? It seems confusing to have multiple names for the same target.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was mostly thinking about compatibility with apollo-codegen here. Is it okay to drop target names now?

Copy link
Contributor

Choose a reason for hiding this comment

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

As this is a new CLI, I think we should favor clarity over backwards compatibility. Plus, I think in apollo-codegen we didn't have typescript-legacy but typescript-modern so it's breaking anyway?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I'll drop ts.

@shadaj shadaj merged commit e2f78f7 into master Jun 28, 2018
@shadaj shadaj deleted the allow-legacy-targets branch June 28, 2018 21:03
@shadaj shadaj added the 🐞 bug label Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants