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

Change generated flow files extension to .js instead of .ts #461

Merged
merged 1 commit into from
Jun 29, 2018
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export type HeroNameVariables = {|
+episode?: ?Episode
|};",
},
"fileName": "HeroName.ts",
"fileName": "HeroName.js",
"sourcePath": "GraphQL request",
},
Object {
Expand Down Expand Up @@ -130,7 +130,7 @@ export type humanFragment = {|
+friends: ?$ReadOnlyArray<?humanFragment_friends>,
|};",
},
"fileName": "humanFragment.ts",
"fileName": "humanFragment.js",
"sourcePath": "GraphQL request",
},
Object {
Expand All @@ -153,7 +153,7 @@ export type droidFragment = {|
+appearsIn: $ReadOnlyArray<?Episode>,
|};",
},
"fileName": "droidFragment.ts",
"fileName": "droidFragment.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -249,7 +249,7 @@ export type HeroNameVariables = {
episode?: ?Episode
};",
},
"fileName": "HeroName.ts",
"fileName": "HeroName.js",
"sourcePath": "GraphQL request",
},
Object {
Expand Down Expand Up @@ -290,7 +290,7 @@ export type humanFragment = {
friends: ?Array<?humanFragment_friends>,
};",
},
"fileName": "humanFragment.ts",
"fileName": "humanFragment.js",
"sourcePath": "GraphQL request",
},
Object {
Expand All @@ -313,7 +313,7 @@ export type droidFragment = {
appearsIn: Array<?Episode>,
};",
},
"fileName": "droidFragment.ts",
"fileName": "droidFragment.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -356,7 +356,7 @@ export type simpleFragment = {
name: string,
};",
},
"fileName": "simpleFragment.ts",
"fileName": "simpleFragment.js",
"sourcePath": "GraphQL request",
},
Object {
Expand All @@ -383,7 +383,7 @@ export type anotherFragment = {
name: string,
};",
},
"fileName": "anotherFragment.ts",
"fileName": "anotherFragment.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -431,7 +431,7 @@ export type simpleFragment = {
name: string,
};",
},
"fileName": "simpleFragment.ts",
"fileName": "simpleFragment.js",
"sourcePath": "GraphQL request",
},
Object {
Expand Down Expand Up @@ -476,7 +476,7 @@ export type anotherFragment_Human = {

export type anotherFragment = anotherFragment_Droid | anotherFragment_Human;",
},
"fileName": "anotherFragment.ts",
"fileName": "anotherFragment.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -525,7 +525,7 @@ export type CustomScalar = {
commentTest: ?CustomScalar_commentTest
};",
},
"fileName": "CustomScalar.ts",
"fileName": "CustomScalar.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -585,7 +585,7 @@ export type HeroInlineFragmentVariables = {
episode?: ?Episode
};",
},
"fileName": "HeroInlineFragment.ts",
"fileName": "HeroInlineFragment.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -675,7 +675,7 @@ export type HeroNameVariables = {
episode?: ?Episode
};",
},
"fileName": "HeroName.ts",
"fileName": "HeroName.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -777,7 +777,7 @@ export type HeroNameVariables = {
episode?: ?Episode
};",
},
"fileName": "HeroName.ts",
"fileName": "HeroName.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -820,7 +820,7 @@ export type HeroNameVariables = {
episode?: ?Episode
};",
},
"fileName": "HeroName.ts",
"fileName": "HeroName.js",
"sourcePath": "/some/file/ComponentA.js",
},
Object {
Expand Down Expand Up @@ -855,7 +855,7 @@ export type SomeOtherVariables = {
episode?: ?Episode
};",
},
"fileName": "SomeOther.ts",
"fileName": "SomeOther.js",
"sourcePath": "/some/file/ComponentB.js",
},
Object {
Expand Down Expand Up @@ -891,7 +891,7 @@ export type ReviewMovieVariables = {
review?: ?ReviewInput,
};",
},
"fileName": "ReviewMovie.ts",
"fileName": "ReviewMovie.js",
"sourcePath": "GraphQL request",
},
Object {
Expand All @@ -914,7 +914,7 @@ export type someFragment = {
appearsIn: Array<?Episode>,
};",
},
"fileName": "someFragment.ts",
"fileName": "someFragment.js",
"sourcePath": "/some/file/ComponentB.js",
},
]
Expand Down Expand Up @@ -1014,7 +1014,7 @@ export type HeroFragmentVariables = {
episode?: ?Episode
};",
},
"fileName": "HeroFragment.ts",
"fileName": "HeroFragment.js",
"sourcePath": "GraphQL request",
},
Object {
Expand All @@ -1037,7 +1037,7 @@ export type simpleFragment = {
name: string,
};",
},
"fileName": "simpleFragment.ts",
"fileName": "simpleFragment.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -1080,7 +1080,7 @@ export type SimpleFragment = {
name: string,
};",
},
"fileName": "SimpleFragment.ts",
"fileName": "SimpleFragment.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -1140,7 +1140,7 @@ export type HeroNameVariables = {
episode?: ?Episode
};",
},
"fileName": "HeroName.ts",
"fileName": "HeroName.js",
"sourcePath": "GraphQL request",
},
],
Expand Down Expand Up @@ -1219,7 +1219,7 @@ export type ReviewMovieVariables = {
review?: ?ReviewInput,
};",
},
"fileName": "ReviewMovie.ts",
"fileName": "ReviewMovie.js",
"sourcePath": "GraphQL request",
},
],
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-codegen-flow/src/codeGeneration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function generateSource(

generatedFiles.push({
sourcePath: operation.filePath,
fileName: `${operation.operationName}.ts`,
fileName: `${operation.operationName}.js`,
content: new FlowGeneratedFile(output)
});
});
Expand All @@ -92,7 +92,7 @@ export function generateSource(

generatedFiles.push({
sourcePath: fragment.filePath,
fileName: `${fragment.fragmentName}.ts`,
fileName: `${fragment.fragmentName}.js`,
content: new FlowGeneratedFile(output)
});
});
Expand Down