Skip to content

Commit

Permalink
Upgrade graphql-upload to support Node.js v14
Browse files Browse the repository at this point in the history
  • Loading branch information
Leko committed Jun 19, 2020
1 parent e44bb72 commit e430769
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 23 deletions.
9 changes: 9 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ jobs:
steps:
- common_test_steps

NodeJS 14:
executor: { name: oss/node, tag: '14' }
steps:
- common_test_steps

# XXX We used to use this filter to only run a "Docs" job on docs branches.
# Now we use it to disable all jobs. It's unclear if there's a simpler way
# to do this!
Expand Down Expand Up @@ -100,6 +105,8 @@ workflows:
<<: *common_non_publish_filters
- NodeJS 12:
<<: *common_non_publish_filters
- NodeJS 14:
<<: *common_non_publish_filters
- oss/lerna_tarballs:
name: Package tarballs
<<: *common_non_publish_filters
Expand All @@ -108,6 +115,7 @@ workflows:
- NodeJS 8
- NodeJS 10
- NodeJS 12
- NodeJS 14
- oss/dry_run:
name: Dry-run
<<: *common_publish_filters
Expand All @@ -116,6 +124,7 @@ workflows:
- NodeJS 8
- NodeJS 10
- NodeJS 12
- NodeJS 14
- oss/confirmation:
name: Confirmation
type: approval
Expand Down
57 changes: 40 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/apollo-server-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"graphql-extensions": "file:../graphql-extensions",
"graphql-tag": "^2.9.2",
"graphql-tools": "^4.0.0",
"graphql-upload": "^8.0.2",
"graphql-upload": "^11.0.0",
"loglevel": "^1.6.7",
"sha.js": "^2.4.11",
"subscriptions-transport-ws": "^0.9.11",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,9 @@ describe('apollo-server-express', () => {
},
Mutation: {
singleUpload: async (_, args) => {
expect((await args.file).stream).toBeDefined();
const stream = (await args.file).createReadStream();
expect(stream).toBeDefined();
stream.destroy();
return args.file;
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ describe('apollo-server-fastify', () => {
},
Mutation: {
singleUpload: async (_, args) => {
expect((await args.file).stream).toBeDefined();
const stream = (await args.file).createReadStream();
expect(stream).toBeDefined();
stream.destroy();
return args.file;
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,9 @@ const port = 0;
},
Mutation: {
singleUpload: async (_, args) => {
expect((await args.file).stream).toBeDefined();
const stream = (await args.file).createReadStream();
expect(stream).toBeDefined();
stream.destroy();
return args.file;
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ const resolvers = {
},
Mutation: {
singleUpload: async (_, args) => {
expect((await args.file).stream).toBeDefined();
const stream = (await args.file).createReadStream();
expect(stream).toBeDefined();
stream.destroy();
return args.file;
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ describe('apollo-server-micro', function() {
},
Mutation: {
singleUpload: async (_, args) => {
expect((await args.file).stream).toBeDefined();
const stream = (await args.file).createReadStream();
expect(stream).toBeDefined();
stream.destroy();
return args.file;
},
},
Expand Down

0 comments on commit e430769

Please sign in to comment.