ds300 / ds300/patch-package

Patch file parse error

Open
#268 1 comment 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.2k
Forks
325
PR merge metrics
No merged PRs in 30d

Description

This patch only fails in Windows 10, latest version, works fine on MacOs. It's for rn-fetch-blob

If you just upgraded patch-package, you can try running:

cd patches\rn-fetch-blob+0.12.0.patc
patch -p1 -i h
npx patch-package rn-fetch-blob
cd ../..

Otherwise, try manually creating the patch file again.

diff --git a/node_modules/rn-fetch-blob/polyfill/Blob.js b/node_modules/rn-fetch-blob/polyfill/Blob.js
index 53662a7..379a7ad 100644
--- a/node_modules/rn-fetch-blob/polyfill/Blob.js
+++ b/node_modules/rn-fetch-blob/polyfill/Blob.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.

-import RNFetchBlob from '../index.js'
+// import RNFetchBlob from '../index.js'
+import {NativeModules} from 'react-native';
+const RNFetchBlob = NativeModules.RNFetchBlob
import fs from '../fs.js'
import getUUID from '../utils/uuid'
import Log from '../utils/log.js'
diff --git a/node_modules/rn-fetch-blob/polyfill/Fetch.js b/node_modules/rn-fetch-blob/polyfill/Fetch.js
index 3ecb591..fbb0702 100644
--- a/node_modules/rn-fetch-blob/polyfill/Fetch.js
+++ b/node_modules/rn-fetch-blob/polyfill/Fetch.js
@@ -1,4 +1,6 @@
-import RNFetchBlob from '../index.js'
+// import RNFetchBlob from '../index.js'
+import {NativeModules} from 'react-native';
+const RNFetchBlob = NativeModules.RNFetchBlob
import Log from '../utils/log.js'
import fs from '../fs'
import unicode from '../utils/unicode'
diff --git a/node_modules/rn-fetch-blob/polyfill/XMLHttpRequest.js b/node_modules/rn-fetch-blob/polyfill/XMLHttpRequest.js
index 9036b2b..f1a99e4 100644
--- a/node_modules/rn-fetch-blob/polyfill/XMLHttpRequest.js
+++ b/node_modules/rn-fetch-blob/polyfill/XMLHttpRequest.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.

-import RNFetchBlob from '../index.js'
+// import RNFetchBlob from '../index.js'
+import {NativeModules} from 'react-native';
+const RNFetchBlob = NativeModules.RNFetchBlob
import XMLHttpRequestEventTarget from './XMLHttpRequestEventTarget.js'
import Log from '../utils/log.js'
import Blob from './Blob.js'

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.