@hot-updater/expo 1.0.0-rc.21 → 1.0.0-rc.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -6262,8 +6262,14 @@ const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcEx
6262
6262
  //#endregion
6263
6263
  //#region src/expoConfig.ts
6264
6264
  const importExpoConfigModule = (specifier) => import(specifier);
6265
- const isMissingModule = (error, specifier) => error instanceof Error && "code" in error && error.code === "ERR_MODULE_NOT_FOUND" && error.message.includes(specifier);
6265
+ const isMissingModule = (error, specifier) => error instanceof Error && "code" in error && (error.code === "ERR_MODULE_NOT_FOUND" || error.code === "ERR_UNSUPPORTED_DIR_IMPORT") && "url" in error && typeof error.url === "string" && error.url.endsWith(`/node_modules/${specifier}`);
6266
6266
  const loadExpoConfig = async () => {
6267
+ try {
6268
+ const module = await importExpoConfigModule("expo/config");
6269
+ return module.getConfig ? module : module.default;
6270
+ } catch (error) {
6271
+ if (!isMissingModule(error, "expo/config")) throw error;
6272
+ }
6267
6273
  try {
6268
6274
  const module = await importExpoConfigModule("expo/config.js");
6269
6275
  return module.getConfig ? module : module.default;
package/dist/index.mjs CHANGED
@@ -6260,8 +6260,14 @@ const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcEx
6260
6260
  //#endregion
6261
6261
  //#region src/expoConfig.ts
6262
6262
  const importExpoConfigModule = (specifier) => import(specifier);
6263
- const isMissingModule = (error, specifier) => error instanceof Error && "code" in error && error.code === "ERR_MODULE_NOT_FOUND" && error.message.includes(specifier);
6263
+ const isMissingModule = (error, specifier) => error instanceof Error && "code" in error && (error.code === "ERR_MODULE_NOT_FOUND" || error.code === "ERR_UNSUPPORTED_DIR_IMPORT") && "url" in error && typeof error.url === "string" && error.url.endsWith(`/node_modules/${specifier}`);
6264
6264
  const loadExpoConfig = async () => {
6265
+ try {
6266
+ const module = await importExpoConfigModule("expo/config");
6267
+ return module.getConfig ? module : module.default;
6268
+ } catch (error) {
6269
+ if (!isMissingModule(error, "expo/config")) throw error;
6270
+ }
6265
6271
  try {
6266
6272
  const module = await importExpoConfigModule("expo/config.js");
6267
6273
  return module.getConfig ? module : module.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/expo",
3
- "version": "1.0.0-rc.21",
3
+ "version": "1.0.0-rc.23",
4
4
  "description": "Hot Updater build and config plugin for Expo",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -28,16 +28,16 @@
28
28
  "@babel/core": "7.26.0",
29
29
  "@babel/types": "7.26.0",
30
30
  "uuidv7": "^1.0.2",
31
- "@hot-updater/bare": "1.0.0-rc.21",
32
- "@hot-updater/plugin-core": "1.0.0-rc.21",
33
- "@hot-updater/cli-tools": "1.0.0-rc.21"
31
+ "@hot-updater/bare": "1.0.0-rc.23",
32
+ "@hot-updater/cli-tools": "1.0.0-rc.23",
33
+ "@hot-updater/plugin-core": "1.0.0-rc.23"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^20",
37
37
  "expo": "^50.0.0",
38
38
  "execa": "9.5.2",
39
39
  "vitest": "4.1.4",
40
- "hot-updater": "1.0.0-rc.21"
40
+ "hot-updater": "1.0.0-rc.23"
41
41
  },
42
42
  "exports": {
43
43
  ".": {