Skip to content

Commit

Permalink
refactor(META): update all to TS 2 and TSLint 4
Browse files Browse the repository at this point in the history
TS 2 (v2.03)

TSLint 4 (4.0.0-dev.0)

This PR updates all repos to the latest stable version of

Typescript 2 and updates to the latest compatible TSLint, it also adds a types property in relevant

package.json files. To be compatible with the latest TSLint the 'no-duplicate-keys' needed to be

disabled.
  • Loading branch information
ntilwalli authored and staltz committed Oct 12, 2016
1 parent c91e7c6 commit f2ffad7
Show file tree
Hide file tree
Showing 54 changed files with 50 additions and 130 deletions.
1 change: 1 addition & 0 deletions base/package.json
Expand Up @@ -27,6 +27,7 @@
],
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"dependencies": {},
"devDependencies": {
"rx": "4.0.6",
Expand Down
4 changes: 2 additions & 2 deletions base/src/index.ts
Expand Up @@ -13,9 +13,9 @@ export interface SinkProxies {
[driverName: string]: Subject<any>;
}

export type DisposeFunction = () => void
export type DisposeFunction = () => void;

export type StreamSubscribe = <T>(stream: any, observer: Observer<T>) => DisposeFunction | void
export type StreamSubscribe = <T>(stream: any, observer: Observer<T>) => DisposeFunction | void;

export interface DevToolEnabledSource {
_isCycleSource: string;
Expand Down
1 change: 0 additions & 1 deletion base/tslint.json
Expand Up @@ -8,7 +8,6 @@
"max-line-length": [true, 100],
"no-consecutive-blank-lines": true,
"no-trailing-whitespace": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-unreachable": true,
"no-var-keyword": true,
Expand Down
4 changes: 0 additions & 4 deletions base/typings.json

This file was deleted.

2 changes: 2 additions & 0 deletions devtool/package.json
Expand Up @@ -15,6 +15,8 @@
},
"devDependencies": {
"@cycle/base": "^4.1.1",
"@types/es6-shim": "^0.31.32",
"@types/webrtc": "0.0.20",
"browserify": "13.1.0"
},
"scripts": {
Expand Down
4 changes: 1 addition & 3 deletions devtool/typings.json
Expand Up @@ -7,9 +7,7 @@
"chrome": "registry:dt/chrome#0.0.0+20160724063844",
"circular-json": "registry:dt/circular-json#0.1.6+20160316155526",
"dagre": "registry:dt/dagre#0.7.0+20160505164908",
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2",
"filesystem": "registry:dt/filesystem#0.0.0+20160316155526",
"filewriter": "registry:dt/filewriter#0.0.0+20160316155526",
"webrtc/mediastream": "registry:dt/webrtc/mediastream#0.0.0+20160317120654"
"filewriter": "registry:dt/filewriter#0.0.0+20160316155526"
}
}
3 changes: 3 additions & 0 deletions dom/package.json
Expand Up @@ -31,6 +31,7 @@
],
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"dependencies": {
"@cycle/xstream-adapter": "3.x.x",
"es6-map": "^0.1.4",
Expand All @@ -47,6 +48,8 @@
"@cycle/isolate": "*",
"@cycle/rxjs-adapter": "*",
"@cycle/rxjs-run": "*",
"@types/core-js": "^0.9.34",
"@types/node": "^6.0.45",
"babel-plugin-jsx-factory": "^1.0.1",
"babel-plugin-syntax-jsx": "^6.3.13",
"babel-plugin-transform-react-jsx": "^6.4.0",
Expand Down
2 changes: 1 addition & 1 deletion dom/src/custom-typings/snabbdom.d.ts
Expand Up @@ -8,7 +8,7 @@ export interface VNode {
}

export interface PatchFunction {
(oldVNode: VNode, vnode: VNode): VNode;
(oldVNode: VNode | Element, vnode: VNode): VNode;
}

export function init(modules: Object, api?: Object): PatchFunction;
4 changes: 2 additions & 2 deletions dom/src/makeDOMDriver.ts
Expand Up @@ -54,10 +54,10 @@ function makeDOMDriver(container: string | Element, options?: DOMDriverOptions):
const sanitation$ = xs.create();
const rootElement$ = xs.merge(preprocessedVNode$.endWhen(sanitation$), sanitation$)
.map(vnode => vnodeWrapper.call(vnode))
.fold<VNode>(<(acc: VNode, v: VNode) => VNode>patch, <VNode> rootElement)
.fold<VNode | Element>(<(acc: VNode | Element, v: VNode) => VNode>patch, rootElement)
.drop(1)
.map(function unwrapElementFromVNode(vnode: VNode) { return vnode.elm; })
.compose(stream => xs.merge(stream, xs.never())) // don't complete this stream
.compose((stream: any) => xs.merge(stream, xs.never())) // don't complete this stream
.startWith(rootElement);

/* tslint:disable:no-empty */
Expand Down
2 changes: 1 addition & 1 deletion dom/src/mockDOMSource.ts
Expand Up @@ -11,7 +11,7 @@ export type EventStream = any;
export type MockConfig = {
[name: string]: GenericStream | MockConfig;
elements?: GenericStream;
}
};

