Skip to content

Commit

Permalink
Switch to a fork of apollo-upload-server to fix missing core-js d…
Browse files Browse the repository at this point in the history
…ependency.

As reported in #1542,
the `apollo-upload-server` package (v5.0.0, which `apollo-server` relies on)
is no longer able to provide a `core-js` package because of change that was
outside of its control in a Babel release.

The problem is resolved in newer versions of `apollo-upload-server`,
however, regrettably, the newer versions of that package (notably, v6 and
v7) drop support for Node.js 6 — one of two versions of Node.js that are
currently under the terms of the Node.js Foundation's Long-Term-Support
(LTS) agreements.

Since Apollo Server aims to support versions of Node.js which are under LTS
(and will drop support for Node.js 6 in April 2019, per Node.js' schedule)
the current, immediate solution is to fork the `apollo-upload-server`
package as `@apollographql/apollo-upload-server`.

With the inclusion of
https://github.com/apollographql/apollo-upload-server/pull/1, we are able to
keep supporting Node.js 6.  Without this change, every new installation
of `apollo-server`, which doesn't have a `package-lock.json` preventing
transitive dependency updates - specifically, the updates to
`@babel/runtime` versions newer than `-beta.56` - is broken.
  • Loading branch information
abernix committed Aug 20, 2018
1 parent 724d9ff commit 5a91936
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 29 deletions.
43 changes: 26 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 @@ -37,7 +37,7 @@
"apollo-server-env": "file:../apollo-server-env",
"apollo-server-errors": "file:../apollo-server-errors",
"apollo-tracing": "file:../apollo-tracing",
"apollo-upload-server": "^5.0.0",
"@apollographql/apollo-upload-server": "^5.0.1",
"graphql-extensions": "file:../graphql-extensions",
"graphql-subscriptions": "^0.5.8",
"graphql-tag": "^2.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-core/src/ApolloServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { GraphQLExtension } from 'graphql-extensions';
import { EngineReportingAgent } from 'apollo-engine-reporting';
import { InMemoryLRUCache } from 'apollo-server-caching';

import { GraphQLUpload } from 'apollo-upload-server';
import { GraphQLUpload } from '@apollographql/apollo-upload-server';

import {
SubscriptionServer,
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ export const gql: (
) => DocumentNode = gqlTag;

import { GraphQLScalarType } from 'graphql';
import { GraphQLUpload as UploadScalar } from 'apollo-upload-server';
import { GraphQLUpload as UploadScalar } from '@apollographql/apollo-upload-server';
export const GraphQLUpload = UploadScalar as GraphQLScalarType;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module 'apollo-upload-server' {
declare module '@apollographql/apollo-upload-server' {
import { GraphQLScalarType } from 'graphql';

export const GraphQLUpload: GraphQLScalarType;
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@types/express": "4.16.0",
"accepts": "^1.3.5",
"apollo-server-core": "file:../apollo-server-core",
"apollo-upload-server": "^5.0.0",
"@apollographql/apollo-upload-server": "^5.0.1",
"body-parser": "^1.18.3",
"cors": "^2.8.4",
"graphql-subscriptions": "^0.5.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-express/src/ApolloServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as typeis from 'type-is';

import { graphqlExpress } from './expressApollo';

import { processRequest as processFileUploads } from 'apollo-upload-server';
import { processRequest as processFileUploads } from '@apollographql/apollo-upload-server';

export { GraphQLOptions, GraphQLExtension } from 'apollo-server-core';

Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-hapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@apollographql/graphql-playground-html": "^1.6.0",
"accept": "^3.0.2",
"apollo-server-core": "file:../apollo-server-core",
"apollo-upload-server": "^5.0.0",
"@apollographql/apollo-upload-server": "^5.0.1",
"boom": "^7.1.0",
"graphql-subscriptions": "^0.5.8",
"graphql-tools": "^3.0.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-hapi/src/ApolloServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
renderPlaygroundPage,
RenderPageOptions as PlaygroundRenderPageOptions,
} from '@apollographql/graphql-playground-html';
import { processRequest as processFileUploads } from 'apollo-upload-server';
import { processRequest as processFileUploads } from '@apollographql/apollo-upload-server';

import { graphqlHapi } from './hapiApollo';

Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-koa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/koa__cors": "^2.2.1",
"accepts": "^1.3.5",
"apollo-server-core": "file:../apollo-server-core",
"apollo-upload-server": "^5.0.0",
"@apollographql/apollo-upload-server": "^5.0.1",
"graphql-subscriptions": "^0.5.8",
"graphql-tools": "^3.0.4",
"koa": "2.5.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-koa/src/ApolloServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as typeis from 'type-is';

import { graphqlKoa } from './koaApollo';

import { processRequest as processFileUploads } from 'apollo-upload-server';
import { processRequest as processFileUploads } from '@apollographql/apollo-upload-server';

export { GraphQLOptions, GraphQLExtension } from 'apollo-server-core';
import { GraphQLOptions, FileUploadOptions } from 'apollo-server-core';
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-micro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@apollographql/graphql-playground-html": "^1.6.0",
"accept": "^3.0.2",
"apollo-server-core": "file:../apollo-server-core",
"apollo-upload-server": "^5.0.0",
"@apollographql/apollo-upload-server": "^5.0.1",
"micro": "^9.3.2"
}
}
2 changes: 1 addition & 1 deletion packages/apollo-server-micro/src/ApolloServer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApolloServerBase, GraphQLOptions } from 'apollo-server-core';
import { processRequest as processFileUploads } from 'apollo-upload-server';
import { processRequest as processFileUploads } from '@apollographql/apollo-upload-server';
import { ServerResponse } from 'http';
import { send } from 'micro';
import { renderPlaygroundPage } from '@apollographql/graphql-playground-html';
Expand Down

0 comments on commit 5a91936

Please sign in to comment.