mirror of
https://github.com/expo/config-plugins.git
synced 2026-11-13 20:28:07 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b22a71343 | ||
|
|
e49a241243 | ||
|
|
2e06dcae54 | ||
|
|
a24ea1df58 | ||
|
|
50646306c5 | ||
|
|
6fbb2192ad | ||
|
|
7c3cda4f79 | ||
|
|
a78e569f54 | ||
|
|
3fee1c0e6e | ||
|
|
31aee40ee3 | ||
|
|
21c49280d4 | ||
|
|
ce1a818564 | ||
|
|
241d378a54 | ||
|
|
d1bf616248 | ||
|
|
a99c60efd5 | ||
|
|
331ecb163f | ||
|
|
1003ddb2ec | ||
|
|
5ca4e44a49 | ||
|
|
4103b4eb7d | ||
|
|
f8023bf04c | ||
|
|
1b3e87f930 | ||
|
|
5e3ed6d5e4 | ||
|
|
f46f340623 | ||
|
|
99f18da4ed | ||
|
|
999cc00275 | ||
|
|
363d36b0bb | ||
|
|
37d11f1867 | ||
|
|
7ecaaf5bd9 | ||
|
|
9ff7299176 | ||
|
|
f1bd9a7e27 | ||
|
|
83b52a3b61 | ||
|
|
16dfad4dc8 | ||
|
|
0f6493e28d | ||
|
|
0d55f9c8c9 | ||
|
|
fa85f7cf36 | ||
|
|
28997c1062 | ||
|
|
d6050beb2a | ||
|
|
5f4e90059e | ||
|
|
c3a375b292 | ||
|
|
1648e8598b | ||
|
|
e2d2b27494 | ||
|
|
ff8b167764 | ||
|
|
eee366bebc | ||
|
|
72fa3e14ef | ||
|
|
6324eb041b | ||
|
|
480ec19161 | ||
|
|
39a9e63fe9 | ||
|
|
7ffc38a808 | ||
|
|
97dcf1aca6 | ||
|
|
4dcc613a70 | ||
|
|
b07ab9e848 | ||
|
|
7411365343 | ||
|
|
e6e8745f05 | ||
|
|
e9f737cfeb | ||
|
|
b0cfebadb4 | ||
|
|
eb957dec79 | ||
|
|
eb4927760b | ||
|
|
3719d67596 | ||
|
|
df9ac710d5 | ||
|
|
73109da98d | ||
|
|
c904bc6a5f | ||
|
|
1374ab2bf4 | ||
|
|
429dcdc1d0 | ||
|
|
5de4ae3e61 | ||
|
|
537afa4c7d | ||
|
|
ada8b99f32 | ||
|
|
546da1c354 | ||
|
|
71c0aa1387 | ||
|
|
8414fda99b | ||
|
|
95c1f0fcd0 | ||
|
|
718c3f9347 | ||
|
|
2591fe2de7 | ||
|
|
39a88c3703 | ||
|
|
1bc203e66e | ||
|
|
352e887b21 | ||
|
|
96fbab5b2a | ||
|
|
4b7192f364 | ||
|
|
7896eccf49 | ||
|
|
ab8076adf5 | ||
|
|
4affbbb7cc | ||
|
|
831546f34b | ||
|
|
90b841d285 |
No files matched your search
@@ -0,0 +1 @@
|
||||
/* @EvanBacon
|
||||
@@ -0,0 +1,24 @@
|
||||
<!--
|
||||
🚨 We use semantic release (a bot publishes everything automatically)
|
||||
🚨 so please use conventional commit style for the PR title:
|
||||
🚨 https://www.conventionalcommits.org/en/v1.0.0/
|
||||
🚨 Example: feat(detox): add new step
|
||||
-->
|
||||
|
||||
# Why
|
||||
|
||||
<!--
|
||||
Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests.
|
||||
-->
|
||||
|
||||
# How
|
||||
|
||||
<!--
|
||||
How did you build this feature or fix this bug and why?
|
||||
-->
|
||||
|
||||
# Test Plan
|
||||
|
||||
<!--
|
||||
Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction.
|
||||
-->
|
||||
@@ -0,0 +1,91 @@
|
||||
# AUTO GENERATED:
|
||||
# This file was generated by running the following in the root directory:
|
||||
#
|
||||
# yarn update-dependabot-config
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: packages/android-jsc-intl
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/detox
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/ffmpeg-kit-react-native
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/ios-stickers
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/react-native-adjust
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/react-native-ble-plx
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/react-native-blob-util
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/react-native-branch
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/react-native-callkeep
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/react-native-dynamic-app-icon
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/react-native-google-cast
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/react-native-pdf
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/react-native-quick-actions
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
- package-ecosystem: npm
|
||||
directory: packages/react-native-webrtc
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: America/Los_Angeles
|
||||
@@ -1,25 +0,0 @@
|
||||
name: PR Title
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "*"
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- edited
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: aslafy-z/[email protected]
|
||||
# continue-on-error: true
|
||||
id: title-check
|
||||
with:
|
||||
success-state: PR title is valid
|
||||
failure-state: "PR title does not follow the conventional commit spec: https://www.conventionalcommits.org/en/v1.0.0/"
|
||||
context-name: pr-title
|
||||
preset: conventional-changelog-angular@latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
@@ -22,11 +22,16 @@ jobs:
|
||||
- run: yarn install --frozen-lockfile --check-files
|
||||
- run: yarn lerna run prepare --stream
|
||||
|
||||
# https://github.com/dhoulb/multi-semantic-release
|
||||
# If the dry run fails then it will prevent us from automatically breaking the repo.
|
||||
- name: Semantic release (dry run)
|
||||
run: npx multi-semantic-release --dry-run --ignore-private-packages
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
- name: Semantic release
|
||||
# use `--ignore-packages` to ignore packages on bumping process
|
||||
# npx multi-semantic-release --ignore-packages=packages/a/**,packages/b/**
|
||||
run: npx multi-semantic-release
|
||||
run: npx multi-semantic-release --ignore-private-packages
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
@@ -40,6 +40,7 @@ jobs:
|
||||
ios-stickers,
|
||||
react-native-ble-plx,
|
||||
react-native-blob-util,
|
||||
react-native-branch,
|
||||
react-native-google-cast,
|
||||
react-native-pdf,
|
||||
# react-native-quick-actions,
|
||||
@@ -54,8 +55,12 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- name: Lint ${{ matrix.package }}
|
||||
run: yarn lint --max-warnings 0
|
||||
working-directory: packages/${{ matrix.package }}
|
||||
- name: Test ${{ matrix.package }}
|
||||
run: cd packages/${{ matrix.package }} && yarn test
|
||||
run: yarn test
|
||||
working-directory: packages/${{ matrix.package }}
|
||||
env:
|
||||
CI: true
|
||||
EXPO_DEBUG: true
|
||||
+5
-1
@@ -51,4 +51,8 @@ xcuserdata
|
||||
# VSCode
|
||||
.history/
|
||||
|
||||
# packages/*/build/
|
||||
# Ignore build folders
|
||||
|
||||
packages/*/build/**
|
||||
packages/*/plugin/build/**
|
||||
packages/@*/*/build/**
|
||||
+1
-1
@@ -49,6 +49,7 @@ module.exports = {
|
||||
},
|
||||
],
|
||||
"@semantic-release/changelog",
|
||||
"@semantic-release/npm",
|
||||
[
|
||||
"@semantic-release/git",
|
||||
{
|
||||
@@ -57,6 +58,5 @@ module.exports = {
|
||||
},
|
||||
],
|
||||
"@semantic-release/github",
|
||||
"@semantic-release/npm",
|
||||
],
|
||||
};
|
||||
+16
-4
@@ -5,10 +5,22 @@
|
||||
To submit a pull request:
|
||||
|
||||
1. Fork the [repository](https://github.com/expo/config-plugins) and create a feature branch. (Existing contributors can create feature branches without forking. Prefix the branch name with `@your-github-username/`.)
|
||||
2. Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) including in the PR tile.
|
||||
3. Fill out the entire PR template. Ensure your code is tested locally and has continuous tests in CI.
|
||||
4. Make sure all tests pass on GitHub Actions.
|
||||
5. Wait for a review and adjust the code if necessary.
|
||||
2. Run `yarn` in the root directory to generate the build files.
|
||||
3. Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) including in the PR tile.
|
||||
4. Fill out the entire PR template. Ensure your code is tested locally and has continuous tests in CI.
|
||||
5. Make sure all tests pass on GitHub Actions.
|
||||
6. Wait for a review and adjust the code if necessary.
|
||||
|
||||
## Creating a plugin
|
||||
|
||||
- Plugins can be generated by running `yarn gen`.
|
||||
- Add plugins to the example in [`apps/app`](/apps/app/package.json) to test them.
|
||||
- The example app should always stay in a state of regeneration.
|
||||
|
||||
Be sure to run the following scripts in the **root directory** to update automation tools:
|
||||
|
||||
- Update dependabot: `yarn update-dependabot-config`
|
||||
- Update the issue template: `yarn update-issue-template`
|
||||
|
||||
## Publishing a release
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# Expo Config Plugins
|
||||
|
||||
A collection of custom WIP config plugins for Expo dev clients. Use at your own discretion.
|
||||
- A collection of [Expo config plugins](https://docs.expo.dev/guides/config-plugins/) for configuring the `expo prebuild` command.
|
||||
- This repo is to Expo config plugins as [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) is to TypeScript.
|
||||
- We prefer packages ship their own Expo config plugin (to ensure versioning is aligned), but if they haven't adopted the system yet, the community can add a package here.
|
||||
- All packages here are community maintained. Feel free to improve docs, packages, tests, etc.
|
||||
- We maintain a 1-1 mapping of **native packages** ⇔ `@config-plugins/*`. This means there should be no general utility packages here -- those are better suited for a different repo / NPM namespace.
|
||||
|
||||
## Contributing!
|
||||
|
||||
## Creating a plugin
|
||||
|
||||
- Plugins can be generated by running `yarn gen`.
|
||||
- Add plugins to the example in [`apps/app`](/apps/app/package.json) to test them.
|
||||
- The example app should always stay in a state of regeneration.
|
||||
See the [contributing guide](/CONTRIBUTING.md).
|
||||
@@ -1,3 +1,27 @@
|
||||
### @expo/app [1.0.1](https://github.com/expo/config-plugins/compare/@expo/[email protected]...@expo/[email protected]) (2022-03-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** use correct internal versions ([ab8076a](https://github.com/expo/config-plugins/commit/ab8076adf51e9ba0439eba60b153d729a0996b8d))
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@config-plugins/android-jsc-intl:** upgraded to 1.0.1
|
||||
* **@config-plugins/detox:** upgraded to 1.0.1
|
||||
* **@config-plugins/react-native-adjust:** upgraded to 1.0.0
|
||||
* **@config-plugins/react-native-ble-plx:** upgraded to 1.0.0
|
||||
* **@config-plugins/react-native-blob-util:** upgraded to 1.0.1
|
||||
* **@config-plugins/react-native-branch:** upgraded to 1.0.0
|
||||
* **@config-plugins/react-native-callkeep:** upgraded to 1.0.0
|
||||
* **@config-plugins/react-native-dynamic-app-icon:** upgraded to 1.0.0
|
||||
* **@config-plugins/react-native-google-cast:** upgraded to 1.0.0
|
||||
* **@config-plugins/react-native-pdf:** upgraded to 1.0.0
|
||||
* **@config-plugins/react-native-quick-actions:** upgraded to 1.0.0
|
||||
* **@config-plugins/react-native-webrtc:** upgraded to 1.0.0
|
||||
|
||||
## @expo/app 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
|
||||
+14
-14
@@ -21,20 +21,20 @@
|
||||
"android": "expo run:android"
|
||||
},
|
||||
"dependencies": {
|
||||
"@config-plugins/android-jsc-intl": "1.0.0",
|
||||
"@config-plugins/detox": "1.0.0",
|
||||
"@config-plugins/ffmpeg-kit-react-native": "1.0.0",
|
||||
"@config-plugins/ios-stickers": "1.0.0",
|
||||
"@config-plugins/react-native-adjust": "1.0.0",
|
||||
"@config-plugins/react-native-ble-plx": "1.0.0",
|
||||
"@config-plugins/react-native-blob-util": "1.0.0",
|
||||
"@config-plugins/react-native-branch": "1.0.0",
|
||||
"@config-plugins/react-native-callkeep": "1.0.0",
|
||||
"@config-plugins/react-native-dynamic-app-icon": "1.0.0",
|
||||
"@config-plugins/react-native-google-cast": "1.0.0",
|
||||
"@config-plugins/react-native-pdf": "1.0.0",
|
||||
"@config-plugins/react-native-quick-actions": "1.0.0",
|
||||
"@config-plugins/react-native-webrtc": "1.0.0",
|
||||
"@config-plugins/android-jsc-intl": "*",
|
||||
"@config-plugins/detox": "*",
|
||||
"@config-plugins/ffmpeg-kit-react-native": "*",
|
||||
"@config-plugins/ios-stickers": "*",
|
||||
"@config-plugins/react-native-adjust": "*",
|
||||
"@config-plugins/react-native-ble-plx": "*",
|
||||
"@config-plugins/react-native-blob-util": "*",
|
||||
"@config-plugins/react-native-branch": "*",
|
||||
"@config-plugins/react-native-callkeep": "*",
|
||||
"@config-plugins/react-native-dynamic-app-icon": "*",
|
||||
"@config-plugins/react-native-google-cast": "*",
|
||||
"@config-plugins/react-native-pdf": "*",
|
||||
"@config-plugins/react-native-quick-actions": "*",
|
||||
"@config-plugins/react-native-webrtc": "*",
|
||||
"expo": "^44.0.0",
|
||||
"expo-localization": "~12.0.0",
|
||||
"expo-splash-screen": "~0.14.0",
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"postinstall": "expo-yarn-workspaces check-workspace-dependencies",
|
||||
"gen": "ts-node ./scripts/generate-plugin.ts",
|
||||
"update-issue-template": "ts-node ./scripts/gh-issues-config.ts",
|
||||
"update-dependabot-config": "ts-node ./scripts/update-dependabot-config.ts",
|
||||
"start": "lerna run build --parallel -- --watch",
|
||||
"prepare": "lerna run prepare --parallel"
|
||||
},
|
||||
@@ -28,6 +29,7 @@
|
||||
"semantic-release": "^19.0.2",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/prompts": "^2.0.13",
|
||||
"eslint": "^7.25.0",
|
||||
"expo-yarn-workspaces": "^1.5.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lerna": "3.4.1",
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
### @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)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/android-jsc-intl [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
### @config-plugins/android-jsc-intl [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** use correct internal versions ([ab8076a](https://github.com/expo/config-plugins/commit/ab8076adf51e9ba0439eba60b153d729a0996b8d))
|
||||
|
||||
## @config-plugins/android-jsc-intl 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -8,12 +8,12 @@ const config_plugins_1 = require("@expo/config-plugins");
|
||||
*/
|
||||
const withAndroidJscIntl = (config) => {
|
||||
// Return the modified config.
|
||||
return config_plugins_1.withAppBuildGradle(config, config => {
|
||||
if (config.modResults.language === 'groovy') {
|
||||
config.modResults.contents = config.modResults.contents.replace('org.webkit:android-jsc:+', 'org.webkit:android-jsc-intl:+');
|
||||
return config_plugins_1.withAppBuildGradle(config, (config) => {
|
||||
if (config.modResults.language === "groovy") {
|
||||
config.modResults.contents = config.modResults.contents.replace("org.webkit:android-jsc:+", "org.webkit:android-jsc-intl:+");
|
||||
}
|
||||
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;
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/android-jsc-intl",
|
||||
"version": "0.0.2",
|
||||
"version": "1.0.4",
|
||||
"description": "Config plugin for android-jsc-intl package",
|
||||
"main": "build/withAndroidJscIntl.js",
|
||||
"types": "build/withAndroidJscIntl.d.ts",
|
||||
@@ -36,4 +36,4 @@
|
||||
"devDependencies": {
|
||||
"expo-module-scripts": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,22 +2,24 @@ import { ConfigPlugin, withAppBuildGradle } from "@expo/config-plugins";
|
||||
|
||||
/**
|
||||
* Apply android-jsc-intl configuration for Expo SDK 42 projects.
|
||||
*
|
||||
*
|
||||
* This plugin lets you access the `Intl` API in Android apps (without Hermes).
|
||||
*/
|
||||
const withAndroidJscIntl: ConfigPlugin = (config) => {
|
||||
// Return the modified config.
|
||||
return withAppBuildGradle(config, config => {
|
||||
if (config.modResults.language === 'groovy') {
|
||||
return withAppBuildGradle(config, (config) => {
|
||||
if (config.modResults.language === "groovy") {
|
||||
config.modResults.contents = config.modResults.contents.replace(
|
||||
'org.webkit:android-jsc:+',
|
||||
'org.webkit:android-jsc-intl:+'
|
||||
)
|
||||
"org.webkit:android-jsc:+",
|
||||
"org.webkit:android-jsc-intl:+"
|
||||
);
|
||||
} 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;
|
||||
});
|
||||
};
|
||||
|
||||
export default withAndroidJscIntl
|
||||
export default withAndroidJscIntl;
|
||||
@@ -1,7 +1,22 @@
|
||||
## @config-plugins/detox 1.0.0 (2022-03-15)
|
||||
### @config-plugins/detox [1.2.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
* **networkConfig:** Fix android crash on empty subdomains config ([#46](https://github.com/expo/config-plugins/issues/46)) ([88e0cd0](https://github.com/expo/config-plugins/commit/88e0cd0ccfdcc337e9c03f318d781aa1097e148b)), closes [#3](https://github.com/expo/config-plugins/issues/3)
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/detox [1.2.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **detox:** use improved xml generation ([#47](https://github.com/expo/config-plugins/issues/47)) ([6324eb0](https://github.com/expo/config-plugins/commit/6324eb041b3b4eb2318c0a1ea0297e3b7bf28f7c))
|
||||
|
||||
### @config-plugins/detox [1.2.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
### @config-plugins/detox 1.2.0
|
||||
+9
-6
@@ -42,12 +42,15 @@ function getTemplateConfigContent(subdomains) {
|
||||
}
|
||||
function getTemplateFile(subdomains) {
|
||||
const content = getTemplateConfigContent(subdomains);
|
||||
return `
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
${content}
|
||||
</network-security-config>
|
||||
`;
|
||||
/**
|
||||
* May not have new lines or spaces in the beginning.
|
||||
* Otherwise build fails with:
|
||||
* "AAPT: error: XML or text declaration not at start of entity"
|
||||
*/
|
||||
return `<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
${content}
|
||||
</network-security-config>`;
|
||||
}
|
||||
exports.getTemplateFile = getTemplateFile;
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/detox",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.3",
|
||||
"description": "Config plugin to auto configure detox on prebuild",
|
||||
"main": "build/withDetox.js",
|
||||
"types": "build/withDetox.d.ts",
|
||||
|
||||
@@ -1,25 +1,21 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`getTemplateFile returns domain-config when subdomains is an array 1`] = `
|
||||
"
|
||||
<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?>
|
||||
<network-security-config>
|
||||
|
||||
"<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?>
|
||||
<network-security-config>
|
||||
|
||||
<domain-config cleartextTrafficPermitted=\\"true\\">
|
||||
<domain includeSubdomains=\\"true\\">localhost</domain>
|
||||
</domain-config>
|
||||
|
||||
</network-security-config>
|
||||
"
|
||||
</network-security-config>"
|
||||
`;
|
||||
|
||||
exports[`getTemplateFile returns only base-config when subdomains is '*' 1`] = `
|
||||
"
|
||||
<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted=\\"true\\" />
|
||||
</network-security-config>
|
||||
"
|
||||
"<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted=\\"true\\" />
|
||||
</network-security-config>"
|
||||
`;
|
||||
|
||||
exports[`withNetworkSecurityConfigManifest doesn't modify config if subdomains is an empty array 1`] = `
|
||||
|
||||
@@ -7,13 +7,13 @@ describe(getTemplateFile, () => {
|
||||
it(`returns only base-config when subdomains is '*'`, () => {
|
||||
const content = getTemplateFile("*");
|
||||
expect(content).toMatchSnapshot();
|
||||
expect(content).toMatch(/base\-config/);
|
||||
expect(content).not.toMatch(/domain\-config/);
|
||||
expect(content).toMatch(/base-config/);
|
||||
expect(content).not.toMatch(/domain-config/);
|
||||
});
|
||||
it(`returns domain-config when subdomains is an array`, () => {
|
||||
const content = getTemplateFile(["localhost"]);
|
||||
expect(content).toMatchSnapshot();
|
||||
expect(content).toMatch(/domain\-config/);
|
||||
expect(content).toMatch(/domain-config/);
|
||||
expect(content).toMatch(/localhost/);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -8,7 +8,10 @@ import withDetoxProjectGradle from "./withDetoxProjectGradle";
|
||||
import withDetoxTestAppGradle from "./withDetoxTestAppGradle";
|
||||
import { withDetoxTestClass } from "./withDetoxTestClass";
|
||||
import withKotlinGradle from "./withKotlinGradle";
|
||||
import { withNetworkSecurityConfigManifest, SubdomainsType } from "./withNetworkSecurityConfig";
|
||||
import {
|
||||
withNetworkSecurityConfigManifest,
|
||||
SubdomainsType,
|
||||
} from "./withNetworkSecurityConfig";
|
||||
import withProguardGradle from "./withProguardGradle";
|
||||
|
||||
const withDetox: ConfigPlugin<{
|
||||
|
||||
@@ -28,7 +28,7 @@ const withDetoxTestAppGradle: ConfigPlugin = (config) => {
|
||||
export function setGradleAndroidTestImplementation(
|
||||
buildGradle: string
|
||||
): string {
|
||||
const pattern = /androidTestImplementation\(\'com.wix:detox:\+\'\)/g;
|
||||
const pattern = /androidTestImplementation\('com.wix:detox:\+'\)/g;
|
||||
if (buildGradle.match(pattern)) {
|
||||
return buildGradle;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ConfigPlugin, withDangerousMod } from "@expo/config-plugins";
|
||||
import * as path from "path";
|
||||
import * as fs from "fs";
|
||||
import assert from "assert";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
/**
|
||||
* Copied from the [official template file](https://github.com/wix/Detox/blob/master/examples/demo-react-native/android/app/src/androidTest/java/com/example/DetoxTest.java).
|
||||
|
||||
@@ -4,9 +4,9 @@ import {
|
||||
withAndroidManifest,
|
||||
withDangerousMod,
|
||||
} from "@expo/config-plugins";
|
||||
import * as path from "path";
|
||||
import * as fs from "fs";
|
||||
import assert from "assert";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
export type SubdomainsType = string[] | "*";
|
||||
|
||||
@@ -29,12 +29,15 @@ function getTemplateConfigContent(subdomains: SubdomainsType) {
|
||||
|
||||
export function getTemplateFile(subdomains: SubdomainsType): string {
|
||||
const content = getTemplateConfigContent(subdomains);
|
||||
return `
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
${content}
|
||||
</network-security-config>
|
||||
`;
|
||||
/**
|
||||
* May not have new lines or spaces in the beginning.
|
||||
* Otherwise build fails with:
|
||||
* "AAPT: error: XML or text declaration not at start of entity"
|
||||
*/
|
||||
return `<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
${content}
|
||||
</network-security-config>`;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,11 +69,9 @@ const withNetworkSecurityConfigFile: ConfigPlugin<{
|
||||
/**
|
||||
* [Step 6](https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md#6-enable-clear-text-unencrypted-traffic-for-detox). Link the `network_security_config.xml` file to the `AndroidManifest.xml`.
|
||||
*/
|
||||
export const withNetworkSecurityConfigManifest: ConfigPlugin<
|
||||
{
|
||||
subdomains: SubdomainsType;
|
||||
} | void
|
||||
> = (config, props) => {
|
||||
export const withNetworkSecurityConfigManifest: ConfigPlugin<{
|
||||
subdomains: SubdomainsType;
|
||||
} | void> = (config, props) => {
|
||||
if (!props || !props.subdomains) {
|
||||
// (*) 10.0.2.2 for Google emulators, 10.0.3.2 for Genymotion emulators.
|
||||
// https://developer.android.com/training/articles/security-config
|
||||
|
||||
@@ -23,7 +23,7 @@ const withProguardGradle: ConfigPlugin = (config) => {
|
||||
};
|
||||
|
||||
export function addDetoxProguardRules(buildGradle: string): string {
|
||||
const pattern = /detox\/proguard\-rules\-app\.pro/g;
|
||||
const pattern = /detox\/proguard-rules-app\.pro/g;
|
||||
if (buildGradle.match(pattern)) {
|
||||
return buildGradle;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
### @config-plugins/ffmpeg-kit-react-native [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/ffmpeg-kit-react-native [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* **ffmpeg-kit-react-native:** update plugin to use `AndroidConfig.Version.withBuildScriptExtMinimumVersion` ([#60](https://github.com/expo/config-plugins/issues/60)) ([c3a375b](https://github.com/expo/config-plugins/commit/c3a375b292d6405be7b3277d10ab4f8dbb006047))
|
||||
|
||||
### @config-plugins/ffmpeg-kit-react-native [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
## @config-plugins/ffmpeg-kit-react-native 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import { ConfigPlugin } from "@expo/config-plugins";
|
||||
/** 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. */
|
||||
export declare const withBuildScriptExtMinimumVersion: ConfigPlugin<{
|
||||
name: string;
|
||||
minVersion: number;
|
||||
}>;
|
||||
export declare function setMinBuildScriptExtVersion(buildGradle: string, { name, minVersion }: {
|
||||
name: string;
|
||||
minVersion: number;
|
||||
}): string;
|
||||
@@ -1,31 +0,0 @@
|
||||
"use strict";
|
||||
// Copied from https://github.com/expo/expo-cli/blob/main/packages/config-plugins/src/android/Version.ts
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.setMinBuildScriptExtVersion = exports.withBuildScriptExtMinimumVersion = void 0;
|
||||
const config_plugins_1 = require("@expo/config-plugins");
|
||||
/** 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. */
|
||||
const withBuildScriptExtMinimumVersion = (config, props) => {
|
||||
return config_plugins_1.withProjectBuildGradle(config, (config) => {
|
||||
if (config.modResults.language === "groovy") {
|
||||
config.modResults.contents = setMinBuildScriptExtVersion(config.modResults.contents, props);
|
||||
}
|
||||
else {
|
||||
config_plugins_1.WarningAggregator.addWarningAndroid("withBuildScriptExtVersion", `Cannot automatically configure project build.gradle if it's not groovy`);
|
||||
}
|
||||
return config;
|
||||
});
|
||||
};
|
||||
exports.withBuildScriptExtMinimumVersion = withBuildScriptExtMinimumVersion;
|
||||
function setMinBuildScriptExtVersion(buildGradle, { name, minVersion }) {
|
||||
var _a;
|
||||
const regex = new RegExp(`(${name}\\s?=\\s?)(\\d+(?:\\.\\d+)?)`);
|
||||
const currentVersion = (_a = buildGradle.match(regex)) === null || _a === void 0 ? void 0 : _a[2];
|
||||
if (!currentVersion) {
|
||||
config_plugins_1.WarningAggregator.addWarningAndroid("withBuildScriptExtVersion", `Cannot set minimum buildscript.ext.${name} version because the property "${name}" cannot be found or does not have a numeric value.`);
|
||||
// TODO: Maybe just add the property...
|
||||
return buildGradle;
|
||||
}
|
||||
const currentVersionNum = Number(currentVersion);
|
||||
return buildGradle.replace(regex, `$1${Math.max(minVersion, currentVersionNum)}`);
|
||||
}
|
||||
exports.setMinBuildScriptExtVersion = setMinBuildScriptExtVersion;
|
||||
+1
-2
@@ -2,7 +2,6 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const config_plugins_1 = require("@expo/config-plugins");
|
||||
const withAndroidFFMPEGPackage_1 = require("./withAndroidFFMPEGPackage");
|
||||
const withBuildScriptExtMinimumVersion_1 = require("./withBuildScriptExtMinimumVersion");
|
||||
const withCocoaPodsImport_1 = require("./withCocoaPodsImport");
|
||||
const withIosDeploymentTarget_1 = require("./withIosDeploymentTarget");
|
||||
let pkg = {
|
||||
@@ -31,7 +30,7 @@ const withFFMPEG = (config, _props) => {
|
||||
// Android
|
||||
// Set min SDK Version to 24.
|
||||
[
|
||||
withBuildScriptExtMinimumVersion_1.withBuildScriptExtMinimumVersion,
|
||||
config_plugins_1.AndroidConfig.Version.withBuildScriptExtMinimumVersion,
|
||||
{
|
||||
name: "minSdkVersion",
|
||||
minVersion: 24,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/ffmpeg-kit-react-native",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.3",
|
||||
"description": "Config plugin to auto configure FFMPEG on prebuild",
|
||||
"main": "build/withFFMPEG.js",
|
||||
"types": "build/withFFMPEG.d.ts",
|
||||
|
||||
-89
@@ -1,89 +0,0 @@
|
||||
import { WarningAggregator } from "@expo/config-plugins";
|
||||
import { setMinBuildScriptExtVersion } from "../withBuildScriptExtMinimumVersion";
|
||||
|
||||
const EXAMPLE_PROJECT_BUILD_GRADLE = `
|
||||
buildscript {
|
||||
ext {
|
||||
buildToolsVersion = "29.0.3"
|
||||
minSdkVersion = 21
|
||||
compileSdkVersion = 30
|
||||
targetSdkVersion = 30
|
||||
oddFormat = 30.2
|
||||
}
|
||||
repositories {
|
||||
}
|
||||
dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven {
|
||||
// Android JSC is installed from npm
|
||||
url(new File(["node", "--print", "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), "../dist"))
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
describe(setMinBuildScriptExtVersion, () => {
|
||||
beforeEach(() => {
|
||||
// @ts-ignore: jest
|
||||
// eslint-disable-next-line import/namespace
|
||||
WarningAggregator.addWarningAndroid = jest.fn();
|
||||
});
|
||||
|
||||
it(`sets the minSdkVersion in build.gradle if minSdkVersion is given`, () => {
|
||||
expect(
|
||||
setMinBuildScriptExtVersion(EXAMPLE_PROJECT_BUILD_GRADLE, {
|
||||
name: "minSdkVersion",
|
||||
minVersion: 22,
|
||||
})
|
||||
).toMatch(/minSdkVersion = 22/);
|
||||
expect(WarningAggregator.addWarningAndroid).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it(`sets the oddFormat in build.gradle if oddFormat is given`, () => {
|
||||
expect(
|
||||
setMinBuildScriptExtVersion(EXAMPLE_PROJECT_BUILD_GRADLE, {
|
||||
name: "oddFormat",
|
||||
minVersion: 30.3,
|
||||
})
|
||||
).toMatch(/oddFormat = 30\.3/);
|
||||
expect(WarningAggregator.addWarningAndroid).not.toHaveBeenCalled();
|
||||
});
|
||||
it(`does not change the compileSdkVersion in build.gradle if compileSdkVersion is lower than the existing value`, () => {
|
||||
expect(
|
||||
setMinBuildScriptExtVersion(EXAMPLE_PROJECT_BUILD_GRADLE, {
|
||||
name: "compileSdkVersion",
|
||||
minVersion: 12,
|
||||
})
|
||||
).toBe(EXAMPLE_PROJECT_BUILD_GRADLE);
|
||||
expect(WarningAggregator.addWarningAndroid).not.toHaveBeenCalled();
|
||||
});
|
||||
it(`warns when it cannot find the requested value`, () => {
|
||||
expect(
|
||||
setMinBuildScriptExtVersion(EXAMPLE_PROJECT_BUILD_GRADLE, {
|
||||
name: "foobar",
|
||||
minVersion: 12,
|
||||
})
|
||||
).toBe(EXAMPLE_PROJECT_BUILD_GRADLE);
|
||||
expect(WarningAggregator.addWarningAndroid).toBeCalledWith(
|
||||
"withBuildScriptExtVersion",
|
||||
'Cannot set minimum buildscript.ext.foobar version because the property "foobar" cannot be found or does not have a numeric value.'
|
||||
);
|
||||
});
|
||||
it(`does warns when targeting a property with a string value`, () => {
|
||||
expect(
|
||||
setMinBuildScriptExtVersion(EXAMPLE_PROJECT_BUILD_GRADLE, {
|
||||
name: "buildToolsVersion",
|
||||
minVersion: 12,
|
||||
})
|
||||
).toBe(EXAMPLE_PROJECT_BUILD_GRADLE);
|
||||
expect(WarningAggregator.addWarningAndroid).toBeCalledWith(
|
||||
"withBuildScriptExtVersion",
|
||||
'Cannot set minimum buildscript.ext.buildToolsVersion version because the property "buildToolsVersion" cannot be found or does not have a numeric value.'
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -1,50 +0,0 @@
|
||||
// Copied from https://github.com/expo/expo-cli/blob/main/packages/config-plugins/src/android/Version.ts
|
||||
|
||||
import {
|
||||
ConfigPlugin,
|
||||
WarningAggregator,
|
||||
withProjectBuildGradle,
|
||||
} from "@expo/config-plugins";
|
||||
|
||||
/** 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. */
|
||||
export const withBuildScriptExtMinimumVersion: ConfigPlugin<{
|
||||
name: string;
|
||||
minVersion: number;
|
||||
}> = (config, props) => {
|
||||
return withProjectBuildGradle(config, (config) => {
|
||||
if (config.modResults.language === "groovy") {
|
||||
config.modResults.contents = setMinBuildScriptExtVersion(
|
||||
config.modResults.contents,
|
||||
props
|
||||
);
|
||||
} else {
|
||||
WarningAggregator.addWarningAndroid(
|
||||
"withBuildScriptExtVersion",
|
||||
`Cannot automatically configure project build.gradle if it's not groovy`
|
||||
);
|
||||
}
|
||||
return config;
|
||||
});
|
||||
};
|
||||
|
||||
export function setMinBuildScriptExtVersion(
|
||||
buildGradle: string,
|
||||
{ name, minVersion }: { name: string; minVersion: number }
|
||||
) {
|
||||
const regex = new RegExp(`(${name}\\s?=\\s?)(\\d+(?:\\.\\d+)?)`);
|
||||
const currentVersion = buildGradle.match(regex)?.[2];
|
||||
if (!currentVersion) {
|
||||
WarningAggregator.addWarningAndroid(
|
||||
"withBuildScriptExtVersion",
|
||||
`Cannot set minimum buildscript.ext.${name} version because the property "${name}" cannot be found or does not have a numeric value.`
|
||||
);
|
||||
// TODO: Maybe just add the property...
|
||||
return buildGradle;
|
||||
}
|
||||
|
||||
const currentVersionNum = Number(currentVersion);
|
||||
return buildGradle.replace(
|
||||
regex,
|
||||
`$1${Math.max(minVersion, currentVersionNum)}`
|
||||
);
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
import {
|
||||
AndroidConfig,
|
||||
ConfigPlugin,
|
||||
createRunOncePlugin,
|
||||
withPlugins,
|
||||
} from "@expo/config-plugins";
|
||||
|
||||
import { withAndroidFFMPEGPackage } from "./withAndroidFFMPEGPackage";
|
||||
import { withBuildScriptExtMinimumVersion } from "./withBuildScriptExtMinimumVersion";
|
||||
import {
|
||||
withCocoaPodsImport,
|
||||
withPodfilePropertiesPackage,
|
||||
@@ -56,7 +56,7 @@ const withFFMPEG: ConfigPlugin<void | Props> = (config, _props) => {
|
||||
|
||||
// Set min SDK Version to 24.
|
||||
[
|
||||
withBuildScriptExtMinimumVersion,
|
||||
AndroidConfig.Version.withBuildScriptExtMinimumVersion,
|
||||
{
|
||||
name: "minSdkVersion",
|
||||
minVersion: 24,
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
### @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)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/ios-stickers [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
|
||||
### Documentation changes
|
||||
|
||||
* **ios-stickers:** add doc block ([#55](https://github.com/expo/config-plugins/issues/55)) ([c904bc6](https://github.com/expo/config-plugins/commit/c904bc6a5f410645696a0356b5c188b94f80c231))
|
||||
|
||||
## @config-plugins/ios-stickers 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
import { ConfigPlugin } from "@expo/config-plugins";
|
||||
/** Dangerously applies sticker assets to the iOS project. */
|
||||
export declare const withStickerAssets: ConfigPlugin<{
|
||||
icon?: string;
|
||||
size: string;
|
||||
|
||||
@@ -44,6 +44,7 @@ function createSticker({ stickerpackPath, name, imageBuffer, extension, accessib
|
||||
name: stickerName,
|
||||
};
|
||||
}
|
||||
/** Dangerously applies sticker assets to the iOS project. */
|
||||
const withStickerAssets = (config, { stickers, icon, size }) => {
|
||||
// Default to using the app icon
|
||||
if (!icon) {
|
||||
|
||||
+1
-1
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.normalizeStickersProps = void 0;
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const schema_utils_1 = require("schema-utils");
|
||||
const options_json_1 = __importDefault(require("./options.json"));
|
||||
const withStickerAssets_1 = require("./withStickerAssets");
|
||||
const withStickerInfoPlist_1 = require("./withStickerInfoPlist");
|
||||
const withStickerXcodeTarget_1 = require("./withStickerXcodeTarget");
|
||||
const path_1 = __importDefault(require("path"));
|
||||
// TODO: Maybe the name is better to use as a prop...
|
||||
const sizeColumnMap = {
|
||||
4: "small",
|
||||
|
||||
+3
-3
@@ -70,9 +70,9 @@ const pbxTargetDependency = "PBXTargetDependency";
|
||||
const pbxContainerItemProxy = "PBXContainerItemProxy";
|
||||
function addStickersTarget(proj, name, bundleId, subfolder) {
|
||||
// Setup uuid and name of new target
|
||||
let targetUuid = proj.generateUuid();
|
||||
let targetType = "app_extension_messages_sticker_pack";
|
||||
let targetName = name.trim();
|
||||
const targetUuid = proj.generateUuid();
|
||||
const targetType = "app_extension_messages_sticker_pack";
|
||||
const targetName = name.trim();
|
||||
const bundleName = subfolder.trim().split(" ").join("-");
|
||||
// Check type against list of allowed target types
|
||||
if (!targetName) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/ios-stickers",
|
||||
"version": "0.0.4",
|
||||
"version": "1.0.3",
|
||||
"description": "Config plugin to auto configure iOS iMessage stickers",
|
||||
"main": "build/withStickerPack.js",
|
||||
"types": "build/withStickerPack.d.ts",
|
||||
|
||||
@@ -68,6 +68,7 @@ function createSticker({
|
||||
};
|
||||
}
|
||||
|
||||
/** Dangerously applies sticker assets to the iOS project. */
|
||||
export const withStickerAssets: ConfigPlugin<{
|
||||
icon?: string;
|
||||
size: string;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { ConfigPlugin } from "@expo/config-plugins";
|
||||
import path from "path";
|
||||
import { validate } from "schema-utils";
|
||||
|
||||
import schema from "./options.json";
|
||||
import { Props, Sticker, withStickerAssets } from "./withStickerAssets";
|
||||
import { withStickersPlist } from "./withStickerInfoPlist";
|
||||
import { withStickerXcodeTarget } from "./withStickerXcodeTarget";
|
||||
import path from "path";
|
||||
|
||||
// TODO: Maybe the name is better to use as a prop...
|
||||
const sizeColumnMap: Record<number, string> = {
|
||||
|
||||
@@ -91,9 +91,9 @@ export function addStickersTarget(
|
||||
subfolder: string
|
||||
) {
|
||||
// Setup uuid and name of new target
|
||||
let targetUuid = proj.generateUuid();
|
||||
let targetType = "app_extension_messages_sticker_pack";
|
||||
let targetName = name.trim();
|
||||
const targetUuid = proj.generateUuid();
|
||||
const targetType = "app_extension_messages_sticker_pack";
|
||||
const targetName = name.trim();
|
||||
const bundleName = subfolder.trim().split(" ").join("-");
|
||||
|
||||
// Check type against list of allowed target types
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
### @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)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/react-native-adjust [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
## @config-plugins/react-native-adjust 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
import { ConfigPlugin } from "@expo/config-plugins";
|
||||
declare const _default: ConfigPlugin<void | {
|
||||
targetAndroid12?: boolean | undefined;
|
||||
}>;
|
||||
export default _default;
|
||||
-92
@@ -1,92 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const config_plugins_1 = require("@expo/config-plugins");
|
||||
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
||||
const withXcodeLinkBinaryWithLibraries = (config, { library, status }) => {
|
||||
return config_plugins_1.withXcodeProject(config, (config) => {
|
||||
const options = status === "optional" ? { weak: true } : {};
|
||||
const target = config_plugins_1.IOSConfig.XcodeUtils.getApplicationNativeTarget({
|
||||
project: config.modResults,
|
||||
projectName: config.modRequest.projectName,
|
||||
});
|
||||
config.modResults.addFramework(library, {
|
||||
target: target.uuid,
|
||||
...options,
|
||||
});
|
||||
return config;
|
||||
});
|
||||
};
|
||||
const addAndroidPackagingOptions = (src) => {
|
||||
return generateCode_1.mergeContents({
|
||||
tag: "react-native-play-services-analytics",
|
||||
src,
|
||||
newSrc: `
|
||||
implementation 'com.google.android.gms:play-services-analytics:18.0.0'
|
||||
implementation 'com.android.installreferrer:installreferrer:2.2'
|
||||
`,
|
||||
anchor: /dependencies(?:\s+)?\{/,
|
||||
// Inside the dependencies block.
|
||||
offset: 1,
|
||||
comment: "//",
|
||||
});
|
||||
};
|
||||
const withGradle = (config) => {
|
||||
return config_plugins_1.withAppBuildGradle(config, (config) => {
|
||||
if (config.modResults.language === "groovy") {
|
||||
config.modResults.contents = addAndroidPackagingOptions(config.modResults.contents).contents;
|
||||
}
|
||||
else {
|
||||
throw new Error("Cannot add Play Services maven gradle because the project build.gradle is not groovy");
|
||||
}
|
||||
return config;
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Apply react-native-adjust configuration for Expo SDK +44 projects.
|
||||
*/
|
||||
const withAdjustPlugin = (config, _props) => {
|
||||
const props = _props || {};
|
||||
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||
library: "iAd.framework",
|
||||
status: "optional",
|
||||
});
|
||||
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||
library: "AdServices.framework",
|
||||
status: "optional",
|
||||
});
|
||||
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||
library: "AdSupport.framework",
|
||||
status: "optional",
|
||||
});
|
||||
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||
library: "StoreKit.framework",
|
||||
status: "optional",
|
||||
});
|
||||
config = withXcodeLinkBinaryWithLibraries(config, {
|
||||
library: "AppTrackingTransparency.framework",
|
||||
status: "optional",
|
||||
});
|
||||
if (props.targetAndroid12) {
|
||||
config = config_plugins_1.AndroidConfig.Version.withBuildScriptExtMinimumVersion(config, {
|
||||
name: "compileSdkVersion",
|
||||
minVersion: 31,
|
||||
});
|
||||
config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [
|
||||
"com.google.android.gms.permission.AD_ID",
|
||||
]);
|
||||
}
|
||||
config = withGradle(config);
|
||||
// Return the modified config.
|
||||
return config;
|
||||
};
|
||||
const pkg = {
|
||||
// Prevent this plugin from being run more than once.
|
||||
// This pattern enables users to safely migrate off of this
|
||||
// out-of-tree `@config-plugins/react-native-adjust` to a future
|
||||
// upstream plugin in `react-native-adjust`
|
||||
name: "react-native-adjust",
|
||||
// Indicates that this plugin is dangerously linked to a module,
|
||||
// and might not work with the latest version of that module.
|
||||
version: "UNVERSIONED",
|
||||
};
|
||||
exports.default = config_plugins_1.createRunOncePlugin(withAdjustPlugin, pkg.name, pkg.version);
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/react-native-adjust",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.3",
|
||||
"description": "Config plugin to auto configure Adjust SDK on prebuild",
|
||||
"main": "build/withReactNativeAdjust.js",
|
||||
"types": "build/withReactNativeAdjust.d.ts",
|
||||
|
||||
@@ -34,7 +34,7 @@ const addAndroidPackagingOptions = (src: string) => {
|
||||
tag: "react-native-play-services-analytics",
|
||||
src,
|
||||
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'
|
||||
`,
|
||||
anchor: /dependencies(?:\s+)?\{/,
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
### @config-plugins/react-native-ble-plx [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/react-native-ble-plx [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
## @config-plugins/react-native-ble-plx 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/react-native-ble-plx",
|
||||
"version": "0.0.2",
|
||||
"version": "1.0.2",
|
||||
"description": "Config plugin to auto configure react-native-ble-plx on prebuild",
|
||||
"main": "build/withBLE.js",
|
||||
"types": "build/withBLE.d.ts",
|
||||
|
||||
@@ -1,42 +1,44 @@
|
||||
import { AndroidConfig, XML } from '@expo/config-plugins'
|
||||
import { AndroidConfig, XML } from "@expo/config-plugins";
|
||||
import { resolve } from "path";
|
||||
|
||||
import { resolve } from 'path'
|
||||
import {
|
||||
addBLEHardwareFeatureToManifest,
|
||||
addFineControlPermissionToManifest,
|
||||
} from "../withBLEAndroidManifest";
|
||||
|
||||
import { addBLEHardwareFeatureToManifest, addFineControlPermissionToManifest } from '../withBLEAndroidManifest'
|
||||
const { readAndroidManifestAsync } = AndroidConfig.Manifest;
|
||||
|
||||
const { readAndroidManifestAsync } = AndroidConfig.Manifest
|
||||
const sampleManifestPath = resolve(__dirname, "fixtures/AndroidManifest.xml");
|
||||
|
||||
const sampleManifestPath = resolve(__dirname, 'fixtures/AndroidManifest.xml')
|
||||
|
||||
describe('addFineControlPermissionToManifest', () => {
|
||||
describe("addFineControlPermissionToManifest", () => {
|
||||
it(`adds element`, async () => {
|
||||
let androidManifest = await readAndroidManifestAsync(sampleManifestPath)
|
||||
androidManifest = await addFineControlPermissionToManifest(androidManifest)
|
||||
expect(androidManifest.manifest['uses-permission-sdk-23']).toStrictEqual([
|
||||
{ $: { 'android:name': 'android.permission.ACCESS_FINE_LOCATION' } }
|
||||
])
|
||||
let androidManifest = await readAndroidManifestAsync(sampleManifestPath);
|
||||
androidManifest = await addFineControlPermissionToManifest(androidManifest);
|
||||
expect(androidManifest.manifest["uses-permission-sdk-23"]).toStrictEqual([
|
||||
{ $: { "android:name": "android.permission.ACCESS_FINE_LOCATION" } },
|
||||
]);
|
||||
// Sanity
|
||||
expect(XML.format(androidManifest)).toMatch(
|
||||
/<uses-permission-sdk-23 android:name="android\.permission\.ACCESS_FINE_LOCATION"\/>/
|
||||
)
|
||||
})
|
||||
})
|
||||
describe('addBLEHardwareFeatureToManifest', () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
describe("addBLEHardwareFeatureToManifest", () => {
|
||||
it(`adds element`, async () => {
|
||||
let androidManifest = await readAndroidManifestAsync(sampleManifestPath)
|
||||
androidManifest = await addBLEHardwareFeatureToManifest(androidManifest)
|
||||
let androidManifest = await readAndroidManifestAsync(sampleManifestPath);
|
||||
androidManifest = await addBLEHardwareFeatureToManifest(androidManifest);
|
||||
|
||||
expect(androidManifest.manifest['uses-feature']).toStrictEqual([
|
||||
expect(androidManifest.manifest["uses-feature"]).toStrictEqual([
|
||||
{
|
||||
$: {
|
||||
'android:name': 'android.hardware.bluetooth_le',
|
||||
'android:required': 'true'
|
||||
}
|
||||
}
|
||||
])
|
||||
"android:name": "android.hardware.bluetooth_le",
|
||||
"android:required": "true",
|
||||
},
|
||||
},
|
||||
]);
|
||||
// Sanity
|
||||
expect(XML.format(androidManifest)).toMatch(
|
||||
/<uses-feature android:name="android\.hardware\.bluetooth_le" android:required="true"\/>/
|
||||
)
|
||||
})
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable flowtype/no-types-missing-file-annotation */
|
||||
|
||||
import {
|
||||
AndroidConfig,
|
||||
ConfigPlugin,
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
/* eslint-disable flowtype/no-types-missing-file-annotation */
|
||||
|
||||
import {
|
||||
ConfigPlugin,
|
||||
withAndroidManifest,
|
||||
AndroidConfig,
|
||||
} from "@expo/config-plugins";
|
||||
|
||||
type InnerManifest = AndroidConfig.Manifest.AndroidManifest['manifest'];
|
||||
type InnerManifest = AndroidConfig.Manifest.AndroidManifest["manifest"];
|
||||
|
||||
type ManifestPermission = InnerManifest["permission"];
|
||||
|
||||
|
||||
@@ -1,42 +1,50 @@
|
||||
/* eslint-disable flowtype/no-types-missing-file-annotation */
|
||||
import { ConfigPlugin, withInfoPlist } from '@expo/config-plugins'
|
||||
import { ConfigPlugin, withInfoPlist } from "@expo/config-plugins";
|
||||
|
||||
export enum BackgroundMode {
|
||||
Central = 'central',
|
||||
Peripheral = 'peripheral'
|
||||
Central = "central",
|
||||
Peripheral = "peripheral",
|
||||
}
|
||||
|
||||
function ensureKey(arr: string[], key: string) {
|
||||
if (!arr.find(mode => mode === key)) {
|
||||
arr.push(key)
|
||||
if (!arr.find((mode) => mode === key)) {
|
||||
arr.push(key);
|
||||
}
|
||||
return arr
|
||||
return arr;
|
||||
}
|
||||
|
||||
const centralKey = 'bluetooth-central'
|
||||
const peripheralKey = 'bluetooth-peripheral'
|
||||
const centralKey = "bluetooth-central";
|
||||
const peripheralKey = "bluetooth-peripheral";
|
||||
|
||||
/**
|
||||
* Append `UIBackgroundModes` to the `Info.plist`.
|
||||
*/
|
||||
export const withBLEBackgroundModes: ConfigPlugin<BackgroundMode[]> = (c, modes) => {
|
||||
return withInfoPlist(c, config => {
|
||||
export const withBLEBackgroundModes: ConfigPlugin<BackgroundMode[]> = (
|
||||
c,
|
||||
modes
|
||||
) => {
|
||||
return withInfoPlist(c, (config) => {
|
||||
if (!Array.isArray(config.modResults.UIBackgroundModes)) {
|
||||
config.modResults.UIBackgroundModes = []
|
||||
config.modResults.UIBackgroundModes = [];
|
||||
}
|
||||
|
||||
if (modes.includes(BackgroundMode.Central)) {
|
||||
config.modResults.UIBackgroundModes = ensureKey(config.modResults.UIBackgroundModes, centralKey)
|
||||
config.modResults.UIBackgroundModes = ensureKey(
|
||||
config.modResults.UIBackgroundModes,
|
||||
centralKey
|
||||
);
|
||||
}
|
||||
if (modes.includes(BackgroundMode.Peripheral)) {
|
||||
config.modResults.UIBackgroundModes = ensureKey(config.modResults.UIBackgroundModes, peripheralKey)
|
||||
config.modResults.UIBackgroundModes = ensureKey(
|
||||
config.modResults.UIBackgroundModes,
|
||||
peripheralKey
|
||||
);
|
||||
}
|
||||
|
||||
// Prevent empty array
|
||||
if (!config.modResults.UIBackgroundModes.length) {
|
||||
delete config.modResults.UIBackgroundModes
|
||||
delete config.modResults.UIBackgroundModes;
|
||||
}
|
||||
|
||||
return config
|
||||
})
|
||||
}
|
||||
return config;
|
||||
});
|
||||
};
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable flowtype/no-types-missing-file-annotation */
|
||||
import { ConfigPlugin, withInfoPlist } from "@expo/config-plugins";
|
||||
|
||||
const BLUETOOTH_ALWAYS =
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
### @config-plugins/react-native-blob-util [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/react-native-blob-util [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
### @config-plugins/react-native-blob-util [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** use correct internal versions ([ab8076a](https://github.com/expo/config-plugins/commit/ab8076adf51e9ba0439eba60b153d729a0996b8d))
|
||||
|
||||
## @config-plugins/react-native-blob-util 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/react-native-blob-util",
|
||||
"version": "0.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "Config plugin to auto configure react-native-blob-util on prebuild",
|
||||
"main": "build/withReactNativeBlobUtil.js",
|
||||
"types": "build/withReactNativeBlobUtil.d.ts",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { AndroidConfig, XML } from "@expo/config-plugins";
|
||||
import { XML } from "@expo/config-plugins";
|
||||
|
||||
import { appendDownloadCompleteAction } from "../withReactNativeBlobUtil";
|
||||
|
||||
const fixture = `
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
### @config-plugins/react-native-branch [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/react-native-branch [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
## @config-plugins/react-native-branch 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* create react-native-branch plugin ([0b06baa](https://github.com/expo/config-plugins/commit/0b06baa2b486c5e02d433a4ac785960934f403b9))
|
||||
* support for universalLinkDomains ([01ca879](https://github.com/expo/config-plugins/commit/01ca879ca3f6cebac1177d74969337819a5fc72d))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* added expo-module.config.json to files ([57d589b](https://github.com/expo/config-plugins/commit/57d589ba8ad60e057b34ad7b2f404f67e85896ab))
|
||||
* fixed MATCH_INIT for SDKv44 ([904741a](https://github.com/expo/config-plugins/commit/904741a3bdb02f5bb76ebcf44131f1698dad0831))
|
||||
* fixed missing files when publish ([ebb8666](https://github.com/expo/config-plugins/commit/ebb86666d6e61a70838048839b144c7217886d73))
|
||||
* removed proguard-rules.pro edit step ([e1159b4](https://github.com/expo/config-plugins/commit/e1159b4021ab722cf3998479e6a459374bdb5075))
|
||||
* updates from code-reviews ([597ffc3](https://github.com/expo/config-plugins/commit/597ffc3bd76517ac96c39b77d8b76e6aee2609dd))
|
||||
* **android:** added `onNewIntent` handler ([31ed997](https://github.com/expo/config-plugins/commit/31ed9978ca6c0a079341b5b4be5479a5e5633f79))
|
||||
* rename module ([7f0dd05](https://github.com/expo/config-plugins/commit/7f0dd05fdc15293b84606cb000bcd7321b418de8))
|
||||
* respect old config from expo-branch ([d0e0186](https://github.com/expo/config-plugins/commit/d0e018601c09c0e92191a4eb2998ab0e6fa1c6ec))
|
||||
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
* **android:** migrate to new expo modules system ([1ac233e](https://github.com/expo/config-plugins/commit/1ac233eb432eaeeb7ead6723a4a232f86cfc8e50))
|
||||
* **ios:** migrate to new expo modules system ([a98a6e0](https://github.com/expo/config-plugins/commit/a98a6e022fc06f8b9c996e4e2b4a1d7aac830d8a))
|
||||
* update plugin to use CodeMod ([ae66cac](https://github.com/expo/config-plugins/commit/ae66cac141847e33add62cc30375620e1a5cc1d0))
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* apply suggestions from code review ([0ccc227](https://github.com/expo/config-plugins/commit/0ccc22771d5ecc97da7720c362ecf90a76e5de1c))
|
||||
* cleanup android gitignore ([c88609a](https://github.com/expo/config-plugins/commit/c88609a8666be1b4137a3694bd844bb6a0f1ec12))
|
||||
* latest cleanup ([ef50c05](https://github.com/expo/config-plugins/commit/ef50c05892b965e2ccd70418da962f2c3d96ab2e))
|
||||
* rename files to avoid possible conflict ([d0b32ce](https://github.com/expo/config-plugins/commit/d0b32ce4a1c28060e61e7109f59be215c5f92f14))
|
||||
* rename module ([71e429b](https://github.com/expo/config-plugins/commit/71e429b77fca05953e94636b31e9b1b8da2ddcb6))
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
+1
-1
@@ -2,5 +2,5 @@ import type { ConfigPlugin, InfoPlist } from "@expo/config-plugins";
|
||||
import type { ExpoConfig } from "@expo/config-types";
|
||||
import type { ConfigData } from "./types";
|
||||
export declare function getBranchApiKey(config: Pick<ExpoConfig, "ios">): string | null;
|
||||
export declare function setBranchApiKey(apiKey: string, infoPlist: InfoPlist): InfoPlist;
|
||||
export declare function setBranchApiKey(apiKey: string | null, infoPlist: InfoPlist): InfoPlist;
|
||||
export declare const withBranchIOS: ConfigPlugin<ConfigData>;
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/react-native-branch",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "Config plugin to auto configure react-native-branch on prebuild",
|
||||
"author": "650 Industries, Inc.",
|
||||
"license": "MIT",
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/config-plugins": "^4.1.0",
|
||||
"@expo/config-types": "^43.0.1"
|
||||
"@expo/config-types": "^44.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"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({});
|
||||
});
|
||||
});
|
||||
@@ -1,9 +1,9 @@
|
||||
import { createRunOncePlugin } from "@expo/config-plugins";
|
||||
import type { ConfigPlugin } from "@expo/config-plugins";
|
||||
|
||||
import type { ConfigData } from "./types";
|
||||
import { withBranchAndroid } from "./withBranchAndroid";
|
||||
import { withBranchIOS } from "./withBranchIOS";
|
||||
import type { ConfigData } from "./types";
|
||||
|
||||
const withBranch: ConfigPlugin<ConfigData> = (
|
||||
config,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { withInfoPlist } from "@expo/config-plugins";
|
||||
import type { ConfigPlugin, InfoPlist } from "@expo/config-plugins";
|
||||
import type { ExpoConfig } from "@expo/config-types";
|
||||
|
||||
import type { ConfigData } from "./types";
|
||||
|
||||
export function getBranchApiKey(config: Pick<ExpoConfig, "ios">) {
|
||||
@@ -8,7 +9,7 @@ export function getBranchApiKey(config: Pick<ExpoConfig, "ios">) {
|
||||
}
|
||||
|
||||
export function setBranchApiKey(
|
||||
apiKey: string,
|
||||
apiKey: string | null,
|
||||
infoPlist: InfoPlist
|
||||
): InfoPlist {
|
||||
if (apiKey === null) {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
### @config-plugins/react-native-callkeep [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* **react-native-callkeep:** lint fix ([241d378](https://github.com/expo/config-plugins/commit/241d378a54327340df3663ef8f66cb8663e1e359))
|
||||
|
||||
### @config-plugins/react-native-callkeep [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/react-native-callkeep [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
## @config-plugins/react-native-callkeep 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
+4
-3
@@ -7,8 +7,9 @@ function unquote(str) {
|
||||
return str.replace(/^"(.*)"$/, "$1");
|
||||
}
|
||||
function nonComments(obj) {
|
||||
var keys = Object.keys(obj), newObj = {}, i = 0;
|
||||
for (i; i < keys.length; i++) {
|
||||
const keys = Object.keys(obj);
|
||||
const newObj = {};
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
if (!COMMENT_KEY.test(keys[i])) {
|
||||
newObj[keys[i]] = obj[keys[i]];
|
||||
}
|
||||
@@ -20,7 +21,7 @@ function ensureHeaderSearchPath(project, file) {
|
||||
const INHERITED = '"$(inherited)"';
|
||||
for (const config in configurations) {
|
||||
const buildSettings = configurations[config].buildSettings;
|
||||
if (unquote(buildSettings["PRODUCT_NAME"]) != project.productName)
|
||||
if (unquote(buildSettings["PRODUCT_NAME"]) !== project.productName)
|
||||
continue;
|
||||
if (!buildSettings["HEADER_SEARCH_PATHS"]) {
|
||||
buildSettings["HEADER_SEARCH_PATHS"] = [INHERITED];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/react-native-callkeep",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.3",
|
||||
"description": "Config plugin to auto configure callkeep on prebuild",
|
||||
"main": "build/withCallkeep.js",
|
||||
"types": "build/withCallkeep.d.ts",
|
||||
|
||||
@@ -6,11 +6,10 @@ function unquote(str: string) {
|
||||
if (str) return str.replace(/^"(.*)"$/, "$1");
|
||||
}
|
||||
function nonComments(obj: Record<string, any>) {
|
||||
var keys = Object.keys(obj),
|
||||
newObj: Record<string, any> = {},
|
||||
i = 0;
|
||||
const keys = Object.keys(obj);
|
||||
const newObj: Record<string, any> = {};
|
||||
|
||||
for (i; i < keys.length; i++) {
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
if (!COMMENT_KEY.test(keys[i])) {
|
||||
newObj[keys[i]] = obj[keys[i]];
|
||||
}
|
||||
@@ -26,7 +25,8 @@ export function ensureHeaderSearchPath(project: XcodeProject, file: string) {
|
||||
for (const config in configurations) {
|
||||
const buildSettings = configurations[config].buildSettings;
|
||||
|
||||
if (unquote(buildSettings["PRODUCT_NAME"]) != project.productName) continue;
|
||||
if (unquote(buildSettings["PRODUCT_NAME"]) !== project.productName)
|
||||
continue;
|
||||
|
||||
if (!buildSettings["HEADER_SEARCH_PATHS"]) {
|
||||
buildSettings["HEADER_SEARCH_PATHS"] = [INHERITED];
|
||||
|
||||
@@ -129,8 +129,7 @@ export const withXcodeLinkBinaryWithLibraries: ConfigPlugin<{
|
||||
status?: string;
|
||||
}> = (config, { library, status }) => {
|
||||
return withXcodeProject(config, (config) => {
|
||||
const options =
|
||||
status === "optional" ? { weak: true } : {};
|
||||
const options = status === "optional" ? { weak: true } : {};
|
||||
|
||||
const target = IOSConfig.XcodeUtils.getApplicationNativeTarget({
|
||||
project: config.modResults,
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
### @config-plugins/react-native-dynamic-app-icon [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/react-native-dynamic-app-icon [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
## @config-plugins/react-native-dynamic-app-icon 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/react-native-dynamic-app-icon",
|
||||
"version": "0.0.2",
|
||||
"version": "1.0.2",
|
||||
"description": "Config plugin to auto configure react-native-dynamic-app-icon",
|
||||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
|
||||
@@ -9,6 +9,8 @@ import {
|
||||
import { generateImageAsync } from "@expo/image-utils";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
// @ts-ignore
|
||||
import pbxFile from "xcode/lib/pbxFile";
|
||||
|
||||
const folderName = "DynamicAppIcons";
|
||||
const size = 60;
|
||||
@@ -56,9 +58,6 @@ function getIconName(name: string, size: number, scale?: number) {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
import pbxFile from "xcode/lib/pbxFile";
|
||||
|
||||
const withIconXcodeProject: ConfigPlugin<Props> = (config, { icons }) => {
|
||||
return withXcodeProject(config, async (config) => {
|
||||
const groupPath = `${config.modRequest.projectName!}/${folderName}`;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
### @config-plugins/react-native-google-cast [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-23)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* **react-native-google-cast:** lint fix ([21c4928](https://github.com/expo/config-plugins/commit/21c49280d49a3584863d8338e4b34c508249a595))
|
||||
|
||||
### @config-plugins/react-native-google-cast [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/react-native-google-cast [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
## @config-plugins/react-native-google-cast 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.withAndroidGoogleCast = void 0;
|
||||
const config_plugins_1 = require("@expo/config-plugins");
|
||||
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
||||
const codeMod_1 = require("@expo/config-plugins/build/android/codeMod");
|
||||
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
||||
const { addMetaDataItemToMainApplication, getMainApplicationOrThrow } = config_plugins_1.AndroidConfig.Manifest;
|
||||
const META_PROVIDER_CLASS = "com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME";
|
||||
const META_RECEIVER_APP_ID = "com.reactnative.googlecast.RECEIVER_APPLICATION_ID";
|
||||
@@ -63,7 +63,7 @@ const withAppBuildGradleImport = (config, { version }) => {
|
||||
};
|
||||
const withMainActivityLazyLoading = (config) => {
|
||||
return config_plugins_1.withMainActivity(config, async (config) => {
|
||||
let src = codeMod_1.addImports(config.modResults.contents, ["com.google.android.gms.cast.framework.CastContext"], config.modResults.language === "java");
|
||||
const src = codeMod_1.addImports(config.modResults.contents, ["com.google.android.gms.cast.framework.CastContext"], config.modResults.language === "java");
|
||||
if (config.modResults.language === "java") {
|
||||
config.modResults.contents = addGoogleCastLazyLoadingImport(src).contents;
|
||||
}
|
||||
|
||||
+19
-16
@@ -17,9 +17,12 @@ const withIosWifiEntitlements = (config) => {
|
||||
});
|
||||
};
|
||||
const LOCAL_NETWORK_USAGE = "${PRODUCT_NAME} uses the local network to discover Cast-enabled devices on your WiFi network";
|
||||
const BLUETOOTH_ALWAYS_USAGE = "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
const BLUETOOTH_PERIPHERAL_USAGE = "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
const MICROPHONE_USAGE = "${PRODUCT_NAME} uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices";
|
||||
// const BLUETOOTH_ALWAYS_USAGE =
|
||||
// "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
// const BLUETOOTH_PERIPHERAL_USAGE =
|
||||
// "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
// const MICROPHONE_USAGE =
|
||||
// "${PRODUCT_NAME} uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices";
|
||||
/**
|
||||
* On iOS, a dialog asking the user for the local network permission will now be displayed immediately when the app is opened.
|
||||
*
|
||||
@@ -45,19 +48,19 @@ const withIosLocalNetworkPermissions = (config, { receiverAppId = "CC1AD845" } =
|
||||
return config;
|
||||
});
|
||||
};
|
||||
const withIosGuestMode = (config) => {
|
||||
return config_plugins_1.withInfoPlist(config, (config) => {
|
||||
config.modResults.NSBluetoothAlwaysUsageDescription =
|
||||
config.modResults.NSBluetoothAlwaysUsageDescription ||
|
||||
BLUETOOTH_ALWAYS_USAGE;
|
||||
config.modResults.NSBluetoothPeripheralUsageDescription =
|
||||
config.modResults.NSBluetoothPeripheralUsageDescription ||
|
||||
BLUETOOTH_PERIPHERAL_USAGE;
|
||||
config.modResults.NSMicrophoneUsageDescription =
|
||||
config.modResults.NSMicrophoneUsageDescription || MICROPHONE_USAGE;
|
||||
return config;
|
||||
});
|
||||
};
|
||||
// const withIosGuestMode: ConfigPlugin = (config) => {
|
||||
// return withInfoPlist(config, (config) => {
|
||||
// config.modResults.NSBluetoothAlwaysUsageDescription =
|
||||
// config.modResults.NSBluetoothAlwaysUsageDescription ||
|
||||
// BLUETOOTH_ALWAYS_USAGE;
|
||||
// config.modResults.NSBluetoothPeripheralUsageDescription =
|
||||
// config.modResults.NSBluetoothPeripheralUsageDescription ||
|
||||
// BLUETOOTH_PERIPHERAL_USAGE;
|
||||
// config.modResults.NSMicrophoneUsageDescription =
|
||||
// config.modResults.NSMicrophoneUsageDescription || MICROPHONE_USAGE;
|
||||
// return config;
|
||||
// });
|
||||
// };
|
||||
// TODO: Use AppDelegate swizzling
|
||||
const withIosAppDelegateLoaded = (config, props) => {
|
||||
return config_plugins_1.withAppDelegate(config, (config) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/react-native-google-cast",
|
||||
"version": "0.1.0",
|
||||
"version": "1.0.3",
|
||||
"description": "Config plugin to auto configure Google Cast on prebuild",
|
||||
"main": "build/withGoogleCast.js",
|
||||
"types": "build/withGoogleCast.d.ts",
|
||||
|
||||
@@ -6,12 +6,11 @@ import {
|
||||
withMainActivity,
|
||||
withProjectBuildGradle,
|
||||
} from "@expo/config-plugins";
|
||||
import { addImports } from "@expo/config-plugins/build/android/codeMod";
|
||||
import {
|
||||
mergeContents,
|
||||
removeContents,
|
||||
} from "@expo/config-plugins/build/utils/generateCode";
|
||||
import { addImports } from "@expo/config-plugins/build/android/codeMod";
|
||||
import fs from "fs";
|
||||
|
||||
const { addMetaDataItemToMainApplication, getMainApplicationOrThrow } =
|
||||
AndroidConfig.Manifest;
|
||||
@@ -121,7 +120,7 @@ const withAppBuildGradleImport: ConfigPlugin<{ version?: string }> = (
|
||||
|
||||
const withMainActivityLazyLoading: ConfigPlugin = (config) => {
|
||||
return withMainActivity(config, async (config) => {
|
||||
let src = addImports(
|
||||
const src = addImports(
|
||||
config.modResults.contents,
|
||||
["com.google.android.gms.cast.framework.CastContext"],
|
||||
config.modResults.language === "java"
|
||||
|
||||
@@ -22,12 +22,12 @@ const withIosWifiEntitlements: ConfigPlugin = (config) => {
|
||||
|
||||
const LOCAL_NETWORK_USAGE =
|
||||
"${PRODUCT_NAME} uses the local network to discover Cast-enabled devices on your WiFi network";
|
||||
const BLUETOOTH_ALWAYS_USAGE =
|
||||
"${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
const BLUETOOTH_PERIPHERAL_USAGE =
|
||||
"${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
const MICROPHONE_USAGE =
|
||||
"${PRODUCT_NAME} uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices";
|
||||
// const BLUETOOTH_ALWAYS_USAGE =
|
||||
// "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
// const BLUETOOTH_PERIPHERAL_USAGE =
|
||||
// "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
// const MICROPHONE_USAGE =
|
||||
// "${PRODUCT_NAME} uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices";
|
||||
|
||||
/**
|
||||
* On iOS, a dialog asking the user for the local network permission will now be displayed immediately when the app is opened.
|
||||
@@ -61,19 +61,19 @@ const withIosLocalNetworkPermissions: ConfigPlugin<{ receiverAppId?: string }> =
|
||||
});
|
||||
};
|
||||
|
||||
const withIosGuestMode: ConfigPlugin = (config) => {
|
||||
return withInfoPlist(config, (config) => {
|
||||
config.modResults.NSBluetoothAlwaysUsageDescription =
|
||||
config.modResults.NSBluetoothAlwaysUsageDescription ||
|
||||
BLUETOOTH_ALWAYS_USAGE;
|
||||
config.modResults.NSBluetoothPeripheralUsageDescription =
|
||||
config.modResults.NSBluetoothPeripheralUsageDescription ||
|
||||
BLUETOOTH_PERIPHERAL_USAGE;
|
||||
config.modResults.NSMicrophoneUsageDescription =
|
||||
config.modResults.NSMicrophoneUsageDescription || MICROPHONE_USAGE;
|
||||
return config;
|
||||
});
|
||||
};
|
||||
// const withIosGuestMode: ConfigPlugin = (config) => {
|
||||
// return withInfoPlist(config, (config) => {
|
||||
// config.modResults.NSBluetoothAlwaysUsageDescription =
|
||||
// config.modResults.NSBluetoothAlwaysUsageDescription ||
|
||||
// BLUETOOTH_ALWAYS_USAGE;
|
||||
// config.modResults.NSBluetoothPeripheralUsageDescription =
|
||||
// config.modResults.NSBluetoothPeripheralUsageDescription ||
|
||||
// BLUETOOTH_PERIPHERAL_USAGE;
|
||||
// config.modResults.NSMicrophoneUsageDescription =
|
||||
// config.modResults.NSMicrophoneUsageDescription || MICROPHONE_USAGE;
|
||||
// return config;
|
||||
// });
|
||||
// };
|
||||
|
||||
// TODO: Use AppDelegate swizzling
|
||||
const withIosAppDelegateLoaded: ConfigPlugin<IosProps> = (config, props) => {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
### @config-plugins/react-native-pdf [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/react-native-pdf [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
## @config-plugins/react-native-pdf 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/react-native-pdf",
|
||||
"version": "0.0.0",
|
||||
"version": "1.0.2",
|
||||
"description": "Config plugin to auto configure react-native-pdf on prebuild",
|
||||
"main": "build/withPdf.js",
|
||||
"types": "build/withPdf.d.ts",
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
### @config-plugins/react-native-quick-actions [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
### @config-plugins/react-native-quick-actions [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
## @config-plugins/react-native-quick-actions 1.0.0 (2022-03-15)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* upgrade @expo/config-plugins ([#49](https://github.com/expo/config-plugins/issues/49)) ([119e31e](https://github.com/expo/config-plugins/commit/119e31edf110409272ace750f02d651124e1a22d))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/react-native-quick-actions",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "Config plugin for react-native-quick-actions package",
|
||||
"main": "build/withReactNativeQuickActions.js",
|
||||
"types": "build/withReactNativeQuickActions.d.ts",
|
||||
@@ -37,4 +37,4 @@
|
||||
"expo-module-scripts": "^2.0.0"
|
||||
},
|
||||
"upstreamPackage": "react-native-quick-actions"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
### @config-plugins/react-native-webrtc [2.1.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Other chores
|
||||
|
||||
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||
|
||||
## @config-plugins/react-native-webrtc [2.1.0](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **react-native-webrtc:** add config mod for Android minSdkVersion 24 ([ff8b167](https://github.com/expo/config-plugins/commit/ff8b1677640a560ca98abd8a83f349b3a1ee9017))
|
||||
|
||||
### @config-plugins/react-native-webrtc [2.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* fix versions [skip ci] ([#53](https://github.com/expo/config-plugins/issues/53)) ([5de4ae3](https://github.com/expo/config-plugins/commit/5de4ae3e6182c32b7aa24d70ccd23a11663bb089))
|
||||
|
||||
## @config-plugins/react-native-webrtc 2.0.1
|
||||
@@ -59,7 +59,10 @@ export default {
|
||||
};
|
||||
```
|
||||
|
||||
This plugin will also disable desugaring in the Android `gradle.properties`: `android.enableDexingArtifactTransform.desugaring=false`, and disable iOS Bitcode for "Release" builds (required).
|
||||
## Important Notes
|
||||
|
||||
- For iOS, this plugin disables Bitcodes for all builds (required).
|
||||
- For Android, this plugin disables desugaring in `gradle.properties`: `android.enableDexingArtifactTransform.desugaring=false` and the [minimum deployment target is changed to `24`](https://github.com/react-native-webrtc/react-native-webrtc/issues/720#issuecomment-552374206) (from `21`) which may break other packages in your app!
|
||||
|
||||
## Manual Setup
|
||||
|
||||
|
||||
+4
@@ -21,6 +21,10 @@ const withWebRTC = (config, props = {}) => {
|
||||
"android.permission.SYSTEM_ALERT_WINDOW",
|
||||
"android.permission.WAKE_LOCK",
|
||||
]);
|
||||
config = config_plugins_1.AndroidConfig.Version.withBuildScriptExtMinimumVersion(config, {
|
||||
name: "minSdkVersion",
|
||||
minVersion: 24,
|
||||
});
|
||||
config = withDesugaring_1.withDesugaring(config, true);
|
||||
return config;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@config-plugins/react-native-webrtc",
|
||||
"version": "2.0.1",
|
||||
"version": "2.1.1",
|
||||
"description": "Config plugin to setup react-native-webrtc on prebuild",
|
||||
"main": "build/withWebRTC.js",
|
||||
"types": "build/withWebRTC.d.ts",
|
||||
|
||||
@@ -8,7 +8,7 @@ export const withDesugaring: ConfigPlugin<boolean> = (config, isDisabled) => {
|
||||
const desugaringKey = "android.enableDexingArtifactTransform.desugaring";
|
||||
return withGradleProperties(config, (config) => {
|
||||
config.modResults = config.modResults.filter((item) => {
|
||||
if (item.type == "property" && item.key === desugaringKey) {
|
||||
if (item.type === "property" && item.key === desugaringKey) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -3,8 +3,8 @@ import {
|
||||
ConfigPlugin,
|
||||
createRunOncePlugin,
|
||||
} from "@expo/config-plugins";
|
||||
import { withBitcodeDisabled } from "./withBitcodeDisabled";
|
||||
|
||||
import { withBitcodeDisabled } from "./withBitcodeDisabled";
|
||||
import { withDesugaring } from "./withDesugaring";
|
||||
import { IOSPermissionsProps, withPermissions } from "./withPermissions";
|
||||
|
||||
@@ -31,7 +31,10 @@ const withWebRTC: ConfigPlugin<IOSPermissionsProps | void> = (
|
||||
"android.permission.SYSTEM_ALERT_WINDOW",
|
||||
"android.permission.WAKE_LOCK",
|
||||
]);
|
||||
|
||||
config = AndroidConfig.Version.withBuildScriptExtMinimumVersion(config, {
|
||||
name: "minSdkVersion",
|
||||
minVersion: 24,
|
||||
});
|
||||
config = withDesugaring(config, true);
|
||||
|
||||
return config;
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env ts-node
|
||||
import * as fs from "fs/promises";
|
||||
import { sync as globSync } from "glob";
|
||||
import * as yaml from "js-yaml";
|
||||
import * as path from "path";
|
||||
|
||||
/**
|
||||
* @returns a list of file paths for each package in the packages folder, relative to the root.
|
||||
* @example
|
||||
* ```
|
||||
* ['packages/react-native-callkeep', 'packages/react-native-camera', ...]
|
||||
* ```
|
||||
*/
|
||||
function getAllPackageJsonFiles(root: string): string[] {
|
||||
const packageJsonFiles = globSync("packages/*/package.json", {
|
||||
cwd: root,
|
||||
});
|
||||
|
||||
return packageJsonFiles.map((pkgJsonFilePath) =>
|
||||
path.dirname(pkgJsonFilePath)
|
||||
);
|
||||
}
|
||||
|
||||
(async () => {
|
||||
const root = path.join(__dirname, "../");
|
||||
const filePaths = getAllPackageJsonFiles(root);
|
||||
|
||||
const config: {
|
||||
version: number;
|
||||
updates: {
|
||||
"package-ecosystem": string;
|
||||
directory: string;
|
||||
schedule: { interval?: string; time?: string; timezone?: string };
|
||||
}[];
|
||||
} = {
|
||||
version: 2,
|
||||
updates: [],
|
||||
};
|
||||
|
||||
for (const filePath of filePaths.sort()) {
|
||||
config.updates.push({
|
||||
"package-ecosystem": "npm",
|
||||
directory: filePath,
|
||||
// Default for every package is to run at the beginning of every Expo work day.
|
||||
schedule: {
|
||||
interval: "daily",
|
||||
time: "09:00",
|
||||
// Expo is based out of California
|
||||
timezone: "America/Los_Angeles",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const outputFilePath = path.join(root, ".github/dependabot.yml");
|
||||
|
||||
const results = yaml.dump(config);
|
||||
|
||||
console.log("Results:\n", results);
|
||||
console.log("");
|
||||
console.log("Writing to:", outputFilePath);
|
||||
await fs.writeFile(
|
||||
outputFilePath,
|
||||
[
|
||||
"# AUTO GENERATED:",
|
||||
"# This file was generated by running the following in the root directory:",
|
||||
"#",
|
||||
"# yarn update-dependabot-config",
|
||||
"",
|
||||
results,
|
||||
].join("\n")
|
||||
);
|
||||
})();
|
||||
Reference in new issue
Block a user