Skip to content

Commit b79cdc7

Browse files
committed
Sort globbed filenames only
1 parent aed1a25 commit b79cdc7

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

javascript_client/src/__tests__/__snapshots__/syncTest.ts.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

javascript_client/src/sync/generateClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function gatherOperations(options: GenerateClientCodeOptions) {
6666

6767
var operations: ClientOperation[] = []
6868

69-
var filenames: string[] = globSync(graphqlGlob, {})
69+
var filenames: string[] = globSync(graphqlGlob, {}).sort()
7070
if (verbose) {
7171
console.log("[Sync] glob: ", graphqlGlob)
7272
console.log("[Sync] " + filenames.length + " files:")

javascript_client/src/sync/prepareIsolatedFiles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { removeClientFields } from "./removeClientFields"
1010
*
1111
*/
1212
function prepareIsolatedFiles(filenames: string[], addTypename: boolean) {
13-
return filenames.sort().map(function(filename) {
13+
return filenames.map(function(filename) {
1414
var fileOperationBody = fs.readFileSync(filename, "utf8")
1515
var fileOperationName = ""
1616

javascript_client/src/sync/prepareProject.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ import { removeClientFields } from "./removeClientFields";
1717
function prepareProject(filenames: string[], addTypename: boolean) {
1818
if(!filenames.length) { return []; }
1919
var allGraphQL = ""
20-
filenames
21-
.sort()
22-
.forEach(function(filename) {
20+
filenames.forEach(function(filename) {
2321
allGraphQL += fs.readFileSync(filename)
2422
})
2523

0 commit comments

Comments
 (0)