From 31d18dbd006aa8026ebab780bd7b1bc723c31118 Mon Sep 17 00:00:00 2001 From: Turgay Saba <22500853+sabaturgay@users.noreply.github.com> Date: Wed, 29 May 2024 18:21:07 +0200 Subject: [PATCH 1/2] fix(base64): disable base64 utils injections by default --- src/index.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index a448579c..cb41d450 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,5 @@ import 'react-native-url-polyfill/auto'; import { NativeModules } from 'react-native'; -import { atob, btoa } from 'react-native-quick-base64'; - -global.atob = atob; -global.btoa = btoa; export { reactiveHooksExtension } from './ReactiveHooksExtension'; export { reactiveQueriesExtension } from './ReactiveQueriesExtension'; From d973be17128ff989f8f0234f41e2a0b85af7d28a Mon Sep 17 00:00:00 2001 From: Turgay Saba <22500853+sabaturgay@users.noreply.github.com> Date: Mon, 24 Feb 2025 19:01:03 +0100 Subject: [PATCH 2/2] fix(base64): remove all references to react-native-quick-base64 --- README.md | 2 +- example/package.json | 1 - example/src/App.tsx | 3 --- package.json | 5 +---- yarn.lock | 4 +--- 5 files changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c1441dfa..3a591c11 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A Prisma engine adaptation for React Native. Please note that this is in [Early ## Installation ``` -npm i --save --save-exact @prisma/client@latest @prisma/react-native@latest react-native-quick-base64 +npm i --save --save-exact @prisma/client@latest @prisma/react-native@latest npx expo prebuild --clean ``` diff --git a/example/package.json b/example/package.json index de555c71..4abc4e16 100644 --- a/example/package.json +++ b/example/package.json @@ -20,7 +20,6 @@ "react-native": "0.73.2", "react-native-http-bridge-refurbished": "^1.2.9", "react-native-network-info": "^5.2.1", - "react-native-quick-base64": "^2.0.8", "react-native-reanimated": "^3.7.2", "react-native-url-polyfill": "^2.0.0", "text-encoding": "^0.7.0" diff --git a/example/src/App.tsx b/example/src/App.tsx index 88a7319f..acb5dc8b 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -9,7 +9,6 @@ import { View, } from 'react-native'; import { NetworkInfo } from 'react-native-network-info'; -import { atob, btoa } from 'react-native-quick-base64'; import 'react-native-url-polyfill/auto'; import '../global.css'; @@ -25,8 +24,6 @@ import { } from './db'; // global.TextEncoder = require('text-encoding').TextEncoder; -global.atob = atob; -global.btoa = btoa; export default function App() { const [prismaTime, setPrismaTime] = useState(0); diff --git a/package.json b/package.json index 001e8c38..e8dc4176 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,6 @@ "react": "18.2.0", "react-native": "0.73.2", "react-native-builder-bob": "0.23.2", - "react-native-quick-base64": "2.0.8", "react-native-url-polyfill": "2.0.0", "tsx": "^4.7.3", "typescript": "^5.4.5", @@ -103,8 +102,7 @@ "@prisma/client": "*", "expo": ">=49.0.0", "react": "*", - "react-native": "*", - "react-native-quick-base64": "*" + "react-native": "*" }, "workspaces": [ "example" @@ -176,7 +174,6 @@ } }, "dependencies": { - "react-native-quick-base64": "^2.0.8", "react-native-url-polyfill": "^2.0.0" } } diff --git a/yarn.lock b/yarn.lock index 79f7b862..f30af7c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3353,7 +3353,6 @@ __metadata: react: "npm:18.2.0" react-native: "npm:0.73.2" react-native-builder-bob: "npm:0.23.2" - react-native-quick-base64: "npm:2.0.8" react-native-url-polyfill: "npm:2.0.0" tsx: "npm:^4.7.3" typescript: "npm:^5.4.5" @@ -3364,7 +3363,6 @@ __metadata: expo: ">=49.0.0" react: "*" react-native: "*" - react-native-quick-base64: "*" peerDependenciesMeta: expo: optional: true @@ -13444,7 +13442,7 @@ __metadata: languageName: unknown linkType: soft -"react-native-quick-base64@npm:2.0.8, react-native-quick-base64@npm:^2.0.8": +"react-native-quick-base64@npm:^2.0.8": version: 2.0.8 resolution: "react-native-quick-base64@npm:2.0.8" dependencies: