Skip to content

Commit

Permalink
examples: introduce patch-package to avoid recoil warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
koichik committed Sep 18, 2022
1 parent 866b7dd commit dbda8da
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 5 deletions.
5 changes: 4 additions & 1 deletion examples/history-sync-json/package.json
Expand Up @@ -13,7 +13,8 @@
"lint-fix:prettier": "prettier \"{pages,src,styles}/**/*.{ts,tsx,css}\" --write",
"local-build": "yarn run local-copy && yarn run build",
"local-dev": "yarn run local-copy && yarn run dev",
"local-copy": "./package-copy.sh"
"local-copy": "./package-copy.sh",
"postinstall": "patch-package"
},
"dependencies": {
"next": "^12.2.2",
Expand All @@ -29,6 +30,8 @@
"@types/react-dom": "^18.0.6",
"eslint": "^8.19.0",
"eslint-config-next": "^12.2.2",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"typescript": "^4.7.4"
}
}
13 changes: 13 additions & 0 deletions examples/history-sync-json/patches/recoil+0.7.5.patch
@@ -0,0 +1,13 @@
diff --git a/node_modules/recoil/cjs/index.js b/node_modules/recoil/cjs/index.js
index d0942d8..e1f14f0 100644
--- a/node_modules/recoil/cjs/index.js
+++ b/node_modules/recoil/cjs/index.js
@@ -468,7 +468,7 @@ function reactMode() {
function isFastRefreshEnabled() {
// @fb-only: const {isAcceptingUpdate} = require('__debug');
// @fb-only: return typeof isAcceptingUpdate === 'function' && isAcceptingUpdate();
- return false; // @oss-only
+ return true; // @oss-only
}

var Recoil_ReactMode = {
5 changes: 4 additions & 1 deletion examples/history-sync-transit/package.json
Expand Up @@ -13,7 +13,8 @@
"lint-fix:prettier": "prettier \"{pages,src,styles}/**/*.{ts,tsx,css}\" --write",
"local-build": "yarn run local-copy && yarn run build",
"local-dev": "yarn run local-copy && yarn run dev",
"local-copy": "./package-copy.sh"
"local-copy": "./package-copy.sh",
"postinstall": "patch-package"
},
"dependencies": {
"next": "^12.2.2",
Expand All @@ -29,6 +30,8 @@
"@types/react-dom": "^18.0.6",
"eslint": "^8.19.0",
"eslint-config-next": "^12.2.2",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"typescript": "^4.7.4"
}
}
13 changes: 13 additions & 0 deletions examples/history-sync-transit/patches/recoil+0.7.4.patch
@@ -0,0 +1,13 @@
diff --git a/node_modules/recoil/cjs/index.js b/node_modules/recoil/cjs/index.js
index 44bdc67..f6000fc 100644
--- a/node_modules/recoil/cjs/index.js
+++ b/node_modules/recoil/cjs/index.js
@@ -468,7 +468,7 @@ function reactMode() {
function isFastRefreshEnabled() {
// @fb-only: const {isAcceptingUpdate} = require('__debug');
// @fb-only: return typeof isAcceptingUpdate === 'function' && isAcceptingUpdate();
- return false; // @oss-only
+ return true; // @oss-only
}

var Recoil_ReactMode = {
5 changes: 4 additions & 1 deletion examples/react-hook-form/package.json
Expand Up @@ -13,7 +13,8 @@
"lint-fix:prettier": "prettier \"{pages,src,styles}/**/*.{ts,tsx,css}\" --write",
"local-build": "yarn run local-copy && yarn run build",
"local-dev": "yarn run local-copy && yarn run dev",
"local-copy": "./package-copy.sh"
"local-copy": "./package-copy.sh",
"postinstall": "patch-package"
},
"dependencies": {
"next": "^12.2.2",
Expand All @@ -30,6 +31,8 @@
"@types/react-dom": "^18.0.6",
"eslint": "^8.19.0",
"eslint-config-next": "^12.2.2",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"typescript": "^4.7.4"
}
}
13 changes: 13 additions & 0 deletions examples/react-hook-form/patches/recoil+0.7.5.patch
@@ -0,0 +1,13 @@
diff --git a/node_modules/recoil/cjs/index.js b/node_modules/recoil/cjs/index.js
index d0942d8..e1f14f0 100644
--- a/node_modules/recoil/cjs/index.js
+++ b/node_modules/recoil/cjs/index.js
@@ -468,7 +468,7 @@ function reactMode() {
function isFastRefreshEnabled() {
// @fb-only: const {isAcceptingUpdate} = require('__debug');
// @fb-only: return typeof isAcceptingUpdate === 'function' && isAcceptingUpdate();
- return false; // @oss-only
+ return true; // @oss-only
}

var Recoil_ReactMode = {
5 changes: 4 additions & 1 deletion examples/url-sync-json/package.json
Expand Up @@ -13,7 +13,8 @@
"lint-fix:prettier": "prettier \"{pages,src,styles}/**/*.{ts,tsx,css}\" --write",
"local-build": "yarn run local-copy && yarn run build",
"local-dev": "yarn run local-copy && yarn run dev",
"local-copy": "./package-copy.sh"
"local-copy": "./package-copy.sh",
"postinstall": "patch-package"
},
"dependencies": {
"next": "^12.2.2",
Expand All @@ -29,6 +30,8 @@
"@types/react-dom": "^18.0.6",
"eslint": "^8.19.0",
"eslint-config-next": "^12.2.2",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"typescript": "^4.7.4"
}
}
13 changes: 13 additions & 0 deletions examples/url-sync-json/patches/recoil+0.7.4.patch
@@ -0,0 +1,13 @@
diff --git a/node_modules/recoil/cjs/index.js b/node_modules/recoil/cjs/index.js
index 44bdc67..f6000fc 100644
--- a/node_modules/recoil/cjs/index.js
+++ b/node_modules/recoil/cjs/index.js
@@ -468,7 +468,7 @@ function reactMode() {
function isFastRefreshEnabled() {
// @fb-only: const {isAcceptingUpdate} = require('__debug');
// @fb-only: return typeof isAcceptingUpdate === 'function' && isAcceptingUpdate();
- return false; // @oss-only
+ return true; // @oss-only
}

var Recoil_ReactMode = {
5 changes: 4 additions & 1 deletion examples/url-sync-transit/package.json
Expand Up @@ -13,7 +13,8 @@
"lint-fix:prettier": "prettier \"{pages,src,styles}/**/*.{ts,tsx,css}\" --write",
"local-build": "yarn run local-copy && yarn run build",
"local-dev": "yarn run local-copy && yarn run dev",
"local-copy": "./package-copy.sh"
"local-copy": "./package-copy.sh",
"postinstall": "patch-package"
},
"dependencies": {
"next": "^12.2.2",
Expand All @@ -29,6 +30,8 @@
"@types/react-dom": "^18.0.6",
"eslint": "^8.19.0",
"eslint-config-next": "^12.2.2",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"typescript": "^4.7.4"
}
}
13 changes: 13 additions & 0 deletions examples/url-sync-transit/patches/recoil+0.7.4.patch
@@ -0,0 +1,13 @@
diff --git a/node_modules/recoil/cjs/index.js b/node_modules/recoil/cjs/index.js
index 44bdc67..f6000fc 100644
--- a/node_modules/recoil/cjs/index.js
+++ b/node_modules/recoil/cjs/index.js
@@ -468,7 +468,7 @@ function reactMode() {
function isFastRefreshEnabled() {
// @fb-only: const {isAcceptingUpdate} = require('__debug');
// @fb-only: return typeof isAcceptingUpdate === 'function' && isAcceptingUpdate();
- return false; // @oss-only
+ return true; // @oss-only
}

var Recoil_ReactMode = {

0 comments on commit dbda8da

Please sign in to comment.