Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions example/babel.config.shared.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path')
const libraryPackage = require('../packages/react-native-nitro-sqlite/package.json')

function createExampleBabelConfig(projectRoot, { buffer, crypto } = {}) {
function createExampleBabelConfig(projectRoot) {
const sourceDirectory = path.join(projectRoot, 'src')
const testsDirectory = path.join(projectRoot, 'tests')
const aliases = {
Expand All @@ -20,14 +20,6 @@ function createExampleBabelConfig(projectRoot, { buffer, crypto } = {}) {
'^@tests/(.+)': `${testsDirectory}/\\1`,
}

if (buffer !== false) {
aliases.buffer = buffer ?? 'react-native-quick-crypto'
}

if (crypto !== false) {
aliases.crypto = crypto ?? 'react-native-quick-crypto'
}

return {
presets: ['module:@react-native/babel-preset'],
plugins: [
Expand Down
56 changes: 0 additions & 56 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,6 @@ PODS:
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- Yoga
- QuickCrypto (1.1.8):
- hermes-engine
- NitroModules
- RCTRequired
- RCTTypeSafety
- React-bridging
- React-callinvoker
- React-Core
- React-Core-prebuilt
- React-cxxstableapi
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- Yoga
- RCT-Folly (2024.11.18.00):
- RCT-Folly/Default (= 2024.11.18.00)
- ReactNativeDependencies
Expand Down Expand Up @@ -1398,29 +1373,6 @@ PODS:
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- Yoga
- react-native-quick-base64 (3.0.1):
- hermes-engine
- RCTRequired
- RCTTypeSafety
- React-bridging
- React-Core
- React-Core-prebuilt
- React-cxxstableapi
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- Yoga
- react-native-safe-area-context (5.10.1):
- hermes-engine
- RCTRequired
Expand Down Expand Up @@ -1997,7 +1949,6 @@ DEPENDENCIES:
- glog (from `build/rndeps-facades/glog`)
- hermes-engine (from `../../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- NitroModules (from `../../node_modules/react-native-nitro-modules`)
- QuickCrypto (from `../../node_modules/react-native-quick-crypto`)
- RCT-Folly (from `build/rndeps-facades/RCT-Folly`)
- RCTDeprecation (from `build/rncore-facades/RCTDeprecation`)
- RCTRequired (from `build/rncore-facades/RCTRequired`)
Expand Down Expand Up @@ -2039,7 +1990,6 @@ DEPENDENCIES:
- React-Mapbuffer (from `../../node_modules/react-native/ReactCommon`)
- React-microtasksnativemodule (from `../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
- React-mutationobservernativemodule (from `../../node_modules/react-native/ReactCommon/react/nativemodule/mutationobserver`)
- react-native-quick-base64 (from `../../node_modules/react-native-quick-base64`)
- react-native-safe-area-context (from `../../node_modules/react-native-safe-area-context`)
- React-NativeModulesApple (from `../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
- React-networking (from `../../node_modules/react-native/ReactCommon/react/networking`)
Expand Down Expand Up @@ -2103,8 +2053,6 @@ EXTERNAL SOURCES:
:tag: hermes-v260318099.0.2
NitroModules:
:path: "../../node_modules/react-native-nitro-modules"
QuickCrypto:
:path: "../../node_modules/react-native-quick-crypto"
RCT-Folly:
:path: build/rndeps-facades/RCT-Folly
RCTDeprecation:
Expand Down Expand Up @@ -2185,8 +2133,6 @@ EXTERNAL SOURCES:
:path: "../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks"
React-mutationobservernativemodule:
:path: "../../node_modules/react-native/ReactCommon/react/nativemodule/mutationobserver"
react-native-quick-base64:
:path: "../../node_modules/react-native-quick-base64"
react-native-safe-area-context:
:path: "../../node_modules/react-native-safe-area-context"
React-NativeModulesApple:
Expand Down Expand Up @@ -2285,7 +2231,6 @@ SPEC CHECKSUMS:
glog: 3cf7cb46f743c4bc758ae3e6d9c15bd1b4cfd6d4
hermes-engine: 6a00d96909f1648698fe5419972fe3c9e628755e
NitroModules: 92c2f230ec822ce8be72c8330fe292cdcf24e3a4
QuickCrypto: 3e6ba9b95e4e6ddf3a5e01290b96d22ada38d3cf
RCT-Folly: 82921e585c0400eda46fac1068297aa9dfb035e4
RCTDeprecation: e134f2a2c096a6450f5fcbbe949531f913a2ff04
RCTRequired: f1a68295837ee8f91e112ed1b5694d12e7ff1784
Expand Down Expand Up @@ -2326,7 +2271,6 @@ SPEC CHECKSUMS:
React-Mapbuffer: cf4026a5c35cd3598b648ce6f3ac6e8bfae12ad5
React-microtasksnativemodule: 3c7c5f3624403317fe91b4ddefa86b60023552a8
React-mutationobservernativemodule: 7284a91b3c7d7fb85b5d4ac04f7f8da811b22977
react-native-quick-base64: f93ca829b2c94cc5b3a175533af49f934a4697e7
react-native-safe-area-context: 7b143af09becaf26ba247b9a82d355f91b77b9b0
React-NativeModulesApple: 52f3def085f129de1307e3eb78e26729ff70f421
React-networking: e97a095de90a95bf811b887e2dfdb225f20fd493
Expand Down
7 changes: 1 addition & 6 deletions example/macos/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
const path = require('path')
const createExampleBabelConfig = require('../babel.config.shared')

module.exports = createExampleBabelConfig(path.resolve(__dirname, '..'), {
// react-native-quick-base64 does not have a macOS native implementation.
// Use the portable Buffer package instead of the mobile crypto polyfill.
buffer: false,
crypto: false,
})
module.exports = createExampleBabelConfig(path.resolve(__dirname, '..'))
4 changes: 1 addition & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"test:harness:ios": "react-native-harness --harnessRunner ios"
},
"dependencies": {
"@craftzdog/react-native-buffer": "^6.1.2",
"@react-native-clipboard/clipboard": "^1.16.3",
"@react-navigation/native": "^7.5.1",
"@react-navigation/native-stack": "^7.21.0",
"buffer": "^6.0.3",
"chai": "^4.3.7",
"chance": "^1.1.9",
"events": "^3.3.0",
Expand All @@ -35,8 +35,6 @@
"react-native-nitro-modules": "*",
"react-native-nitro-sqlite": "10.2.0",
"react-native-nitro-sqlite-vec": "10.2.0",
"react-native-quick-base64": "^3.0.1",
"react-native-quick-crypto": "^1.1.8",
"react-native-safe-area-context": "^5.10.1",
"react-native-screens": "^4.30.0",
"reflect-metadata": "^0.2.2",
Expand Down
15 changes: 2 additions & 13 deletions example/src/initGlobals.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
import { Buffer as CraftzdogBuffer } from '@craftzdog/react-native-buffer'
import {
install as installQuickCrypto,
Buffer as QuickCryptoBuffer,
} from 'react-native-quick-crypto'

declare global {
// eslint-disable-next-line no-var
var Buffer: typeof CraftzdogBuffer | typeof QuickCryptoBuffer
}
import { Buffer } from 'buffer'

if (!globalThis.process) {
// @ts-expect-error - if process is not defined, we need to set it to an empty object
globalThis.process = {}
}

globalThis.Buffer = QuickCryptoBuffer
globalThis.Buffer = Buffer
globalThis.process.cwd = () => 'sxsx'
globalThis.process.env = { NODE_ENV: 'production' }

installQuickCrypto()
Loading