@expo/metro-config 0.17.2 → 0.17.4
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/ExpoMetroConfig.js +239 -366
- package/build/ExpoMetroConfig.js.map +1 -1
- package/build/babel-core.js +6 -23
- package/build/babel-core.js.map +1 -1
- package/build/babel-transformer.js +117 -162
- package/build/babel-transformer.js.map +1 -1
- package/build/customizeFrame.js +84 -78
- package/build/customizeFrame.js.map +1 -1
- package/build/env.js +23 -37
- package/build/env.js.map +1 -1
- package/build/file-store.js +13 -21
- package/build/file-store.js.map +1 -1
- package/build/getModulesPaths.js +31 -48
- package/build/getModulesPaths.js.map +1 -1
- package/build/getWatchFolders.js +70 -98
- package/build/getWatchFolders.js.map +1 -1
- package/build/loadBabelConfig.js +30 -49
- package/build/loadBabelConfig.js.map +1 -1
- package/build/rewriteRequestUrl.js +82 -142
- package/build/rewriteRequestUrl.js.map +1 -1
- package/build/serializer/debugId.js +23 -22
- package/build/serializer/debugId.js.map +1 -1
- package/build/serializer/environmentVariableSerializerPlugin.js +90 -101
- package/build/serializer/environmentVariableSerializerPlugin.js.map +1 -1
- package/build/serializer/exportHermes.js +96 -133
- package/build/serializer/exportHermes.js.map +1 -1
- package/build/serializer/exportPath.js +18 -35
- package/build/serializer/exportPath.js.map +1 -1
- package/build/serializer/fork/baseJSBundle.js +124 -147
- package/build/serializer/fork/baseJSBundle.js.map +1 -1
- package/build/serializer/fork/js.js +81 -116
- package/build/serializer/fork/js.js.map +1 -1
- package/build/serializer/fork/processModules.js +22 -36
- package/build/serializer/fork/processModules.js.map +1 -1
- package/build/serializer/getCssDeps.js +64 -95
- package/build/serializer/getCssDeps.js.map +1 -1
- package/build/serializer/jsOutput.js +6 -16
- package/build/serializer/jsOutput.js.map +1 -1
- package/build/serializer/serializeChunks.js +406 -483
- package/build/serializer/serializeChunks.js.map +1 -1
- package/build/serializer/serializerAssets.js +1 -0
- package/build/serializer/serializerAssets.js.map +1 -1
- package/build/serializer/withExpoSerializers.js +165 -236
- package/build/serializer/withExpoSerializers.js.map +1 -1
- package/build/transform-worker/asset-transformer.js +21 -44
- package/build/transform-worker/asset-transformer.js.map +1 -1
- package/build/transform-worker/css-modules.js +57 -84
- package/build/transform-worker/css-modules.js.map +1 -1
- package/build/transform-worker/css.js +21 -20
- package/build/transform-worker/css.js.map +1 -1
- package/build/transform-worker/getAssets.js +38 -75
- package/build/transform-worker/getAssets.js.map +1 -1
- package/build/transform-worker/metro-transform-worker.js +384 -489
- package/build/transform-worker/metro-transform-worker.js.map +1 -1
- package/build/transform-worker/postcss.js +176 -233
- package/build/transform-worker/postcss.js.map +1 -1
- package/build/transform-worker/sass.js +30 -38
- package/build/transform-worker/sass.js.map +1 -1
- package/build/transform-worker/transform-worker.js +156 -188
- package/build/transform-worker/transform-worker.js.map +1 -1
- package/build/transform-worker/utils/require.js +30 -28
- package/build/transform-worker/utils/require.js.map +1 -1
- package/build/transformSync.js +40 -28
- package/build/transformSync.js.map +1 -1
- package/build/transformer/createExoticTransformer.js +96 -129
- package/build/transformer/createExoticTransformer.js.map +1 -1
- package/build/transformer/createMatcher.js +37 -46
- package/build/transformer/createMatcher.js.map +1 -1
- package/build/transformer/createMultiRuleTransformer.js +170 -240
- package/build/transformer/createMultiRuleTransformer.js.map +1 -1
- package/build/transformer/generateFunctionMap.js +20 -23
- package/build/transformer/generateFunctionMap.js.map +1 -1
- package/build/transformer/getBabelConfig.js +94 -127
- package/build/transformer/getBabelConfig.js.map +1 -1
- package/build/transformer/getCacheKey.js +17 -31
- package/build/transformer/getCacheKey.js.map +1 -1
- package/build/transformer/index.js +11 -62
- package/build/transformer/index.js.map +1 -1
- package/build/transformer/metro-expo-exotic-babel-transformer.js +3 -12
- package/build/transformer/metro-expo-exotic-babel-transformer.js.map +1 -1
- package/build/traveling/metro-config.js +12 -19
- package/build/traveling/metro-config.js.map +1 -1
- package/build/utils/hash.js +8 -14
- package/build/utils/hash.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoMetroConfig.js","names":["_config","data","require","_paths","runtimeEnv","_interopRequireWildcard","_jsonFile","_interopRequireDefault","_chalk","_metroCache","_metroConfig","_os","_path","_resolveFrom","_customizeFrame","_env2","_fileStore","_getModulesPaths","_getWatchFolders","_rewriteRequestUrl","_withExpoSerializers","_postcss","_metroConfig2","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","debug","getAssetPlugins","projectRoot","hashAssetFilesPath","resolveFrom","silent","Error","hasWarnedAboutExotic","patchMetroGraphToSupportUncachedModules","Graph","original_traverseDependencies","traverseDependencies","__patched","paths","options","dependencies","forEach","dependency","output","find","file","_file$data$css","css","skipCache","includes","path","unstable_transformResultKey","push","getDefaultConfig","mode","isCSSEnabled","unstable_beforeAssetSerializationPlugins","getDefaultMetroConfig","mergeConfig","importMetroConfig","isExotic","env","EXPO_USE_EXOTIC","console","log","chalk","gray","bold","reactNativePath","dirname","babelPresetFbjsPath","process","EXPO_METRO_CACHE_KEY_VERSION","String","version","sourceExtsConfig","isTS","isReact","isModern","sourceExts","getBareExtensions","reanimatedVersion","getPkgVersion","sassVersion","envFiles","getFiles","NODE_ENV","pkg","getPackageJson","watchFolders","getWatchFolders","nodeModulesPaths","getModulesPaths","EXPO_DEBUG","join","reporter","metroDefaultValues","getDefaultValues","cacheStore","FileStore","root","os","tmpdir","metroConfig","resolver","unstable_conditionsByPlatform","ios","android","web","unstable_conditionNames","resolverMainFields","platforms","assetExts","concat","filter","assetExt","cacheStores","watcher","additionalExts","map","replace","serializer","getModulesRunBeforeMainModule","preModules","resolve","stdRuntime","metroRuntime","getPolyfills","server","rewriteRequestUrl","getRewriteRequestUrl","port","Number","RCT_METRO_PORT","unstable_serverRoot","getServerRoot","symbolicator","customizeFrame","getDefaultCustomizeFrame","transformerPath","transformer","postcssHash","getPostcssConfigHash","browserslistHash","browserslist","stableHash","JSON","stringify","toString","unstable_allowRequireContext","allowOptionalDependencies","babelTransformerPath","asyncRequireModulePath","assetRegistryPath","assetPlugins","getTransformOptions","transform","experimentalImportSupport","inlineRequires","withExpoSerializers","exports","pkgName","targetPkg","targetPkgJson","findUpPackageJson","JsonFile","read","pkgVersion","cwd","sep","found"],"sources":["../src/ExpoMetroConfig.ts"],"sourcesContent":["// Copyright 2023-present 650 Industries (Expo). All rights reserved.\nimport { getPackageJson } from '@expo/config';\nimport { getBareExtensions } from '@expo/config/paths';\nimport * as runtimeEnv from '@expo/env';\nimport JsonFile from '@expo/json-file';\nimport chalk from 'chalk';\nimport { MixedOutput, Module, ReadOnlyGraph, Reporter } from 'metro';\nimport { stableHash } from 'metro-cache';\nimport { ConfigT as MetroConfig, InputConfigT } from 'metro-config';\nimport os from 'os';\nimport path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { getDefaultCustomizeFrame, INTERNAL_CALLSITES_REGEX } from './customizeFrame';\nimport { env } from './env';\nimport { FileStore } from './file-store';\nimport { getModulesPaths, getServerRoot } from './getModulesPaths';\nimport { getWatchFolders } from './getWatchFolders';\nimport { getRewriteRequestUrl } from './rewriteRequestUrl';\nimport { JSModule } from './serializer/getCssDeps';\nimport { withExpoSerializers } from './serializer/withExpoSerializers';\nimport { getPostcssConfigHash } from './transform-worker/postcss';\nimport { importMetroConfig } from './traveling/metro-config';\nconst debug = require('debug')('expo:metro:config') as typeof console.log;\n\nexport interface LoadOptions {\n config?: string;\n maxWorkers?: number;\n port?: number;\n reporter?: Reporter;\n resetCache?: boolean;\n}\n\nexport interface DefaultConfigOptions {\n /** @deprecated */\n mode?: 'exotic';\n /**\n * **Experimental:** Enable CSS support for Metro web, and shim on native.\n *\n * This is an experimental feature and may change in the future. The underlying implementation\n * is subject to change, and native support for CSS Modules may be added in the future during a non-major SDK release.\n */\n isCSSEnabled?: boolean;\n\n /**\n * **Experimental:** Modify premodules before a code asset is serialized\n *\n * This is an experimental feature and may change in the future. The underlying implementation\n * is subject to change.\n */\n unstable_beforeAssetSerializationPlugins?: ((serializationInput: {\n graph: ReadOnlyGraph<MixedOutput>;\n premodules: Module[];\n debugId?: string;\n }) => Module[])[];\n}\n\nfunction getAssetPlugins(projectRoot: string): string[] {\n const hashAssetFilesPath = resolveFrom.silent(projectRoot, 'expo-asset/tools/hashAssetFiles');\n\n if (!hashAssetFilesPath) {\n throw new Error(`The required package \\`expo-asset\\` cannot be found`);\n }\n\n return [hashAssetFilesPath];\n}\n\nlet hasWarnedAboutExotic = false;\n\n// Patch Metro's graph to support always parsing certain modules. This enables\n// things like Tailwind CSS which update based on their own heuristics.\nfunction patchMetroGraphToSupportUncachedModules() {\n const { Graph } = require('metro/src/DeltaBundler/Graph');\n\n const original_traverseDependencies = Graph.prototype.traverseDependencies;\n if (!original_traverseDependencies.__patched) {\n original_traverseDependencies.__patched = true;\n\n Graph.prototype.traverseDependencies = function (paths: string[], options: unknown) {\n this.dependencies.forEach((dependency: JSModule) => {\n // Find any dependencies that have been marked as `skipCache` and ensure they are invalidated.\n // `skipCache` is set when a CSS module is found by PostCSS.\n if (\n dependency.output.find((file) => file.data.css?.skipCache) &&\n !paths.includes(dependency.path)\n ) {\n // Ensure we invalidate the `unstable_transformResultKey` (input hash) so the module isn't removed in\n // the Graph._processModule method.\n dependency.unstable_transformResultKey = dependency.unstable_transformResultKey + '.';\n\n // Add the path to the list of modified paths so it gets run through the transformer again,\n // this will ensure it is passed to PostCSS -> Tailwind.\n paths.push(dependency.path);\n }\n });\n // Invoke the original method with the new paths to ensure the standard behavior is preserved.\n return original_traverseDependencies.call(this, paths, options);\n };\n // Ensure we don't patch the method twice.\n Graph.prototype.traverseDependencies.__patched = true;\n }\n}\n\nexport function getDefaultConfig(\n projectRoot: string,\n { mode, isCSSEnabled = true, unstable_beforeAssetSerializationPlugins }: DefaultConfigOptions = {}\n): InputConfigT {\n const { getDefaultConfig: getDefaultMetroConfig, mergeConfig } = importMetroConfig(projectRoot);\n\n if (isCSSEnabled) {\n patchMetroGraphToSupportUncachedModules();\n }\n\n const isExotic = mode === 'exotic' || env.EXPO_USE_EXOTIC;\n\n if (isExotic && !hasWarnedAboutExotic) {\n hasWarnedAboutExotic = true;\n console.log(\n chalk.gray(`\\u203A Feature ${chalk.bold`EXPO_USE_EXOTIC`} is no longer supported.`)\n );\n }\n\n const reactNativePath = path.dirname(resolveFrom(projectRoot, 'react-native/package.json'));\n\n try {\n // Set the `EXPO_METRO_CACHE_KEY_VERSION` variable for use in the custom babel transformer.\n // This hack is used because there doesn't appear to be anyway to resolve\n // `babel-preset-fbjs` relative to the project root later (in `metro-expo-babel-transformer`).\n const babelPresetFbjsPath = resolveFrom(projectRoot, 'babel-preset-fbjs/package.json');\n process.env.EXPO_METRO_CACHE_KEY_VERSION = String(require(babelPresetFbjsPath).version);\n } catch {\n // noop -- falls back to a hardcoded value.\n }\n\n const sourceExtsConfig = { isTS: true, isReact: true, isModern: true };\n const sourceExts = getBareExtensions([], sourceExtsConfig);\n\n // Add support for cjs (without platform extensions).\n sourceExts.push('cjs');\n\n const reanimatedVersion = getPkgVersion(projectRoot, 'react-native-reanimated');\n\n let sassVersion: string | null = null;\n if (isCSSEnabled) {\n sassVersion = getPkgVersion(projectRoot, 'sass');\n // Enable SCSS by default so we can provide a better error message\n // when sass isn't installed.\n sourceExts.push('scss', 'sass', 'css');\n }\n\n const envFiles = runtimeEnv.getFiles(process.env.NODE_ENV, { silent: true });\n\n const pkg = getPackageJson(projectRoot);\n const watchFolders = getWatchFolders(projectRoot);\n const nodeModulesPaths = getModulesPaths(projectRoot);\n if (env.EXPO_DEBUG) {\n console.log();\n console.log(`Expo Metro config:`);\n try {\n console.log(`- Version: ${require('../package.json').version}`);\n } catch {}\n console.log(`- Extensions: ${sourceExts.join(', ')}`);\n console.log(`- React Native: ${reactNativePath}`);\n console.log(`- Watch Folders: ${watchFolders.join(', ')}`);\n console.log(`- Node Module Paths: ${nodeModulesPaths.join(', ')}`);\n console.log(`- Env Files: ${envFiles}`);\n console.log(`- Sass: ${sassVersion}`);\n console.log(`- Reanimated: ${reanimatedVersion}`);\n console.log();\n }\n\n const {\n // Remove the default reporter which metro always resolves to be the react-native-community/cli reporter.\n // This prints a giant React logo which is less accessible to users on smaller terminals.\n reporter,\n ...metroDefaultValues\n } = getDefaultMetroConfig.getDefaultValues(projectRoot);\n\n const cacheStore = new FileStore<any>({\n root: path.join(os.tmpdir(), 'metro-cache'),\n });\n\n // Merge in the default config from Metro here, even though loadConfig uses it as defaults.\n // This is a convenience for getDefaultConfig use in metro.config.js, e.g. to modify assetExts.\n const metroConfig: Partial<MetroConfig> = mergeConfig(metroDefaultValues, {\n watchFolders,\n resolver: {\n unstable_conditionsByPlatform: {\n ios: ['react-native'],\n android: ['react-native'],\n // This is removed for server platforms.\n web: ['browser'],\n },\n unstable_conditionNames: ['require', 'import'],\n resolverMainFields: ['react-native', 'browser', 'main'],\n platforms: ['ios', 'android'],\n assetExts: metroDefaultValues.resolver.assetExts\n .concat(\n // Add default support for `expo-image` file types.\n ['heic', 'avif']\n )\n .filter((assetExt) => !sourceExts.includes(assetExt)),\n sourceExts,\n nodeModulesPaths,\n },\n cacheStores: [cacheStore],\n watcher: {\n // strip starting dot from env files\n additionalExts: envFiles.map((file: string) => file.replace(/^\\./, '')),\n },\n serializer: {\n getModulesRunBeforeMainModule: () => {\n const preModules: string[] = [\n // MUST be first\n require.resolve(path.join(reactNativePath, 'Libraries/Core/InitializeCore')),\n ];\n\n const stdRuntime = resolveFrom.silent(projectRoot, 'expo/build/winter');\n if (stdRuntime) {\n preModules.push(stdRuntime);\n }\n\n // We need to shift this to be the first module so web Fast Refresh works as expected.\n // This will only be applied if the module is installed and imported somewhere in the bundle already.\n const metroRuntime = resolveFrom.silent(projectRoot, '@expo/metro-runtime');\n if (metroRuntime) {\n preModules.push(metroRuntime);\n }\n\n return preModules;\n },\n getPolyfills: () => require('@react-native/js-polyfills')(),\n },\n server: {\n rewriteRequestUrl: getRewriteRequestUrl(projectRoot),\n port: Number(env.RCT_METRO_PORT) || 8081,\n // NOTE(EvanBacon): Moves the server root down to the monorepo root.\n // This enables proper monorepo support for web.\n unstable_serverRoot: getServerRoot(projectRoot),\n },\n symbolicator: {\n customizeFrame: getDefaultCustomizeFrame(),\n },\n transformerPath: require.resolve('./transform-worker/transform-worker'),\n transformer: {\n // Custom: These are passed to `getCacheKey` and ensure invalidation when the version changes.\n // @ts-expect-error: not on type.\n postcssHash: getPostcssConfigHash(projectRoot),\n browserslistHash: pkg.browserslist\n ? stableHash(JSON.stringify(pkg.browserslist)).toString('hex')\n : null,\n sassVersion,\n // Ensure invalidation when the version changes due to the Babel plugin.\n reanimatedVersion,\n\n // `require.context` support\n unstable_allowRequireContext: true,\n allowOptionalDependencies: true,\n babelTransformerPath: require.resolve('./babel-transformer'),\n // See: https://github.com/facebook/react-native/blob/v0.73.0/packages/metro-config/index.js#L72-L74\n asyncRequireModulePath: resolveFrom(\n reactNativePath,\n metroDefaultValues.transformer.asyncRequireModulePath\n ),\n assetRegistryPath: '@react-native/assets-registry/registry',\n assetPlugins: getAssetPlugins(projectRoot),\n getTransformOptions: async () => ({\n transform: {\n experimentalImportSupport: false,\n inlineRequires: false,\n },\n }),\n },\n });\n\n return withExpoSerializers(metroConfig, { unstable_beforeAssetSerializationPlugins });\n}\n\n// re-export for use in config files.\nexport { MetroConfig, INTERNAL_CALLSITES_REGEX };\n\n// re-export for legacy cases.\nexport const EXPO_DEBUG = env.EXPO_DEBUG;\n\nfunction getPkgVersion(projectRoot: string, pkgName: string): string | null {\n const targetPkg = resolveFrom.silent(projectRoot, pkgName);\n if (!targetPkg) return null;\n const targetPkgJson = findUpPackageJson(targetPkg);\n if (!targetPkgJson) return null;\n const pkg = JsonFile.read(targetPkgJson);\n\n debug(`${pkgName} package.json:`, targetPkgJson);\n const pkgVersion = pkg.version;\n if (typeof pkgVersion === 'string') {\n return pkgVersion;\n }\n\n return null;\n}\n\nfunction findUpPackageJson(cwd: string): string | null {\n if (['.', path.sep].includes(cwd)) return null;\n\n const found = resolveFrom.silent(cwd, './package.json');\n if (found) {\n return found;\n }\n return findUpPackageJson(path.dirname(cwd));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAI,uBAAA,CAAAH,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAM,sBAAA,CAAAL,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,OAAA;EAAA,MAAAP,IAAA,GAAAM,sBAAA,CAAAL,OAAA;EAAAM,MAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,YAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,WAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,aAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,YAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAU,IAAA;EAAA,MAAAV,IAAA,GAAAM,sBAAA,CAAAL,OAAA;EAAAS,GAAA,YAAAA,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AAa,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACnD,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,GAAG,GAAG,mBAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAEzC,KAAK,CAAC,GAAG,OAAO,gBAAgB,EAAE,aAAa,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC;IAC/B,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAClC,OAAO,UAAU,CAAC;KACnB;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,iBAAiB,CAAC,GAAW;IACpC,IAAI,CAAC,GAAG,EAAE,cAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAE/C,MAAM,KAAK,GAAG,sBAAW,CAAC,MAAM,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IACxD,IAAI,KAAK,EAAE;QACT,OAAO,KAAK,CAAC;KACd;IACD,OAAO,iBAAiB,CAAC,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
package/build/babel-core.js
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Object.defineProperty(exports, "transformFromAstSync", {
|
|
7
|
-
|
|
8
|
-
get: function () {
|
|
9
|
-
return _core().transformFromAstSync;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "transformSync", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _core().transformSync;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
function _core() {
|
|
19
|
-
const data = require("@babel/core");
|
|
20
|
-
_core = function () {
|
|
21
|
-
return data;
|
|
22
|
-
};
|
|
23
|
-
return data;
|
|
24
|
-
}
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformSync = exports.transformFromAstSync = void 0;
|
|
4
|
+
// re-exported because babel/core is hard to mock.
|
|
5
|
+
var core_1 = require("@babel/core");
|
|
6
|
+
Object.defineProperty(exports, "transformFromAstSync", { enumerable: true, get: function () { return core_1.transformFromAstSync; } });
|
|
7
|
+
Object.defineProperty(exports, "transformSync", { enumerable: true, get: function () { return core_1.transformSync; } });
|
|
25
8
|
//# sourceMappingURL=babel-core.js.map
|
package/build/babel-core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"babel-core.js","
|
|
1
|
+
{"version":3,"file":"babel-core.js","sourceRoot":"","sources":["../src/babel-core.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,oCAKqB;AAFnB,4GAAA,oBAAoB,OAAA;AACpB,qGAAA,aAAa,OAAA"}
|
|
@@ -1,179 +1,134 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return data;
|
|
16
|
-
}
|
|
17
|
-
function _nodeFs() {
|
|
18
|
-
const data = _interopRequireDefault(require("node:fs"));
|
|
19
|
-
_nodeFs = function () {
|
|
20
|
-
return data;
|
|
21
|
-
};
|
|
22
|
-
return data;
|
|
23
|
-
}
|
|
24
|
-
function _loadBabelConfig() {
|
|
25
|
-
const data = require("./loadBabelConfig");
|
|
26
|
-
_loadBabelConfig = function () {
|
|
27
|
-
return data;
|
|
28
|
-
};
|
|
29
|
-
return data;
|
|
30
|
-
}
|
|
31
|
-
function _transformSync() {
|
|
32
|
-
const data = require("./transformSync");
|
|
33
|
-
_transformSync = function () {
|
|
34
|
-
return data;
|
|
35
|
-
};
|
|
36
|
-
return data;
|
|
37
|
-
}
|
|
38
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
|
-
/**
|
|
40
|
-
* Copyright (c) 650 Industries (Expo). All rights reserved.
|
|
41
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
42
|
-
*
|
|
43
|
-
* This source code is licensed under the MIT license found in the
|
|
44
|
-
* LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/
|
|
46
|
-
// A fork of the upstream babel-transformer that uses Expo-specific babel defaults
|
|
47
|
-
// and adds support for web and Node.js environments via `isServer` on the Babel caller.
|
|
48
|
-
|
|
49
|
-
const cacheKeyParts = [_nodeFs().default.readFileSync(__filename), require('babel-preset-fbjs/package.json').version];
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
7
|
+
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
8
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
|
+
const loadBabelConfig_1 = require("./loadBabelConfig");
|
|
10
|
+
const transformSync_1 = require("./transformSync");
|
|
11
|
+
const cacheKeyParts = [
|
|
12
|
+
node_fs_1.default.readFileSync(__filename),
|
|
13
|
+
require('babel-preset-fbjs/package.json').version,
|
|
14
|
+
];
|
|
50
15
|
function isCustomTruthy(value) {
|
|
51
|
-
|
|
16
|
+
return value === true || value === 'true';
|
|
52
17
|
}
|
|
53
18
|
function memoize(fn) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
19
|
+
const cache = new Map();
|
|
20
|
+
return ((...args) => {
|
|
21
|
+
const key = JSON.stringify(args);
|
|
22
|
+
if (cache.has(key)) {
|
|
23
|
+
return cache.get(key);
|
|
24
|
+
}
|
|
25
|
+
const result = fn(...args);
|
|
26
|
+
cache.set(key, result);
|
|
27
|
+
return result;
|
|
28
|
+
});
|
|
64
29
|
}
|
|
65
|
-
const memoizeWarning = memoize(message => {
|
|
66
|
-
|
|
30
|
+
const memoizeWarning = memoize((message) => {
|
|
31
|
+
console.warn(message);
|
|
67
32
|
});
|
|
68
|
-
function getBabelCaller({
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if (routerRoot == null) {
|
|
77
|
-
memoizeWarning('Missing transform.routerRoot option in Metro bundling request, falling back to `app` as routes directory.');
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
name: 'metro',
|
|
81
|
-
bundler: 'metro',
|
|
82
|
-
platform: options.platform,
|
|
83
|
-
// Empower the babel preset to know the env it's bundling for.
|
|
84
|
-
// Metro automatically updates the cache to account for the custom transform options.
|
|
85
|
-
isServer,
|
|
86
|
-
// The base url to make requests from, used for hosting from non-standard locations.
|
|
87
|
-
baseUrl: typeof ((_options$customTransf3 = options.customTransformOptions) === null || _options$customTransf3 === void 0 ? void 0 : _options$customTransf3.baseUrl) === 'string' ? decodeURI(options.customTransformOptions.baseUrl) : '',
|
|
88
|
-
// Ensure we always use a mostly-valid router root.
|
|
89
|
-
routerRoot: routerRoot !== null && routerRoot !== void 0 ? routerRoot : 'app',
|
|
90
|
-
isDev: options.dev,
|
|
91
|
-
// This value indicates if the user has disabled the feature or not.
|
|
92
|
-
// Other criteria may still cause the feature to be disabled, but all inputs used are
|
|
93
|
-
// already considered in the cache key.
|
|
94
|
-
preserveEnvVars: isCustomTruthy((_options$customTransf4 = options.customTransformOptions) === null || _options$customTransf4 === void 0 ? void 0 : _options$customTransf4.preserveEnvVars) ? true : undefined,
|
|
95
|
-
asyncRoutes: isCustomTruthy((_options$customTransf5 = options.customTransformOptions) === null || _options$customTransf5 === void 0 ? void 0 : _options$customTransf5.asyncRoutes) ? true : undefined,
|
|
96
|
-
// Pass the engine to babel so we can automatically transpile for the correct
|
|
97
|
-
// target environment.
|
|
98
|
-
engine: (_options$customTransf6 = options.customTransformOptions) === null || _options$customTransf6 === void 0 ? void 0 : _options$customTransf6.engine,
|
|
99
|
-
// Provide the project root for accurately reading the Expo config.
|
|
100
|
-
projectRoot: options.projectRoot,
|
|
101
|
-
isNodeModule,
|
|
102
|
-
isHMREnabled: options.hot,
|
|
103
|
-
// Set the standard Babel flag to disable ESM transformations.
|
|
104
|
-
supportsStaticESM: options.experimentalImportSupport
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
const transform = ({
|
|
108
|
-
filename,
|
|
109
|
-
src,
|
|
110
|
-
options,
|
|
111
|
-
// `plugins` is used for `functionMapBabelPlugin` from `metro-source-map`. Could make sense to move this to `babel-preset-expo` too.
|
|
112
|
-
plugins
|
|
113
|
-
}) => {
|
|
114
|
-
const OLD_BABEL_ENV = process.env.BABEL_ENV;
|
|
115
|
-
process.env.BABEL_ENV = options.dev ? 'development' : process.env.BABEL_ENV || 'production';
|
|
116
|
-
try {
|
|
117
|
-
const babelConfig = {
|
|
118
|
-
// ES modules require sourceType='module' but OSS may not always want that
|
|
119
|
-
sourceType: 'unambiguous',
|
|
120
|
-
// The output we want from Babel methods
|
|
121
|
-
ast: true,
|
|
122
|
-
code: false,
|
|
123
|
-
// NOTE(EvanBacon): We split the parse/transform steps up to accommodate
|
|
124
|
-
// Hermes parsing, but this defaults to cloning the AST which increases
|
|
125
|
-
// the transformation time by a fair amount.
|
|
126
|
-
// You get this behavior by default when using Babel's `transform` method directly.
|
|
127
|
-
cloneInputAst: false,
|
|
128
|
-
// Options for debugging
|
|
129
|
-
cwd: options.projectRoot,
|
|
130
|
-
filename,
|
|
131
|
-
highlightCode: true,
|
|
132
|
-
// Load the project babel config file.
|
|
133
|
-
...(0, _loadBabelConfig().loadBabelConfig)(options),
|
|
134
|
-
babelrc: typeof options.enableBabelRCLookup === 'boolean' ? options.enableBabelRCLookup : true,
|
|
135
|
-
plugins,
|
|
136
|
-
// NOTE(EvanBacon): We heavily leverage the caller functionality to mutate the babel config.
|
|
137
|
-
// This compensates for the lack of a format plugin system in Metro. Users can modify the
|
|
138
|
-
// all (most) of the transforms in their local Babel config.
|
|
139
|
-
// This also helps us keep the transform layers small and focused on a single task. We can also use this to
|
|
140
|
-
// ensure the Babel config caching is more accurate.
|
|
141
|
-
// Additionally, by moving everything Babel-related to the Babel preset, it makes it easier for users to reason
|
|
142
|
-
// about the requirements of an Expo project, making it easier to migrate to other transpilers in the future.
|
|
143
|
-
caller: getBabelCaller({
|
|
144
|
-
filename,
|
|
145
|
-
options
|
|
146
|
-
})
|
|
147
|
-
};
|
|
148
|
-
const result = (0, _transformSync().transformSync)(src, babelConfig, options);
|
|
149
|
-
|
|
150
|
-
// The result from `transformFromAstSync` can be null (if the file is ignored)
|
|
151
|
-
if (!result) {
|
|
152
|
-
// BabelTransformer specifies that the `ast` can never be null but
|
|
153
|
-
// the function returns here. Discovered when typing `BabelNode`.
|
|
154
|
-
return {
|
|
155
|
-
ast: null
|
|
156
|
-
};
|
|
33
|
+
function getBabelCaller({ filename, options }) {
|
|
34
|
+
const isNodeModule = filename.includes('node_modules');
|
|
35
|
+
const isServer = options.customTransformOptions?.environment === 'node';
|
|
36
|
+
const routerRoot = typeof options.customTransformOptions?.routerRoot === 'string'
|
|
37
|
+
? decodeURI(options.customTransformOptions.routerRoot)
|
|
38
|
+
: undefined;
|
|
39
|
+
if (routerRoot == null) {
|
|
40
|
+
memoizeWarning('Missing transform.routerRoot option in Metro bundling request, falling back to `app` as routes directory.');
|
|
157
41
|
}
|
|
158
|
-
(0, _nodeAssert().default)(result.ast);
|
|
159
42
|
return {
|
|
160
|
-
|
|
161
|
-
|
|
43
|
+
name: 'metro',
|
|
44
|
+
bundler: 'metro',
|
|
45
|
+
platform: options.platform,
|
|
46
|
+
// Empower the babel preset to know the env it's bundling for.
|
|
47
|
+
// Metro automatically updates the cache to account for the custom transform options.
|
|
48
|
+
isServer,
|
|
49
|
+
// The base url to make requests from, used for hosting from non-standard locations.
|
|
50
|
+
baseUrl: typeof options.customTransformOptions?.baseUrl === 'string'
|
|
51
|
+
? decodeURI(options.customTransformOptions.baseUrl)
|
|
52
|
+
: '',
|
|
53
|
+
// Ensure we always use a mostly-valid router root.
|
|
54
|
+
routerRoot: routerRoot ?? 'app',
|
|
55
|
+
isDev: options.dev,
|
|
56
|
+
// This value indicates if the user has disabled the feature or not.
|
|
57
|
+
// Other criteria may still cause the feature to be disabled, but all inputs used are
|
|
58
|
+
// already considered in the cache key.
|
|
59
|
+
preserveEnvVars: isCustomTruthy(options.customTransformOptions?.preserveEnvVars)
|
|
60
|
+
? true
|
|
61
|
+
: undefined,
|
|
62
|
+
asyncRoutes: isCustomTruthy(options.customTransformOptions?.asyncRoutes) ? true : undefined,
|
|
63
|
+
// Pass the engine to babel so we can automatically transpile for the correct
|
|
64
|
+
// target environment.
|
|
65
|
+
engine: options.customTransformOptions?.engine,
|
|
66
|
+
// Provide the project root for accurately reading the Expo config.
|
|
67
|
+
projectRoot: options.projectRoot,
|
|
68
|
+
isNodeModule,
|
|
69
|
+
isHMREnabled: options.hot,
|
|
70
|
+
// Set the standard Babel flag to disable ESM transformations.
|
|
71
|
+
supportsStaticESM: options.experimentalImportSupport,
|
|
162
72
|
};
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
73
|
+
}
|
|
74
|
+
const transform = ({ filename, src, options,
|
|
75
|
+
// `plugins` is used for `functionMapBabelPlugin` from `metro-source-map`. Could make sense to move this to `babel-preset-expo` too.
|
|
76
|
+
plugins, }) => {
|
|
77
|
+
const OLD_BABEL_ENV = process.env.BABEL_ENV;
|
|
78
|
+
process.env.BABEL_ENV = options.dev ? 'development' : process.env.BABEL_ENV || 'production';
|
|
79
|
+
try {
|
|
80
|
+
const babelConfig = {
|
|
81
|
+
// ES modules require sourceType='module' but OSS may not always want that
|
|
82
|
+
sourceType: 'unambiguous',
|
|
83
|
+
// The output we want from Babel methods
|
|
84
|
+
ast: true,
|
|
85
|
+
code: false,
|
|
86
|
+
// NOTE(EvanBacon): We split the parse/transform steps up to accommodate
|
|
87
|
+
// Hermes parsing, but this defaults to cloning the AST which increases
|
|
88
|
+
// the transformation time by a fair amount.
|
|
89
|
+
// You get this behavior by default when using Babel's `transform` method directly.
|
|
90
|
+
cloneInputAst: false,
|
|
91
|
+
// Options for debugging
|
|
92
|
+
cwd: options.projectRoot,
|
|
93
|
+
filename,
|
|
94
|
+
highlightCode: true,
|
|
95
|
+
// Load the project babel config file.
|
|
96
|
+
...(0, loadBabelConfig_1.loadBabelConfig)(options),
|
|
97
|
+
babelrc: typeof options.enableBabelRCLookup === 'boolean' ? options.enableBabelRCLookup : true,
|
|
98
|
+
plugins,
|
|
99
|
+
// NOTE(EvanBacon): We heavily leverage the caller functionality to mutate the babel config.
|
|
100
|
+
// This compensates for the lack of a format plugin system in Metro. Users can modify the
|
|
101
|
+
// all (most) of the transforms in their local Babel config.
|
|
102
|
+
// This also helps us keep the transform layers small and focused on a single task. We can also use this to
|
|
103
|
+
// ensure the Babel config caching is more accurate.
|
|
104
|
+
// Additionally, by moving everything Babel-related to the Babel preset, it makes it easier for users to reason
|
|
105
|
+
// about the requirements of an Expo project, making it easier to migrate to other transpilers in the future.
|
|
106
|
+
caller: getBabelCaller({ filename, options }),
|
|
107
|
+
};
|
|
108
|
+
const result = (0, transformSync_1.transformSync)(src, babelConfig, options);
|
|
109
|
+
// The result from `transformFromAstSync` can be null (if the file is ignored)
|
|
110
|
+
if (!result) {
|
|
111
|
+
// BabelTransformer specifies that the `ast` can never be null but
|
|
112
|
+
// the function returns here. Discovered when typing `BabelNode`.
|
|
113
|
+
return { ast: null };
|
|
114
|
+
}
|
|
115
|
+
(0, node_assert_1.default)(result.ast);
|
|
116
|
+
return { ast: result.ast, metadata: result.metadata };
|
|
117
|
+
}
|
|
118
|
+
finally {
|
|
119
|
+
if (OLD_BABEL_ENV) {
|
|
120
|
+
process.env.BABEL_ENV = OLD_BABEL_ENV;
|
|
121
|
+
}
|
|
166
122
|
}
|
|
167
|
-
}
|
|
168
123
|
};
|
|
169
124
|
function getCacheKey() {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
125
|
+
const key = node_crypto_1.default.createHash('md5');
|
|
126
|
+
cacheKeyParts.forEach((part) => key.update(part));
|
|
127
|
+
return key.digest('hex');
|
|
173
128
|
}
|
|
174
129
|
const babelTransformer = {
|
|
175
|
-
|
|
176
|
-
|
|
130
|
+
transform,
|
|
131
|
+
getCacheKey,
|
|
177
132
|
};
|
|
178
133
|
module.exports = babelTransformer;
|
|
179
134
|
//# sourceMappingURL=babel-transformer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"babel-transformer.js","names":["_nodeAssert","data","_interopRequireDefault","require","_nodeCrypto","_nodeFs","_loadBabelConfig","_transformSync","obj","__esModule","default","cacheKeyParts","fs","readFileSync","__filename","version","isCustomTruthy","value","memoize","fn","cache","Map","args","key","JSON","stringify","has","get","result","set","memoizeWarning","message","console","warn","getBabelCaller","filename","options","_options$customTransf","_options$customTransf2","_options$customTransf3","_options$customTransf4","_options$customTransf5","_options$customTransf6","isNodeModule","includes","isServer","customTransformOptions","environment","routerRoot","decodeURI","undefined","name","bundler","platform","baseUrl","isDev","dev","preserveEnvVars","asyncRoutes","engine","projectRoot","isHMREnabled","hot","supportsStaticESM","experimentalImportSupport","transform","src","plugins","OLD_BABEL_ENV","process","env","BABEL_ENV","babelConfig","sourceType","ast","code","cloneInputAst","cwd","highlightCode","loadBabelConfig","babelrc","enableBabelRCLookup","caller","transformSync","assert","metadata","getCacheKey","crypto","createHash","forEach","part","update","digest","babelTransformer","module","exports"],"sources":["../src/babel-transformer.ts"],"sourcesContent":["/**\n * Copyright (c) 650 Industries (Expo). All rights reserved.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\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 */\n// A fork of the upstream babel-transformer that uses Expo-specific babel defaults\n// and adds support for web and Node.js environments via `isServer` on the Babel caller.\nimport type { BabelTransformer, BabelTransformerArgs } from 'metro-babel-transformer';\nimport assert from 'node:assert';\nimport crypto from 'node:crypto';\nimport fs from 'node:fs';\n\nimport { TransformOptions } from './babel-core';\nimport { loadBabelConfig } from './loadBabelConfig';\nimport { transformSync } from './transformSync';\n\nconst cacheKeyParts = [\n fs.readFileSync(__filename),\n require('babel-preset-fbjs/package.json').version,\n];\n\nfunction isCustomTruthy(value: any): boolean {\n return value === true || value === 'true';\n}\n\nfunction memoize<T extends (...args: any[]) => any>(fn: T): T {\n const cache = new Map<string, ReturnType<T>>();\n return ((...args: any[]) => {\n const key = JSON.stringify(args);\n if (cache.has(key)) {\n return cache.get(key);\n }\n const result = fn(...args);\n cache.set(key, result);\n return result;\n }) as T;\n}\n\nconst memoizeWarning = memoize((message: string) => {\n console.warn(message);\n});\n\nfunction getBabelCaller({ filename, options }: Pick<BabelTransformerArgs, 'filename' | 'options'>) {\n const isNodeModule = filename.includes('node_modules');\n const isServer = options.customTransformOptions?.environment === 'node';\n\n const routerRoot =\n typeof options.customTransformOptions?.routerRoot === 'string'\n ? decodeURI(options.customTransformOptions.routerRoot)\n : undefined;\n\n if (routerRoot == null) {\n memoizeWarning(\n 'Missing transform.routerRoot option in Metro bundling request, falling back to `app` as routes directory.'\n );\n }\n\n return {\n name: 'metro',\n bundler: 'metro',\n platform: options.platform,\n // Empower the babel preset to know the env it's bundling for.\n // Metro automatically updates the cache to account for the custom transform options.\n isServer,\n\n // The base url to make requests from, used for hosting from non-standard locations.\n baseUrl:\n typeof options.customTransformOptions?.baseUrl === 'string'\n ? decodeURI(options.customTransformOptions.baseUrl)\n : '',\n\n // Ensure we always use a mostly-valid router root.\n routerRoot: routerRoot ?? 'app',\n\n isDev: options.dev,\n\n // This value indicates if the user has disabled the feature or not.\n // Other criteria may still cause the feature to be disabled, but all inputs used are\n // already considered in the cache key.\n preserveEnvVars: isCustomTruthy(options.customTransformOptions?.preserveEnvVars)\n ? true\n : undefined,\n asyncRoutes: isCustomTruthy(options.customTransformOptions?.asyncRoutes) ? true : undefined,\n // Pass the engine to babel so we can automatically transpile for the correct\n // target environment.\n engine: options.customTransformOptions?.engine,\n\n // Provide the project root for accurately reading the Expo config.\n projectRoot: options.projectRoot,\n\n isNodeModule,\n\n isHMREnabled: options.hot,\n\n // Set the standard Babel flag to disable ESM transformations.\n supportsStaticESM: options.experimentalImportSupport,\n };\n}\n\nconst transform: BabelTransformer['transform'] = ({\n filename,\n src,\n options,\n // `plugins` is used for `functionMapBabelPlugin` from `metro-source-map`. Could make sense to move this to `babel-preset-expo` too.\n plugins,\n}: BabelTransformerArgs): ReturnType<BabelTransformer['transform']> => {\n const OLD_BABEL_ENV = process.env.BABEL_ENV;\n process.env.BABEL_ENV = options.dev ? 'development' : process.env.BABEL_ENV || 'production';\n\n try {\n const babelConfig: TransformOptions = {\n // ES modules require sourceType='module' but OSS may not always want that\n sourceType: 'unambiguous',\n\n // The output we want from Babel methods\n ast: true,\n code: false,\n // NOTE(EvanBacon): We split the parse/transform steps up to accommodate\n // Hermes parsing, but this defaults to cloning the AST which increases\n // the transformation time by a fair amount.\n // You get this behavior by default when using Babel's `transform` method directly.\n cloneInputAst: false,\n\n // Options for debugging\n cwd: options.projectRoot,\n filename,\n highlightCode: true,\n\n // Load the project babel config file.\n ...loadBabelConfig(options),\n\n babelrc:\n typeof options.enableBabelRCLookup === 'boolean' ? options.enableBabelRCLookup : true,\n\n plugins,\n\n // NOTE(EvanBacon): We heavily leverage the caller functionality to mutate the babel config.\n // This compensates for the lack of a format plugin system in Metro. Users can modify the\n // all (most) of the transforms in their local Babel config.\n // This also helps us keep the transform layers small and focused on a single task. We can also use this to\n // ensure the Babel config caching is more accurate.\n // Additionally, by moving everything Babel-related to the Babel preset, it makes it easier for users to reason\n // about the requirements of an Expo project, making it easier to migrate to other transpilers in the future.\n caller: getBabelCaller({ filename, options }),\n };\n\n const result = transformSync(src, babelConfig, options);\n\n // The result from `transformFromAstSync` can be null (if the file is ignored)\n if (!result) {\n // BabelTransformer specifies that the `ast` can never be null but\n // the function returns here. Discovered when typing `BabelNode`.\n return { ast: null };\n }\n\n assert(result.ast);\n return { ast: result.ast, metadata: result.metadata };\n } finally {\n if (OLD_BABEL_ENV) {\n process.env.BABEL_ENV = OLD_BABEL_ENV;\n }\n }\n};\n\nfunction getCacheKey() {\n const key = crypto.createHash('md5');\n cacheKeyParts.forEach((part) => key.update(part));\n return key.digest('hex');\n}\n\nconst babelTransformer: BabelTransformer = {\n transform,\n getCacheKey,\n};\n\nmodule.exports = babelTransformer;\n"],"mappings":";;AAUA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAK,iBAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,gBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,eAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,cAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgD,SAAAC,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UA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