Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

update to new typescript and remove typings #217

Merged
merged 5 commits into from
Sep 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ node_js:
install:
- npm install -g coveralls
- npm install
- npm install -g npm-publish

script:
- npm test
- coveralls < ./coverage/lcov.info || true # ignore coveralls error
- npm run compile
- npm run filesize
- python node_modules/travis-weigh-in/weigh_in.py ./dist/index.min.js

# Allow Travis tests to run in containers.
sudo: false

Expand Down
10 changes: 4 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
"node_modules": true,
"scripts": true,
"test-lib": true,
"lib": true,
"typings": true,
"lib": false,
".gitignore": true,
".npmignore": true,
".travis.*": true,
".travis.*": false,
"appveyor.yml": true,
"LICENSE": true,
"global.d.ts": true,
"tsconfig.json": true,
"typings.json": true,
"typings.d.ts": false,
"tsconfig.json": false,
"tslint.json": true,
"coverage": true
}
Expand Down
29 changes: 22 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.5.5",
"description": "React data container for Apollo Client",
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
"test": "jest",
"posttest": "npm run lint",
Expand Down Expand Up @@ -49,16 +50,14 @@
"peerDependencies": {
"react": "0.14.x || 15.* || ^15.0.0",
"redux": "^2.0.0 || ^3.0.0",
"apollo-client": "^0.4.12"
"apollo-client": "^0.4.15"
},
"devDependencies": {
"apollo-client": "0.4.13",
"@types/chai": "^3.4.33",
"apollo-client": "^0.4.15",
"babel-jest": "^14.1.0",
"babel-preset-react-native": "^1.9.0",
"browserify": "^13.0.0",
"chai": "^3.5.0",
"chai-as-promised": "^5.2.0",
"chai-enzyme": "^0.4.2",
"cheerio": "^0.20.0",
"colors": "^1.1.2",
"enzyme": "^2.2.0",
Expand Down Expand Up @@ -88,18 +87,34 @@
"swapi-graphql": "0.0.4",
"travis-weigh-in": "^1.0.2",
"tslint": "^3.6.0",
"typescript": "^1.8.9",
"typescript": "^2.0.3",
"typescript-require": "^0.2.9-1",
"typings": "^0.7.9",
"uglify-js": "^2.6.2"
},
"dependencies": {
"@types/enzyme": "^2.4.32",
"@types/immutable": "^3.8.3",
"@types/invariant": "^2.2.27",
"@types/isomorphic-fetch": "0.0.30",
"@types/jest": "^0.9.31",
"@types/lodash": "^4.14.36",
"@types/node": "^6.0.38",
"@types/object-assign": "^4.0.28",
"@types/react": "^0.14.34",
"@types/react-addons-test-utils": "^0.14.14",
"@types/react-dom": "^0.14.16",
"@types/react-redux": "^4.4.31",
"@types/redux-form": "^4.0.29",
"@types/redux-immutable": "^3.0.30",
"@types/sinon": "^1.16.29",
"hoist-non-react-statics": "^1.2.0",
"invariant": "^2.2.1",
"lodash.flatten": "^4.2.0",
"lodash.isequal": "^4.1.1",
"lodash.isobject": "^3.0.2",
"object-assign": "^4.0.1",
"recompose": "^0.20.2"
"recompose": "^0.20.2",
"typed-graphql": "^1.0.2"
}
}
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function getDataFromTree(app, ctx: any = {}, fetch: boolean = true): Prom
const mappedQueries = flatten(queries).map(y => y.query.then(x => y));
// run through all queries we can
return Promise.all(mappedQueries)
.then(trees => Promise.all(trees.filter(x => !!x).map(x => {
.then(trees => Promise.all(trees.filter(x => !!x).map((x: any) => {
return getDataFromTree(x.component, context, false); // don't rerun `fetchData'
})))
.then(() => (context));
Expand Down
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"lib": ["es6", "dom"],
"moduleResolution": "node",
"sourceMap": true,
"declaration": true,
Expand All @@ -15,11 +16,11 @@
"jsx": "react"
},
"include": [
"./global.d.ts"
"./typings.d.ts",
"./src/index.ts",
"./src/server.ts"
],
"exclude": [
"typings/globals",
"typings/modules",
"node_modules",
"dist",
"lib"
Expand Down
17 changes: 10 additions & 7 deletions global.d.ts → typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/// <reference path="./node_modules/typed-graphql/graphql.d.ts" />


/*
LODASH
*/
Expand All @@ -7,8 +10,13 @@ declare module 'lodash.isobject' {
}

declare module 'lodash.isequal' {
import main = require('lodash');
export = main.isEqual;
import main = require('lodash/isEqual');
export = main;
}

declare module 'lodash.flatten' {
import main = require('lodash/flatten');
export = main;
}

declare module 'recompose/compose' {
Expand All @@ -28,11 +36,6 @@ declare module 'hoist-non-react-statics' {
export = hoistNonReactStatics;
}

declare module 'lodash.flatten' {
import main = require('lodash');
export = main.flatten;
}

declare module 'redux-loop' {
function combineReducers(reducers: any, state?: any, get?: any, set?: any): any;
function install(): any;
Expand Down
29 changes: 0 additions & 29 deletions typings.json

This file was deleted.

Loading