Skip to content

Commit

Permalink
chore: update dependencies (#716) (#723)
Browse files Browse the repository at this point in the history
* chore: update dependencies

This updates all of our (Co)Mapeo dependencies to their latest versions.
This should be the last time we do this before the 1.0 releases of those
modules.

* Default config's extension is `.comapeocat`

* chore: update mapeo-schema for ESM fix

* chore: update backend deps

* chore: update @electron/asar patch

* fix: temp fix

---------

Co-authored-by: Evan Hahn <[email protected]>
Co-authored-by: Gregor MacLennan <[email protected]>
  • Loading branch information
3 people authored Sep 17, 2024
1 parent 4abe848 commit e06a7e4
Show file tree
Hide file tree
Showing 25 changed files with 1,557 additions and 1,204 deletions.
2 changes: 1 addition & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@
"message": "Import Config"
},
"screens.Settings.CreateOrJoinProject.importConfigFileError": {
"message": "File name should end with .mapeoconfig"
"message": "File name should end with .comapeocat"
},
"screens.Settings.CreateOrJoinProject.joinExisting": {
"message": "Join an existing CoMapeo Project"
Expand Down
7 changes: 6 additions & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ module.exports = {
resolver: {
...config.resolver,
// For nodejs-mobile
blockList: [...defaultBlockList, /nodejs-assets\/.*/],
blockList: [
...defaultBlockList,
/nodejs-assets\/.*/,
// TODO: Update comapeo-schema to make ajv a dev-dep
/node_modules\/ajv\/.*/,
],
// For https://github.com/kristerkari/react-native-svg-transformer
assetExts: config.resolver.assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...config.resolver.sourceExts, 'svg'],
Expand Down
93 changes: 61 additions & 32 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
},
"dependencies": {
"@bam.tech/react-native-image-resizer": "^3.0.7",
"@comapeo/ipc": "0.16.1",
"@dev-plugins/react-navigation": "^0.0.6",
"@dr.pogodin/react-native-fs": "^2.24.1",
"@formatjs/intl-getcanonicallocales": "^2.3.0",
"@formatjs/intl-locale": "^3.3.2",
"@formatjs/intl-pluralrules": "^5.2.4",
"@formatjs/intl-relativetimeformat": "^11.2.4",
"@gorhom/bottom-sheet": "^4.5.1",
"@mapeo/ipc": "0.15.0",
"@mapeo/mock-data": "1.0.3-alpha.5",
"@mapeo/mock-data": "1.0.3-alpha.6",
"@osm_borders/maritime_10000m": "^1.1.0",
"@react-native-community/hooks": "^2.8.0",
"@react-native-community/netinfo": "11.1.0",
Expand Down Expand Up @@ -118,8 +118,8 @@
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@formatjs/cli": "^6.2.0",
"@mapeo/core": "9.0.0-alpha.23",
"@mapeo/schema": "3.0.0-next.26",
"@mapeo/core": "9.0.0-alpha.25",
"@mapeo/schema": "3.0.0-next.28",
"@react-native-community/cli": "^12.3.6",
"@react-native/babel-preset": "^0.73.21",
"@react-native/eslint-config": "^0.73.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
diff --git a/node_modules/@mapeo/ipc/dist/client.js b/node_modules/@mapeo/ipc/dist/client.js
diff --git a/node_modules/@comapeo/ipc/dist/client.js b/node_modules/@comapeo/ipc/dist/client.js
index 6ccb1e9..561ab9d 100644
--- a/node_modules/@mapeo/ipc/dist/client.js
+++ b/node_modules/@mapeo/ipc/dist/client.js
--- a/node_modules/@comapeo/ipc/dist/client.js
+++ b/node_modules/@comapeo/ipc/dist/client.js
@@ -1,4 +1,4 @@
-import { createClient } from 'rpc-reflector';
+import createClient from 'rpc-reflector/client.js';
import pDefer from 'p-defer';
import { MANAGER_CHANNEL_ID, MAPEO_RPC_ID, SubChannel, } from './lib/sub-channel.js';
/**
diff --git a/node_modules/@mapeo/ipc/dist/server.js b/node_modules/@mapeo/ipc/dist/server.js
diff --git a/node_modules/@comapeo/ipc/dist/server.js b/node_modules/@comapeo/ipc/dist/server.js
index 164f9a7..5b3f4d5 100644
--- a/node_modules/@mapeo/ipc/dist/server.js
+++ b/node_modules/@mapeo/ipc/dist/server.js
--- a/node_modules/@comapeo/ipc/dist/server.js
+++ b/node_modules/@comapeo/ipc/dist/server.js
@@ -1,4 +1,4 @@
-import { createServer } from 'rpc-reflector';
+import createServer from 'rpc-reflector/server.js';
Expand Down
4 changes: 2 additions & 2 deletions patches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ desirable to have Prettier tightly integrated with ESLint. The patch removes the
We can remove this if either [this](https://github.com/facebook/react-native/pull/41877)
or [this](https://github.com/facebook/react-native/pull/43756) is merged.

## @mapeo/ipc
## @comapeo/ipc

### [Change imports to avoid calling unavailable code](./@mapeo+ipc+0.15.0.patch)
### [Change imports to avoid calling unavailable code](./@comapeo+ipc+0.16.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 @@ -75,7 +75,7 @@ const KEEP_THESE = [
// Static folders referenced by @mapeo/core code
'node_modules/@mapeo/core/drizzle',
// zip file that is the default config
'node_modules/@mapeo/default-config/dist/mapeo-default-config.mapeoconfig',
'node_modules/@mapeo/default-config/dist/mapeo-default-config.comapeocat',
// Offline fallback map
'node_modules/mapeo-offline-map',
];
Expand Down
2 changes: 1 addition & 1 deletion src/backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const FALLBACK_MAP_PATH = new URL(
).pathname

const DEFAULT_CONFIG_PATH = new URL(
'./node_modules/@mapeo/default-config/dist/mapeo-default-config.mapeoconfig',
'./node_modules/@mapeo/default-config/dist/mapeo-default-config.comapeocat',
import.meta.url,
).pathname

Expand Down
Loading

0 comments on commit e06a7e4

Please sign in to comment.