@expo/config-plugins 9.0.16 → 9.0.17

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.
@@ -10,7 +10,7 @@ export declare function setMinBuildScriptExtVersion(buildGradle: string, { name,
10
10
  name: string;
11
11
  minVersion: number;
12
12
  }): string;
13
- export declare function getVersionName(config: Pick<ExpoConfig, 'version'>): string | null;
14
- export declare function setVersionName(config: Pick<ExpoConfig, 'version'>, buildGradle: string): string;
13
+ export declare function getVersionName(config: Pick<ExpoConfig, 'version' | 'android'>): string | null;
14
+ export declare function setVersionName(config: Pick<ExpoConfig, 'version' | 'android'>, buildGradle: string): string;
15
15
  export declare function getVersionCode(config: Pick<ExpoConfig, 'android'>): number;
16
16
  export declare function setVersionCode(config: Pick<ExpoConfig, 'android'>, buildGradle: string): string;
@@ -63,7 +63,7 @@ function setMinBuildScriptExtVersion(buildGradle, {
63
63
  return buildGradle.replace(regex, `$1${Math.max(minVersion, currentVersionNum)}`);
64
64
  }
65
65
  function getVersionName(config) {
66
- return config.version ?? null;
66
+ return config.android?.version ?? config.version ?? null;
67
67
  }
68
68
  function setVersionName(config, buildGradle) {
69
69
  const versionName = getVersionName(config);
@@ -1 +1 @@
1
- {"version":3,"file":"Version.js","names":["_androidPlugins","data","require","_warnings","withVersion","config","withAppBuildGradle","modResults","language","contents","setVersionCode","setVersionName","addWarningAndroid","exports","withBuildScriptExtMinimumVersion","props","withProjectBuildGradle","setMinBuildScriptExtVersion","buildGradle","name","minVersion","regex","RegExp","currentVersion","match","currentVersionNum","Number","replace","Math","max","getVersionName","version","versionName","pattern","getVersionCode","android","versionCode"],"sources":["../../src/android/Version.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withAppBuildGradle, withProjectBuildGradle } from '../plugins/android-plugins';\nimport { addWarningAndroid } from '../utils/warnings';\n\nexport const withVersion: ConfigPlugin = (config) => {\n return withAppBuildGradle(config, (config) => {\n if (config.modResults.language === 'groovy') {\n config.modResults.contents = setVersionCode(config, config.modResults.contents);\n config.modResults.contents = setVersionName(config, config.modResults.contents);\n } else {\n addWarningAndroid(\n 'android.versionCode',\n `Cannot automatically configure app build.gradle if it's not groovy`\n );\n }\n return config;\n });\n};\n\n/** Sets a numeric version for a value in the project.gradle buildscript.ext object to be at least the provided props.minVersion, if the existing value is greater then no change will be made. */\nexport const withBuildScriptExtMinimumVersion: ConfigPlugin<{\n name: string;\n minVersion: number;\n}> = (config, props) => {\n return withProjectBuildGradle(config, (config) => {\n if (config.modResults.language === 'groovy') {\n config.modResults.contents = setMinBuildScriptExtVersion(config.modResults.contents, props);\n } else {\n addWarningAndroid(\n 'withBuildScriptExtVersion',\n `Cannot automatically configure project build.gradle if it's not groovy`\n );\n }\n return config;\n });\n};\n\nexport function setMinBuildScriptExtVersion(\n buildGradle: string,\n { name, minVersion }: { name: string; minVersion: number }\n) {\n const regex = new RegExp(`(${name}\\\\s?=\\\\s?)(\\\\d+(?:\\\\.\\\\d+)?)`);\n const currentVersion = buildGradle.match(regex)?.[2];\n if (!currentVersion) {\n addWarningAndroid(\n 'withBuildScriptExtVersion',\n `Cannot set minimum buildscript.ext.${name} version because the property \"${name}\" cannot be found or does not have a numeric value.`\n );\n // TODO: Maybe just add the property...\n return buildGradle;\n }\n\n const currentVersionNum = Number(currentVersion);\n return buildGradle.replace(regex, `$1${Math.max(minVersion, currentVersionNum)}`);\n}\n\nexport function getVersionName(config: Pick<ExpoConfig, 'version'>) {\n return config.version ?? null;\n}\n\nexport function setVersionName(config: Pick<ExpoConfig, 'version'>, buildGradle: string) {\n const versionName = getVersionName(config);\n if (versionName === null) {\n return buildGradle;\n }\n\n const pattern = new RegExp(`versionName \".*\"`);\n return buildGradle.replace(pattern, `versionName \"${versionName}\"`);\n}\n\nexport function getVersionCode(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.versionCode ?? 1;\n}\n\nexport function setVersionCode(config: Pick<ExpoConfig, 'android'>, buildGradle: string) {\n const versionCode = getVersionCode(config);\n if (versionCode === null) {\n return buildGradle;\n }\n\n const pattern = new RegExp(`versionCode.*`);\n return buildGradle.replace(pattern, `versionCode ${versionCode}`);\n}\n"],"mappings":";;;;;;;;;;;AAGA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,WAAyB,GAAIC,MAAM,IAAK;EACnD,OAAO,IAAAC,oCAAkB,EAACD,MAAM,EAAGA,MAAM,IAAK;IAC5C,IAAIA,MAAM,CAACE,UAAU,CAACC,QAAQ,KAAK,QAAQ,EAAE;MAC3CH,MAAM,CAACE,UAAU,CAACE,QAAQ,GAAGC,cAAc,CAACL,MAAM,EAAEA,MAAM,CAACE,UAAU,CAACE,QAAQ,CAAC;MAC/EJ,MAAM,CAACE,UAAU,CAACE,QAAQ,GAAGE,cAAc,CAACN,MAAM,EAAEA,MAAM,CAACE,UAAU,CAACE,QAAQ,CAAC;IACjF,CAAC,MAAM;MACL,IAAAG,6BAAiB,EACf,qBAAqB,EACrB,oEACF,CAAC;IACH;IACA,OAAOP,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AAAAQ,OAAA,CAAAT,WAAA,GAAAA,WAAA;AACO,MAAMU,gCAGX,GAAGA,CAACT,MAAM,EAAEU,KAAK,KAAK;EACtB,OAAO,IAAAC,wCAAsB,EAACX,MAAM,EAAGA,MAAM,IAAK;IAChD,IAAIA,MAAM,CAACE,UAAU,CAACC,QAAQ,KAAK,QAAQ,EAAE;MAC3CH,MAAM,CAACE,UAAU,CAACE,QAAQ,GAAGQ,2BAA2B,CAACZ,MAAM,CAACE,UA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AC8B,OAAO,EAAEC,WAAW,IAAI,CAAC;AACzC;AAEO,SAAS1B,cAAcA,CAACL,MAAmC,EAAEa,WAAmB,EAAE;EACvF,MAAMkB,WAAW,GAAGF,cAAc,CAAC7B,MAAM,CAAC;EAC1C,IAAI+B,WAAW,KAAK,IAAI,EAAE;IACxB,OAAOlB,WAAW;EACpB;EAEA,MAAMe,OAAO,GAAG,IAAIX,MAAM,CAAC,eAAe,CAAC;EAC3C,OAAOJ,WAAW,CAACS,OAAO,CAACM,OAAO,EAAE,eAAeG,WAAW,EAAE,CAAC;AACnE","ignoreList":[]}
1
+ {"version":3,"file":"Version.js","names":["_androidPlugins","data","require","_warnings","withVersion","config","withAppBuildGradle","modResults","language","contents","setVersionCode","setVersionName","addWarningAndroid","exports","withBuildScriptExtMinimumVersion","props","withProjectBuildGradle","setMinBuildScriptExtVersion","buildGradle","name","minVersion","regex","RegExp","currentVersion","match","currentVersionNum","Number","replace","Math","max","getVersionName","android","version","versionName","pattern","getVersionCode","versionCode"],"sources":["../../src/android/Version.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withAppBuildGradle, withProjectBuildGradle } from '../plugins/android-plugins';\nimport { addWarningAndroid } from '../utils/warnings';\n\nexport const withVersion: ConfigPlugin = (config) => {\n return withAppBuildGradle(config, (config) => {\n if (config.modResults.language === 'groovy') {\n config.modResults.contents = setVersionCode(config, config.modResults.contents);\n config.modResults.contents = setVersionName(config, config.modResults.contents);\n } else {\n addWarningAndroid(\n 'android.versionCode',\n `Cannot automatically configure app build.gradle if it's not groovy`\n );\n }\n return config;\n });\n};\n\n/** Sets a numeric version for a value in the project.gradle buildscript.ext object to be at least the provided props.minVersion, if the existing value is greater then no change will be made. */\nexport const withBuildScriptExtMinimumVersion: ConfigPlugin<{\n name: string;\n minVersion: number;\n}> = (config, props) => {\n return withProjectBuildGradle(config, (config) => {\n if (config.modResults.language === 'groovy') {\n config.modResults.contents = setMinBuildScriptExtVersion(config.modResults.contents, props);\n } else {\n addWarningAndroid(\n 'withBuildScriptExtVersion',\n `Cannot automatically configure project build.gradle if it's not groovy`\n );\n }\n return config;\n });\n};\n\nexport function setMinBuildScriptExtVersion(\n buildGradle: string,\n { name, minVersion }: { name: string; minVersion: number }\n) {\n const regex = new RegExp(`(${name}\\\\s?=\\\\s?)(\\\\d+(?:\\\\.\\\\d+)?)`);\n const currentVersion = buildGradle.match(regex)?.[2];\n if (!currentVersion) {\n addWarningAndroid(\n 'withBuildScriptExtVersion',\n `Cannot set minimum buildscript.ext.${name} version because the property \"${name}\" cannot be found or does not have a numeric value.`\n );\n // TODO: Maybe just add the property...\n return buildGradle;\n }\n\n const currentVersionNum = Number(currentVersion);\n return buildGradle.replace(regex, `$1${Math.max(minVersion, currentVersionNum)}`);\n}\n\nexport function getVersionName(config: Pick<ExpoConfig, 'version' | 'android'>) {\n return config.android?.version ?? config.version ?? null;\n}\n\nexport function setVersionName(\n config: Pick<ExpoConfig, 'version' | 'android'>,\n buildGradle: string\n) {\n const versionName = getVersionName(config);\n if (versionName === null) {\n return buildGradle;\n }\n\n const pattern = new RegExp(`versionName \".*\"`);\n return buildGradle.replace(pattern, `versionName \"${versionName}\"`);\n}\n\nexport function getVersionCode(config: Pick<ExpoConfig, 'android'>) {\n return config.android?.versionCode ?? 1;\n}\n\nexport function setVersionCode(config: Pick<ExpoConfig, 'android'>, buildGradle: string) {\n const versionCode = getVersionCode(config);\n if (versionCode === null) {\n return buildGradle;\n }\n\n const pattern = new RegExp(`versionCode.*`);\n return buildGradle.replace(pattern, `versionCode ${versionCode}`);\n}\n"],"mappings":";;;;;;;;;;;AAGA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,C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,OAAO,EAAE,eAAeE,WAAW,EAAE,CAAC;AACnE","ignoreList":[]}
@@ -2,7 +2,7 @@ import { ExpoConfig } from '@expo/config-types';
2
2
  import { InfoPlist } from './IosConfig.types';
3
3
  export declare const withVersion: import("..").ConfigPlugin;
4
4
  export declare const withBuildNumber: import("..").ConfigPlugin;
5
- export declare function getVersion(config: Pick<ExpoConfig, 'version'>): string;
6
- export declare function setVersion(config: Pick<ExpoConfig, 'version'>, infoPlist: InfoPlist): InfoPlist;
5
+ export declare function getVersion(config: Pick<ExpoConfig, 'version' | 'ios'>): string;
6
+ export declare function setVersion(config: Pick<ExpoConfig, 'version' | 'ios'>, infoPlist: InfoPlist): InfoPlist;
7
7
  export declare function getBuildNumber(config: Pick<ExpoConfig, 'ios'>): string;
8
8
  export declare function setBuildNumber(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist;
@@ -17,14 +17,15 @@ function _iosPlugins() {
17
17
  }
18
18
  const withVersion = exports.withVersion = (0, _iosPlugins().createInfoPlistPluginWithPropertyGuard)(setVersion, {
19
19
  infoPlistProperty: 'CFBundleShortVersionString',
20
- expoConfigProperty: 'version'
20
+ expoConfigProperty: 'version | ios.version',
21
+ expoPropertyGetter: getVersion
21
22
  }, 'withVersion');
22
23
  const withBuildNumber = exports.withBuildNumber = (0, _iosPlugins().createInfoPlistPluginWithPropertyGuard)(setBuildNumber, {
23
24
  infoPlistProperty: 'CFBundleVersion',
24
25
  expoConfigProperty: 'ios.buildNumber'
25
26
  }, 'withBuildNumber');
26
27
  function getVersion(config) {
27
- return config.version || '1.0.0';
28
+ return config.ios?.version || config.version || '1.0.0';
28
29
  }
29
30
  function setVersion(config, infoPlist) {
30
31
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"Version.js","names":["_iosPlugins","data","require","withVersion","exports","createInfoPlistPluginWithPropertyGuard","setVersion","infoPlistProperty","expoConfigProperty","withBuildNumber","setBuildNumber","getVersion","config","version","infoPlist","CFBundleShortVersionString","getBuildNumber","ios","buildNumber","CFBundleVersion"],"sources":["../../src/ios/Version.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { InfoPlist } from './IosConfig.types';\nimport { createInfoPlistPluginWithPropertyGuard } from '../plugins/ios-plugins';\n\nexport const withVersion = createInfoPlistPluginWithPropertyGuard(\n setVersion,\n {\n infoPlistProperty: 'CFBundleShortVersionString',\n expoConfigProperty: 'version',\n },\n 'withVersion'\n);\n\nexport const withBuildNumber = createInfoPlistPluginWithPropertyGuard(\n setBuildNumber,\n {\n infoPlistProperty: 'CFBundleVersion',\n expoConfigProperty: 'ios.buildNumber',\n },\n 'withBuildNumber'\n);\n\nexport function getVersion(config: Pick<ExpoConfig, 'version'>) {\n return config.version || '1.0.0';\n}\n\nexport function setVersion(config: Pick<ExpoConfig, 'version'>, infoPlist: InfoPlist): InfoPlist {\n return {\n ...infoPlist,\n CFBundleShortVersionString: getVersion(config),\n };\n}\n\nexport function getBuildNumber(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.buildNumber ? config.ios.buildNumber : '1';\n}\n\nexport function setBuildNumber(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist {\n return {\n ...infoPlist,\n CFBundleVersion: getBuildNumber(config),\n };\n}\n"],"mappings":";;;;;;;;;;AAGA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,oDAAsC,EAC/DC,UAAU,EACV;EACEC,iBAAiB,EAAE,4BAA4B;EAC/CC,kBAAkB,EAAE;AACtB,CAAC,EACD,aACF,CAAC;AAEM,MAAMC,eAAe,GAAAL,OAAA,CAAAK,eAAA,GAAG,IAAAJ,oDAAsC,EACnEK,cAAc,EACd;EACEH,iBAAiB,EAAE,iBAAiB;EACpCC,kBAAkB,EAAE;AACtB,CAAC,EACD,iBACF,CAAC;AAEM,SAASG,UAAUA,CAACC,MAAmC,EAAE;EAC9D,OAAOA,MAAM,CAACC,OAAO,IAAI,OAAO;AAClC;AAEO,SAASP,UAAUA,CAACM,MAAmC,EAAEE,SAAoB,EAAa;EAC/F,OAAO;IACL,GAAGA,SAAS;IACZC,0BAA0B,EAAEJ,UAAU,CAACC,MAAM;EAC/C,CAAC;AACH;AAEO,SAASI,cAAcA,CAACJ,MAA+B,EAAE;EAC9D,OAAOA,MAAM,CAACK,GAAG,EAAEC,WAAW,GAAGN,MAAM,CAACK,GAAG,CAACC,WAAW,GAAG,GAAG;AAC/D;AAEO,SAASR,cAAcA,CAACE,MAA+B,EAAEE,SAAoB,EAAa;EAC/F,OAAO;IACL,GAAGA,SAAS;IACZK,eAAe,EAAEH,cAAc,CAACJ,MAAM;EACxC,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"Version.js","names":["_iosPlugins","data","require","withVersion","exports","createInfoPlistPluginWithPropertyGuard","setVersion","infoPlistProperty","expoConfigProperty","expoPropertyGetter","getVersion","withBuildNumber","setBuildNumber","config","ios","version","infoPlist","CFBundleShortVersionString","getBuildNumber","buildNumber","CFBundleVersion"],"sources":["../../src/ios/Version.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { InfoPlist } from './IosConfig.types';\nimport { createInfoPlistPluginWithPropertyGuard } from '../plugins/ios-plugins';\n\nexport const withVersion = createInfoPlistPluginWithPropertyGuard(\n setVersion,\n {\n infoPlistProperty: 'CFBundleShortVersionString',\n expoConfigProperty: 'version | ios.version',\n expoPropertyGetter: getVersion,\n },\n 'withVersion'\n);\n\nexport const withBuildNumber = createInfoPlistPluginWithPropertyGuard(\n setBuildNumber,\n {\n infoPlistProperty: 'CFBundleVersion',\n expoConfigProperty: 'ios.buildNumber',\n },\n 'withBuildNumber'\n);\n\nexport function getVersion(config: Pick<ExpoConfig, 'version' | 'ios'>) {\n return config.ios?.version || config.version || '1.0.0';\n}\n\nexport function setVersion(\n config: Pick<ExpoConfig, 'version' | 'ios'>,\n infoPlist: InfoPlist\n): InfoPlist {\n return {\n ...infoPlist,\n CFBundleShortVersionString: getVersion(config),\n };\n}\n\nexport function getBuildNumber(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.buildNumber ? config.ios.buildNumber : '1';\n}\n\nexport function setBuildNumber(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist {\n return {\n ...infoPlist,\n CFBundleVersion: getBuildNumber(config),\n };\n}\n"],"mappings":";;;;;;;;;;AAGA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,oDAAsC,EAC/DC,UAAU,EACV;EACEC,iBAAiB,EAAE,4BAA4B;EAC/CC,kBAAkB,EAAE,uBAAuB;EAC3CC,kBAAkB,EAAEC;AACtB,CAAC,EACD,aACF,CAAC;AAEM,MAAMC,eAAe,GAAAP,OAAA,CAAAO,eAAA,GAAG,IAAAN,oDAAsC,EACnEO,cAAc,EACd;EACEL,iBAAiB,EAAE,iBAAiB;EACpCC,kBAAkB,EAAE;AACtB,CAAC,EACD,iBACF,CAAC;AAEM,SAASE,UAAUA,CAACG,MAA2C,EAAE;EACtE,OAAOA,MAAM,CAACC,GAAG,EAAEC,OAAO,IAAIF,MAAM,CAACE,OAAO,IAAI,OAAO;AACzD;AAEO,SAAST,UAAUA,CACxBO,MAA2C,EAC3CG,SAAoB,EACT;EACX,OAAO;IACL,GAAGA,SAAS;IACZC,0BAA0B,EAAEP,UAAU,CAACG,MAAM;EAC/C,CAAC;AACH;AAEO,SAASK,cAAcA,CAACL,MAA+B,EAAE;EAC9D,OAAOA,MAAM,CAACC,GAAG,EAAEK,WAAW,GAAGN,MAAM,CAACC,GAAG,CAACK,WAAW,GAAG,GAAG;AAC/D;AAEO,SAASP,cAAcA,CAACC,MAA+B,EAAEG,SAAoB,EAAa;EAC/F,OAAO;IACL,GAAGA,SAAS;IACZI,eAAe,EAAEF,cAAc,CAACL,MAAM;EACxC,CAAC;AACH","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/config-plugins",
3
- "version": "9.0.16",
3
+ "version": "9.0.17",
4
4
  "description": "A library for Expo config plugins",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "50890a252047d8f4513d6859216229eee353fcb0"
60
+ "gitHead": "1992dd3ba012ec59a646e383b9895ea6b577948b"
61
61
  }