From c027f039a9fb956a313d82cf17113b82f616a3d0 Mon Sep 17 00:00:00 2001 From: RJ Zaworski Date: Wed, 4 Oct 2017 19:44:59 -0700 Subject: [PATCH 1/2] Upgrades dependencies We're now building from react@16.0; the supporting cast of libraries are updated for good measure. --- index.html | 4 +-- package.json | 63 +++++++++++++++++++++++++---------------------- typings.json | 9 ++----- webpack.config.js | 8 ++---- 4 files changed, 40 insertions(+), 44 deletions(-) diff --git a/index.html b/index.html index 6e19502..c953b88 100644 --- a/index.html +++ b/index.html @@ -14,8 +14,8 @@

Counter Demo

...and refresh this page! - - + + diff --git a/package.json b/package.json index 64a3076..416a298 100644 --- a/package.json +++ b/package.json @@ -20,40 +20,42 @@ "author": "RJ Zaworski (http://rjzaworski.com)", "license": "ISC", "dependencies": { - "react": "15.6.1", - "react-redux": "5.0.5", - "redux": "3.6.0", + "react": "16.0.0", + "react-redux": "5.0.6", + "redux": "3.7.2", "redux-thunk": "2.2.0" }, "devDependencies": { - "@types/jest": "20.0.4", + "@types/jest": "21.1.2", "@types/minimist": "1.2.0", - "@types/node": "7.0.12", - "@types/react": "15.0.38", - "@types/react-dom": "15.5.1", - "@types/react-redux": "4.4.46", - "@types/semver": "5.3.31", - "@types/sinon": "2.1.2", - "babel-core": "6.14.0", - "babel-loader": "6.2.5", - "babel-polyfill": "6.20.0", - "babel-preset-es2015": "6.14.0", - "coveralls": "2.11.15", - "http-server": "0.9.0", - "jest": "20.0.4", - "jest-cli": "20.0.4", - "react-addons-test-utils": "15.6.0", - "react-dom": "15.6.1", - "react-test-renderer": "15.6.1", - "sinon": "2.3.8", - "source-map-loader": "0.1.5", - "ts-jest": "20.0.7", - "ts-loader": "2.3.0", - "tslint": "5.5.0", - "typescript": "2.4.1", + "@types/node": "8.0.32", + "@types/react": "16.0.9", + "@types/react-addons-test-utils": "0.14.20", + "@types/react-dom": "16.0.0", + "@types/react-redux": "5.0.10", + "@types/semver": "5.4.0", + "@types/sinon": "2.3.5", + "babel-core": "6.26.0", + "babel-loader": "7.1.2", + "babel-polyfill": "6.26.0", + "babel-preset-es2015": "6.24.1", + "coveralls": "3.0.0", + "http-server": "0.10.0", + "jest": "21.2.1", + "jest-cli": "21.2.1", + "raf": "3.4.0", + "react-addons-test-utils": "15.6.2", + "react-dom": "16.0.0", + "react-test-renderer": "16.0.0", + "sinon": "4.0.1", + "source-map-loader": "0.2.2", + "ts-jest": "21.0.1", + "ts-loader": "2.3.7", + "tslint": "5.7.0", + "typescript": "2.5.3", "typings": "2.1.1", - "webpack": "1.13.1", - "webpack-fail-plugin": "1.0.5", + "webpack": "3.6.0", + "webpack-fail-plugin": "2.0.0", "zakalwe": "1.0.3" }, "jest": { @@ -62,6 +64,9 @@ "tsx", "js" ], + "setupFiles": [ + "raf/polyfill" + ], "transform": { "\\.(ts|tsx)$": "/node_modules/ts-jest/preprocessor.js" }, diff --git a/typings.json b/typings.json index 82ded49..222fdec 100644 --- a/typings.json +++ b/typings.json @@ -1,10 +1,5 @@ { "name": "typescript-react-redux", - "globalDependencies": { - "sinon": "registry:dt/sinon#1.16.1+20161208163514" - }, - "dependencies": { - "react-addons-test-utils": "registry:dt/react-addons-test-utils#0.14.0+20170123203653", - "react-redux": "registry:dt/react-redux#4.4.0+20170315101812" - } + "globalDependencies": {}, + "dependencies": {} } diff --git a/webpack.config.js b/webpack.config.js index 7ed5e25..675ff3f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -12,7 +12,7 @@ module.exports = { resolve: { // add '.ts' and '.tsx' as resolvable extensions. - extensions: ['', '.webpack.js', '.web.js', '.ts', '.tsx', '.js'] + extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js'] }, plugins: [ failPlugin ], @@ -21,12 +21,8 @@ module.exports = { loaders: [ // all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'. { test: /\.tsx?$/, loader: 'babel-loader?presets[]=es2015!ts-loader' }, + { test: /\.js$/, enforce: 'pre', loader: 'source-map-loader' }, ], - - preloaders: [ - // all output '.js' files will have any sourcemaps re-processed by 'source-map-loader'. - { test: /\.js$/, loader: 'source-map-loader' } - ] }, // when importing a module whose path matches one of the following, just From 11c851eb275390bf3dfcbce188f1d64f4639d348 Mon Sep 17 00:00:00 2001 From: RJ Zaworski Date: Wed, 4 Oct 2017 20:07:44 -0700 Subject: [PATCH 2/2] Removes typings --- .gitignore | 1 - package.json | 5 +---- tsconfig.json | 4 +--- typings.json | 5 ----- 4 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 typings.json diff --git a/.gitignore b/.gitignore index 1a282ed..a13feb6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ dist node_modules -typings *.swp npm-debug.log src/**/*.js diff --git a/package.json b/package.json index 416a298..c8fa79c 100644 --- a/package.json +++ b/package.json @@ -8,15 +8,13 @@ "node": ">=7.0.0" }, "scripts": { - "setup": "typings install", "start": "http-server -c-1", - "build": "npm run setup && npm run test && webpack", + "build": "npm run test && webpack", "watch": "webpack --watch", "lint": "tslint -c tslint.json 'src/**/*.{ts,tsx}'", "pretest": "npm run lint", "test": "jest --coverage" }, - "typings": "typings/index.d.ts", "author": "RJ Zaworski (http://rjzaworski.com)", "license": "ISC", "dependencies": { @@ -53,7 +51,6 @@ "ts-loader": "2.3.7", "tslint": "5.7.0", "typescript": "2.5.3", - "typings": "2.1.1", "webpack": "3.6.0", "webpack-fail-plugin": "2.0.0", "zakalwe": "1.0.3" diff --git a/tsconfig.json b/tsconfig.json index 20c8ed1..7b13fb4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,8 +9,6 @@ "jsx": "react" }, "files": [ - "node_modules/@types/react-dom/index.d.ts", - "node_modules/@types/react/index.d.ts", - "typings/index.d.ts" + "node_modules/@types/react/index.d.ts" ] } diff --git a/typings.json b/typings.json deleted file mode 100644 index 222fdec..0000000 --- a/typings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "typescript-react-redux", - "globalDependencies": {}, - "dependencies": {} -}