@expo/cli 1.0.0-canary-20250630-547cd82 → 1.0.0-canary-20250709-136b77f
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/build/bin/cli +1 -1
- package/build/src/start/server/metro/createExpoMetroResolver.js +1 -1
- package/build/src/start/server/metro/createExpoMetroResolver.js.map +1 -1
- package/build/src/start/server/metro/withMetroMultiPlatform.js +8 -3
- package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
- package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
- package/build/src/utils/telemetry/utils/context.js +1 -1
- package/package.json +14 -14
- /package/static/canary-full/{react → node_modules/react}/LICENSE +0 -0
- /package/static/canary-full/{react → node_modules/react}/README.md +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-compiler-runtime.development.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-compiler-runtime.production.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-compiler-runtime.profiling.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-dev-runtime.development.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-dev-runtime.production.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-dev-runtime.profiling.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-dev-runtime.react-server.development.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-dev-runtime.react-server.production.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-runtime.development.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-runtime.production.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-runtime.profiling.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-runtime.react-server.development.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-runtime.react-server.production.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react.development.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react.production.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react.react-server.development.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/cjs/react.react-server.production.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/compiler-runtime.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/index.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/jsx-dev-runtime.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/jsx-dev-runtime.react-server.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/jsx-runtime.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/jsx-runtime.react-server.js +0 -0
- /package/static/canary-full/{react → node_modules/react}/package.json +0 -0
- /package/static/canary-full/{react → node_modules/react}/react.react-server.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/LICENSE +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/README.md +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-client.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-client.production.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-profiling.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-profiling.profiling.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server-legacy.browser.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server-legacy.browser.production.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server-legacy.node.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server-legacy.node.production.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server.browser.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server.browser.production.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server.bun.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server.bun.production.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server.edge.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server.edge.production.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server.node.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-server.node.production.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-test-utils.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-test-utils.production.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom.production.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom.react-server.development.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom.react-server.production.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/client.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/client.react-server.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/index.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/package.json +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/profiling.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/profiling.react-server.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/react-dom.react-server.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/server.browser.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/server.bun.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/server.edge.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/server.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/server.node.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/server.react-server.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/static.browser.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/static.edge.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/static.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/static.node.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/static.react-server.js +0 -0
- /package/static/canary-full/{react-dom → node_modules/react-dom}/test-utils.js +0 -0
package/build/bin/cli
CHANGED
|
@@ -123,7 +123,7 @@ const args = (0, _arg().default)({
|
|
|
123
123
|
});
|
|
124
124
|
if (args['--version']) {
|
|
125
125
|
// Version is added in the build script.
|
|
126
|
-
console.log("1.0.0-canary-
|
|
126
|
+
console.log("1.0.0-canary-20250709-136b77f");
|
|
127
127
|
process.exit(0);
|
|
128
128
|
}
|
|
129
129
|
if (args['--non-interactive']) {
|
|
@@ -126,7 +126,7 @@ function createFastResolver({ preserveSymlinks, blockList }) {
|
|
|
126
126
|
blockList,
|
|
127
127
|
enablePackageExports: context.unstable_enablePackageExports,
|
|
128
128
|
basedir: _path().default.dirname(context.originModulePath),
|
|
129
|
-
|
|
129
|
+
paths: context.nodeModulesPaths.length ? context.nodeModulesPaths : undefined,
|
|
130
130
|
extensions,
|
|
131
131
|
conditions,
|
|
132
132
|
realpathSync (file) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/start/server/metro/createExpoMetroResolver.ts"],"sourcesContent":["/**\n * Copyright © 2023 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport fs from 'fs';\nimport { Resolution, ResolutionContext } from 'metro-resolver';\nimport path from 'path';\n\nimport jestResolver from './createJResolver';\nimport { isNodeExternal } from './externals';\nimport { formatFileCandidates } from './formatFileCandidates';\nimport { isServerEnvironment } from '../middleware/metroOptions';\n\nexport class FailedToResolvePathError extends Error {\n // Added to ensure the error is matched by our tooling.\n // TODO: Test that this matches `isFailedToResolvePathError`\n candidates = {};\n}\n\nclass ShimModuleError extends Error {}\n\nconst debug = require('debug')('expo:metro:resolve') as typeof console.log;\n\nconst realpathFS =\n process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function'\n ? fs.realpathSync.native\n : fs.realpathSync;\n\nfunction realpathSync(x: string) {\n try {\n return realpathFS(x);\n } catch (realpathErr: any) {\n if (realpathErr.code !== 'ENOENT') {\n throw realpathErr;\n }\n }\n return x;\n}\n\nexport function createFastResolver({\n preserveSymlinks,\n blockList,\n}: {\n preserveSymlinks: boolean;\n blockList: RegExp[];\n}) {\n debug('Creating with settings:', { preserveSymlinks, blockList });\n const cachedExtensions: Map<string, readonly string[]> = new Map();\n\n function getAdjustedExtensions({\n metroSourceExtensions,\n platform,\n isNative,\n }: {\n metroSourceExtensions: readonly string[];\n platform: string | null;\n isNative: boolean;\n }): readonly string[] {\n const key = JSON.stringify({ metroSourceExtensions, platform, isNative });\n if (cachedExtensions.has(key)) {\n return cachedExtensions.get(key)!;\n }\n\n let output = metroSourceExtensions;\n if (platform) {\n const nextOutput: string[] = [];\n\n output.forEach((ext) => {\n nextOutput.push(`${platform}.${ext}`);\n if (isNative) {\n nextOutput.push(`native.${ext}`);\n }\n nextOutput.push(ext);\n });\n\n output = nextOutput;\n }\n\n output = Array.from(new Set<string>(output));\n\n // resolve expects these to start with a dot.\n output = output.map((ext) => `.${ext}`);\n\n cachedExtensions.set(key, output);\n\n return output;\n }\n\n function fastResolve(\n context: Pick<\n ResolutionContext,\n | 'unstable_enablePackageExports'\n | 'customResolverOptions'\n | 'sourceExts'\n | 'preferNativePlatform'\n | 'originModulePath'\n | 'getPackage'\n | 'nodeModulesPaths'\n | 'mainFields'\n | 'resolveAsset'\n | 'unstable_conditionNames'\n | 'unstable_conditionsByPlatform'\n | 'fileSystemLookup'\n | 'isESMImport'\n >,\n moduleName: string,\n platform: string | null\n ): Resolution {\n const environment = context.customResolverOptions?.environment;\n const isServer = isServerEnvironment(environment);\n\n const extensions = getAdjustedExtensions({\n metroSourceExtensions: context.sourceExts,\n platform,\n isNative: context.preferNativePlatform,\n }) as string[];\n\n let fp: string;\n\n const conditions = context.unstable_enablePackageExports\n ? [\n ...new Set([\n 'default',\n context.isESMImport === true ? 'import' : 'require',\n ...context.unstable_conditionNames,\n ...(platform != null ? (context.unstable_conditionsByPlatform[platform] ?? []) : []),\n ]),\n ]\n : [];\n\n // NOTE(cedric): metro@0.81.0 ships with `fileSystemLookup`, while `metro@0.80.12` ships as unstable\n const fileSystemLookup = (\n 'unstable_fileSystemLookup' in context\n ? context.unstable_fileSystemLookup\n : context.fileSystemLookup\n ) as ResolutionContext['fileSystemLookup'] | undefined;\n\n if (!fileSystemLookup) {\n throw new Error('Metro API fileSystemLookup is required for fast resolver');\n }\n\n try {\n fp = jestResolver(moduleName, {\n blockList,\n enablePackageExports: context.unstable_enablePackageExports,\n basedir: path.dirname(context.originModulePath),\n moduleDirectory: context.nodeModulesPaths.length\n ? (context.nodeModulesPaths as string[])\n : undefined,\n extensions,\n conditions,\n realpathSync(file: string): string {\n let metroRealPath: string | null = null;\n\n const res = fileSystemLookup(file);\n if (res?.exists) {\n metroRealPath = res.realPath;\n }\n\n if (metroRealPath == null && preserveSymlinks) {\n return realpathSync(file);\n }\n return metroRealPath ?? file;\n },\n isDirectory(file: string): boolean {\n const res = fileSystemLookup(file);\n return res.exists && res.type === 'd';\n },\n isFile(file: string): boolean {\n const res = fileSystemLookup(file);\n return res.exists && res.type === 'f';\n },\n pathExists(file: string): boolean {\n return fileSystemLookup(file).exists;\n },\n packageFilter(pkg) {\n // set the pkg.main to the first available field in context.mainFields\n for (const field of context.mainFields) {\n if (\n pkg[field] &&\n // object-inspect uses browser: {} in package.json\n typeof pkg[field] === 'string'\n ) {\n return {\n ...pkg,\n main: pkg[field],\n };\n }\n }\n return pkg;\n },\n // Used to ensure files trace to packages instead of node_modules in expo/expo. This is how Metro works and\n // the app doesn't finish without it.\n preserveSymlinks,\n readPackageSync(readFileSync, pkgFile) {\n return context.getPackage(pkgFile) ?? JSON.parse(fs.readFileSync(pkgFile, 'utf8'));\n },\n includeCoreModules: isServer,\n\n pathFilter:\n // Disable `browser` field for server environments.\n isServer\n ? undefined\n : // Enable `browser` field support\n (pkg: any, _resolvedPath: string, relativePathIn: string): string => {\n let relativePath = relativePathIn;\n if (relativePath[0] !== '.') {\n relativePath = `./${relativePath}`;\n }\n\n const replacements = pkg.browser;\n if (replacements === undefined) {\n return '';\n }\n\n // TODO: Probably use a better extension matching system here.\n // This was added for `uuid/v4` -> `./lib/rng` -> `./lib/rng-browser.js`\n const mappedPath = replacements[relativePath] ?? replacements[relativePath + '.js'];\n if (mappedPath === false) {\n throw new ShimModuleError();\n }\n return mappedPath;\n },\n });\n } catch (error: any) {\n if (error instanceof ShimModuleError) {\n return {\n type: 'empty',\n };\n }\n\n if ('code' in error && error.code === 'MODULE_NOT_FOUND') {\n if (isNodeExternal(moduleName)) {\n // In this case, mock the file to use an empty module.\n return {\n type: 'empty',\n };\n }\n\n debug({ moduleName, platform, conditions, isServer, preserveSymlinks }, context);\n\n throw new FailedToResolvePathError(\n 'The module could not be resolved because no file or module matched the pattern:\\n' +\n ` ${formatFileCandidates(\n {\n type: 'sourceFile',\n filePathPrefix: moduleName,\n candidateExts: extensions,\n },\n true\n )}\\n\\nFrom:\\n ${context.originModulePath}\\n`\n );\n }\n throw error;\n }\n\n if (context.sourceExts.some((ext) => fp.endsWith(ext))) {\n return {\n type: 'sourceFile',\n filePath: fp,\n };\n }\n\n if (isNodeExternal(fp)) {\n if (isServer) {\n return {\n type: 'sourceFile',\n filePath: fp,\n };\n }\n // NOTE: This shouldn't happen, the module should throw.\n // Mock non-server built-in modules to empty.\n return {\n type: 'empty',\n };\n }\n\n // NOTE: platform extensions may not be supported on assets.\n\n if (platform === 'web') {\n // Skip multi-resolution on web/server bundles. Only consideration here is that\n // we may still need it in case the only image is a multi-resolution image.\n return {\n type: 'assetFiles',\n filePaths: [fp],\n };\n }\n\n const dirPath = path.dirname(fp);\n const extension = path.extname(fp);\n const basename = path.basename(fp, extension);\n return {\n type: 'assetFiles',\n // Support multi-resolution asset extensions...\n filePaths: context.resolveAsset(dirPath, basename, extension) ?? [fp],\n };\n }\n\n return fastResolve;\n}\n"],"names":["FailedToResolvePathError","createFastResolver","Error","candidates","ShimModuleError","debug","require","realpathFS","process","platform","fs","realpathSync","native","x","realpathErr","code","preserveSymlinks","blockList","cachedExtensions","Map","getAdjustedExtensions","metroSourceExtensions","isNative","key","JSON","stringify","has","get","output","nextOutput","forEach","ext","push","Array","from","Set","map","set","fastResolve","context","moduleName","environment","customResolverOptions","isServer","isServerEnvironment","extensions","sourceExts","preferNativePlatform","fp","conditions","unstable_enablePackageExports","isESMImport","unstable_conditionNames","unstable_conditionsByPlatform","fileSystemLookup","unstable_fileSystemLookup","jestResolver","enablePackageExports","basedir","path","dirname","originModulePath","moduleDirectory","nodeModulesPaths","length","undefined","file","metroRealPath","res","exists","realPath","isDirectory","type","isFile","pathExists","packageFilter","pkg","field","mainFields","main","readPackageSync","readFileSync","pkgFile","getPackage","parse","includeCoreModules","pathFilter","_resolvedPath","relativePathIn","relativePath","replacements","browser","mappedPath","error","isNodeExternal","formatFileCandidates","filePathPrefix","candidateExts","some","endsWith","filePath","filePaths","dirPath","extension","extname","basename","resolveAsset"],"mappings":"AAAA;;;;;CAKC;;;;;;;;;;;IAUYA,wBAAwB;eAAxBA;;IA0BGC,kBAAkB;eAAlBA;;;;gEAnCD;;;;;;;gEAEE;;;;;;wEAEQ;2BACM;sCACM;8BACD;;;;;;AAE7B,MAAMD,iCAAiCE;;QAAvC,gBACL,uDAAuD;QACvD,4DAA4D;aAC5DC,aAAa,CAAC;;AAChB;AAEA,MAAMC,wBAAwBF;AAAO;AAErC,M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AEA,OAAOV;AACT"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/start/server/metro/createExpoMetroResolver.ts"],"sourcesContent":["/**\n * Copyright © 2023 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport fs from 'fs';\nimport { Resolution, ResolutionContext } from 'metro-resolver';\nimport path from 'path';\n\nimport jestResolver from './createJResolver';\nimport { isNodeExternal } from './externals';\nimport { formatFileCandidates } from './formatFileCandidates';\nimport { isServerEnvironment } from '../middleware/metroOptions';\n\nexport class FailedToResolvePathError extends Error {\n // Added to ensure the error is matched by our tooling.\n // TODO: Test that this matches `isFailedToResolvePathError`\n candidates = {};\n}\n\nclass ShimModuleError extends Error {}\n\nconst debug = require('debug')('expo:metro:resolve') as typeof console.log;\n\nconst realpathFS =\n process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function'\n ? fs.realpathSync.native\n : fs.realpathSync;\n\nfunction realpathSync(x: string) {\n try {\n return realpathFS(x);\n } catch (realpathErr: any) {\n if (realpathErr.code !== 'ENOENT') {\n throw realpathErr;\n }\n }\n return x;\n}\n\nexport function createFastResolver({\n preserveSymlinks,\n blockList,\n}: {\n preserveSymlinks: boolean;\n blockList: RegExp[];\n}) {\n debug('Creating with settings:', { preserveSymlinks, blockList });\n const cachedExtensions: Map<string, readonly string[]> = new Map();\n\n function getAdjustedExtensions({\n metroSourceExtensions,\n platform,\n isNative,\n }: {\n metroSourceExtensions: readonly string[];\n platform: string | null;\n isNative: boolean;\n }): readonly string[] {\n const key = JSON.stringify({ metroSourceExtensions, platform, isNative });\n if (cachedExtensions.has(key)) {\n return cachedExtensions.get(key)!;\n }\n\n let output = metroSourceExtensions;\n if (platform) {\n const nextOutput: string[] = [];\n\n output.forEach((ext) => {\n nextOutput.push(`${platform}.${ext}`);\n if (isNative) {\n nextOutput.push(`native.${ext}`);\n }\n nextOutput.push(ext);\n });\n\n output = nextOutput;\n }\n\n output = Array.from(new Set<string>(output));\n\n // resolve expects these to start with a dot.\n output = output.map((ext) => `.${ext}`);\n\n cachedExtensions.set(key, output);\n\n return output;\n }\n\n function fastResolve(\n context: Pick<\n ResolutionContext,\n | 'unstable_enablePackageExports'\n | 'customResolverOptions'\n | 'sourceExts'\n | 'preferNativePlatform'\n | 'originModulePath'\n | 'getPackage'\n | 'nodeModulesPaths'\n | 'mainFields'\n | 'resolveAsset'\n | 'unstable_conditionNames'\n | 'unstable_conditionsByPlatform'\n | 'fileSystemLookup'\n | 'isESMImport'\n >,\n moduleName: string,\n platform: string | null\n ): Resolution {\n const environment = context.customResolverOptions?.environment;\n const isServer = isServerEnvironment(environment);\n\n const extensions = getAdjustedExtensions({\n metroSourceExtensions: context.sourceExts,\n platform,\n isNative: context.preferNativePlatform,\n }) as string[];\n\n let fp: string;\n\n const conditions = context.unstable_enablePackageExports\n ? [\n ...new Set([\n 'default',\n context.isESMImport === true ? 'import' : 'require',\n ...context.unstable_conditionNames,\n ...(platform != null ? (context.unstable_conditionsByPlatform[platform] ?? []) : []),\n ]),\n ]\n : [];\n\n // NOTE(cedric): metro@0.81.0 ships with `fileSystemLookup`, while `metro@0.80.12` ships as unstable\n const fileSystemLookup = (\n 'unstable_fileSystemLookup' in context\n ? context.unstable_fileSystemLookup\n : context.fileSystemLookup\n ) as ResolutionContext['fileSystemLookup'] | undefined;\n\n if (!fileSystemLookup) {\n throw new Error('Metro API fileSystemLookup is required for fast resolver');\n }\n\n try {\n fp = jestResolver(moduleName, {\n blockList,\n enablePackageExports: context.unstable_enablePackageExports,\n basedir: path.dirname(context.originModulePath),\n paths: context.nodeModulesPaths.length ? (context.nodeModulesPaths as string[]) : undefined,\n extensions,\n conditions,\n realpathSync(file: string): string {\n let metroRealPath: string | null = null;\n\n const res = fileSystemLookup(file);\n if (res?.exists) {\n metroRealPath = res.realPath;\n }\n\n if (metroRealPath == null && preserveSymlinks) {\n return realpathSync(file);\n }\n return metroRealPath ?? file;\n },\n isDirectory(file: string): boolean {\n const res = fileSystemLookup(file);\n return res.exists && res.type === 'd';\n },\n isFile(file: string): boolean {\n const res = fileSystemLookup(file);\n return res.exists && res.type === 'f';\n },\n pathExists(file: string): boolean {\n return fileSystemLookup(file).exists;\n },\n packageFilter(pkg) {\n // set the pkg.main to the first available field in context.mainFields\n for (const field of context.mainFields) {\n if (\n pkg[field] &&\n // object-inspect uses browser: {} in package.json\n typeof pkg[field] === 'string'\n ) {\n return {\n ...pkg,\n main: pkg[field],\n };\n }\n }\n return pkg;\n },\n // Used to ensure files trace to packages instead of node_modules in expo/expo. This is how Metro works and\n // the app doesn't finish without it.\n preserveSymlinks,\n readPackageSync(readFileSync, pkgFile) {\n return context.getPackage(pkgFile) ?? JSON.parse(fs.readFileSync(pkgFile, 'utf8'));\n },\n includeCoreModules: isServer,\n\n pathFilter:\n // Disable `browser` field for server environments.\n isServer\n ? undefined\n : // Enable `browser` field support\n (pkg: any, _resolvedPath: string, relativePathIn: string): string => {\n let relativePath = relativePathIn;\n if (relativePath[0] !== '.') {\n relativePath = `./${relativePath}`;\n }\n\n const replacements = pkg.browser;\n if (replacements === undefined) {\n return '';\n }\n\n // TODO: Probably use a better extension matching system here.\n // This was added for `uuid/v4` -> `./lib/rng` -> `./lib/rng-browser.js`\n const mappedPath = replacements[relativePath] ?? replacements[relativePath + '.js'];\n if (mappedPath === false) {\n throw new ShimModuleError();\n }\n return mappedPath;\n },\n });\n } catch (error: any) {\n if (error instanceof ShimModuleError) {\n return {\n type: 'empty',\n };\n }\n\n if ('code' in error && error.code === 'MODULE_NOT_FOUND') {\n if (isNodeExternal(moduleName)) {\n // In this case, mock the file to use an empty module.\n return {\n type: 'empty',\n };\n }\n\n debug({ moduleName, platform, conditions, isServer, preserveSymlinks }, context);\n\n throw new FailedToResolvePathError(\n 'The module could not be resolved because no file or module matched the pattern:\\n' +\n ` ${formatFileCandidates(\n {\n type: 'sourceFile',\n filePathPrefix: moduleName,\n candidateExts: extensions,\n },\n true\n )}\\n\\nFrom:\\n ${context.originModulePath}\\n`\n );\n }\n throw error;\n }\n\n if (context.sourceExts.some((ext) => fp.endsWith(ext))) {\n return {\n type: 'sourceFile',\n filePath: fp,\n };\n }\n\n if (isNodeExternal(fp)) {\n if (isServer) {\n return {\n type: 'sourceFile',\n filePath: fp,\n };\n }\n // NOTE: This shouldn't happen, the module should throw.\n // Mock non-server built-in modules to empty.\n return {\n type: 'empty',\n };\n }\n\n // NOTE: platform extensions may not be supported on assets.\n\n if (platform === 'web') {\n // Skip multi-resolution on web/server bundles. Only consideration here is that\n // we may still need it in case the only image is a multi-resolution image.\n return {\n type: 'assetFiles',\n filePaths: [fp],\n };\n }\n\n const dirPath = path.dirname(fp);\n const extension = path.extname(fp);\n const basename = path.basename(fp, extension);\n return {\n type: 'assetFiles',\n // Support multi-resolution asset extensions...\n filePaths: context.resolveAsset(dirPath, basename, extension) ?? [fp],\n };\n }\n\n return fastResolve;\n}\n"],"names":["FailedToResolvePathError","createFastResolver","Error","candidates","ShimModuleError","debug","require","realpathFS","process","platform","fs","realpathSync","native","x","realpathErr","code","preserveSymlinks","blockList","cachedExtensions","Map","getAdjustedExtensions","metroSourceExtensions","isNative","key","JSON","stringify","has","get","output","nextOutput","forEach","ext","push","Array","from","Set","map","set","fastResolve","context","moduleName","environment","customResolverOptions","isServer","isServerEnvironment","extensions","sourceExts","preferNativePlatform","fp","conditions","unstable_enablePackageExports","isESMImport","unstable_conditionNames","unstable_conditionsByPlatform","fileSystemLookup","unstable_fileSystemLookup","jestResolver","enablePackageExports","basedir","path","dirname","originModulePath","paths","nodeModulesPaths","length","undefined","file","metroRealPath","res","exists","realPath","isDirectory","type","isFile","pathExists","packageFilter","pkg","field","mainFields","main","readPackageSync","readFileSync","pkgFile","getPackage","parse","includeCoreModules","pathFilter","_resolvedPath","relativePathIn","relativePath","replacements","browser","mappedPath","error","isNodeExternal","formatFileCandidates","filePathPrefix","candidateExts","some","endsWith","filePath","filePaths","dirPath","extension","extname","basename","resolveAsset"],"mappings":"AAAA;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eAAI,CAACC,OAAO,CAACZ;QAC7B,MAAMuD,YAAY5C,eAAI,CAAC6C,OAAO,CAACxD;QAC/B,MAAMyD,WAAW9C,eAAI,CAAC8C,QAAQ,CAACzD,IAAIuD;QACnC,OAAO;YACL/B,MAAM;YACN,+CAA+C;YAC/C6B,WAAW9D,QAAQmE,YAAY,CAACJ,SAASG,UAAUF,cAAc;gBAACvD;aAAG;QACvE;IACF;IAEA,OAAOV;AACT"}
|
|
@@ -208,6 +208,10 @@ function withExtendedResolver(config, { tsconfig, isTsconfigPathsEnabled, isFast
|
|
|
208
208
|
'react-native/Libraries/Image/resolveAssetSource': 'expo-asset/build/resolveAssetSource'
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
+
// The vendored canary modules live inside /static/canary-full/node_modules
|
|
212
|
+
// Adding the `index.js` allows us to add this path as `originModulePath` to
|
|
213
|
+
// resolve the nested `node_modules` folder properly.
|
|
214
|
+
const canaryModulesPath = _path().default.join(require.resolve('@expo/cli/package.json'), '../static/canary-full/index.js');
|
|
211
215
|
let _universalAliases;
|
|
212
216
|
function getUniversalAliases() {
|
|
213
217
|
if (_universalAliases) {
|
|
@@ -592,9 +596,10 @@ function withExtendedResolver(config, { tsconfig, isTsconfigPathsEnabled, isFast
|
|
|
592
596
|
// TODO: Remove this when we have React 19 in the expo/expo monorepo.
|
|
593
597
|
if (isReactCanaryEnabled && // Change the node modules path for react and react-dom to use the vendor in Expo CLI.
|
|
594
598
|
/^(react|react\/.*|react-dom|react-dom\/.*)$/.test(moduleName)) {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
599
|
+
// Modifying the origin module path changes the starting Node module resolution path to this folder
|
|
600
|
+
context.originModulePath = canaryModulesPath;
|
|
601
|
+
// Hierarchical lookup has to be enabled for this to work
|
|
602
|
+
context.disableHierarchicalLookup = false;
|
|
598
603
|
}
|
|
599
604
|
if ((0, _metroOptions.isServerEnvironment)((_context_customResolverOptions = context.customResolverOptions) == null ? void 0 : _context_customResolverOptions.environment)) {
|
|
600
605
|
var _context_customResolverOptions1, _context_customResolverOptions2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/start/server/metro/withMetroMultiPlatform.ts"],"sourcesContent":["/**\n * Copyright © 2022 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { ExpoConfig, Platform } from '@expo/config';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport Bundler from 'metro/src/Bundler';\nimport { ConfigT } from 'metro-config';\nimport { Resolution, ResolutionContext, CustomResolutionContext } from 'metro-resolver';\nimport * as metroResolver from 'metro-resolver';\nimport path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { createFallbackModuleResolver } from './createExpoFallbackResolver';\nimport { createFastResolver, FailedToResolvePathError } from './createExpoMetroResolver';\nimport { isNodeExternal, shouldCreateVirtualCanary, shouldCreateVirtualShim } from './externals';\nimport { isFailedToResolveNameError, isFailedToResolvePathError } from './metroErrors';\nimport { getMetroBundlerWithVirtualModules } from './metroVirtualModules';\nimport {\n withMetroErrorReportingResolver,\n withMetroMutatedResolverContext,\n withMetroResolvers,\n} from './withMetroResolvers';\nimport { Log } from '../../../log';\nimport { FileNotifier } from '../../../utils/FileNotifier';\nimport { env } from '../../../utils/env';\nimport { CommandError } from '../../../utils/errors';\nimport { installExitHooks } from '../../../utils/exit';\nimport { isInteractive } from '../../../utils/interactive';\nimport { loadTsConfigPathsAsync, TsConfigPaths } from '../../../utils/tsconfig/loadTsConfigPaths';\nimport { resolveWithTsConfigPaths } from '../../../utils/tsconfig/resolveWithTsConfigPaths';\nimport { isServerEnvironment } from '../middleware/metroOptions';\nimport { PlatformBundlers } from '../platformBundlers';\n\ntype Mutable<T> = { -readonly [K in keyof T]: T[K] };\n\nexport type StrictResolver = (moduleName: string) => Resolution;\nexport type StrictResolverFactory = (\n context: ResolutionContext,\n platform: string | null\n) => StrictResolver;\n\nconst ASSET_REGISTRY_SRC = `const assets=[];module.exports={registerAsset:s=>assets.push(s),getAssetByID:s=>assets[s-1]};`;\n\nconst debug = require('debug')('expo:start:server:metro:multi-platform') as typeof console.log;\n\nfunction withWebPolyfills(\n config: ConfigT,\n {\n getMetroBundler,\n }: {\n getMetroBundler: () => Bundler;\n }\n): ConfigT {\n const originalGetPolyfills = config.serializer.getPolyfills\n ? config.serializer.getPolyfills.bind(config.serializer)\n : () => [];\n\n const getPolyfills = (ctx: { platform?: string | null }): readonly string[] => {\n const virtualEnvVarId = `\\0polyfill:environment-variables`;\n\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualEnvVarId,\n (() => {\n return `//`;\n })()\n );\n\n const virtualModuleId = `\\0polyfill:external-require`;\n\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualModuleId,\n (() => {\n if (ctx.platform === 'web') {\n return `global.$$require_external = typeof require !== \"undefined\" ? require : () => null;`;\n } else {\n // Wrap in try/catch to support Android.\n return 'try { global.$$require_external = typeof expo === \"undefined\" ? require : (moduleId) => { throw new Error(`Node.js standard library module ${moduleId} is not available in this JavaScript environment`);} } catch { global.$$require_external = (moduleId) => { throw new Error(`Node.js standard library module ${moduleId} is not available in this JavaScript environment`);} }';\n }\n })()\n );\n\n if (ctx.platform === 'web') {\n return [\n virtualModuleId,\n virtualEnvVarId,\n // Ensure that the error-guard polyfill is included in the web polyfills to\n // make metro-runtime work correctly.\n // TODO: This module is pretty big for a function that simply re-throws an error that doesn't need to be caught.\n require.resolve('@react-native/js-polyfills/error-guard'),\n ];\n }\n\n // Generally uses `rn-get-polyfills`\n const polyfills = originalGetPolyfills(ctx);\n return [\n ...polyfills,\n virtualModuleId,\n virtualEnvVarId,\n // Removed on server platforms during the transform.\n require.resolve('expo/virtual/streams.js'),\n ];\n };\n\n return {\n ...config,\n serializer: {\n ...config.serializer,\n getPolyfills,\n },\n };\n}\n\nfunction normalizeSlashes(p: string) {\n return p.replace(/\\\\/g, '/');\n}\n\nexport function getNodejsExtensions(srcExts: readonly string[]): string[] {\n const mjsExts = srcExts.filter((ext) => /mjs$/.test(ext));\n const nodejsSourceExtensions = srcExts.filter((ext) => !/mjs$/.test(ext));\n // find index of last `*.js` extension\n const jsIndex = nodejsSourceExtensions.reduce((index, ext, i) => {\n return /jsx?$/.test(ext) ? i : index;\n }, -1);\n\n // insert `*.mjs` extensions after `*.js` extensions\n nodejsSourceExtensions.splice(jsIndex + 1, 0, ...mjsExts);\n\n return nodejsSourceExtensions;\n}\n\n/**\n * Apply custom resolvers to do the following:\n * - Disable `.native.js` extensions on web.\n * - Alias `react-native` to `react-native-web` on web.\n * - Redirect `react-native-web/dist/modules/AssetRegistry/index.js` to `@react-native/assets/registry.js` on web.\n * - Add support for `tsconfig.json`/`jsconfig.json` aliases via `compilerOptions.paths`.\n * - Alias react-native renderer code to a vendored React canary build on native.\n */\nexport function withExtendedResolver(\n config: ConfigT,\n {\n tsconfig,\n isTsconfigPathsEnabled,\n isFastResolverEnabled,\n isExporting,\n isReactCanaryEnabled,\n isReactServerComponentsEnabled,\n getMetroBundler,\n }: {\n tsconfig: TsConfigPaths | null;\n isTsconfigPathsEnabled?: boolean;\n isFastResolverEnabled?: boolean;\n isExporting?: boolean;\n isReactCanaryEnabled?: boolean;\n isReactServerComponentsEnabled?: boolean;\n getMetroBundler: () => Bundler;\n }\n) {\n if (isReactServerComponentsEnabled) {\n Log.warn(`React Server Components (beta) is enabled.`);\n }\n if (isReactCanaryEnabled) {\n Log.warn(`Experimental React 19 canary is enabled.`);\n }\n if (isFastResolverEnabled) {\n Log.log(chalk.dim`Fast resolver is enabled.`);\n }\n\n const defaultResolver = metroResolver.resolve;\n const resolver = isFastResolverEnabled\n ? createFastResolver({\n preserveSymlinks: true,\n blockList: !config.resolver?.blockList\n ? []\n : Array.isArray(config.resolver?.blockList)\n ? config.resolver?.blockList\n : [config.resolver?.blockList],\n })\n : defaultResolver;\n\n const aliases: { [key: string]: Record<string, string> } = {\n web: {\n 'react-native': 'react-native-web',\n 'react-native/index': 'react-native-web',\n 'react-native/Libraries/Image/resolveAssetSource': 'expo-asset/build/resolveAssetSource',\n },\n };\n\n let _universalAliases: [RegExp, string][] | null;\n\n function getUniversalAliases() {\n if (_universalAliases) {\n return _universalAliases;\n }\n\n _universalAliases = [];\n\n // This package is currently always installed as it is included in the `expo` package.\n if (resolveFrom.silent(config.projectRoot, '@expo/vector-icons')) {\n debug('Enabling alias: react-native-vector-icons -> @expo/vector-icons');\n _universalAliases.push([/^react-native-vector-icons(\\/.*)?/, '@expo/vector-icons$1']);\n }\n if (isReactServerComponentsEnabled) {\n if (resolveFrom.silent(config.projectRoot, 'expo-router/rsc')) {\n debug('Enabling bridge alias: expo-router -> expo-router/rsc');\n _universalAliases.push([/^expo-router$/, 'expo-router/rsc']);\n // Bridge the internal entry point which is a standalone import to ensure package.json resolution works as expected.\n _universalAliases.push([/^expo-router\\/entry-classic$/, 'expo-router/rsc/entry']);\n }\n }\n return _universalAliases;\n }\n\n const preferredMainFields: { [key: string]: string[] } = {\n // Defaults from Expo Webpack. Most packages using `react-native` don't support web\n // in the `react-native` field, so we should prefer the `browser` field.\n // https://github.com/expo/router/issues/37\n web: ['browser', 'module', 'main'],\n };\n\n let tsConfigResolve =\n isTsconfigPathsEnabled && (tsconfig?.paths || tsconfig?.baseUrl != null)\n ? resolveWithTsConfigPaths.bind(resolveWithTsConfigPaths, {\n paths: tsconfig.paths ?? {},\n baseUrl: tsconfig.baseUrl ?? config.projectRoot,\n hasBaseUrl: !!tsconfig.baseUrl,\n })\n : null;\n\n // TODO: Move this to be a transform key for invalidation.\n if (!isExporting && isInteractive()) {\n if (isTsconfigPathsEnabled) {\n // TODO: We should track all the files that used imports and invalidate them\n // currently the user will need to save all the files that use imports to\n // use the new aliases.\n const configWatcher = new FileNotifier(config.projectRoot, [\n './tsconfig.json',\n './jsconfig.json',\n ]);\n configWatcher.startObserving(() => {\n debug('Reloading tsconfig.json');\n loadTsConfigPathsAsync(config.projectRoot).then((tsConfigPaths) => {\n if (tsConfigPaths?.paths && !!Object.keys(tsConfigPaths.paths).length) {\n debug('Enabling tsconfig.json paths support');\n tsConfigResolve = resolveWithTsConfigPaths.bind(resolveWithTsConfigPaths, {\n paths: tsConfigPaths.paths ?? {},\n baseUrl: tsConfigPaths.baseUrl ?? config.projectRoot,\n hasBaseUrl: !!tsConfigPaths.baseUrl,\n });\n } else {\n debug('Disabling tsconfig.json paths support');\n tsConfigResolve = null;\n }\n });\n });\n\n // TODO: This probably prevents the process from exiting.\n installExitHooks(() => {\n configWatcher.stopObserving();\n });\n } else {\n debug('Skipping tsconfig.json paths support');\n }\n }\n\n let nodejsSourceExtensions: string[] | null = null;\n\n const getStrictResolver: StrictResolverFactory = (\n { resolveRequest, ...context },\n platform\n ): StrictResolver => {\n return function doResolve(moduleName: string): Resolution {\n return resolver(context, moduleName, platform);\n };\n };\n\n function getOptionalResolver(context: ResolutionContext, platform: string | null) {\n const doResolve = getStrictResolver(context, platform);\n return function optionalResolve(moduleName: string): Resolution | null {\n try {\n return doResolve(moduleName);\n } catch (error) {\n // If the error is directly related to a resolver not being able to resolve a module, then\n // we can ignore the error and try the next resolver. Otherwise, we should throw the error.\n const isResolutionError =\n isFailedToResolveNameError(error) || isFailedToResolvePathError(error);\n if (!isResolutionError) {\n throw error;\n }\n }\n return null;\n };\n }\n\n // TODO: This is a hack to get resolveWeak working.\n const idFactory = (config.serializer?.createModuleIdFactory?.() ??\n ((id: number | string, context: { platform: string; environment?: string }): number | string =>\n id)) as (\n id: number | string,\n context: { platform: string; environment?: string }\n ) => number | string;\n\n const getAssetRegistryModule = () => {\n const virtualModuleId = `\\0polyfill:assets-registry`;\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualModuleId,\n ASSET_REGISTRY_SRC\n );\n return {\n type: 'sourceFile',\n filePath: virtualModuleId,\n } as const;\n };\n\n // If Node.js pass-through, then remap to a module like `module.exports = $$require_external(<module>)`.\n // If module should be shimmed, remap to an empty module.\n const externals: {\n match: (context: ResolutionContext, moduleName: string, platform: string | null) => boolean;\n replace: 'empty' | 'node' | 'weak';\n }[] = [\n {\n match: (context: ResolutionContext, moduleName: string) => {\n if (\n // Disable internal externals when exporting for production.\n context.customResolverOptions.exporting ||\n // These externals are only for Node.js environments.\n !isServerEnvironment(context.customResolverOptions?.environment)\n ) {\n return false;\n }\n\n if (context.customResolverOptions?.environment === 'react-server') {\n // Ensure these non-react-server modules are excluded when bundling for React Server Components in development.\n return /^(source-map-support(\\/.*)?|@babel\\/runtime\\/.+|debug|metro-runtime\\/src\\/modules\\/HMRClient|metro|acorn-loose|acorn|chalk|ws|ansi-styles|supports-color|color-convert|has-flag|utf-8-validate|color-name|react-refresh\\/runtime|@remix-run\\/node\\/.+)$/.test(\n moduleName\n );\n }\n\n // TODO: Windows doesn't support externals somehow.\n if (process.platform === 'win32') {\n return /^(source-map-support(\\/.*)?)$/.test(moduleName);\n }\n\n // Extern these modules in standard Node.js environments in development to prevent API routes side-effects\n // from leaking into the dev server process.\n return /^(source-map-support(\\/.*)?|react|@radix-ui\\/.+|@babel\\/runtime\\/.+|react-dom(\\/.+)?|debug|acorn-loose|acorn|css-in-js-utils\\/lib\\/.+|hyphenate-style-name|color|color-string|color-convert|color-name|fontfaceobserver|fast-deep-equal|query-string|escape-string-regexp|invariant|postcss-value-parser|memoize-one|nullthrows|strict-uri-encode|decode-uri-component|split-on-first|filter-obj|warn-once|simple-swizzle|is-arrayish|inline-style-prefixer\\/.+)$/.test(\n moduleName\n );\n },\n replace: 'node',\n },\n // Externals to speed up async split chunks by extern-ing common packages that appear in the root client chunk.\n {\n match: (context: ResolutionContext, moduleName: string, platform: string | null) => {\n if (\n // Disable internal externals when exporting for production.\n context.customResolverOptions.exporting ||\n // These externals are only for client environments.\n isServerEnvironment(context.customResolverOptions?.environment) ||\n // Only enable for client boundaries\n !context.customResolverOptions.clientboundary\n ) {\n return false;\n }\n\n // We don't support this in the resolver at the moment.\n if (moduleName.endsWith('/package.json')) {\n return false;\n }\n\n const isExternal = // Extern these modules in standard Node.js environments.\n /^(deprecated-react-native-prop-types|react|react\\/jsx-dev-runtime|scheduler|react-native|react-dom(\\/.+)?|metro-runtime(\\/.+)?)$/.test(\n moduleName\n ) ||\n // TODO: Add more\n /^@babel\\/runtime\\/helpers\\/(wrapNativeSuper)$/.test(moduleName);\n\n return isExternal;\n },\n replace: 'weak',\n },\n ];\n\n const metroConfigWithCustomResolver = withMetroResolvers(config, [\n // Mock out production react imports in development.\n function requestDevMockProdReact(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n // This resolution is dev-only to prevent bundling the production React packages in development.\n if (!context.dev) return null;\n\n if (\n // Match react-native renderers.\n (platform !== 'web' &&\n context.originModulePath.match(/[\\\\/]node_modules[\\\\/]react-native[\\\\/]/) &&\n moduleName.match(/([\\\\/]ReactFabric|ReactNativeRenderer)-prod/)) ||\n // Match react production imports.\n (moduleName.match(/\\.production(\\.min)?\\.js$/) &&\n // Match if the import originated from a react package.\n context.originModulePath.match(/[\\\\/]node_modules[\\\\/](react[-\\\\/]|scheduler[\\\\/])/))\n ) {\n debug(`Skipping production module: ${moduleName}`);\n // /Users/path/to/expo/node_modules/react/index.js ./cjs/react.production.min.js\n // /Users/path/to/expo/node_modules/react/jsx-dev-runtime.js ./cjs/react-jsx-dev-runtime.production.min.js\n // /Users/path/to/expo/node_modules/react-is/index.js ./cjs/react-is.production.min.js\n // /Users/path/to/expo/node_modules/react-refresh/runtime.js ./cjs/react-refresh-runtime.production.min.js\n // /Users/path/to/expo/node_modules/react-native/node_modules/scheduler/index.native.js ./cjs/scheduler.native.production.min.js\n // /Users/path/to/expo/node_modules/react-native/node_modules/react-is/index.js ./cjs/react-is.production.min.js\n return {\n type: 'empty',\n };\n }\n return null;\n },\n // tsconfig paths\n function requestTsconfigPaths(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n return (\n tsConfigResolve?.(\n {\n originModulePath: context.originModulePath,\n moduleName,\n },\n getOptionalResolver(context, platform)\n ) ?? null\n );\n },\n\n // Node.js externals support\n function requestNodeExternals(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n const isServer =\n context.customResolverOptions?.environment === 'node' ||\n context.customResolverOptions?.environment === 'react-server';\n\n const moduleId = isNodeExternal(moduleName);\n if (!moduleId) {\n return null;\n }\n\n if (\n // In browser runtimes, we want to either resolve a local node module by the same name, or shim the module to\n // prevent crashing when Node.js built-ins are imported.\n !isServer\n ) {\n // Perform optional resolve first. If the module doesn't exist (no module in the node_modules)\n // then we can mock the file to use an empty module.\n const result = getOptionalResolver(context, platform)(moduleName);\n\n if (!result && platform !== 'web') {\n // Preserve previous behavior where native throws an error on node.js internals.\n return null;\n }\n\n return (\n result ?? {\n // In this case, mock the file to use an empty module.\n type: 'empty',\n }\n );\n }\n const contents = `module.exports=$$require_external('node:${moduleId}');`;\n debug(`Virtualizing Node.js \"${moduleId}\"`);\n const virtualModuleId = `\\0node:${moduleId}`;\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualModuleId,\n contents\n );\n return {\n type: 'sourceFile',\n filePath: virtualModuleId,\n };\n },\n\n // Custom externals support\n function requestCustomExternals(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n // We don't support this in the resolver at the moment.\n if (moduleName.endsWith('/package.json')) {\n return null;\n }\n // Skip applying JS externals for CSS files.\n if (/\\.(s?css|sass)$/.test(context.originModulePath)) {\n return null;\n }\n\n const environment = context.customResolverOptions?.environment;\n\n const strictResolve = getStrictResolver(context, platform);\n\n for (const external of externals) {\n if (external.match(context, moduleName, platform)) {\n if (external.replace === 'empty') {\n debug(`Redirecting external \"${moduleName}\" to \"${external.replace}\"`);\n return {\n type: external.replace,\n };\n } else if (external.replace === 'weak') {\n // TODO: Make this use require.resolveWeak again. Previously this was just resolving to the same path.\n const realModule = strictResolve(moduleName);\n const realPath = realModule.type === 'sourceFile' ? realModule.filePath : moduleName;\n const opaqueId = idFactory(realPath, {\n platform: platform!,\n environment,\n });\n\n const contents =\n typeof opaqueId === 'number'\n ? `module.exports=/*${moduleName}*/__r(${opaqueId})`\n : `module.exports=/*${moduleName}*/__r(${JSON.stringify(opaqueId)})`;\n // const contents = `module.exports=/*${moduleName}*/__r(require.resolveWeak('${moduleName}'))`;\n // const generatedModuleId = fastHashMemoized(contents);\n const virtualModuleId = `\\0weak:${opaqueId}`;\n debug('Virtualizing module:', moduleName, '->', virtualModuleId);\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualModuleId,\n contents\n );\n return {\n type: 'sourceFile',\n filePath: virtualModuleId,\n };\n } else if (external.replace === 'node') {\n const contents = `module.exports=$$require_external('${moduleName}')`;\n const virtualModuleId = `\\0node:${moduleName}`;\n debug('Virtualizing Node.js (custom):', moduleName, '->', virtualModuleId);\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualModuleId,\n contents\n );\n return {\n type: 'sourceFile',\n filePath: virtualModuleId,\n };\n } else {\n throw new CommandError(\n `Invalid external alias type: \"${external.replace}\" for module \"${moduleName}\" (platform: ${platform}, originModulePath: ${context.originModulePath})`\n );\n }\n }\n }\n return null;\n },\n\n // Basic moduleId aliases\n function requestAlias(context: ResolutionContext, moduleName: string, platform: string | null) {\n // Conditionally remap `react-native` to `react-native-web` on web in\n // a way that doesn't require Babel to resolve the alias.\n if (platform && platform in aliases && aliases[platform][moduleName]) {\n const redirectedModuleName = aliases[platform][moduleName];\n return getStrictResolver(context, platform)(redirectedModuleName);\n }\n\n for (const [matcher, alias] of getUniversalAliases()) {\n const match = moduleName.match(matcher);\n if (match) {\n const aliasedModule = alias.replace(\n /\\$(\\d+)/g,\n (_, index) => match[parseInt(index, 10)] ?? ''\n );\n const doResolve = getStrictResolver(context, platform);\n debug(`Alias \"${moduleName}\" to \"${aliasedModule}\"`);\n return doResolve(aliasedModule);\n }\n }\n\n return null;\n },\n\n // Polyfill for asset registry\n function requestStableAssetRegistry(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n if (/^@react-native\\/assets-registry\\/registry(\\.js)?$/.test(moduleName)) {\n return getAssetRegistryModule();\n }\n\n if (\n platform === 'web' &&\n context.originModulePath.match(/node_modules[\\\\/]react-native-web[\\\\/]/) &&\n moduleName.includes('/modules/AssetRegistry')\n ) {\n return getAssetRegistryModule();\n }\n\n return null;\n },\n\n // TODO: Reduce these as much as possible in the future.\n // Complex post-resolution rewrites.\n function requestPostRewrites(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n const doResolve = getStrictResolver(context, platform);\n\n const result = doResolve(moduleName);\n\n if (result.type !== 'sourceFile') {\n return result;\n }\n\n if (platform === 'web') {\n if (result.filePath.includes('node_modules')) {\n // // Disallow importing confusing native modules on web\n if (moduleName.includes('react-native/Libraries/Utilities/codegenNativeCommands')) {\n throw new FailedToResolvePathError(\n `Importing native-only module \"${moduleName}\" on web from: ${context.originModulePath}`\n );\n }\n\n // Replace with static shims\n\n const normalName = normalizeSlashes(result.filePath)\n // Drop everything up until the `node_modules` folder.\n .replace(/.*node_modules\\//, '');\n\n const shimFile = shouldCreateVirtualShim(normalName);\n if (shimFile) {\n const virtualId = `\\0shim:${normalName}`;\n const bundler = getMetroBundlerWithVirtualModules(getMetroBundler());\n if (!bundler.hasVirtualModule(virtualId)) {\n bundler.setVirtualModule(virtualId, fs.readFileSync(shimFile, 'utf8'));\n }\n debug(`Redirecting module \"${result.filePath}\" to shim`);\n\n return {\n ...result,\n filePath: virtualId,\n };\n }\n }\n } else {\n const isServer =\n context.customResolverOptions?.environment === 'node' ||\n context.customResolverOptions?.environment === 'react-server';\n\n // react-native/Libraries/Core/InitializeCore\n const normal = normalizeSlashes(result.filePath);\n\n // Shim out React Native native runtime globals in server mode for native.\n if (isServer) {\n if (normal.endsWith('react-native/Libraries/Core/InitializeCore.js')) {\n debug('Shimming out InitializeCore for React Native in native SSR bundle');\n return {\n type: 'empty',\n };\n }\n }\n\n // When server components are enabled, redirect React Native's renderer to the canary build\n // this will enable the use hook and other requisite features from React 19.\n if (isReactCanaryEnabled && result.filePath.includes('node_modules')) {\n const normalName = normalizeSlashes(result.filePath)\n // Drop everything up until the `node_modules` folder.\n .replace(/.*node_modules\\//, '');\n\n const canaryFile = shouldCreateVirtualCanary(normalName);\n if (canaryFile) {\n debug(`Redirecting React Native module \"${result.filePath}\" to canary build`);\n return {\n ...result,\n filePath: canaryFile,\n };\n }\n }\n }\n\n return result;\n },\n\n // If at this point, we haven't resolved a module yet, if it's a module specifier for a known dependency\n // of either `expo` or `expo-router`, attempt to resolve it from these origin modules instead\n createFallbackModuleResolver({\n projectRoot: config.projectRoot,\n originModuleNames: ['expo', 'expo-router'],\n getStrictResolver,\n }),\n ]);\n\n // Ensure we mutate the resolution context to include the custom resolver options for server and web.\n const metroConfigWithCustomContext = withMetroMutatedResolverContext(\n metroConfigWithCustomResolver,\n (\n immutableContext: CustomResolutionContext,\n moduleName: string,\n platform: string | null\n ): CustomResolutionContext => {\n const context: Mutable<CustomResolutionContext> = {\n ...immutableContext,\n preferNativePlatform: platform !== 'web',\n };\n\n // TODO: Remove this when we have React 19 in the expo/expo monorepo.\n if (\n isReactCanaryEnabled &&\n // Change the node modules path for react and react-dom to use the vendor in Expo CLI.\n /^(react|react\\/.*|react-dom|react-dom\\/.*)$/.test(moduleName)\n ) {\n context.nodeModulesPaths = [\n path.join(require.resolve('@expo/cli/package.json'), '../static/canary-full'),\n ];\n }\n\n if (isServerEnvironment(context.customResolverOptions?.environment)) {\n // Adjust nodejs source extensions to sort mjs after js, including platform variants.\n if (nodejsSourceExtensions === null) {\n nodejsSourceExtensions = getNodejsExtensions(context.sourceExts);\n }\n context.sourceExts = nodejsSourceExtensions;\n\n context.unstable_enablePackageExports = true;\n context.unstable_conditionsByPlatform = {};\n\n const isReactServerComponents =\n context.customResolverOptions?.environment === 'react-server';\n\n if (isReactServerComponents) {\n // NOTE: Align the behavior across server and client. This is a breaking change so we'll just roll it out with React Server Components.\n // This ensures that react-server and client code both resolve `module` and `main` in the same order.\n if (platform === 'web') {\n // Node.js runtimes should only be importing main at the moment.\n // This is a temporary fix until we can support the package.json exports.\n context.mainFields = ['module', 'main'];\n } else {\n // In Node.js + native, use the standard main fields.\n context.mainFields = ['react-native', 'module', 'main'];\n }\n } else {\n if (platform === 'web') {\n // Node.js runtimes should only be importing main at the moment.\n // This is a temporary fix until we can support the package.json exports.\n context.mainFields = ['main', 'module'];\n } else {\n // In Node.js + native, use the standard main fields.\n context.mainFields = ['react-native', 'main', 'module'];\n }\n }\n\n // Enable react-server import conditions.\n if (context.customResolverOptions?.environment === 'react-server') {\n context.unstable_conditionNames = ['node', 'react-server', 'workerd'];\n } else {\n context.unstable_conditionNames = ['node'];\n }\n } else {\n // Non-server changes\n\n if (!env.EXPO_METRO_NO_MAIN_FIELD_OVERRIDE && platform && platform in preferredMainFields) {\n context.mainFields = preferredMainFields[platform];\n }\n }\n\n return context;\n }\n );\n\n return withMetroErrorReportingResolver(metroConfigWithCustomContext);\n}\n\n/** @returns `true` if the incoming resolution should be swapped. */\nexport function shouldAliasModule(\n input: {\n platform: string | null;\n result: Resolution;\n },\n alias: { platform: string; output: string }\n): boolean {\n return (\n input.platform === alias.platform &&\n input.result?.type === 'sourceFile' &&\n typeof input.result?.filePath === 'string' &&\n normalizeSlashes(input.result.filePath).endsWith(alias.output)\n );\n}\n\n/** Add support for `react-native-web` and the Web platform. */\nexport async function withMetroMultiPlatformAsync(\n projectRoot: string,\n {\n config,\n exp,\n platformBundlers,\n isTsconfigPathsEnabled,\n isFastResolverEnabled,\n isExporting,\n isReactCanaryEnabled,\n isNamedRequiresEnabled,\n isReactServerComponentsEnabled,\n getMetroBundler,\n }: {\n config: ConfigT;\n exp: ExpoConfig;\n isTsconfigPathsEnabled: boolean;\n platformBundlers: PlatformBundlers;\n isFastResolverEnabled?: boolean;\n isExporting?: boolean;\n isReactCanaryEnabled: boolean;\n isReactServerComponentsEnabled: boolean;\n isNamedRequiresEnabled: boolean;\n getMetroBundler: () => Bundler;\n }\n) {\n if (isNamedRequiresEnabled) {\n debug('Using Expo metro require runtime.');\n // Change the default metro-runtime to a custom one that supports bundle splitting.\n require('metro-config/src/defaults/defaults').moduleSystem = require.resolve(\n '@expo/cli/build/metro-require/require'\n );\n }\n\n if (!config.projectRoot) {\n // @ts-expect-error: read-only types\n config.projectRoot = projectRoot;\n }\n\n // Required for @expo/metro-runtime to format paths in the web LogBox.\n process.env.EXPO_PUBLIC_PROJECT_ROOT = process.env.EXPO_PUBLIC_PROJECT_ROOT ?? projectRoot;\n\n // This is used for running Expo CLI in development against projects outside the monorepo.\n if (!isDirectoryIn(__dirname, projectRoot)) {\n if (!config.watchFolders) {\n // @ts-expect-error: watchFolders is readonly\n config.watchFolders = [];\n }\n // @ts-expect-error: watchFolders is readonly\n config.watchFolders.push(path.join(require.resolve('metro-runtime/package.json'), '../..'));\n // @ts-expect-error: watchFolders is readonly\n config.watchFolders.push(\n path.join(require.resolve('@expo/metro-config/package.json'), '../..'),\n // For virtual modules\n path.join(require.resolve('expo/package.json'), '..')\n );\n if (isReactCanaryEnabled) {\n // @ts-expect-error: watchFolders is readonly\n config.watchFolders.push(path.join(require.resolve('@expo/cli/package.json'), '..'));\n }\n }\n\n // TODO: Remove this\n // @ts-expect-error: Invalidate the cache when the location of expo-router changes on-disk.\n config.transformer._expoRouterPath = resolveFrom.silent(projectRoot, 'expo-router');\n\n let tsconfig: null | TsConfigPaths = null;\n\n if (isTsconfigPathsEnabled) {\n tsconfig = await loadTsConfigPathsAsync(projectRoot);\n }\n\n let expoConfigPlatforms = Object.entries(platformBundlers)\n .filter(\n ([platform, bundler]) => bundler === 'metro' && exp.platforms?.includes(platform as Platform)\n )\n .map(([platform]) => platform);\n\n if (Array.isArray(config.resolver.platforms)) {\n expoConfigPlatforms = [...new Set(expoConfigPlatforms.concat(config.resolver.platforms))];\n }\n\n // @ts-expect-error: typed as `readonly`.\n config.resolver.platforms = expoConfigPlatforms;\n\n config = withWebPolyfills(config, { getMetroBundler });\n\n return withExtendedResolver(config, {\n tsconfig,\n isExporting,\n isTsconfigPathsEnabled,\n isFastResolverEnabled,\n isReactCanaryEnabled,\n isReactServerComponentsEnabled,\n getMetroBundler,\n });\n}\n\nfunction isDirectoryIn(targetPath: string, rootPath: string) {\n return targetPath.startsWith(rootPath) && targetPath.length >= rootPath.length;\n}\n"],"names":["getNodejsExtensions","shouldAliasModule","withExtendedResolver","withMetroMultiPlatformAsync","ASSET_REGISTRY_SRC","debug","require","withWebPolyfills","config","getMetroBundler","originalGetPolyfills","serializer","getPolyfills","bind","ctx","virtualEnvVarId","getMetroBundlerWithVirtualModules","setVirtualModule","virtualModuleId","platform","resolve","polyfills","normalizeSlashes","p","replace","srcExts","mjsExts","filter","ext","test","nodejsSourceExtensions","jsIndex","reduce","index","i","splice","tsconfig","isTsconfigPathsEnabled","isFastResolverEnabled","isExporting","isReactCanaryEnabled","isReactServerComponentsEnabled","Log","warn","log","chalk","dim","defaultResolver","metroResolver","resolver","createFastResolver","preserveSymlinks","blockList","Array","isArray","aliases","web","_universalAliases","getUniversalAliases","resolveFrom","silent","projectRoot","push","preferredMainFields","tsConfigResolve","paths","baseUrl","resolveWithTsConfigPaths","hasBaseUrl","isInteractive","configWatcher","FileNotifier","startObserving","loadTsConfigPathsAsync","then","tsConfigPaths","Object","keys","length","installExitHooks","stopObserving","getStrictResolver","resolveRequest","context","doResolve","moduleName","getOptionalResolver","optionalResolve","error","isResolutionError","isFailedToResolveNameError","isFailedToResolvePathError","idFactory","createModuleIdFactory","id","getAssetRegistryModule","type","filePath","externals","match","customResolverOptions","exporting","isServerEnvironment","environment","process","clientboundary","endsWith","isExternal","metroConfigWithCustomResolver","withMetroResolvers","requestDevMockProdReact","dev","originModulePath","requestTsconfigPaths","requestNodeExternals","isServer","moduleId","isNodeExternal","result","contents","requestCustomExternals","strictResolve","external","realModule","realPath","opaqueId","JSON","stringify","CommandError","requestAlias","redirectedModuleName","matcher","alias","aliasedModule","_","parseInt","requestStableAssetRegistry","includes","requestPostRewrites","FailedToResolvePathError","normalName","shimFile","shouldCreateVirtualShim","virtualId","bundler","hasVirtualModule","fs","readFileSync","normal","canaryFile","shouldCreateVirtualCanary","createFallbackModuleResolver","originModuleNames","metroConfigWithCustomContext","withMetroMutatedResolverContext","immutableContext","preferNativePlatform","nodeModulesPaths","path","join","sourceExts","unstable_enablePackageExports","unstable_conditionsByPlatform","isReactServerComponents","mainFields","unstable_conditionNames","env","EXPO_METRO_NO_MAIN_FIELD_OVERRIDE","withMetroErrorReportingResolver","input","output","exp","platformBundlers","isNamedRequiresEnabled","moduleSystem","EXPO_PUBLIC_PROJECT_ROOT","isDirectoryIn","__dirname","watchFolders","transformer","_expoRouterPath","expoConfigPlatforms","entries","platforms","map","Set","concat","targetPath","rootPath","startsWith"],"mappings":"AAAA;;;;;CAKC;;;;;;;;;;;IAmHeA,mBAAmB;eAAnBA;;IAmpBAC,iBAAiB;eAAjBA;;IA7nBAC,oBAAoB;eAApBA;;IA6oBMC,2BAA2B;eAA3BA;;;;gEApxBJ;;;;;;;gEACH;;;;;;;iEAIgB;;;;;;;gEACd;;;;;;;gEACO;;;;;;4CAEqB;yCACgB;2BACsB;6BACZ;qCACrB;oCAK3C;qBACa;8BACS;qBACT;wBACS;sBACI;6BACH;mCACwB;0CACb;8BACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWpC,MAAMC,qBAAqB,CAAC,6FAA6F,CAAC;AAE1H,MAAMC,QAAQC,QAAQ,SAAS;AAE/B,SAASC,iBACPC,MAAe,EACf,EACEC,eAAe,EAGhB;IAED,MAAMC,uBAAuBF,OAAOG,UAAU,CAACC,YAAY,GACvDJ,OAAOG,UAAU,CAACC,YAAY,CAACC,IAAI,CAACL,OAAOG,UAAU,IACrD,IAAM,EAAE;IAEZ,MAAMC,eAAe,CAACE;QACpB,MAAMC,kBAAkB,CAAC,gCAAgC,CAAC;QAE1DC,IAAAA,s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,GAAG,CAAC,CAAC,CAACrK,SAAS,GAAKA;IAEvB,IAAIkC,MAAMC,OAAO,CAAC9C,OAAOyC,QAAQ,CAACsI,SAAS,GAAG;QAC5CF,sBAAsB;eAAI,IAAII,IAAIJ,oBAAoBK,MAAM,CAAClL,OAAOyC,QAAQ,CAACsI,SAAS;SAAG;IAC3F;IAEA,yCAAyC;IACzC/K,OAAOyC,QAAQ,CAACsI,SAAS,GAAGF;IAE5B7K,SAASD,iBAAiBC,QAAQ;QAAEC;IAAgB;IAEpD,OAAOP,qBAAqBM,QAAQ;QAClC4B;QACAG;QACAF;QACAC;QACAE;QACAC;QACAhC;IACF;AACF;AAEA,SAASuK,cAAcW,UAAkB,EAAEC,QAAgB;IACzD,OAAOD,WAAWE,UAAU,CAACD,aAAaD,WAAW7G,MAAM,IAAI8G,SAAS9G,MAAM;AAChF"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/start/server/metro/withMetroMultiPlatform.ts"],"sourcesContent":["/**\n * Copyright © 2022 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { ExpoConfig, Platform } from '@expo/config';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport Bundler from 'metro/src/Bundler';\nimport { ConfigT } from 'metro-config';\nimport { Resolution, ResolutionContext, CustomResolutionContext } from 'metro-resolver';\nimport * as metroResolver from 'metro-resolver';\nimport path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { createFallbackModuleResolver } from './createExpoFallbackResolver';\nimport { createFastResolver, FailedToResolvePathError } from './createExpoMetroResolver';\nimport { isNodeExternal, shouldCreateVirtualCanary, shouldCreateVirtualShim } from './externals';\nimport { isFailedToResolveNameError, isFailedToResolvePathError } from './metroErrors';\nimport { getMetroBundlerWithVirtualModules } from './metroVirtualModules';\nimport {\n withMetroErrorReportingResolver,\n withMetroMutatedResolverContext,\n withMetroResolvers,\n} from './withMetroResolvers';\nimport { Log } from '../../../log';\nimport { FileNotifier } from '../../../utils/FileNotifier';\nimport { env } from '../../../utils/env';\nimport { CommandError } from '../../../utils/errors';\nimport { installExitHooks } from '../../../utils/exit';\nimport { isInteractive } from '../../../utils/interactive';\nimport { loadTsConfigPathsAsync, TsConfigPaths } from '../../../utils/tsconfig/loadTsConfigPaths';\nimport { resolveWithTsConfigPaths } from '../../../utils/tsconfig/resolveWithTsConfigPaths';\nimport { isServerEnvironment } from '../middleware/metroOptions';\nimport { PlatformBundlers } from '../platformBundlers';\n\ntype Mutable<T> = { -readonly [K in keyof T]: T[K] };\n\nexport type StrictResolver = (moduleName: string) => Resolution;\nexport type StrictResolverFactory = (\n context: ResolutionContext,\n platform: string | null\n) => StrictResolver;\n\nconst ASSET_REGISTRY_SRC = `const assets=[];module.exports={registerAsset:s=>assets.push(s),getAssetByID:s=>assets[s-1]};`;\n\nconst debug = require('debug')('expo:start:server:metro:multi-platform') as typeof console.log;\n\nfunction withWebPolyfills(\n config: ConfigT,\n {\n getMetroBundler,\n }: {\n getMetroBundler: () => Bundler;\n }\n): ConfigT {\n const originalGetPolyfills = config.serializer.getPolyfills\n ? config.serializer.getPolyfills.bind(config.serializer)\n : () => [];\n\n const getPolyfills = (ctx: { platform?: string | null }): readonly string[] => {\n const virtualEnvVarId = `\\0polyfill:environment-variables`;\n\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualEnvVarId,\n (() => {\n return `//`;\n })()\n );\n\n const virtualModuleId = `\\0polyfill:external-require`;\n\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualModuleId,\n (() => {\n if (ctx.platform === 'web') {\n return `global.$$require_external = typeof require !== \"undefined\" ? require : () => null;`;\n } else {\n // Wrap in try/catch to support Android.\n return 'try { global.$$require_external = typeof expo === \"undefined\" ? require : (moduleId) => { throw new Error(`Node.js standard library module ${moduleId} is not available in this JavaScript environment`);} } catch { global.$$require_external = (moduleId) => { throw new Error(`Node.js standard library module ${moduleId} is not available in this JavaScript environment`);} }';\n }\n })()\n );\n\n if (ctx.platform === 'web') {\n return [\n virtualModuleId,\n virtualEnvVarId,\n // Ensure that the error-guard polyfill is included in the web polyfills to\n // make metro-runtime work correctly.\n // TODO: This module is pretty big for a function that simply re-throws an error that doesn't need to be caught.\n require.resolve('@react-native/js-polyfills/error-guard'),\n ];\n }\n\n // Generally uses `rn-get-polyfills`\n const polyfills = originalGetPolyfills(ctx);\n return [\n ...polyfills,\n virtualModuleId,\n virtualEnvVarId,\n // Removed on server platforms during the transform.\n require.resolve('expo/virtual/streams.js'),\n ];\n };\n\n return {\n ...config,\n serializer: {\n ...config.serializer,\n getPolyfills,\n },\n };\n}\n\nfunction normalizeSlashes(p: string) {\n return p.replace(/\\\\/g, '/');\n}\n\nexport function getNodejsExtensions(srcExts: readonly string[]): string[] {\n const mjsExts = srcExts.filter((ext) => /mjs$/.test(ext));\n const nodejsSourceExtensions = srcExts.filter((ext) => !/mjs$/.test(ext));\n // find index of last `*.js` extension\n const jsIndex = nodejsSourceExtensions.reduce((index, ext, i) => {\n return /jsx?$/.test(ext) ? i : index;\n }, -1);\n\n // insert `*.mjs` extensions after `*.js` extensions\n nodejsSourceExtensions.splice(jsIndex + 1, 0, ...mjsExts);\n\n return nodejsSourceExtensions;\n}\n\n/**\n * Apply custom resolvers to do the following:\n * - Disable `.native.js` extensions on web.\n * - Alias `react-native` to `react-native-web` on web.\n * - Redirect `react-native-web/dist/modules/AssetRegistry/index.js` to `@react-native/assets/registry.js` on web.\n * - Add support for `tsconfig.json`/`jsconfig.json` aliases via `compilerOptions.paths`.\n * - Alias react-native renderer code to a vendored React canary build on native.\n */\nexport function withExtendedResolver(\n config: ConfigT,\n {\n tsconfig,\n isTsconfigPathsEnabled,\n isFastResolverEnabled,\n isExporting,\n isReactCanaryEnabled,\n isReactServerComponentsEnabled,\n getMetroBundler,\n }: {\n tsconfig: TsConfigPaths | null;\n isTsconfigPathsEnabled?: boolean;\n isFastResolverEnabled?: boolean;\n isExporting?: boolean;\n isReactCanaryEnabled?: boolean;\n isReactServerComponentsEnabled?: boolean;\n getMetroBundler: () => Bundler;\n }\n) {\n if (isReactServerComponentsEnabled) {\n Log.warn(`React Server Components (beta) is enabled.`);\n }\n if (isReactCanaryEnabled) {\n Log.warn(`Experimental React 19 canary is enabled.`);\n }\n if (isFastResolverEnabled) {\n Log.log(chalk.dim`Fast resolver is enabled.`);\n }\n\n const defaultResolver = metroResolver.resolve;\n const resolver = isFastResolverEnabled\n ? createFastResolver({\n preserveSymlinks: true,\n blockList: !config.resolver?.blockList\n ? []\n : Array.isArray(config.resolver?.blockList)\n ? config.resolver?.blockList\n : [config.resolver?.blockList],\n })\n : defaultResolver;\n\n const aliases: { [key: string]: Record<string, string> } = {\n web: {\n 'react-native': 'react-native-web',\n 'react-native/index': 'react-native-web',\n 'react-native/Libraries/Image/resolveAssetSource': 'expo-asset/build/resolveAssetSource',\n },\n };\n\n // The vendored canary modules live inside /static/canary-full/node_modules\n // Adding the `index.js` allows us to add this path as `originModulePath` to\n // resolve the nested `node_modules` folder properly.\n const canaryModulesPath = path.join(\n require.resolve('@expo/cli/package.json'),\n '../static/canary-full/index.js'\n );\n\n let _universalAliases: [RegExp, string][] | null;\n\n function getUniversalAliases() {\n if (_universalAliases) {\n return _universalAliases;\n }\n\n _universalAliases = [];\n\n // This package is currently always installed as it is included in the `expo` package.\n if (resolveFrom.silent(config.projectRoot, '@expo/vector-icons')) {\n debug('Enabling alias: react-native-vector-icons -> @expo/vector-icons');\n _universalAliases.push([/^react-native-vector-icons(\\/.*)?/, '@expo/vector-icons$1']);\n }\n if (isReactServerComponentsEnabled) {\n if (resolveFrom.silent(config.projectRoot, 'expo-router/rsc')) {\n debug('Enabling bridge alias: expo-router -> expo-router/rsc');\n _universalAliases.push([/^expo-router$/, 'expo-router/rsc']);\n // Bridge the internal entry point which is a standalone import to ensure package.json resolution works as expected.\n _universalAliases.push([/^expo-router\\/entry-classic$/, 'expo-router/rsc/entry']);\n }\n }\n return _universalAliases;\n }\n\n const preferredMainFields: { [key: string]: string[] } = {\n // Defaults from Expo Webpack. Most packages using `react-native` don't support web\n // in the `react-native` field, so we should prefer the `browser` field.\n // https://github.com/expo/router/issues/37\n web: ['browser', 'module', 'main'],\n };\n\n let tsConfigResolve =\n isTsconfigPathsEnabled && (tsconfig?.paths || tsconfig?.baseUrl != null)\n ? resolveWithTsConfigPaths.bind(resolveWithTsConfigPaths, {\n paths: tsconfig.paths ?? {},\n baseUrl: tsconfig.baseUrl ?? config.projectRoot,\n hasBaseUrl: !!tsconfig.baseUrl,\n })\n : null;\n\n // TODO: Move this to be a transform key for invalidation.\n if (!isExporting && isInteractive()) {\n if (isTsconfigPathsEnabled) {\n // TODO: We should track all the files that used imports and invalidate them\n // currently the user will need to save all the files that use imports to\n // use the new aliases.\n const configWatcher = new FileNotifier(config.projectRoot, [\n './tsconfig.json',\n './jsconfig.json',\n ]);\n configWatcher.startObserving(() => {\n debug('Reloading tsconfig.json');\n loadTsConfigPathsAsync(config.projectRoot).then((tsConfigPaths) => {\n if (tsConfigPaths?.paths && !!Object.keys(tsConfigPaths.paths).length) {\n debug('Enabling tsconfig.json paths support');\n tsConfigResolve = resolveWithTsConfigPaths.bind(resolveWithTsConfigPaths, {\n paths: tsConfigPaths.paths ?? {},\n baseUrl: tsConfigPaths.baseUrl ?? config.projectRoot,\n hasBaseUrl: !!tsConfigPaths.baseUrl,\n });\n } else {\n debug('Disabling tsconfig.json paths support');\n tsConfigResolve = null;\n }\n });\n });\n\n // TODO: This probably prevents the process from exiting.\n installExitHooks(() => {\n configWatcher.stopObserving();\n });\n } else {\n debug('Skipping tsconfig.json paths support');\n }\n }\n\n let nodejsSourceExtensions: string[] | null = null;\n\n const getStrictResolver: StrictResolverFactory = (\n { resolveRequest, ...context },\n platform\n ): StrictResolver => {\n return function doResolve(moduleName: string): Resolution {\n return resolver(context, moduleName, platform);\n };\n };\n\n function getOptionalResolver(context: ResolutionContext, platform: string | null) {\n const doResolve = getStrictResolver(context, platform);\n return function optionalResolve(moduleName: string): Resolution | null {\n try {\n return doResolve(moduleName);\n } catch (error) {\n // If the error is directly related to a resolver not being able to resolve a module, then\n // we can ignore the error and try the next resolver. Otherwise, we should throw the error.\n const isResolutionError =\n isFailedToResolveNameError(error) || isFailedToResolvePathError(error);\n if (!isResolutionError) {\n throw error;\n }\n }\n return null;\n };\n }\n\n // TODO: This is a hack to get resolveWeak working.\n const idFactory = (config.serializer?.createModuleIdFactory?.() ??\n ((id: number | string, context: { platform: string; environment?: string }): number | string =>\n id)) as (\n id: number | string,\n context: { platform: string; environment?: string }\n ) => number | string;\n\n const getAssetRegistryModule = () => {\n const virtualModuleId = `\\0polyfill:assets-registry`;\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualModuleId,\n ASSET_REGISTRY_SRC\n );\n return {\n type: 'sourceFile',\n filePath: virtualModuleId,\n } as const;\n };\n\n // If Node.js pass-through, then remap to a module like `module.exports = $$require_external(<module>)`.\n // If module should be shimmed, remap to an empty module.\n const externals: {\n match: (context: ResolutionContext, moduleName: string, platform: string | null) => boolean;\n replace: 'empty' | 'node' | 'weak';\n }[] = [\n {\n match: (context: ResolutionContext, moduleName: string) => {\n if (\n // Disable internal externals when exporting for production.\n context.customResolverOptions.exporting ||\n // These externals are only for Node.js environments.\n !isServerEnvironment(context.customResolverOptions?.environment)\n ) {\n return false;\n }\n\n if (context.customResolverOptions?.environment === 'react-server') {\n // Ensure these non-react-server modules are excluded when bundling for React Server Components in development.\n return /^(source-map-support(\\/.*)?|@babel\\/runtime\\/.+|debug|metro-runtime\\/src\\/modules\\/HMRClient|metro|acorn-loose|acorn|chalk|ws|ansi-styles|supports-color|color-convert|has-flag|utf-8-validate|color-name|react-refresh\\/runtime|@remix-run\\/node\\/.+)$/.test(\n moduleName\n );\n }\n\n // TODO: Windows doesn't support externals somehow.\n if (process.platform === 'win32') {\n return /^(source-map-support(\\/.*)?)$/.test(moduleName);\n }\n\n // Extern these modules in standard Node.js environments in development to prevent API routes side-effects\n // from leaking into the dev server process.\n return /^(source-map-support(\\/.*)?|react|@radix-ui\\/.+|@babel\\/runtime\\/.+|react-dom(\\/.+)?|debug|acorn-loose|acorn|css-in-js-utils\\/lib\\/.+|hyphenate-style-name|color|color-string|color-convert|color-name|fontfaceobserver|fast-deep-equal|query-string|escape-string-regexp|invariant|postcss-value-parser|memoize-one|nullthrows|strict-uri-encode|decode-uri-component|split-on-first|filter-obj|warn-once|simple-swizzle|is-arrayish|inline-style-prefixer\\/.+)$/.test(\n moduleName\n );\n },\n replace: 'node',\n },\n // Externals to speed up async split chunks by extern-ing common packages that appear in the root client chunk.\n {\n match: (context: ResolutionContext, moduleName: string, platform: string | null) => {\n if (\n // Disable internal externals when exporting for production.\n context.customResolverOptions.exporting ||\n // These externals are only for client environments.\n isServerEnvironment(context.customResolverOptions?.environment) ||\n // Only enable for client boundaries\n !context.customResolverOptions.clientboundary\n ) {\n return false;\n }\n\n // We don't support this in the resolver at the moment.\n if (moduleName.endsWith('/package.json')) {\n return false;\n }\n\n const isExternal = // Extern these modules in standard Node.js environments.\n /^(deprecated-react-native-prop-types|react|react\\/jsx-dev-runtime|scheduler|react-native|react-dom(\\/.+)?|metro-runtime(\\/.+)?)$/.test(\n moduleName\n ) ||\n // TODO: Add more\n /^@babel\\/runtime\\/helpers\\/(wrapNativeSuper)$/.test(moduleName);\n\n return isExternal;\n },\n replace: 'weak',\n },\n ];\n\n const metroConfigWithCustomResolver = withMetroResolvers(config, [\n // Mock out production react imports in development.\n function requestDevMockProdReact(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n // This resolution is dev-only to prevent bundling the production React packages in development.\n if (!context.dev) return null;\n\n if (\n // Match react-native renderers.\n (platform !== 'web' &&\n context.originModulePath.match(/[\\\\/]node_modules[\\\\/]react-native[\\\\/]/) &&\n moduleName.match(/([\\\\/]ReactFabric|ReactNativeRenderer)-prod/)) ||\n // Match react production imports.\n (moduleName.match(/\\.production(\\.min)?\\.js$/) &&\n // Match if the import originated from a react package.\n context.originModulePath.match(/[\\\\/]node_modules[\\\\/](react[-\\\\/]|scheduler[\\\\/])/))\n ) {\n debug(`Skipping production module: ${moduleName}`);\n // /Users/path/to/expo/node_modules/react/index.js ./cjs/react.production.min.js\n // /Users/path/to/expo/node_modules/react/jsx-dev-runtime.js ./cjs/react-jsx-dev-runtime.production.min.js\n // /Users/path/to/expo/node_modules/react-is/index.js ./cjs/react-is.production.min.js\n // /Users/path/to/expo/node_modules/react-refresh/runtime.js ./cjs/react-refresh-runtime.production.min.js\n // /Users/path/to/expo/node_modules/react-native/node_modules/scheduler/index.native.js ./cjs/scheduler.native.production.min.js\n // /Users/path/to/expo/node_modules/react-native/node_modules/react-is/index.js ./cjs/react-is.production.min.js\n return {\n type: 'empty',\n };\n }\n return null;\n },\n // tsconfig paths\n function requestTsconfigPaths(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n return (\n tsConfigResolve?.(\n {\n originModulePath: context.originModulePath,\n moduleName,\n },\n getOptionalResolver(context, platform)\n ) ?? null\n );\n },\n\n // Node.js externals support\n function requestNodeExternals(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n const isServer =\n context.customResolverOptions?.environment === 'node' ||\n context.customResolverOptions?.environment === 'react-server';\n\n const moduleId = isNodeExternal(moduleName);\n if (!moduleId) {\n return null;\n }\n\n if (\n // In browser runtimes, we want to either resolve a local node module by the same name, or shim the module to\n // prevent crashing when Node.js built-ins are imported.\n !isServer\n ) {\n // Perform optional resolve first. If the module doesn't exist (no module in the node_modules)\n // then we can mock the file to use an empty module.\n const result = getOptionalResolver(context, platform)(moduleName);\n\n if (!result && platform !== 'web') {\n // Preserve previous behavior where native throws an error on node.js internals.\n return null;\n }\n\n return (\n result ?? {\n // In this case, mock the file to use an empty module.\n type: 'empty',\n }\n );\n }\n const contents = `module.exports=$$require_external('node:${moduleId}');`;\n debug(`Virtualizing Node.js \"${moduleId}\"`);\n const virtualModuleId = `\\0node:${moduleId}`;\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualModuleId,\n contents\n );\n return {\n type: 'sourceFile',\n filePath: virtualModuleId,\n };\n },\n\n // Custom externals support\n function requestCustomExternals(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n // We don't support this in the resolver at the moment.\n if (moduleName.endsWith('/package.json')) {\n return null;\n }\n // Skip applying JS externals for CSS files.\n if (/\\.(s?css|sass)$/.test(context.originModulePath)) {\n return null;\n }\n\n const environment = context.customResolverOptions?.environment;\n\n const strictResolve = getStrictResolver(context, platform);\n\n for (const external of externals) {\n if (external.match(context, moduleName, platform)) {\n if (external.replace === 'empty') {\n debug(`Redirecting external \"${moduleName}\" to \"${external.replace}\"`);\n return {\n type: external.replace,\n };\n } else if (external.replace === 'weak') {\n // TODO: Make this use require.resolveWeak again. Previously this was just resolving to the same path.\n const realModule = strictResolve(moduleName);\n const realPath = realModule.type === 'sourceFile' ? realModule.filePath : moduleName;\n const opaqueId = idFactory(realPath, {\n platform: platform!,\n environment,\n });\n\n const contents =\n typeof opaqueId === 'number'\n ? `module.exports=/*${moduleName}*/__r(${opaqueId})`\n : `module.exports=/*${moduleName}*/__r(${JSON.stringify(opaqueId)})`;\n // const contents = `module.exports=/*${moduleName}*/__r(require.resolveWeak('${moduleName}'))`;\n // const generatedModuleId = fastHashMemoized(contents);\n const virtualModuleId = `\\0weak:${opaqueId}`;\n debug('Virtualizing module:', moduleName, '->', virtualModuleId);\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualModuleId,\n contents\n );\n return {\n type: 'sourceFile',\n filePath: virtualModuleId,\n };\n } else if (external.replace === 'node') {\n const contents = `module.exports=$$require_external('${moduleName}')`;\n const virtualModuleId = `\\0node:${moduleName}`;\n debug('Virtualizing Node.js (custom):', moduleName, '->', virtualModuleId);\n getMetroBundlerWithVirtualModules(getMetroBundler()).setVirtualModule(\n virtualModuleId,\n contents\n );\n return {\n type: 'sourceFile',\n filePath: virtualModuleId,\n };\n } else {\n throw new CommandError(\n `Invalid external alias type: \"${external.replace}\" for module \"${moduleName}\" (platform: ${platform}, originModulePath: ${context.originModulePath})`\n );\n }\n }\n }\n return null;\n },\n\n // Basic moduleId aliases\n function requestAlias(context: ResolutionContext, moduleName: string, platform: string | null) {\n // Conditionally remap `react-native` to `react-native-web` on web in\n // a way that doesn't require Babel to resolve the alias.\n if (platform && platform in aliases && aliases[platform][moduleName]) {\n const redirectedModuleName = aliases[platform][moduleName];\n return getStrictResolver(context, platform)(redirectedModuleName);\n }\n\n for (const [matcher, alias] of getUniversalAliases()) {\n const match = moduleName.match(matcher);\n if (match) {\n const aliasedModule = alias.replace(\n /\\$(\\d+)/g,\n (_, index) => match[parseInt(index, 10)] ?? ''\n );\n const doResolve = getStrictResolver(context, platform);\n debug(`Alias \"${moduleName}\" to \"${aliasedModule}\"`);\n return doResolve(aliasedModule);\n }\n }\n\n return null;\n },\n\n // Polyfill for asset registry\n function requestStableAssetRegistry(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n if (/^@react-native\\/assets-registry\\/registry(\\.js)?$/.test(moduleName)) {\n return getAssetRegistryModule();\n }\n\n if (\n platform === 'web' &&\n context.originModulePath.match(/node_modules[\\\\/]react-native-web[\\\\/]/) &&\n moduleName.includes('/modules/AssetRegistry')\n ) {\n return getAssetRegistryModule();\n }\n\n return null;\n },\n\n // TODO: Reduce these as much as possible in the future.\n // Complex post-resolution rewrites.\n function requestPostRewrites(\n context: ResolutionContext,\n moduleName: string,\n platform: string | null\n ) {\n const doResolve = getStrictResolver(context, platform);\n\n const result = doResolve(moduleName);\n\n if (result.type !== 'sourceFile') {\n return result;\n }\n\n if (platform === 'web') {\n if (result.filePath.includes('node_modules')) {\n // // Disallow importing confusing native modules on web\n if (moduleName.includes('react-native/Libraries/Utilities/codegenNativeCommands')) {\n throw new FailedToResolvePathError(\n `Importing native-only module \"${moduleName}\" on web from: ${context.originModulePath}`\n );\n }\n\n // Replace with static shims\n\n const normalName = normalizeSlashes(result.filePath)\n // Drop everything up until the `node_modules` folder.\n .replace(/.*node_modules\\//, '');\n\n const shimFile = shouldCreateVirtualShim(normalName);\n if (shimFile) {\n const virtualId = `\\0shim:${normalName}`;\n const bundler = getMetroBundlerWithVirtualModules(getMetroBundler());\n if (!bundler.hasVirtualModule(virtualId)) {\n bundler.setVirtualModule(virtualId, fs.readFileSync(shimFile, 'utf8'));\n }\n debug(`Redirecting module \"${result.filePath}\" to shim`);\n\n return {\n ...result,\n filePath: virtualId,\n };\n }\n }\n } else {\n const isServer =\n context.customResolverOptions?.environment === 'node' ||\n context.customResolverOptions?.environment === 'react-server';\n\n // react-native/Libraries/Core/InitializeCore\n const normal = normalizeSlashes(result.filePath);\n\n // Shim out React Native native runtime globals in server mode for native.\n if (isServer) {\n if (normal.endsWith('react-native/Libraries/Core/InitializeCore.js')) {\n debug('Shimming out InitializeCore for React Native in native SSR bundle');\n return {\n type: 'empty',\n };\n }\n }\n\n // When server components are enabled, redirect React Native's renderer to the canary build\n // this will enable the use hook and other requisite features from React 19.\n if (isReactCanaryEnabled && result.filePath.includes('node_modules')) {\n const normalName = normalizeSlashes(result.filePath)\n // Drop everything up until the `node_modules` folder.\n .replace(/.*node_modules\\//, '');\n\n const canaryFile = shouldCreateVirtualCanary(normalName);\n if (canaryFile) {\n debug(`Redirecting React Native module \"${result.filePath}\" to canary build`);\n return {\n ...result,\n filePath: canaryFile,\n };\n }\n }\n }\n\n return result;\n },\n\n // If at this point, we haven't resolved a module yet, if it's a module specifier for a known dependency\n // of either `expo` or `expo-router`, attempt to resolve it from these origin modules instead\n createFallbackModuleResolver({\n projectRoot: config.projectRoot,\n originModuleNames: ['expo', 'expo-router'],\n getStrictResolver,\n }),\n ]);\n\n // Ensure we mutate the resolution context to include the custom resolver options for server and web.\n const metroConfigWithCustomContext = withMetroMutatedResolverContext(\n metroConfigWithCustomResolver,\n (\n immutableContext: CustomResolutionContext,\n moduleName: string,\n platform: string | null\n ): CustomResolutionContext => {\n const context: Mutable<CustomResolutionContext> = {\n ...immutableContext,\n preferNativePlatform: platform !== 'web',\n };\n\n // TODO: Remove this when we have React 19 in the expo/expo monorepo.\n if (\n isReactCanaryEnabled &&\n // Change the node modules path for react and react-dom to use the vendor in Expo CLI.\n /^(react|react\\/.*|react-dom|react-dom\\/.*)$/.test(moduleName)\n ) {\n // Modifying the origin module path changes the starting Node module resolution path to this folder\n context.originModulePath = canaryModulesPath;\n // Hierarchical lookup has to be enabled for this to work\n context.disableHierarchicalLookup = false;\n }\n\n if (isServerEnvironment(context.customResolverOptions?.environment)) {\n // Adjust nodejs source extensions to sort mjs after js, including platform variants.\n if (nodejsSourceExtensions === null) {\n nodejsSourceExtensions = getNodejsExtensions(context.sourceExts);\n }\n context.sourceExts = nodejsSourceExtensions;\n\n context.unstable_enablePackageExports = true;\n context.unstable_conditionsByPlatform = {};\n\n const isReactServerComponents =\n context.customResolverOptions?.environment === 'react-server';\n\n if (isReactServerComponents) {\n // NOTE: Align the behavior across server and client. This is a breaking change so we'll just roll it out with React Server Components.\n // This ensures that react-server and client code both resolve `module` and `main` in the same order.\n if (platform === 'web') {\n // Node.js runtimes should only be importing main at the moment.\n // This is a temporary fix until we can support the package.json exports.\n context.mainFields = ['module', 'main'];\n } else {\n // In Node.js + native, use the standard main fields.\n context.mainFields = ['react-native', 'module', 'main'];\n }\n } else {\n if (platform === 'web') {\n // Node.js runtimes should only be importing main at the moment.\n // This is a temporary fix until we can support the package.json exports.\n context.mainFields = ['main', 'module'];\n } else {\n // In Node.js + native, use the standard main fields.\n context.mainFields = ['react-native', 'main', 'module'];\n }\n }\n\n // Enable react-server import conditions.\n if (context.customResolverOptions?.environment === 'react-server') {\n context.unstable_conditionNames = ['node', 'react-server', 'workerd'];\n } else {\n context.unstable_conditionNames = ['node'];\n }\n } else {\n // Non-server changes\n\n if (!env.EXPO_METRO_NO_MAIN_FIELD_OVERRIDE && platform && platform in preferredMainFields) {\n context.mainFields = preferredMainFields[platform];\n }\n }\n\n return context;\n }\n );\n\n return withMetroErrorReportingResolver(metroConfigWithCustomContext);\n}\n\n/** @returns `true` if the incoming resolution should be swapped. */\nexport function shouldAliasModule(\n input: {\n platform: string | null;\n result: Resolution;\n },\n alias: { platform: string; output: string }\n): boolean {\n return (\n input.platform === alias.platform &&\n input.result?.type === 'sourceFile' &&\n typeof input.result?.filePath === 'string' &&\n normalizeSlashes(input.result.filePath).endsWith(alias.output)\n );\n}\n\n/** Add support for `react-native-web` and the Web platform. */\nexport async function withMetroMultiPlatformAsync(\n projectRoot: string,\n {\n config,\n exp,\n platformBundlers,\n isTsconfigPathsEnabled,\n isFastResolverEnabled,\n isExporting,\n isReactCanaryEnabled,\n isNamedRequiresEnabled,\n isReactServerComponentsEnabled,\n getMetroBundler,\n }: {\n config: ConfigT;\n exp: ExpoConfig;\n isTsconfigPathsEnabled: boolean;\n platformBundlers: PlatformBundlers;\n isFastResolverEnabled?: boolean;\n isExporting?: boolean;\n isReactCanaryEnabled: boolean;\n isReactServerComponentsEnabled: boolean;\n isNamedRequiresEnabled: boolean;\n getMetroBundler: () => Bundler;\n }\n) {\n if (isNamedRequiresEnabled) {\n debug('Using Expo metro require runtime.');\n // Change the default metro-runtime to a custom one that supports bundle splitting.\n require('metro-config/src/defaults/defaults').moduleSystem = require.resolve(\n '@expo/cli/build/metro-require/require'\n );\n }\n\n if (!config.projectRoot) {\n // @ts-expect-error: read-only types\n config.projectRoot = projectRoot;\n }\n\n // Required for @expo/metro-runtime to format paths in the web LogBox.\n process.env.EXPO_PUBLIC_PROJECT_ROOT = process.env.EXPO_PUBLIC_PROJECT_ROOT ?? projectRoot;\n\n // This is used for running Expo CLI in development against projects outside the monorepo.\n if (!isDirectoryIn(__dirname, projectRoot)) {\n if (!config.watchFolders) {\n // @ts-expect-error: watchFolders is readonly\n config.watchFolders = [];\n }\n // @ts-expect-error: watchFolders is readonly\n config.watchFolders.push(path.join(require.resolve('metro-runtime/package.json'), '../..'));\n // @ts-expect-error: watchFolders is readonly\n config.watchFolders.push(\n path.join(require.resolve('@expo/metro-config/package.json'), '../..'),\n // For virtual modules\n path.join(require.resolve('expo/package.json'), '..')\n );\n if (isReactCanaryEnabled) {\n // @ts-expect-error: watchFolders is readonly\n config.watchFolders.push(path.join(require.resolve('@expo/cli/package.json'), '..'));\n }\n }\n\n // TODO: Remove this\n // @ts-expect-error: Invalidate the cache when the location of expo-router changes on-disk.\n config.transformer._expoRouterPath = resolveFrom.silent(projectRoot, 'expo-router');\n\n let tsconfig: null | TsConfigPaths = null;\n\n if (isTsconfigPathsEnabled) {\n tsconfig = await loadTsConfigPathsAsync(projectRoot);\n }\n\n let expoConfigPlatforms = Object.entries(platformBundlers)\n .filter(\n ([platform, bundler]) => bundler === 'metro' && exp.platforms?.includes(platform as Platform)\n )\n .map(([platform]) => platform);\n\n if (Array.isArray(config.resolver.platforms)) {\n expoConfigPlatforms = [...new Set(expoConfigPlatforms.concat(config.resolver.platforms))];\n }\n\n // @ts-expect-error: typed as `readonly`.\n config.resolver.platforms = expoConfigPlatforms;\n\n config = withWebPolyfills(config, { getMetroBundler });\n\n return withExtendedResolver(config, {\n tsconfig,\n isExporting,\n isTsconfigPathsEnabled,\n isFastResolverEnabled,\n isReactCanaryEnabled,\n isReactServerComponentsEnabled,\n getMetroBundler,\n });\n}\n\nfunction isDirectoryIn(targetPath: string, rootPath: string) {\n return targetPath.startsWith(rootPath) && targetPath.length >= rootPath.length;\n}\n"],"names":["getNodejsExtensions","shouldAliasModule","withExtendedResolver","withMetroMultiPlatformAsync","ASSET_REGISTRY_SRC","debug","require","withWebPolyfills","config","getMetroBundler","originalGetPolyfills","serializer","getPolyfills","bind","ctx","virtualEnvVarId","getMetroBundlerWithVirtualModules","setVirtualModule","virtualModuleId","platform","resolve","polyfills","normalizeSlashes","p","replace","srcExts","mjsExts","filter","ext","test","nodejsSourceExtensions","jsIndex","reduce","index","i","splice","tsconfig","isTsconfigPathsEnabled","isFastResolverEnabled","isExporting","isReactCanaryEnabled","isReactServerComponentsEnabled","Log","warn","log","chalk","dim","defaultResolver","metroResolver","resolver","createFastResolver","preserveSymlinks","blockList","Array","isArray","aliases","web","canaryModulesPath","path","join","_universalAliases","getUniversalAliases","resolveFrom","silent","projectRoot","push","preferredMainFields","tsConfigResolve","paths","baseUrl","resolveWithTsConfigPaths","hasBaseUrl","isInteractive","configWatcher","FileNotifier","startObserving","loadTsConfigPathsAsync","then","tsConfigPaths","Object","keys","length","installExitHooks","stopObserving","getStrictResolver","resolveRequest","context","doResolve","moduleName","getOptionalResolver","optionalResolve","error","isResolutionError","isFailedToResolveNameError","isFailedToResolvePathError","idFactory","createModuleIdFactory","id","getAssetRegistryModule","type","filePath","externals","match","customResolverOptions","exporting","isServerEnvironment","environment","process","clientboundary","endsWith","isExternal","metroConfigWithCustomResolver","withMetroResolvers","requestDevMockProdReact","dev","originModulePath","requestTsconfigPaths","requestNodeExternals","isServer","moduleId","isNodeExternal","result","contents","requestCustomExternals","strictResolve","external","realModule","realPath","opaqueId","JSON","stringify","CommandError","requestAlias","redirectedModuleName","matcher","alias","aliasedModule","_","parseInt","requestStableAssetRegistry","includes","requestPostRewrites","FailedToResolvePathError","normalName","shimFile","shouldCreateVirtualShim","virtualId","bundler","hasVirtualModule","fs","readFileSync","normal","canaryFile","shouldCreateVirtualCanary","createFallbackModuleResolver","originModuleNames","metroConfigWithCustomContext","withMetroMutatedResolverContext","immutableContext","preferNativePlatform","disableHierarchicalLookup","sourceExts","unstable_enablePackageExports","unstable_conditionsByPlatform","isReactServerComponents","mainFields","unstable_conditionNames","env","EXPO_METRO_NO_MAIN_FIELD_OVERRIDE","withMetroErrorReportingResolver","input","output","exp","platformBundlers","isNamedRequiresEnabled","moduleSystem","EXPO_PUBLIC_PROJECT_ROOT","isDirectoryIn","__dirname","watchFolders","transformer","_expoRouterPath","expoConfigPlatforms","entries","platforms","map","Set","concat","targetPath","rootPath","startsWith"],"mappings":"AAAA;;;;;CAKC;;;;;;;;;;;IAmHeA,mBAAmB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,OAAOD,WAAWE,UAAU,CAACD,aAAaD,WAAW3G,MAAM,IAAI4G,SAAS5G,MAAM;AAChF"}
|
|
@@ -33,7 +33,7 @@ class FetchClient {
|
|
|
33
33
|
this.headers = {
|
|
34
34
|
accept: 'application/json',
|
|
35
35
|
'content-type': 'application/json',
|
|
36
|
-
'user-agent': `expo-cli/${"1.0.0-canary-
|
|
36
|
+
'user-agent': `expo-cli/${"1.0.0-canary-20250709-136b77f"}`,
|
|
37
37
|
authorization: 'Basic ' + _nodebuffer().Buffer.from(`${target}:`).toString('base64')
|
|
38
38
|
};
|
|
39
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/cli",
|
|
3
|
-
"version": "1.0.0-canary-
|
|
3
|
+
"version": "1.0.0-canary-20250709-136b77f",
|
|
4
4
|
"description": "The Expo CLI",
|
|
5
5
|
"main": "build/bin/cli",
|
|
6
6
|
"bin": {
|
|
@@ -42,21 +42,21 @@
|
|
|
42
42
|
"@0no-co/graphql.web": "^1.0.8",
|
|
43
43
|
"@babel/runtime": "^7.20.0",
|
|
44
44
|
"@expo/code-signing-certificates": "^0.0.5",
|
|
45
|
-
"@expo/config": "11.0.
|
|
46
|
-
"@expo/config-plugins": "10.
|
|
45
|
+
"@expo/config": "11.0.14-canary-20250709-136b77f",
|
|
46
|
+
"@expo/config-plugins": "10.0.4-canary-20250709-136b77f",
|
|
47
47
|
"@expo/devcert": "^1.1.2",
|
|
48
|
-
"@expo/env": "1.0.
|
|
49
|
-
"@expo/image-utils": "0.7.
|
|
50
|
-
"@expo/json-file": "9.1.
|
|
51
|
-
"@expo/metro-config": "0.21.0-canary-
|
|
52
|
-
"@expo/osascript": "2.2.
|
|
53
|
-
"@expo/package-manager": "1.8.
|
|
54
|
-
"@expo/plist": "0.3.
|
|
55
|
-
"@expo/prebuild-config": "9.1.0-canary-
|
|
48
|
+
"@expo/env": "1.0.8-canary-20250709-136b77f",
|
|
49
|
+
"@expo/image-utils": "0.7.7-canary-20250709-136b77f",
|
|
50
|
+
"@expo/json-file": "9.1.6-canary-20250709-136b77f",
|
|
51
|
+
"@expo/metro-config": "0.21.0-canary-20250709-136b77f",
|
|
52
|
+
"@expo/osascript": "2.2.6-canary-20250709-136b77f",
|
|
53
|
+
"@expo/package-manager": "1.8.7-canary-20250709-136b77f",
|
|
54
|
+
"@expo/plist": "0.3.6-canary-20250709-136b77f",
|
|
55
|
+
"@expo/prebuild-config": "9.1.0-canary-20250709-136b77f",
|
|
56
56
|
"@expo/spawn-async": "^1.7.2",
|
|
57
57
|
"@expo/ws-tunnel": "^1.0.1",
|
|
58
58
|
"@expo/xcpretty": "^4.3.0",
|
|
59
|
-
"@react-native/dev-middleware": "0.80.
|
|
59
|
+
"@react-native/dev-middleware": "0.80.1",
|
|
60
60
|
"@urql/core": "^5.0.6",
|
|
61
61
|
"@urql/exchange-retry": "^1.3.0",
|
|
62
62
|
"accepts": "^1.3.8",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"devDependencies": {
|
|
110
110
|
"@expo/multipart-body-parser": "^1.0.0",
|
|
111
111
|
"@expo/ngrok": "4.1.3",
|
|
112
|
-
"@expo/server": "0.6.4-canary-
|
|
112
|
+
"@expo/server": "0.6.4-canary-20250709-136b77f",
|
|
113
113
|
"@graphql-codegen/cli": "^2.16.3",
|
|
114
114
|
"@graphql-codegen/typescript": "^2.8.7",
|
|
115
115
|
"@graphql-codegen/typescript-operations": "^2.5.12",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"@types/ws": "^8.5.4",
|
|
140
140
|
"devtools-protocol": "^0.0.1113120",
|
|
141
141
|
"expo-atlas": "^0.4.1",
|
|
142
|
-
"expo-module-scripts": "4.1.
|
|
142
|
+
"expo-module-scripts": "4.1.10-canary-20250709-136b77f",
|
|
143
143
|
"find-process": "^1.4.7",
|
|
144
144
|
"jest-runner-tsd": "^6.0.0",
|
|
145
145
|
"klaw-sync": "^6.0.0",
|
|
File without changes
|
|
File without changes
|
/package/static/canary-full/{react → node_modules/react}/cjs/react-compiler-runtime.development.js
RENAMED
|
File without changes
|
/package/static/canary-full/{react → node_modules/react}/cjs/react-compiler-runtime.production.js
RENAMED
|
File without changes
|
/package/static/canary-full/{react → node_modules/react}/cjs/react-compiler-runtime.profiling.js
RENAMED
|
File without changes
|
/package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-dev-runtime.development.js
RENAMED
|
File without changes
|
/package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-dev-runtime.production.js
RENAMED
|
File without changes
|
/package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-dev-runtime.profiling.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-runtime.development.js
RENAMED
|
File without changes
|
/package/static/canary-full/{react → node_modules/react}/cjs/react-jsx-runtime.production.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/static/canary-full/{react → node_modules/react}/cjs/react.react-server.development.js
RENAMED
|
File without changes
|
/package/static/canary-full/{react → node_modules/react}/cjs/react.react-server.production.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-client.development.js
RENAMED
|
File without changes
|
/package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom-client.production.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom.development.js
RENAMED
|
File without changes
|
/package/static/canary-full/{react-dom → node_modules/react-dom}/cjs/react-dom.production.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|