@expo/build-tools 1.0.21 → 1.0.22

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.
@@ -25,7 +25,7 @@ async function prebuildAsync(ctx, { logger, workingDir, options }) {
25
25
  await (0, project_1.runExpoCliCommand)(ctx, prebuildCommandArgs, spawnOptions, {
26
26
  npmVersionAtLeast7: await (0, packageManager_1.isAtLeastNpm7Async)(),
27
27
  });
28
- await (0, installDependencies_1.installDependenciesAsync)(ctx, { logger, workingDir });
28
+ await (0, installDependencies_1.installDependenciesAsync)(ctx, { logger, workingDir: (0, installDependencies_1.resolvePackagerDir)(ctx) });
29
29
  }
30
30
  exports.prebuildAsync = prebuildAsync;
31
31
  function getPrebuildCommandArgs(ctx, { options }) {
@@ -1 +1 @@
1
- {"version":3,"file":"prebuild.js","sourceRoot":"","sources":["../../src/common/prebuild.ts"],"names":[],"mappings":";;;;;;AAEA,oDAA4B;AAI5B,4DAA6D;AAC7D,8CAA6E;AAE7E,+DAAiE;AAQ1D,KAAK,UAAU,aAAa,CACjC,GAAuB,EACvB,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAqE;;IAElG,MAAM,oBAAoB,GAAG,MAAA,GAAG,CAAC,GAAG,CAAC,kBAAkB,0CAAE,OAAO,CAAC;IACjE,MAAM,kBAAkB,GACtB,CAAC,oBAAoB,IAAI,gBAAM,CAAC,SAAS,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IAE7E,MAAM,YAAY,GAAiB;QACjC,GAAG,EAAE,UAAU;QACf,MAAM;QACN,GAAG,EAAE;YACH,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,yBAAyB,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS;YACrB,GAAG,GAAG,CAAC,GAAG;SACX;KACF,CAAC;IAEF,MAAM,mBAAmB,GAAG,sB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jD,eAAe,GAAG,eAAe,CAAC,SAAS,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KAC9E;IACD,IAAI,eAAe,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE;QACpD,eAAe,GAAG,eAAe,CAAC,SAAS,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KACjF;IACD,IAAI,CAAC,IAAA,gCAAsB,EAAC,GAAG,CAAC,EAAE;QAChC,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;KACrE;IACD,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import { Job } from '@expo/eas-build-job';\nimport { SpawnOptions } from '@expo/turtle-spawn';\nimport semver from 'semver';\nimport { bunyan } from '@expo/logger';\n\nimport { BuildContext } from '../context';\nimport { isAtLeastNpm7Async } from '../utils/packageManager';\nimport { runExpoCliCommand, shouldUseGlobalExpoCli } from '../utils/project';\n\nimport { installDependenciesAsync } from './installDependencies';\n\nexport interface PrebuildOptions {\n extraEnvs?: Record<string, string>;\n clean?: boolean;\n skipDependencyUpdate?: string;\n}\n\nexport async function prebuildAsync<TJob extends Job>(\n ctx: BuildContext<TJob>,\n { logger, workingDir, options }: { logger: bunyan; workingDir: string; options?: PrebuildOptions }\n): Promise<void> {\n const customExpoCliVersion = ctx.job.builderEnvironment?.expoCli;\n const shouldDisableSharp =\n !customExpoCliVersion || semver.satisfies(customExpoCliVersion, '>=5.4.4');\n\n const spawnOptions: SpawnOptions = {\n cwd: workingDir,\n logger,\n env: {\n ...(shouldDisableSharp ? { EXPO_IMAGE_UTILS_NO_SHARP: '1' } : {}),\n ...options?.extraEnvs,\n ...ctx.env,\n },\n };\n\n const prebuildCommandArgs = getPrebuildCommandArgs(ctx, { options });\n await runExpoCliCommand(ctx, prebuildCommandArgs, spawnOptions, {\n npmVersionAtLeast7: await isAtLeastNpm7Async(),\n });\n await installDependenciesAsync(ctx, { logger, workingDir });\n}\n\nfunction getPrebuildCommandArgs<TJob extends Job>(\n ctx: BuildContext<TJob>,\n { options }: { options?: PrebuildOptions }\n): string[] {\n let prebuildCommand =\n ctx.job.experimental?.prebuildCommand ??\n `prebuild --non-interactive --no-install --platform ${ctx.job.platform}`;\n if (!prebuildCommand.match(/(?:--platform| -p)/)) {\n prebuildCommand = `${prebuildCommand} --platform ${ctx.job.platform}`;\n }\n if (options?.skipDependencyUpdate) {\n prebuildCommand = `${prebuildCommand} --skip-dependency-update ${options.skipDependencyUpdate}`;\n }\n if (options?.clean) {\n prebuildCommand = `${prebuildCommand} --clean`;\n }\n const npxCommandPrefix = 'npx ';\n const expoCommandPrefix = 'expo ';\n const expoCliCommandPrefix = 'expo-cli ';\n if (prebuildCommand.startsWith(npxCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(npxCommandPrefix.length).trim();\n }\n if (prebuildCommand.startsWith(expoCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(expoCommandPrefix.length).trim();\n }\n if (prebuildCommand.startsWith(expoCliCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(expoCliCommandPrefix.length).trim();\n }\n if (!shouldUseGlobalExpoCli(ctx)) {\n prebuildCommand = prebuildCommand.replace(' --non-interactive', '');\n }\n return prebuildCommand.split(' ');\n}\n"]}
1
+ {"version":3,"file":"prebuild.js","sourceRoot":"","sources":["../../src/common/prebuild.ts"],"names":[],"mappings":";;;;;;AAEA,oDAA4B;AAI5B,4DAA6D;AAC7D,8CAA6E;AAE7E,+DAAqF;AAQ9E,KAAK,UAAU,aAAa,CACjC,GAAuB,EACvB,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAqE;;IAElG,MAAM,oBAAoB,GAAG,MAAA,GAAG,CAAC,GAAG,CAAC,kBAAkB,0CAAE,OAAO,CAAC;IACjE,MAAM,kBAAkB,GACtB,CAAC,oBAAoB,IAAI,gBAAM,CAAC,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,CAAE,KAAK,EAAE;QAClB,eAAe,GAAG,GAAG,eAAe,UAAU,CAAC;KAChD;IACD,MAAM,gBAAgB,GAAG,MAAM,CAAC;IAChC,MAAM,iBAAiB,GAAG,OAAO,CAAC;IAClC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IACzC,IAAI,eAAe,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;QAChD,eAAe,GAAG,eAAe,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KAC7E;IACD,IAAI,eAAe,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE;QACjD,eAAe,GAAG,eAAe,CAAC,SAAS,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KAC9E;IACD,IAAI,eAAe,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE;QACpD,eAAe,GAAG,eAAe,CAAC,SAAS,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KACjF;IACD,IAAI,CAAC,IAAA,gCAAsB,EAAC,GAAG,CAAC,EAAE;QAChC,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;KACrE;IACD,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import { Job } from '@expo/eas-build-job';\nimport { SpawnOptions } from '@expo/turtle-spawn';\nimport semver from 'semver';\nimport { bunyan } from '@expo/logger';\n\nimport { BuildContext } from '../context';\nimport { isAtLeastNpm7Async } from '../utils/packageManager';\nimport { runExpoCliCommand, shouldUseGlobalExpoCli } from '../utils/project';\n\nimport { installDependenciesAsync, resolvePackagerDir } from './installDependencies';\n\nexport interface PrebuildOptions {\n extraEnvs?: Record<string, string>;\n clean?: boolean;\n skipDependencyUpdate?: string;\n}\n\nexport async function prebuildAsync<TJob extends Job>(\n ctx: BuildContext<TJob>,\n { logger, workingDir, options }: { logger: bunyan; workingDir: string; options?: PrebuildOptions }\n): Promise<void> {\n const customExpoCliVersion = ctx.job.builderEnvironment?.expoCli;\n const shouldDisableSharp =\n !customExpoCliVersion || semver.satisfies(customExpoCliVersion, '>=5.4.4');\n\n const spawnOptions: SpawnOptions = {\n cwd: workingDir,\n logger,\n env: {\n ...(shouldDisableSharp ? { EXPO_IMAGE_UTILS_NO_SHARP: '1' } : {}),\n ...options?.extraEnvs,\n ...ctx.env,\n },\n };\n\n const prebuildCommandArgs = getPrebuildCommandArgs(ctx, { options });\n await runExpoCliCommand(ctx, prebuildCommandArgs, spawnOptions, {\n npmVersionAtLeast7: await isAtLeastNpm7Async(),\n });\n await installDependenciesAsync(ctx, { logger, workingDir: resolvePackagerDir(ctx) });\n}\n\nfunction getPrebuildCommandArgs<TJob extends Job>(\n ctx: BuildContext<TJob>,\n { options }: { options?: PrebuildOptions }\n): string[] {\n let prebuildCommand =\n ctx.job.experimental?.prebuildCommand ??\n `prebuild --non-interactive --no-install --platform ${ctx.job.platform}`;\n if (!prebuildCommand.match(/(?:--platform| -p)/)) {\n prebuildCommand = `${prebuildCommand} --platform ${ctx.job.platform}`;\n }\n if (options?.skipDependencyUpdate) {\n prebuildCommand = `${prebuildCommand} --skip-dependency-update ${options.skipDependencyUpdate}`;\n }\n if (options?.clean) {\n prebuildCommand = `${prebuildCommand} --clean`;\n }\n const npxCommandPrefix = 'npx ';\n const expoCommandPrefix = 'expo ';\n const expoCliCommandPrefix = 'expo-cli ';\n if (prebuildCommand.startsWith(npxCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(npxCommandPrefix.length).trim();\n }\n if (prebuildCommand.startsWith(expoCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(expoCommandPrefix.length).trim();\n }\n if (prebuildCommand.startsWith(expoCliCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(expoCliCommandPrefix.length).trim();\n }\n if (!shouldUseGlobalExpoCli(ctx)) {\n prebuildCommand = prebuildCommand.replace(' --non-interactive', '');\n }\n return prebuildCommand.split(' ');\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/build-tools",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -61,5 +61,5 @@
61
61
  "node": "18.13.0",
62
62
  "yarn": "1.22.19"
63
63
  },
64
- "gitHead": "cba11a9a8c1aa55ca4c3bb06a43150b185bebf64"
64
+ "gitHead": "f44c5e619e468bb85999216b82133b6ede85d4c1"
65
65
  }