mirror of
https://github.com/expo/config-plugins.git
synced 2026-11-13 20:28:07 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e06dcae54 | ||
|
|
a24ea1df58 | ||
|
|
50646306c5 | ||
|
|
6fbb2192ad | ||
|
|
7c3cda4f79 | ||
|
|
a78e569f54 |
No files matched your search
@@ -40,6 +40,7 @@ jobs:
|
|||||||
ios-stickers,
|
ios-stickers,
|
||||||
react-native-ble-plx,
|
react-native-ble-plx,
|
||||||
react-native-blob-util,
|
react-native-blob-util,
|
||||||
|
react-native-branch,
|
||||||
react-native-google-cast,
|
react-native-google-cast,
|
||||||
react-native-pdf,
|
react-native-pdf,
|
||||||
# react-native-quick-actions,
|
# react-native-quick-actions,
|
||||||
@@ -58,7 +59,8 @@ jobs:
|
|||||||
run: yarn lint --max-warnings 0
|
run: yarn lint --max-warnings 0
|
||||||
working-directory: packages/${{ matrix.package }}
|
working-directory: packages/${{ matrix.package }}
|
||||||
- name: Test ${{ matrix.package }}
|
- name: Test ${{ matrix.package }}
|
||||||
run: cd packages/${{ matrix.package }} && yarn test
|
run: yarn test
|
||||||
|
working-directory: packages/${{ matrix.package }}
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
EXPO_DEBUG: true
|
EXPO_DEBUG: true
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/android-jsc-intl [1.0.4](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* **android-jsc-intl:** lint fix ([5ca4e44](https://github.com/expo/config-plugins/commit/5ca4e44a49ad5c3153b4a2b15acf69db594d76b8))
|
||||||
|
|
||||||
### @config-plugins/android-jsc-intl [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
### @config-plugins/android-jsc-intl [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -8,12 +8,12 @@ const config_plugins_1 = require("@expo/config-plugins");
|
|||||||
*/
|
*/
|
||||||
const withAndroidJscIntl = (config) => {
|
const withAndroidJscIntl = (config) => {
|
||||||
// Return the modified config.
|
// Return the modified config.
|
||||||
return config_plugins_1.withAppBuildGradle(config, config => {
|
return config_plugins_1.withAppBuildGradle(config, (config) => {
|
||||||
if (config.modResults.language === 'groovy') {
|
if (config.modResults.language === "groovy") {
|
||||||
config.modResults.contents = config.modResults.contents.replace('org.webkit:android-jsc:+', 'org.webkit:android-jsc-intl:+');
|
config.modResults.contents = config.modResults.contents.replace("org.webkit:android-jsc:+", "org.webkit:android-jsc-intl:+");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw new Error('[@expo/config-plugins][withAndroidJscIntl] Cannot enable Intl in Android JSC app gradle because the build.gradle is not groovy.');
|
throw new Error("[@expo/config-plugins][withAndroidJscIntl] Cannot enable Intl in Android JSC app gradle because the build.gradle is not groovy.");
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/android-jsc-intl",
|
"name": "@config-plugins/android-jsc-intl",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "Config plugin for android-jsc-intl package",
|
"description": "Config plugin for android-jsc-intl package",
|
||||||
"main": "build/withAndroidJscIntl.js",
|
"main": "build/withAndroidJscIntl.js",
|
||||||
"types": "build/withAndroidJscIntl.d.ts",
|
"types": "build/withAndroidJscIntl.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/ios-stickers [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* **ios-stickers:** lint fix ([331ecb1](https://github.com/expo/config-plugins/commit/331ecb163f000578bc519ebe94f90d62374095d1))
|
||||||
|
|
||||||
### @config-plugins/ios-stickers [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
### @config-plugins/ios-stickers [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.normalizeStickersProps = void 0;
|
exports.normalizeStickersProps = void 0;
|
||||||
|
const path_1 = __importDefault(require("path"));
|
||||||
const schema_utils_1 = require("schema-utils");
|
const schema_utils_1 = require("schema-utils");
|
||||||
const options_json_1 = __importDefault(require("./options.json"));
|
const options_json_1 = __importDefault(require("./options.json"));
|
||||||
const withStickerAssets_1 = require("./withStickerAssets");
|
const withStickerAssets_1 = require("./withStickerAssets");
|
||||||
const withStickerInfoPlist_1 = require("./withStickerInfoPlist");
|
const withStickerInfoPlist_1 = require("./withStickerInfoPlist");
|
||||||
const withStickerXcodeTarget_1 = require("./withStickerXcodeTarget");
|
const withStickerXcodeTarget_1 = require("./withStickerXcodeTarget");
|
||||||
const path_1 = __importDefault(require("path"));
|
|
||||||
// TODO: Maybe the name is better to use as a prop...
|
// TODO: Maybe the name is better to use as a prop...
|
||||||
const sizeColumnMap = {
|
const sizeColumnMap = {
|
||||||
4: "small",
|
4: "small",
|
||||||
|
|||||||
+3
-3
@@ -70,9 +70,9 @@ const pbxTargetDependency = "PBXTargetDependency";
|
|||||||
const pbxContainerItemProxy = "PBXContainerItemProxy";
|
const pbxContainerItemProxy = "PBXContainerItemProxy";
|
||||||
function addStickersTarget(proj, name, bundleId, subfolder) {
|
function addStickersTarget(proj, name, bundleId, subfolder) {
|
||||||
// Setup uuid and name of new target
|
// Setup uuid and name of new target
|
||||||
let targetUuid = proj.generateUuid();
|
const targetUuid = proj.generateUuid();
|
||||||
let targetType = "app_extension_messages_sticker_pack";
|
const targetType = "app_extension_messages_sticker_pack";
|
||||||
let targetName = name.trim();
|
const targetName = name.trim();
|
||||||
const bundleName = subfolder.trim().split(" ").join("-");
|
const bundleName = subfolder.trim().split(" ").join("-");
|
||||||
// Check type against list of allowed target types
|
// Check type against list of allowed target types
|
||||||
if (!targetName) {
|
if (!targetName) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/ios-stickers",
|
"name": "@config-plugins/ios-stickers",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "Config plugin to auto configure iOS iMessage stickers",
|
"description": "Config plugin to auto configure iOS iMessage stickers",
|
||||||
"main": "build/withStickerPack.js",
|
"main": "build/withStickerPack.js",
|
||||||
"types": "build/withStickerPack.d.ts",
|
"types": "build/withStickerPack.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-adjust [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* upgrade google play-services-analytics to v18.0.1 ([a24ea1d](https://github.com/expo/config-plugins/commit/a24ea1df58e9d0639dc4fa016aae8a4e15d53529))
|
||||||
|
|
||||||
### @config-plugins/react-native-adjust [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
### @config-plugins/react-native-adjust [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ const addAndroidPackagingOptions = (src) => {
|
|||||||
tag: "react-native-play-services-analytics",
|
tag: "react-native-play-services-analytics",
|
||||||
src,
|
src,
|
||||||
newSrc: `
|
newSrc: `
|
||||||
implementation 'com.google.android.gms:play-services-analytics:18.0.0'
|
implementation 'com.google.android.gms:play-services-analytics:18.0.1'
|
||||||
implementation 'com.android.installreferrer:installreferrer:2.2'
|
implementation 'com.android.installreferrer:installreferrer:2.2'
|
||||||
`,
|
`,
|
||||||
anchor: /dependencies(?:\s+)?\{/,
|
anchor: /dependencies(?:\s+)?\{/,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-adjust",
|
"name": "@config-plugins/react-native-adjust",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "Config plugin to auto configure Adjust SDK on prebuild",
|
"description": "Config plugin to auto configure Adjust SDK on prebuild",
|
||||||
"main": "build/withReactNativeAdjust.js",
|
"main": "build/withReactNativeAdjust.js",
|
||||||
"types": "build/withReactNativeAdjust.d.ts",
|
"types": "build/withReactNativeAdjust.d.ts",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const addAndroidPackagingOptions = (src: string) => {
|
|||||||
tag: "react-native-play-services-analytics",
|
tag: "react-native-play-services-analytics",
|
||||||
src,
|
src,
|
||||||
newSrc: `
|
newSrc: `
|
||||||
implementation 'com.google.android.gms:play-services-analytics:18.0.0'
|
implementation 'com.google.android.gms:play-services-analytics:18.0.1'
|
||||||
implementation 'com.android.installreferrer:installreferrer:2.2'
|
implementation 'com.android.installreferrer:installreferrer:2.2'
|
||||||
`,
|
`,
|
||||||
anchor: /dependencies(?:\s+)?\{/,
|
anchor: /dependencies(?:\s+)?\{/,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/config-plugins": "^4.1.0",
|
"@expo/config-plugins": "^4.1.0",
|
||||||
"@expo/config-types": "^43.0.1"
|
"@expo/config-types": "^44.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"expo-module-scripts": "^2.0.0"
|
"expo-module-scripts": "^2.0.0"
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.expo.mycoolapp">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
<queries>
|
||||||
|
<!-- Support checking for http(s) links via the Linking API -->
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="https" />
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
|
|
||||||
|
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme">
|
||||||
|
<activity android:name=".MainActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:windowSoftInputMode="adjustResize">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
import { AndroidConfig } from "@expo/config-plugins";
|
||||||
|
import { resolve } from "path";
|
||||||
|
|
||||||
|
import { getBranchApiKey, setBranchApiKey } from "../withBranchAndroid";
|
||||||
|
|
||||||
|
const { findMetaDataItem, getMainApplication, readAndroidManifestAsync } =
|
||||||
|
AndroidConfig.Manifest;
|
||||||
|
|
||||||
|
const sampleManifestPath = resolve(
|
||||||
|
__dirname,
|
||||||
|
"./fixtures",
|
||||||
|
"react-native-AndroidManifest.xml"
|
||||||
|
);
|
||||||
|
|
||||||
|
describe(getBranchApiKey, () => {
|
||||||
|
it(`returns null if no android branch api key is provided`, () => {
|
||||||
|
expect(getBranchApiKey({ android: { config: {} } } as any)).toBe(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`returns apikey if android branch api key is provided`, () => {
|
||||||
|
expect(
|
||||||
|
getBranchApiKey({
|
||||||
|
android: { config: { branch: { apiKey: "MY-API-KEY" } } },
|
||||||
|
} as any)
|
||||||
|
).toBe("MY-API-KEY");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe(setBranchApiKey, () => {
|
||||||
|
it("sets branch api key in AndroidManifest.xml if given", async () => {
|
||||||
|
let androidManifestJson = await readAndroidManifestAsync(
|
||||||
|
sampleManifestPath
|
||||||
|
);
|
||||||
|
androidManifestJson = await setBranchApiKey(
|
||||||
|
"MY-API-KEY",
|
||||||
|
androidManifestJson
|
||||||
|
);
|
||||||
|
let mainApplication = getMainApplication(androidManifestJson);
|
||||||
|
|
||||||
|
expect(
|
||||||
|
findMetaDataItem(mainApplication, "io.branch.sdk.BranchKey")
|
||||||
|
).toBeGreaterThan(-1);
|
||||||
|
|
||||||
|
// Unset the item
|
||||||
|
|
||||||
|
androidManifestJson = await setBranchApiKey(null, androidManifestJson);
|
||||||
|
mainApplication = getMainApplication(androidManifestJson);
|
||||||
|
|
||||||
|
expect(findMetaDataItem(mainApplication, "io.branch.sdk.BranchKey")).toBe(
|
||||||
|
-1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import { getBranchApiKey, setBranchApiKey } from "../withBranchIOS";
|
||||||
|
|
||||||
|
describe(getBranchApiKey, () => {
|
||||||
|
it(`returns null if no api key is provided`, () => {
|
||||||
|
expect(getBranchApiKey({})).toBe(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`returns the api key if provided`, () => {
|
||||||
|
expect(
|
||||||
|
getBranchApiKey({ ios: { config: { branch: { apiKey: "123" } } } })
|
||||||
|
).toBe("123");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe(setBranchApiKey, () => {
|
||||||
|
it(`sets branch_key.live if the api key is given`, () => {
|
||||||
|
expect(setBranchApiKey("123", {})).toMatchObject({
|
||||||
|
branch_key: {
|
||||||
|
live: "123",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`makes no changes to the infoPlist no api key is provided`, () => {
|
||||||
|
expect(setBranchApiKey(null, {})).toMatchObject({});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -9,7 +9,7 @@ export function getBranchApiKey(config: Pick<ExpoConfig, "ios">) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function setBranchApiKey(
|
export function setBranchApiKey(
|
||||||
apiKey: string,
|
apiKey: string | null,
|
||||||
infoPlist: InfoPlist
|
infoPlist: InfoPlist
|
||||||
): InfoPlist {
|
): InfoPlist {
|
||||||
if (apiKey === null) {
|
if (apiKey === null) {
|
||||||
|
|||||||
Reference in new issue
Block a user