const SCOPE_PREFIX = '___';

Expand Down
1 change: 1 addition & 0 deletions dom/tsconfig.json
Expand Up @@ -15,6 +15,7 @@
"tabSize": 2
},
"files": [
"node_modules/rx/ts/rx.all.d.ts",
"typings/index.d.ts",
"src/index.ts"
]
Expand Down
1 change: 0 additions & 1 deletion dom/tslint.json
Expand Up @@ -8,7 +8,6 @@
"max-line-length": [true, 150],
"no-consecutive-blank-lines": true,
"no-trailing-whitespace": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-unreachable": true,
"no-var-keyword": true,
Expand Down
7 changes: 0 additions & 7 deletions dom/typings.json
Expand Up @@ -2,7 +2,6 @@
"name": "@cycle/dom",
"main": "lib/index.d.ts",
"dependencies": {
"@cycle/base": "npm:@cycle/base",
"snabbdom": "file:src/custom-typings/snabbdom.d.ts",
"snabbdom/vnode": "file:src/custom-typings/snabbdom-vnode.d.ts",
"snabbdom/is": "file:src/custom-typings/snabbdom-is.d.ts",
Expand All @@ -16,11 +15,5 @@
"snabbdom-selector/lib/selectorParser": "file:src/custom-typings/snabbdom-selector-lib-selectorParser.d.ts",
"snabbdom-selector/lib/classNameFromVNode": "file:src/custom-typings/snabbdom-selector-lib-classNameFromVNode.d.ts",
"snabbdom-to-html": "file:src/custom-typings/snabbdom-to-html.d.ts"
},
"devDependencies": {},
"globalDependencies": {
"rx.all": "github:Reactive-Extensions/RxJS/ts/rx.all.d.ts",
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2",
"require": "github:DefinitelyTyped/DefinitelyTyped/requirejs/require.d.ts#56295f5058cac7ae458540423c50ac2dcf9fc711"
}
}
5 changes: 3 additions & 2 deletions history/package.json
Expand Up @@ -4,6 +4,7 @@
"description": "The standard history driver for Cycle.js",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"directories": {
"test": "test"
},
Expand All @@ -28,7 +29,7 @@
"es6-promise": "^3.2.1",
"most": "^1.0.1",
"rx": "^4.1.0",
"rxjs": "^5.0.0-beta.11",
"rxjs": "^5.0.0-beta.12",
"saucie": "^1.4.1",
"xstream": "^6.2.0"
},
Expand All @@ -42,7 +43,7 @@
"test-ci": "npm run lint && npm run lib && npm run test-node && npm run test-browser-ci",
"browserify": "../node_modules/.bin/browserify lib/index.js --standalone CycleHistory --outfile dist/cycle-history.js",
"uglify": "../node_modules/.bin/uglifyjs dist/cycle-history.js -o dist/cycle-history.min.js",
"prelib": "rm -rf lib/ && mkdir -p lib && ../node_modules/.bin/typings install",
"prelib": "rm -rf lib/ && mkdir -p lib",
"lib": "../node_modules/.bin/tsc",
"predist": "rm -rf dist/ && mkdir -p dist/",
"dist": "npm run lib && npm run browserify && npm run uglify",
Expand Down
1 change: 0 additions & 1 deletion history/tsconfig.json
Expand Up @@ -15,7 +15,6 @@
"tabSize": 2
},
"files": [
"typings/index.d.ts",
"src/index.ts"
],
"exclude": [
Expand Down
1 change: 0 additions & 1 deletion history/tslint.json
Expand Up @@ -8,7 +8,6 @@
"max-line-length": [true, 150],
"no-consecutive-blank-lines": true,
"no-trailing-whitespace": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-unreachable": true,
"no-var-keyword": true,
Expand Down
13 changes: 0 additions & 13 deletions history/typings.json

This file was deleted.

4 changes: 3 additions & 1 deletion http/package.json
Expand Up @@ -16,6 +16,8 @@
"devDependencies": {
"@cycle/base": "*",
"@cycle/rxjs-run": "*",
"@types/core-js": "^0.9.34",
"@types/node": "^6.0.45",
"body-parser": "1.15.2",
"cookie-parser": "1.4.3",
"express": "4.14.0",
Expand All @@ -37,7 +39,7 @@
"test": "npm run lib && npm run lint && npm run test-node && npm run test-browser",
"browserify": "npm run lib && ../node_modules/.bin/browserify lib/index.js --global-transform=browserify-shim --standalone CycleHTTPDriver --exclude xstream --outfile dist/cycle-http-driver.js",
"uglify": "../node_modules/.bin/uglifyjs dist/cycle-http-driver.js -o dist/cycle-http-driver.min.js",
"prelib": "rm -rf lib/ && mkdir -p lib && ../node_modules/.bin/typings install",
"prelib": "rm -rf lib/ && mkdir -p lib",
"lib": "../node_modules/.bin/tsc",
"predist": "rm -rf dist/ && mkdir -p dist/",
"dist": "npm run lib && npm run browserify && npm run uglify",
Expand Down
1 change: 0 additions & 1 deletion http/src/custom-typings/index.d.ts

This file was deleted.

File renamed without changes.
3 changes: 1 addition & 2 deletions http/tsconfig.json
Expand Up @@ -15,8 +15,7 @@
"tabSize": 2
},
"files": [
"typings/index.d.ts",
"src/custom-typings/index.d.ts",
"superagent.d.ts",
"src/index.ts"
],
"exclude": [
Expand Down
1 change: 0 additions & 1 deletion http/tslint.json
Expand Up @@ -8,7 +8,6 @@
"max-line-length": [true, 150],
"no-consecutive-blank-lines": true,
"no-trailing-whitespace": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-unreachable": true,
"no-var-keyword": true,
Expand Down
11 changes: 0 additions & 11 deletions http/typings.json

This file was deleted.

1 change: 1 addition & 0 deletions isolate/package.json
Expand Up @@ -28,6 +28,7 @@
],
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"dependencies": {},
"devDependencies": {
"rx": "4.0.6"
Expand Down
1 change: 0 additions & 1 deletion isolate/tslint.json
Expand Up @@ -8,7 +8,6 @@
"max-line-length": [true, 150],
"no-consecutive-blank-lines": true,
"no-trailing-whitespace": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-unreachable": true,
"no-var-keyword": true,
Expand Down
8 changes: 5 additions & 3 deletions most-adapter/package.json
Expand Up @@ -4,6 +4,7 @@
"description": "Cycle.js Most Adapter",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"contributors": [
{
"name": "Andre Staltz",
Expand Down Expand Up @@ -44,11 +45,12 @@
"dependencies": {
"@most/create": "^1.1.3",
"@most/hold": "^1.3.1",
"most": "^1.0.0",
"most": "^1.0.1",
"most-subject": "^4.1.3"
},
"devDependencies": {
"@cycle/base": "*"
"@cycle/base": "*",
"@types/es6-shim": "^0.31.32"
},
"scripts": {
"lint": "../node_modules/.bin/tslint -c tslint.json src/*.ts src/**/*.ts",
Expand All @@ -60,7 +62,7 @@
"predist": "rm -rf dist/ && mkdir -p dist",
"dist": "npm run lib && npm run browserify && npm run uglify",
"readme": ":",
"lib": "rm -rf lib/ && mkdir -p lib/ && ../node_modules/.bin/typings install && ../node_modules/.bin/tsc",
"lib": "rm -rf lib/ && mkdir -p lib/ && ../node_modules/.bin/tsc",
"preversion": "npm test",
"version": "npm run dist && npm run readme && npm run changelog",
"postversion": "git add -A && git commit -m \"release(${PWD##*/}): v$(cat package.json | ../node_modules/.bin/jase version)\" && git push origin master && npm publish",
Expand Down
1 change: 0 additions & 1 deletion most-adapter/tsconfig.json
Expand Up @@ -15,7 +15,6 @@
"tabSize": 2
},
"files": [
"typings/index.d.ts",
"src/index.ts"
]
}
1 change: 0 additions & 1 deletion most-adapter/tslint.json
Expand Up @@ -8,7 +8,6 @@
"max-line-length": [true, 150],
"no-consecutive-blank-lines": true,
"no-trailing-whitespace": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-unreachable": true,
"no-var-keyword": true,
Expand Down
6 changes: 0 additions & 6 deletions most-adapter/typings.json

This file was deleted.

3 changes: 2 additions & 1 deletion most-run/package.json
Expand Up @@ -4,6 +4,7 @@
"description": "Cycle.js Diversity run() for most.js",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"contributors": [
{
"name": "Andre Staltz",
Expand Down Expand Up @@ -50,7 +51,7 @@
"uglify": "../node_modules/.bin/uglifyjs dist/cycle-most-run.js -o dist/cycle-most-run.min.js",
"predist": "rm -rf dist/ && mkdir -p dist",
"dist": "npm run lib && npm run browserify && npm run uglify",
"lib": "rm -rf lib/ && mkdir -p lib/ && ../node_modules/.bin/typings install && ../node_modules/.bin/tsc",
"lib": "rm -rf lib/ && mkdir -p lib/ && ../node_modules/.bin/tsc",
"readme": "node ../.scripts/make-api-docs.js ${PWD##*/} && cat ./.scripts/template-readme.md ./generated-api.md > README.md && rm ./generated-api.md",
"preversion": "npm test",
"version": "npm run dist && npm run readme && npm run changelog",
Expand Down
1 change: 0 additions & 1 deletion most-run/tsconfig.json
Expand Up @@ -15,7 +15,6 @@
"tabSize": 2
},
"files": [
"typings/index.d.ts",
"src/index.ts"
]
}
1 change: 0 additions & 1 deletion most-run/tslint.json
Expand Up @@ -8,7 +8,6 @@
"max-line-length": [true, 150],
"no-consecutive-blank-lines": true,
"no-trailing-whitespace": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-unreachable": true,
"no-var-keyword": true,
Expand Down
5 changes: 0 additions & 5 deletions most-run/typings.json

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -24,8 +24,8 @@
"tempfile": "^1.1.1",
"testem": "1.10.3",
"ts-node": "^1.2.2",
"tslint": "3.14.0",
"typescript": "1.8.10",
"tslint": "4.0.0-dev.0",
"typescript": "^2.0.3",
"typings": "^1.3.1",
"uglify-js": "2.7.0",
"validate-commit-msg": "^2.6.1"
Expand All @@ -48,5 +48,6 @@
"cz-customizable": {
"config": "./.cz-config.js"
}
}
},
"dependencies": {}
}
6 changes: 3 additions & 3 deletions rx-adapter/package.json
Expand Up @@ -34,14 +34,14 @@
},
"devDependencies": {
"@cycle/base": "*",
"rx": "^4.0.7"
"rx": "^4.1.0"
},
"scripts": {
"lint": "../node_modules/.bin/tslint -c tslint.json src/*.ts",
"mocha": "../node_modules/.bin/mocha --compilers js:babel-register test",
"test": "npm run lint && npm run lib && npm run mocha",
"test-ci": "npm run test",
"prelib": "rm -rf lib/ && mkdir -p lib/ && ../node_modules/.bin/typings install",
"prelib": "rm -rf lib/ && mkdir -p lib/",
"lib": "../node_modules/.bin/tsc",
"readme": ":",
"browserify": "../node_modules/.bin/browserify -t browserify-shim -t babelify --exclude rx lib/index.js -o dist/cycle-rx-adapter.js",
Expand All @@ -59,4 +59,4 @@
"publishConfig": {
"access": "public"
}
}
}

0 comments on commit f2ffad7

Please sign in to comment.