Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Commit 0ede727

Browse files
committed
fix: patch axios to avoid calling process
remove once parcel-bundler/parcel#8433 is fixed
1 parent 534121c commit 0ede727

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
"packages/*"
66
],
77
"devDependencies": {
8-
"lerna": "^5.4.3"
8+
"lerna": "^5.4.3",
9+
"patch-package": "^6.4.7",
10+
"postinstall-postinstall": "^2.1.0"
911
},
1012
"scripts": {
13+
"postinstall": "patch-package",
1114
"build": "lerna run --scope @firebase-proxy/* --scope firebase-proxy build",
1215
"dev": "lerna run --parallel --scope @firebase-proxy/* --scope firebase-proxy dev"
1316
}

patches/axios+0.27.2.patch

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/node_modules/axios/lib/defaults/index.js b/node_modules/axios/lib/defaults/index.js
2+
index 9199818..d954f5a 100644
3+
--- a/node_modules/axios/lib/defaults/index.js
4+
+++ b/node_modules/axios/lib/defaults/index.js
5+
@@ -17,15 +17,7 @@ function setContentTypeIfUnset(headers, value) {
6+
}
7+
8+
function getDefaultAdapter() {
9+
- var adapter;
10+
- if (typeof XMLHttpRequest !== 'undefined') {
11+
- // For browsers use XHR adapter
12+
- adapter = require('../adapters/xhr');
13+
- } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
14+
- // For node use HTTP adapter
15+
- adapter = require('../adapters/http');
16+
- }
17+
- return adapter;
18+
+ return require('../adapters/xhr');
19+
}
20+
21+
function stringifySafely(rawValue, parser, encoder) {

0 commit comments

Comments
 (0)