Commit graph

509 commits

Author SHA1 Message Date
Martijn Walraven
9020b7eb25 Use caret version ranges for dev dependencies 2018-08-11 16:45:03 +02:00
Martijn Walraven
b863f206a3 Adjust Jest config for CI 2018-08-11 16:45:03 +02:00
Martijn Walraven
5b91e93336 Update dev dependencies 2018-08-11 16:45:03 +02:00
Martijn Walraven
26c11b842c Rename top-level package to avoid conflicts 2018-08-11 16:45:03 +02:00
Martijn Walraven
ef4d5e4f95 Switch to using file specifiers and root level dev dependencies only 2018-08-11 16:45:03 +02:00
Martijn Walraven
1c8582384c Remove unused prebootstrap script 2018-08-11 16:45:03 +02:00
Martijn Walraven
5b5ac177bd Update Jest dependencies 2018-08-11 16:45:03 +02:00
Martijn Walraven
6923b196fd Run multi-project Jest in CI and remove coverage for now 2018-08-11 16:45:03 +02:00
Martijn Walraven
dd4970f1f4 Run Jest tests in a multi-project runner instead of in separate runners 2018-08-11 16:45:03 +02:00
Martijn Walraven
d43ea3a603 Update Lerna to 3.0.1 2018-08-11 16:45:03 +02:00
Renovate Bot
40bb1521c8 chore(deps): update dependency ts-jest to v23.1.3 2018-08-10 22:21:31 +00:00
Renovate Bot
a73f2322c8 chore(deps): update dependency jest-matcher-utils to v23.5.0 2018-08-10 20:52:37 +00:00
Renovate Bot
3272ddae78 chore(deps): update dependency jest to v23.5.0 2018-08-10 17:03:04 +00:00
Renovate Bot
260ab80838 chore(deps): update dependency @types/node to v10.5.7 2018-08-10 13:53:15 +00:00
Renovate Bot
5d1a2490eb chore(deps): update dependency prettier to v1.14.2 2018-08-10 10:44:19 +00:00
Renovate Bot
dfa92be140 chore(deps): update dependency @types/graphql to v0.13.4 2018-08-10 08:05:00 +00:00
Renovate Bot
fb28693a8a chore(deps): update dependency ts-jest to v23.1.2 2018-08-03 14:13:51 +00:00
Renovate Bot
62be6ff78d chore(deps): update dependency @types/node to v10.5.5 2018-08-01 12:43:22 +00:00
Evans Hauser
9dd1fec766
Mocha to Jest Test Conversion (#1453)
* import jest

* remove mocha, chai, sinon

* fix JSON parsing for package.json

* replace import mocha, chai, sinon with jest

* add jest as test npm script

* remove dependency on mocha types

* errors: remove unused jest tests

* move tests to __tests__ folders

* add jest types to root tsconfig

* fix tsconfig include excludes

* .to.equal -> toEqual

* .true -> .toBe(true)

* .to.deep.equal -> .toEqual

* .to.exist -> .toBeDefined()

* .to.contain -> .toMatch

* .to.match -> .toMatch

* to.be.undefined -> .toBeUndefined()

* not.toBeDefined -> .toBeUndefined

* bring integration test up to date with past changes

* remove message from expect

* .null -> .toBe(null)

* expect.fail -> done.fail

* callsFake -> jest.fn

* mocha mock calls -> jest

* .not.to.exist -> .toBeUndefined()

* callCount -> mocks.calls.length

* returns -> jest.fn()

* .equals -> .toEqual

* fix relative imports

* remove string in expects and place as comment

* remove Fibers from runQuery

* restore -> mockRestore

* before -> beforeAll

* after -> afterAll

* fix async_hooks test and Promise await

* remove jest from testsuite package json

* remove unnecessary apollo-server-env setup

* add start of cloudflare tests

* this.timeout -> timeout argument

* express: fix relative require

* import gql tag properly

* .to.throw -> .toThrow

* .to.be.instanceof -> .toBeInstanceOf

* remove console log check test

* done(Error) -> done.fail(Error)

* done -> done.fail

* change port numbers, since jest runs in parallel

* fix toBeUndefined for null checks

* make engine port unique in testsuite

* make data source rest endpoint port unique

* add coverage scripts

* travis npm script -> cricle script

* make engine port random

* change ports to not conflict across integrations

* increase node version for apollo-server-hapi

* add node versioning to prevent hapi tests from running

* move jest dependencies to the root package.json

* make hapi port unique

* fix port reference in hapi tests
2018-07-31 15:40:03 -07:00
Renovate Bot
6710575e6f chore(deps): update dependency prettier to v1.14.0 2018-07-30 09:40:27 +00:00
Renovate Bot
7f19fc239e chore(deps): update dependency @types/node to v10.5.4 2018-07-28 10:17:15 +00:00
Renovate Bot
46bd6fcb19 chore(deps): update dependency @types/node to v10.5.3 2018-07-25 07:26:16 +00:00
Renovate Bot
6e0fe2483e chore(deps): update dependency sinon to v6.1.4 2018-07-23 11:52:01 +00:00
Martijn Walraven
4f7b6e0ca1 Revert Lerna to 2.x to avoid CI build failures 2018-07-18 14:35:18 -07:00
Martijn Walraven
8f85252949 Update to Lerna 3.0 2018-07-18 08:43:47 -07:00
Evans Hauser
9518c0ff1a
Publish
- apollo-cache-control@0.2.0-rc.3
 - apollo-datasource-rest@0.1.0-rc.10
 - apollo-datasource@0.1.0-rc.10
 - apollo-engine-reporting@0.0.0-rc.4
 - apollo-server-caching@0.1.0-rc.10
 - apollo-server-cloudflare@2.0.0-rc.10
 - apollo-server-core@2.0.0-rc.10
 - apollo-server-env@2.0.0-rc.10
 - apollo-server-errors@2.0.0-rc.10
 - apollo-server-express@2.0.0-rc.10
 - apollo-server-hapi@2.0.0-rc.10
 - apollo-server-integration-testsuite@2.0.0-rc.10
 - apollo-server-koa@2.0.0-rc.10
 - apollo-server-lambda@2.0.0-xrc.10
 - apollo-server-memcached@0.1.0-rc.10
 - apollo-server-micro@2.0.0-rc.10
 - apollo-server-redis@0.1.0-rc.10
 - apollo-server@2.0.0-rc.10
 - apollo-tracing@0.2.0-rc.3
 - graphql-extensions@0.1.0-rc.4
2018-07-17 10:55:45 -07:00
Renovate Bot
fc95bcbf68 chore(deps): update dependency @types/mocha to v5.2.5 2018-07-17 08:51:26 +00:00
renovate[bot]
3b3c50a1ab chore(deps): pin dependencies (#1346) 2018-07-16 09:56:51 -07:00
Martijn Walraven
c2e4dfb265 Import graphql-extensions+apollo-engine-reporting/no global apollo-server-env (#1259)
* Export polyfills and types separately

* More imports from apollo-server-env

* Initial commit

* Add .npmignore to avoid ignoring lib when publishing

* 0.0.2

* Reorganize code and clean up GraphQLExtension interface

* 0.0.3

* Add support for timing callbacks and add GraphQLExtensionStack

* 0.0.4

* Downgrade target in tsconfig.json from es2015 to es5

* 0.0.5

* Bump `graphql` peerDependency. (#3)

* 0.0.6

* Update dependencies

* 0.0.7

* whenResultIsFinished fix for array results (#4)

* 0.0.8

* [apollo-bot] Update the Issue/PR Templates with auto label (#6)

* Bump `graphql` peerDependency. (#7)

* Update `graphql` peer dependency range to allow 0.13.x. (#8)

* Update `devDependencies` to latest versions. (#9)

* dev: Update TypeScript to latest version, v2.7.2.

* dev: Update `graphql` to latest version, v0.13.2.

* dev: Update jest & dependencies to latest versions.

* dev: Update type definitions for `graphql`, `node` and `jest`.

* Allow `undefined` return values to `GraphQLExtension`'s `format()`. (#10)

In some cases, it's conceivable that the `format()` method may need to abort
its decision to provide extension information at runtime, in the event that
it doesn't have the proper information to return a full-result.

The `format` method already removed false-y results, so this simply changes
the types to allow the same.

* 0.0.9

* Fix lifecycle method invocations on extensions

* 0.0.10

* Add changelog

* Upgrade to TypeScript 2.8

Makes my editor integration happier (a bugfix in tsserver I think)

* Add tslint and prettier

Same configuration as apollo-engine-js

* Remove magic from GraphQLExtensionStack constructor

It's not hard to consistently pass in an actual extension object to this
low-level API.

* New extension API: didStart handlers return didEnd handlers

This is a backwards-incompatible change: GraphQLExtension implementations and
users of GraphQLExtensionStack (ie apollo-server-core) must change their
implementations, if they implement any of the xDidStart/xDidEnd APIs.

This allows "didEnd" handlers to refer to closure variables from the "didStart"
handler rather than needing to store state on the extension.

The new "didEnd" handlers run in the opposite order of the "didStart" handlers,
so that they properly nest.

* 0.1.0-beta.0

* Changelog

* Add magic back into GraphQLExtensionStack constructor

But now it actually gets more context (the execution arguments) and doesn't have
to be a constructor.

* 0.1.0-beta.1

* Export more types

* 0.1.0-beta.2

* Fix lifecycle handlers to pass proper "this"

* 0.1.0-beta.3

* Pass options directly to start handlers; eliminate factory again

* 0.1.0-beta.4

* error handling in didEnd

* 0.1.0-beta.5

* pass multiple errors to EndHandler

* 0.1.0-beta.6

* add willSendResponse

* 0.1.0-beta.7

* prettier

* setFieldResolver for custom fieldResolver

* reverse

* get more initial options into requestDidStart

* 0.1.0-beta.8

* 0.1.0-beta.9

* Actually, we already get the fieldResolver!

* 0.1.0-beta.10

* work without extensionStack

* 0.1.0-beta.11

* 0.1.0-beta.12

* Send errors to willResolveField callback

* 0.1.0-beta.13

* willSendResponse can return a result

* 0.1.0-beta.14

* Revert 1063be8..56912fc

This reverts commit 1063be8..56912fc.

* add PQ options to requestDidStart

* 0.1.0-beta.14

* 0.1.0-beta.15

* Initialize an empty TypeScript/Jest package

Template based on apollo-engine-js

* Basic trace node structure building

* basic timing

* Checkpoint towards signature implementation

The new signature implementation does not try to compress whitespace.

* Basic signature implementation

* progress towards actual reporting

* basic checkpoint for reporting

* 0.0.0-beta.1

* pull in @types/long, since it is in the external api

* 0.0.0-beta.2

* get rid of Long

* 0.0.0-beta.3

* debug log request what happened

* 0.0.0-beta.4

* 0.0.0-beta.5

* correct url

* 0.0.0-beta.6

* request headers

* 0.0.0-beta.7

* leave out a few headers

* 0.0.0-beta.8

* prettier

* move stuff into multiple files, and stop exporting the extension

* lots of doc comments

* address agent.ts XXX comments

* implement privateVariables

simplify API by removing flush() and allowing flush-ers to just call sendReport
directly

* privateHeaders and error tracking

* gzip, signals

* fix test

* 0.0.0-beta.9

* Error handling for reports

* 0.0.0-beta.10

* no need to include boring stacktrace

* 0.0.0-beta.11

* tweak error reporting

* 0.0.0-beta.12

* package-lock update (npm@6?)

* Reduce target report size to 512KB from 4MB.

Load testing revealed that protobuf encoding for large FullTraceReports could
tie up CPU and reduce p99 request latency (eg, to 200ms from 10ms). Reducing the
default target report size spreads out the encoding time and mitigates the
impact on latency.  If this is not acceptable for all users, we may have to
investigate reintroducing agent-side stats aggregation to keep report sizes
small.

* 0.0.0-beta.13

* Encode Traces as they come in

This improves p99 times with little effect on p50 times. It also lets us get rid
of the heuristic average trace size estimation.

* 0.0.0-beta.14

* support PQ fields

* npm audit fix

* 0.0.0-beta.15

* ignore coverage

* Make the default signature more aggressive

We'd rather tell people confused by literal removal to tweak the signature than
tell people causing outages to do so.

* 0.0.0-beta.16

* Remove obsolete files from graphql-extensions and apollo-engine-reporting

* Fix dependencies and configs

* Fix apollo-server-cloudflare to import from apollo-server-env

* Fix compilation and test configs

* Get all tests passing again

* Switch to Lerna independent versioning

* Polyfill promisify for Node < 8 and load polyfills in tests

* ES2016 exponentiation operator is only supported in Node > 6

* add dependency cache for circle

* add missing env dependencies in REST datasource
2018-06-27 16:29:00 -07:00
Martijn Walraven
7496eb034d Run test in apollo-datasource-rest as part of monorepo tests 2018-06-18 11:57:19 +02:00
Evans Hauser
e66f6db413
fix: support Node 6 (#1171) 2018-06-13 14:56:09 -07:00
Martijn Walraven
4a068cff74 Add engines field with node >= 8 in package.json 2018-06-11 13:21:51 +02:00
Martijn Walraven
5a1598c99a Remove deprecated supertest-as-promised 2018-06-11 12:17:10 +02:00
Martijn Walraven
1e1b49ec29 Update devDependencies, including typescript 2018-06-11 12:13:03 +02:00
Evans Hauser
582698c09c
package.json: update @types/graphql 2018-05-21 16:54:46 -07:00
Evans Hauser
84e763358e
package.json: remove node and graphql types from root and unnecessary variants 2018-05-21 15:31:57 -07:00
Evans Hauser
aad7c39001
build: update dependencies and remove extra node typings 2018-05-20 03:52:54 -07:00
Renovate Bot
70a09df2c8
chore(deps): update dependency @types/sinon to v4.3.3 2018-05-11 15:54:24 -07:00
Renovate Bot
6457b1a3a1
chore(deps): update dependency @types/node to v9.6.15 2018-05-11 15:54:23 -07:00
Renovate Bot
7b781333f2
chore(deps): update dependency @types/sinon to v4.3.2 2018-05-11 15:54:22 -07:00
Renovate Bot
3fff064387
chore(deps): update dependency @types/node to v9.6.14 2018-05-11 15:54:22 -07:00
Renovate Bot
98ec318109
chore(deps): update dependency sinon to v5.0.7 2018-05-11 15:54:21 -07:00
Renovate Bot
f6fc411b55
chore(deps): update dependency sinon to v5.0.6 2018-05-11 15:54:21 -07:00
Renovate Bot
5e3b64263f
chore(deps): update dependency sinon to v5.0.5 2018-05-11 15:54:20 -07:00
Renovate Bot
95d23e7868
chore(deps): update dependency @types/node to v9.6.12 2018-05-11 15:54:20 -07:00
Renovate Bot
e18e23119f
chore(deps): update dependency @types/node to v9.6.11 2018-05-11 15:54:20 -07:00
Evans Hauser
0cccdb9cc5
root: add @types/graphql to package.json to fix cache-control compilation error 2018-05-11 15:53:13 -07:00
Renovate Bot
22d13f2ec8
chore(deps): update dependency @types/node to v9.6.9 2018-05-11 15:53:07 -07:00
Renovate Bot
f9d919c31e
chore(deps): update dependency sinon to v5.0.3 2018-05-11 15:53:06 -07:00
Renovate Bot
b7595b30e3
chore(deps): update dependency sinon to v5.0.2 2018-05-11 15:53:06 -07:00