From 0fba9be61f423881f2def91b9840ad68e997900d Mon Sep 17 00:00:00 2001 From: Anton Korzunov Date: Thu, 7 Feb 2019 11:17:17 +1100 Subject: [PATCH] React 16.8.1 --- package.json | 4 ++-- patch/build.js | 6 +++++- source/README.md | 2 +- yarn.lock | 26 +++++++++++++------------- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index a7ae6ce..e45e755 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "main": "index.js", "scripts": { "clean": "rm -Rf target", - "prepare": "mkdir target && cp ./README.md ./source/README.md", + "prepare": "cp ./README.md ./source/README.md", "patch": "cd patch && node build.js", "build": "run-s clean prepare patch" }, @@ -27,7 +27,7 @@ "homepage": "https://github.com/hot-loader/react-dom#readme", "devDependencies": { "npm-run-all": "^4.1.5", - "react-dom": "^16.7.0" + "react-dom": "^16.8.1" }, "dependencies": { "loose-envify": "^1.1.0", diff --git a/patch/build.js b/patch/build.js index e2eb6c7..4dcb29f 100644 --- a/patch/build.js +++ b/patch/build.js @@ -36,7 +36,10 @@ const copy = (source, target) => { const stat = statSync(sourceFile); if (stat.isDirectory()) { - mkdirSync(`${target}/${i}`); + try { + mkdirSync(`${target}/${i}`); + } catch (e) { + } copy(sourceFile, targetFile) } else { copyFile(sourceFile, targetFile); @@ -44,6 +47,7 @@ const copy = (source, target) => { } } +mkdirSync('../target'); copy('../node_modules/react-dom/', '../target'); copy('../source', '../node_modules/react-dom/', '../target'); diff --git a/source/README.md b/source/README.md index 0b9d007..1f7e659 100644 --- a/source/README.md +++ b/source/README.md @@ -14,7 +14,7 @@ There are just 4 changed lines, see `patch.js` for details ```text yarn add @hot-loader/react-dom@YOUR_REACT_VERSION ``` -> Right now only 16.7.0-alpha.2 version is available +> Right now only 16.7.0+ versions are available ## Rewire To use this version of React-dom you have to rewire your application diff --git a/yarn.lock b/yarn.lock index eaf774f..22f42df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -313,15 +313,15 @@ prop-types@^15.6.2: loose-envify "^1.3.1" object-assign "^4.1.1" -react-dom@^16.7.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.7.0.tgz#a17b2a7ca89ee7390bc1ed5eb81783c7461748b8" - integrity sha512-D0Ufv1ExCAmF38P2Uh1lwpminZFRXEINJe53zRAbm4KPwSyd6DY/uDoS0Blj9jvPpn1+wivKpZYc8aAAN/nAkg== +react-dom@^16.8.1: + version "16.8.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.1.tgz#ec860f98853d09d39bafd3a6f1e12389d283dbb4" + integrity sha512-N74IZUrPt6UiDjXaO7UbDDFXeUXnVhZzeRLy/6iqqN1ipfjrhR60Bp5NuBK+rv3GMdqdIuwIl22u1SYwf330bg== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.12.0" + scheduler "^0.13.1" read-pkg@^3.0.0: version "3.0.0" @@ -332,14 +332,6 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -scheduler@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.12.0.tgz#8ab17699939c0aedc5a196a657743c496538647b" - integrity sha512-t7MBR28Akcp4Jm+QoR63XgAi9YgCUmgvDHqf5otgAj4QvdoBE4ImCX0ffehefePPG+aitiYHp0g/mW6s4Tp+dw== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler@^0.12.0-alpha.2: version "0.12.0-alpha.2" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.12.0-alpha.2.tgz#2a8bc8dc6ecdb75fa6480ceeedc1f187c9539970" @@ -348,6 +340,14 @@ scheduler@^0.12.0-alpha.2: loose-envify "^1.1.0" object-assign "^4.1.1" +scheduler@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.1.tgz#1a217df1bfaabaf4f1b92a9127d5d732d85a9591" + integrity sha512-VJKOkiKIN2/6NOoexuypwSrybx13MY7NSy9RNt8wPvZDMRT1CW6qlpF5jXRToXNHz3uWzbm2elNpZfXfGPqP9A== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + "semver@2 || 3 || 4 || 5", semver@^5.5.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"