-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert project to Typescript and add es2015 build target (#672)
BREAKING CHANGE: the TS type definition for `combineEpics()` no longer accepts any unsafe overloads. Cast to `any` if you need to provide unsafe/untyped Epics.
- Loading branch information
Showing
34 changed files
with
336 additions
and
506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.vscode | ||
npm-debug.log | ||
node_modules | ||
lib | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "./tsconfig.defaults.json", | ||
"compilerOptions": { | ||
"outDir": "../dist/cjs", | ||
"module": "commonjs" | ||
}, | ||
"include": [ | ||
"../src/**/*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "es2015", | ||
"moduleResolution": "node", | ||
"outDir": "dist", | ||
"importHelpers": true, | ||
"strict": true, | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"lib": ["es5", "dom"], | ||
"types": ["node"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "./tsconfig.defaults.json", | ||
"compilerOptions": { | ||
"outDir": "../dist/es2015", | ||
"target": "es2015" | ||
}, | ||
"include": [ | ||
"../src/**/*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "./tsconfig.defaults.json", | ||
"compilerOptions": { | ||
"outDir": "../dist/esm" | ||
}, | ||
"include": [ | ||
"../src/**/*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "./tsconfig.defaults.json", | ||
"compilerOptions": { | ||
"outDir": "../temp", | ||
"module": "commonjs", | ||
// For `sinon` import in unit tests | ||
"esModuleInterop": true, | ||
"types": ["mocha", "node"] | ||
}, | ||
"include": [ | ||
"../test/**/*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "./tsconfig.defaults.json", | ||
"compilerOptions": { | ||
"outDir": "../dist/types", | ||
"emitDeclarationOnly": true, | ||
"declaration": true, | ||
"declarationMap": true | ||
}, | ||
"include": [ | ||
"../src/**/*.ts" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,33 +2,34 @@ | |
"name": "redux-observable", | ||
"version": "1.2.0", | ||
"description": "RxJS based middleware for Redux. Compose and cancel async actions and more.", | ||
"module": "lib/esm/index.js", | ||
"main": "lib/cjs/index.js", | ||
"module": "./dist/esm/index.js", | ||
"main": "./dist/cjs/index.js", | ||
"es2015": "./dist/es2015/index.js", | ||
"sideEffects": false, | ||
"scripts": { | ||
"lint": "eslint src && eslint test", | ||
"build": "npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min", | ||
"build:esm": "gulp build:esm", | ||
"build:cjs": "babel src -d lib/cjs", | ||
"build:umd": "cross-env NODE_ENV=development webpack src/index.js -o dist/redux-observable.js", | ||
"build:umd:min": "cross-env NODE_ENV=production webpack src/index.js -o dist/redux-observable.min.js", | ||
"build:tests": "rimraf temp && babel test -d temp", | ||
"clean": "rimraf lib temp dist", | ||
"lint": "eslint --ext .ts src && eslint --ext .ts test", | ||
"build": "npm run build:esm && npm run build:es2015 && npm run build:cjs && npm run build:types && npm run build:umd && npm run build:umd:min", | ||
"build:esm": "tsc -p configs/tsconfig.esm.json", | ||
"build:es2015": "tsc -p configs/tsconfig.es2015.json", | ||
"build:cjs": "tsc -p configs/tsconfig.cjs.json", | ||
"build:types": "tsc -p configs/tsconfig.types.json", | ||
"build:umd": "cross-env NODE_ENV=development webpack -o dist/redux-observable.js", | ||
"build:umd:min": "cross-env NODE_ENV=production webpack -o dist/redux-observable.min.js", | ||
"build:tests": "rimraf temp && tsc -p configs/tsconfig.test.json", | ||
"clean": "rimraf temp dist", | ||
"check": "npm run lint && npm run test", | ||
"test": "npm run lint && npm run build && npm run build:tests && mocha temp && npm run test:typings", | ||
"test:typings": "tsc --strict index.d.ts test/typings.ts --outDir temp --target ES5 --moduleResolution node --lib dom,es2015 && cd temp && node typings.js", | ||
"test": "npm run lint && npm run build && npm run build:tests && mocha temp", | ||
"shipit": "npm run clean && npm run build && npm run lint && npm test && scripts/publish.sh", | ||
"docs:clean": "rimraf _book", | ||
"docs:prepare": "gitbook install", | ||
"docs:build": "npm run docs:prepare && gitbook build -g redux-observable/redux-observable && cp logo/favicon.ico _book/gitbook/images", | ||
"docs:watch": "gitbook serve", | ||
"docs:publish": "npm run docs:clean && npm run docs:build && cp CNAME _book && cd _book && git init && git commit --allow-empty -m 'update book' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update book' && git push [email protected]:redux-observable/redux-observable gh-pages --force" | ||
}, | ||
"typings": "./index.d.ts", | ||
"typings": "./dist/types/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"lib", | ||
"index.d.ts", | ||
"src", | ||
"README.md", | ||
"LICENSE" | ||
], | ||
|
@@ -65,40 +66,37 @@ | |
"homepage": "https://github.com/redux-observable/redux-observable#README.md", | ||
"peerDependencies": { | ||
"redux": ">=4 <5", | ||
"rxjs": ">=6.0.0-beta.0 <7" | ||
"rxjs": ">=6.0.0-beta.0 <7", | ||
"tslib": "^1.9.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^3.5.2", | ||
"@types/mocha": "^2.2.48", | ||
"@types/node": "^12.7.12", | ||
"@types/sinon": "^4.3.1", | ||
"babel-cli": "^6.11.4", | ||
"babel-core": "^6.26.0", | ||
"babel-eslint": "^7.0.0", | ||
"babel-loader": "^7.0.0", | ||
"babel-plugin-transform-object-rest-spread": "^6.8.0", | ||
"@typescript-eslint/eslint-plugin": "^2.4.0", | ||
"@typescript-eslint/parser": "^2.4.0", | ||
"babel-polyfill": "^6.13.0", | ||
"babel-preset-env": "^1.6.1", | ||
"babel-register": "^6.11.6", | ||
"chai": "^4.1.2", | ||
"conventional-changelog-cli": "1.3.3", | ||
"cross-env": "^5.0.0", | ||
"eslint": "^4.6.0", | ||
"eslint": "^6.5.1", | ||
"esm": "^3.2.25", | ||
"gitbook-cli": "^2.3.0", | ||
"gitbook-plugin-addcssjs": "^1.0.2", | ||
"gitbook-plugin-anker-enable": "^0.0.4", | ||
"gitbook-plugin-edit-link": "^2.0.2", | ||
"gitbook-plugin-github": "^2.0.0", | ||
"gitbook-plugin-prism": "^2.0.1", | ||
"gitbook-plugin-theme-default": "^1.0.5", | ||
"gulp": "^4.0.1", | ||
"gulp-babel": "^6.1.2", | ||
"json-server": "^0.10.0", | ||
"mocha": "^3.5.3", | ||
"redux": "^4.0.0", | ||
"rimraf": "^2.5.4", | ||
"rxjs": "^6.0.0", | ||
"sinon": "^4.5.0", | ||
"typescript": "^2.1.4", | ||
"ts-loader": "^6.2.0", | ||
"typescript": "^3.6.4", | ||
"webpack": "^4.29.3", | ||
"webpack-cli": "^3.2.3", | ||
"webpack-rxjs-externals": "~2.0.0" | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.