From fe52b8c6a4c3541afad8ca9d137fd832e99f025f Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Wed, 2 Nov 2016 23:21:06 +0100 Subject: [PATCH 1/3] refactor(Angular2Apollo): use exposed types of options for each method exposed from apollo-client@0.5.1 --- CHANGELOG.md | 6 +++++- package.json | 4 ++-- src/Angular2Apollo.ts | 15 ++------------- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c91f9080..725657b6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,11 @@ ### vNEXT - Made `mutate()` and `query()` methods to return `Observable` instead of `Promise` ([PR #140](https://github.com/apollostack/angular2-apollo/pull/140)) -- Define types of options and results (of `watchQuery`, `query`, `mutate`) ([PR #145](https://github.com/apollostack/angular2-apollo/pull/145) [PR #148](https://github.com/apollostack/angular2-apollo/pull/148)) +- Use types of options (for `watchQuery`, `query`, `mutate`) ( +[PR #145](https://github.com/apollostack/angular2-apollo/pull/145), +[PR #146](https://github.com/apollostack/angular2-apollo/pull/146), +[PR #148](https://github.com/apollostack/angular2-apollo/pull/148) +) ### v0.7.0 diff --git a/package.json b/package.json index f71056450..bad748cd9 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "prepublish": "npm run clean && npm run build" }, "peerDependencies": { - "apollo-client": "^0.5.0", + "apollo-client": "^0.5.1", "@angular/core": "^2.0.0", "rxjs": "^5.0.0-beta.12 || ^5.0.0-rc.1" }, @@ -79,7 +79,7 @@ "browser": true, "collectCoverage": true, "collectCoverageFrom": [ - "**/src/*.js", + "**/src/*.js", "!**/src/index.js", "!**/node_modules/**" ], diff --git a/src/Angular2Apollo.ts b/src/Angular2Apollo.ts index 22e96d310..785855903 100644 --- a/src/Angular2Apollo.ts +++ b/src/Angular2Apollo.ts @@ -1,24 +1,13 @@ import { OpaqueToken, Injectable, Inject } from '@angular/core'; import { rxify } from 'apollo-client-rxjs'; -import { ApolloClient, ApolloQueryResult, WatchQueryOptions, MutationBehavior, MutationQueryReducersMap } from 'apollo-client'; +import { ApolloClient, ApolloQueryResult, WatchQueryOptions, MutationOptions, SubscriptionOptions } from 'apollo-client'; import { Observable } from 'rxjs/Observable'; -import { Document, FragmentDefinition } from 'graphql'; import { ApolloQueryObservable } from './ApolloQueryObservable'; import 'rxjs/add/observable/from'; import 'rxjs/add/observable/fromPromise'; -export interface MutateOptions { - mutation: Document; - variables?: Object; - resultBehaviors?: MutationBehavior[]; - fragments?: FragmentDefinition[]; - optimisticResponse?: Object; - updateQueries?: MutationQueryReducersMap; - refetchQueries?: string[]; -} - export interface DeprecatedWatchQueryOptions extends WatchQueryOptions { fragments?: FragmentDefinition[]; } @@ -49,7 +38,7 @@ export class Angular2Apollo { return Observable.fromPromise(this.client.mutate(options)); } - public subscribe(options: any): Observable { + public subscribe(options: SubscriptionOptions): Observable { if (typeof this.client.subscribe === 'undefined') { throw new Error(`Your version of ApolloClient doesn't support subscriptions`); } From 844ad42e525406e346f10ddfabcb56072e54375c Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 10 Nov 2016 11:31:49 +0100 Subject: [PATCH 2/3] WIP: Up da te --- package.json | 2 +- src/Angular2Apollo.ts | 3 +- yarn.lock | 245 +++++++++++++++++++++--------------------- 3 files changed, 123 insertions(+), 127 deletions(-) diff --git a/package.json b/package.json index bad748cd9..169c32f7a 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@types/jest": "^15.1.32", "@types/lodash": "^4.14.34", "@types/node": "^6.0.38", - "apollo-client": "^0.5.0", + "apollo-client": "^0.5.1", "es6-shim": "^0.35.0", "ghooks": "^1.2.1", "graphql": "^0.7.0", diff --git a/src/Angular2Apollo.ts b/src/Angular2Apollo.ts index 785855903..4f47d32dc 100644 --- a/src/Angular2Apollo.ts +++ b/src/Angular2Apollo.ts @@ -2,6 +2,7 @@ import { OpaqueToken, Injectable, Inject } from '@angular/core'; import { rxify } from 'apollo-client-rxjs'; import { ApolloClient, ApolloQueryResult, WatchQueryOptions, MutationOptions, SubscriptionOptions } from 'apollo-client'; import { Observable } from 'rxjs/Observable'; +import { FragmentDefinition } from 'graphql'; import { ApolloQueryObservable } from './ApolloQueryObservable'; @@ -34,7 +35,7 @@ export class Angular2Apollo { return Observable.fromPromise(this.client.query(options)); } - public mutate(options: MutateOptions): Observable { + public mutate(options: MutationOptions): Observable { return Observable.fromPromise(this.client.mutate(options)); } diff --git a/yarn.lock b/yarn.lock index 1f54ca61a..e135bd30f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -134,11 +134,10 @@ apollo-client-rxjs@~0.2.2: lodash.isfunction "^3.0.8" lodash.omit "^4.5.0" -apollo-client@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-0.5.0.tgz#b9ec43a8e621461ff24c9fddba21446d8e1d5aa3" +apollo-client@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-0.5.1.tgz#d22e6da2886e12dc3f9d76a517c171a9a4ee930a" dependencies: - es6-promise "^4.0.3" graphql-anywhere "^0.2.4" graphql-tag "^0.1.13" lodash.assign "^4.0.8" @@ -261,7 +260,7 @@ babel-code-frame@^6.16.0: esutils "^2.0.2" js-tokens "^2.0.0" -babel-core@^6.0.0, babel-core@^6.11.4, babel-core@^6.18.0: +babel-core@^6.0.0, babel-core@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.18.0.tgz#bb5ce9bc0a956e6e94e2f12d597abb3b0b330deb" dependencies: @@ -304,9 +303,9 @@ babel-helpers@^6.16.0: babel-runtime "^6.0.0" babel-template "^6.16.0" -babel-jest@^16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-16.0.0.tgz#348729aea6d624a4774b8a934d07a40dd2cfd640" +babel-jest@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-17.0.0.tgz#4dbee762eb2f2ca77c4dacc17eb61f38157b0f01" dependencies: babel-core "^6.0.0" babel-plugin-istanbul "^2.0.0" @@ -692,10 +691,6 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es6-promise@^4.0.3: - version "4.0.5" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" - es6-shim@^0.35.0: version "0.35.1" resolved "https://registry.yarnpkg.com/es6-shim/-/es6-shim-0.35.1.tgz#a23524009005b031ab4a352ac196dfdfd1144ab7" @@ -1330,9 +1325,9 @@ jest-changed-files@^16.0.0: version "16.0.0" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-16.0.0.tgz#7931deff4424182b8173d80e06800d7363b19c45" -jest-cli@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-16.0.2.tgz#d439b28affa7189aa3d046d2af931f7ebb9af69d" +jest-cli@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-17.0.0.tgz#c2e16575546d2fe875345e40fbf3d1d914bdd7cb" dependencies: ansi-escapes "^1.4.0" callsites "^2.0.0" @@ -1343,17 +1338,17 @@ jest-cli@^16.0.2: istanbul-lib-coverage "^1.0.0" istanbul-lib-instrument "^1.1.1" jest-changed-files "^16.0.0" - jest-config "^16.0.2" - jest-environment-jsdom "^16.0.2" - jest-file-exists "^15.0.0" - jest-haste-map "^16.0.2" - jest-jasmine2 "^16.0.2" - jest-mock "^16.0.2" - jest-resolve "^16.0.2" - jest-resolve-dependencies "^16.0.2" - jest-runtime "^16.0.2" - jest-snapshot "^16.0.2" - jest-util "^16.0.2" + jest-config "^17.0.0" + jest-environment-jsdom "^17.0.0" + jest-file-exists "^17.0.0" + jest-haste-map "^17.0.0" + jest-jasmine2 "^17.0.0" + jest-mock "^17.0.0" + jest-resolve "^17.0.0" + jest-resolve-dependencies "^17.0.0" + jest-runtime "^17.0.0" + jest-snapshot "^17.0.0" + jest-util "^17.0.0" json-stable-stringify "^1.0.0" node-notifier "^4.6.1" sane "~1.4.1" @@ -1361,151 +1356,152 @@ jest-cli@^16.0.2: throat "^3.0.0" which "^1.1.1" worker-farm "^1.3.1" - yargs "^5.0.0" + yargs "^6.3.0" -jest-config@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-16.0.2.tgz#8e82a9c08846f23dc7fd42b5c0a1f596c385772a" +jest-config@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-17.0.0.tgz#6474051f00aed3ef050e1342bb753ee672485313" dependencies: chalk "^1.1.1" istanbul "^0.4.5" - jest-environment-jsdom "^16.0.2" - jest-environment-node "^16.0.2" - jest-jasmine2 "^16.0.2" - jest-mock "^16.0.2" - jest-resolve "^16.0.2" - jest-util "^16.0.2" + jest-environment-jsdom "^17.0.0" + jest-environment-node "^17.0.0" + jest-jasmine2 "^17.0.0" + jest-mock "^17.0.0" + jest-resolve "^17.0.0" + jest-util "^17.0.0" json-stable-stringify "^1.0.0" -jest-diff@^16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-16.0.0.tgz#4a5d13b1e36c5b8020d5d9e69639e486a675ce14" +jest-diff@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-17.0.0.tgz#d3288d6f28b9db4f78f93e718af5e61cd636bd71" dependencies: chalk "^1.1.3" diff "^3.0.0" - jest-matcher-utils "^16.0.0" + jest-matcher-utils "^17.0.0" pretty-format "~4.2.1" -jest-environment-jsdom@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-16.0.2.tgz#548d883b68f8ed0bd6466d8703986296724c1ef7" +jest-environment-jsdom@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-17.0.0.tgz#d543000de994857bbe88afa8fd40756363757488" dependencies: - jest-mock "^16.0.2" - jest-util "^16.0.2" - jsdom "^9.8.0" + jest-mock "^17.0.0" + jest-util "^17.0.0" + jsdom "^9.8.1" -jest-environment-node@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-16.0.2.tgz#eb7b3a4a9c63b728ce023828d4b5661aad8c7a08" +jest-environment-node@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-17.0.0.tgz#cd1f93490a397b632cd251cecf2e560da0a0c468" dependencies: - jest-mock "^16.0.2" - jest-util "^16.0.2" + jest-mock "^17.0.0" + jest-util "^17.0.0" -jest-file-exists@^15.0.0: - version "15.0.0" - resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-15.0.0.tgz#b7fefdd3f4b227cb686bb156ecc7661ee6935a88" +jest-file-exists@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-17.0.0.tgz#7f63eb73a1c43a13f461be261768b45af2cdd169" -jest-haste-map@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-16.0.2.tgz#4562915b25171ae2d0d75118c992f0e97536a2ed" +jest-haste-map@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-17.0.0.tgz#07ee15f555a1e8106c31c190a6f0e767d39564c2" dependencies: fb-watchman "^1.9.0" graceful-fs "^4.1.6" multimatch "^2.1.0" + sane "~1.4.1" worker-farm "^1.3.1" -jest-jasmine2@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-16.0.2.tgz#c91ae170d127aae22180dbfe181d77655a5da8c3" +jest-jasmine2@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-17.0.0.tgz#811e493b1df968f34b08f9c4573f77b9d9319624" dependencies: graceful-fs "^4.1.6" jasmine-check "^0.1.4" - jest-matchers "^16.0.2" - jest-snapshot "^16.0.2" - jest-util "^16.0.2" + jest-matchers "^17.0.0" + jest-snapshot "^17.0.0" + jest-util "^17.0.0" -jest-matcher-utils@^16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-16.0.0.tgz#705af3ff85944bec1c25bc813f427aff8642b0cd" +jest-matcher-utils@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-17.0.0.tgz#d7c5609312a555a747d7938b1d560a2e320bc1a6" dependencies: chalk "^1.1.3" pretty-format "~4.2.1" -jest-matchers@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-16.0.2.tgz#c078c28cfe05b9b1f295f9ab27b5991f1095bbbf" +jest-matchers@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-17.0.0.tgz#75b8dc7431e9b7afb15e7424b7869ea3d88e6af4" dependencies: - jest-diff "^16.0.0" - jest-matcher-utils "^16.0.0" - jest-util "^16.0.2" + jest-diff "^17.0.0" + jest-matcher-utils "^17.0.0" + jest-util "^17.0.0" -jest-mock@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-16.0.2.tgz#97b533343295d0082e9474a73ac4eb474d1636fe" +jest-mock@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-17.0.0.tgz#2475c3fec5d3ac117e2f59d40e1f6311ab9aae40" -jest-resolve-dependencies@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-16.0.2.tgz#b204166d50141469d10667dc216239c0be865729" +jest-resolve-dependencies@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-17.0.0.tgz#5b9ead58af2c7be7d3a4f49ba28265d4d6db1213" dependencies: - jest-file-exists "^15.0.0" - jest-resolve "^16.0.2" + jest-file-exists "^17.0.0" + jest-resolve "^17.0.0" -jest-resolve@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-16.0.2.tgz#46b92b9c2a44aa7ddd9a6b73dc234e9503e8c609" +jest-resolve@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-17.0.0.tgz#6a2b53ba5080c9d9a96a63bdfc4bd6ac2c3e4628" dependencies: browser-resolve "^1.11.2" - jest-file-exists "^15.0.0" - jest-haste-map "^16.0.2" + jest-file-exists "^17.0.0" + jest-haste-map "^17.0.0" resolve "^1.1.6" -jest-runtime@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-16.0.2.tgz#a741e8d55a7b5f011bbe17a22c673a83d278a45d" +jest-runtime@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-17.0.0.tgz#cac76b26ed5bd6f018fa1741087ce1c70632eddd" dependencies: - babel-core "^6.11.4" - babel-jest "^16.0.0" + babel-core "^6.0.0" + babel-jest "^17.0.0" babel-plugin-istanbul "^2.0.0" chalk "^1.1.3" graceful-fs "^4.1.6" - jest-config "^16.0.2" - jest-file-exists "^15.0.0" - jest-haste-map "^16.0.2" - jest-mock "^16.0.2" - jest-resolve "^16.0.2" - jest-snapshot "^16.0.2" - jest-util "^16.0.2" + jest-config "^17.0.0" + jest-file-exists "^17.0.0" + jest-haste-map "^17.0.0" + jest-mock "^17.0.0" + jest-resolve "^17.0.0" + jest-snapshot "^17.0.0" + jest-util "^17.0.0" json-stable-stringify "^1.0.0" multimatch "^2.1.0" - yargs "^5.0.0" + yargs "^6.3.0" -jest-snapshot@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-16.0.2.tgz#f137a4176d661bd4058910850191d1816bebdaae" +jest-snapshot@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-17.0.0.tgz#0601cdc610470ed5e11d9c29f7d753401659d855" dependencies: - jest-diff "^16.0.0" - jest-file-exists "^15.0.0" - jest-matcher-utils "^16.0.0" - jest-util "^16.0.2" + jest-diff "^17.0.0" + jest-file-exists "^17.0.0" + jest-matcher-utils "^17.0.0" + jest-util "^17.0.0" natural-compare "^1.4.0" pretty-format "~4.2.1" -jest-util@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-16.0.2.tgz#db5123358278e7a34a6d9f837409d649a0db5d54" +jest-util@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-17.0.0.tgz#3501b1b2469650b3c9341667b78695ace08e1b68" dependencies: chalk "^1.1.1" diff "^3.0.0" graceful-fs "^4.1.6" - jest-file-exists "^15.0.0" - jest-mock "^16.0.2" + jest-file-exists "^17.0.0" + jest-mock "^17.0.0" mkdirp "^0.5.1" -jest@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-16.0.2.tgz#4a2f7f3527465168a0bafe0c3d55055188253f3a" +jest@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-17.0.0.tgz#ebceb910c4e32cdea2adf44aba304d1ed4ad369e" dependencies: - jest-cli "^16.0.2" + jest-cli "^17.0.0" jodid25519@^1.0.0: version "1.0.2" @@ -1532,7 +1528,7 @@ jsbn@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" -jsdom@^9.8.0: +jsdom@^9.8.1: version "9.8.3" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.8.3.tgz#fde29c109c32a1131e0b6c65914e64198f97c370" dependencies: @@ -1706,7 +1702,7 @@ lodash._root@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" -lodash.assign@^4.0.8, lodash.assign@^4.0.9, lodash.assign@^4.1.0, lodash.assign@^4.2.0: +lodash.assign@^4.0.8, lodash.assign@^4.0.9, lodash.assign@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" @@ -2817,21 +2813,20 @@ yallist@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4" -yargs-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-3.2.0.tgz#5081355d19d9d0c8c5d81ada908cb4e6d186664f" +yargs-parser@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.1.0.tgz#313df030f20124124aeae8fbab2da53ec28c56d7" dependencies: camelcase "^3.0.0" - lodash.assign "^4.1.0" -yargs@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-5.0.0.tgz#3355144977d05757dbb86d6e38ec056123b3a66e" +yargs@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.3.0.tgz#19c6dbb768744d571eb6ebae0c174cf2f71b188d" dependencies: + camelcase "^3.0.0" cliui "^3.2.0" decamelize "^1.1.1" get-caller-file "^1.0.1" - lodash.assign "^4.2.0" os-locale "^1.4.0" read-pkg-up "^1.0.1" require-directory "^2.1.1" @@ -2841,7 +2836,7 @@ yargs@^5.0.0: which-module "^1.0.0" window-size "^0.2.0" y18n "^3.2.1" - yargs-parser "^3.2.0" + yargs-parser "^4.0.2" yargs@~3.10.0: version "3.10.0" From a0fef81be2250f379a1700f84986084935a3ab87 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 10 Nov 2016 12:26:16 +0100 Subject: [PATCH 3/3] chore: Update to latest --- package.json | 20 ++++++++++++-------- tsconfig.json | 1 + yarn.lock | 16 ++++------------ 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 169c32f7a..038b6de14 100644 --- a/package.json +++ b/package.json @@ -27,12 +27,12 @@ "prepublish": "npm run clean && npm run build" }, "peerDependencies": { - "apollo-client": "^0.5.1", "@angular/core": "^2.0.0", + "apollo-client": "^0.5.1", "rxjs": "^5.0.0-beta.12 || ^5.0.0-rc.1" }, "dependencies": { - "apollo-client-rxjs": "~0.2.2", + "apollo-client-rxjs": "~0.2.3", "lodash.assign": "^4.0.9", "lodash.forin": "^4.2.0", "lodash.isequal": "^4.2.0" @@ -45,14 +45,12 @@ "@angular/platform-browser": "^2.1.0", "@angular/platform-browser-dynamic": "^2.1.0", "@angular/platform-server": "^2.1.0", - "@types/chai": "^3.4.33", - "@types/es6-shim": "^0.31.32", + "@types/chai": "^3.4.34", "@types/isomorphic-fetch": "^0.0.30", "@types/jest": "^15.1.32", "@types/lodash": "^4.14.34", "@types/node": "^6.0.38", "apollo-client": "^0.5.1", - "es6-shim": "^0.35.0", "ghooks": "^1.2.1", "graphql": "^0.7.0", "graphql-tag": "^0.1.9", @@ -73,9 +71,13 @@ } }, "jest": { - "moduleFileExtensions": ["js"], + "moduleFileExtensions": [ + "js" + ], "testRegex": "\\.spec\\.js$", - "testPathDirs": ["/build/tests"], + "testPathDirs": [ + "/build/tests" + ], "browser": true, "collectCoverage": true, "collectCoverageFrom": [ @@ -84,6 +86,8 @@ "!**/node_modules/**" ], "coverageDirectory": "coverage", - "coverageReporters": ["json"] + "coverageReporters": [ + "json" + ] } } diff --git a/tsconfig.json b/tsconfig.json index 3aaf7ca8b..1b8e32e12 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,7 @@ "declaration": true, "rootDir": ".", "outDir": "build", + "lib": ["es6", "dom"], "emitDecoratorMetadata": true, "experimentalDecorators": true, "noImplicitAny": false diff --git a/yarn.lock b/yarn.lock index e135bd30f..fc0a60856 100644 --- a/yarn.lock +++ b/yarn.lock @@ -44,14 +44,10 @@ version "2.0.32" resolved "https://registry.yarnpkg.com/@types/async/-/async-2.0.32.tgz#bb7be943784ca63d0c7b1358ce598b5f3cebc059" -"@types/chai@^3.4.33": +"@types/chai": version "3.4.34" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.4.34.tgz#d5335792823bb09cddd5e38c3d211b709183854d" -"@types/es6-shim@^0.31.32": - version "0.31.32" - resolved "https://registry.yarnpkg.com/@types/es6-shim/-/es6-shim-0.31.32.tgz#8196c09e1e40ac977c713bf258090989f501d8ff" - "@types/isomorphic-fetch@^0.0.30", "@types/isomorphic-fetch@0.0.30": version "0.0.30" resolved "https://registry.yarnpkg.com/@types/isomorphic-fetch/-/isomorphic-fetch-0.0.30.tgz#a21717624cde9a48c2db53a4e500fc5c32a99bbc" @@ -126,9 +122,9 @@ ansicolors@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" -apollo-client-rxjs@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/apollo-client-rxjs/-/apollo-client-rxjs-0.2.2.tgz#764c170b0606cb726f60104b116ef09f792315cb" +apollo-client-rxjs@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/apollo-client-rxjs/-/apollo-client-rxjs-0.2.3.tgz#63f17139c323a7605d521bd017b536e3a24a9d0f" dependencies: lodash.assign "^4.2.0" lodash.isfunction "^3.0.8" @@ -691,10 +687,6 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es6-shim@^0.35.0: - version "0.35.1" - resolved "https://registry.yarnpkg.com/es6-shim/-/es6-shim-0.35.1.tgz#a23524009005b031ab4a352ac196dfdfd1144ab7" - escape-string-regexp@^1.0.2: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"