Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update core and ipc to v2.0.0 #796

Merged
merged 6 commits into from
Oct 17, 2024
Merged
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
6,072 changes: 2,579 additions & 3,493 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
},
"dependencies": {
"@bam.tech/react-native-image-resizer": "^3.0.7",
"@comapeo/ipc": "1.0.1",
"@comapeo/ipc": "2.0.0",
"@dev-plugins/react-navigation": "^0.0.6",
"@dr.pogodin/react-native-fs": "^2.24.1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer used at all given the removal of the external shared directory path

"@formatjs/intl-getcanonicallocales": "^2.3.0",
"@formatjs/intl-locale": "^3.3.2",
"@formatjs/intl-pluralrules": "^5.2.4",
Expand Down Expand Up @@ -116,7 +115,7 @@
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@comapeo/core": "1.0.1",
"@comapeo/core": "2.0.0",
"@comapeo/schema": "1.0.0",
"@formatjs/cli": "^6.2.0",
"@react-native-community/cli": "^12.3.6",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion patches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ or [this](https://github.com/facebook/react-native/pull/43756) is merged.

## @comapeo/ipc

### [Change imports to avoid calling unavailable code](./@comapeo+ipc+1.0.1.patch)
### [Change imports to avoid calling unavailable code](./@comapeo+ipc+2.0.0.patch)

There was an error while running app via Expo because of exports in `rpc-reflector` package. To remove this patch, `rpc-reflector` would need to be updated not to use `encode-decode.js` file which indirect usage results in errors.

Expand Down
2 changes: 1 addition & 1 deletion scripts/build-backend.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const KEEP_THESE = [
// zip file that is the default config
'node_modules/@mapeo/default-config/dist/mapeo-default-config.comapeocat',
// Offline fallback map
'node_modules/mapeo-offline-map',
'node_modules/@comapeo/fallback-smp',
];

for (const name of KEEP_THESE) {
Expand Down
13 changes: 0 additions & 13 deletions src/backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ const MIGRATIONS_FOLDER_PATH = new URL(
'./node_modules/@comapeo/core/drizzle',
import.meta.url,
).pathname
const FALLBACK_MAP_PATH = new URL(
'./node_modules/mapeo-offline-map',
import.meta.url,
).pathname

const DEFAULT_CONFIG_PATH = new URL(
'./node_modules/@mapeo/default-config/dist/mapeo-default-config.comapeocat',
Expand All @@ -24,28 +20,19 @@ try {
options: {
version: { type: 'string' },
rootKey: { type: 'string' },
sharedStoragePath: { type: 'string' },
},
})

if (typeof values.rootKey !== 'string') {
throw new Error('backend did not receive root key from front end')
}

if (typeof values.sharedStoragePath !== 'string') {
throw new Error(
'backend did not receive shared storage path from front end',
)
}

// Do not await this as we want this to run indefinitely
init({
version: values.version,
rootKey: Buffer.from(values.rootKey, 'hex'),
migrationsFolderPath: MIGRATIONS_FOLDER_PATH,
sharedStoragePath: values.sharedStoragePath,
defaultConfigPath: DEFAULT_CONFIG_PATH,
fallbackMapPath: FALLBACK_MAP_PATH,
}).catch((err) => {
console.error('Server startup error:', err)
})
Expand Down
Loading
Loading