Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/lint-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
lint-md:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn install --frozen-lockfile --check-files
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: npx remark --use validate-links . .github
18 changes: 11 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ jobs:
node: ["20", "22"]
name: Build with Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: yarn install --frozen-lockfile --check-files
- run: yarn lerna run prepare --stream
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm --filter './packages/*' --parallel run prepare
- uses: actions/cache@v4
with:
path: "*"
Expand All @@ -47,15 +49,17 @@ jobs:
with:
path: "*"
key: v2-${{ github.sha }}-${{ matrix.node }}
- uses: pnpm/action-setup@v4
- name: Set up Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: Lint ${{ matrix.package }}
run: yarn lint --max-warnings 0
run: pnpm lint --max-warnings 0
working-directory: packages/${{ matrix.package }}
- name: Test ${{ matrix.package }}
run: yarn test
run: pnpm test
working-directory: packages/${{ matrix.package }}
env:
CI: true
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ web-build
# Node
node_modules
npm-debug.log
yarn-error.log
pnpm-debug.log

# Ruby
.direnv
Expand Down
49 changes: 28 additions & 21 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,38 @@
Monorepo of community-maintained Expo config plugins for React Native libraries. Plugins auto-configure native Android/iOS projects during `npx expo prebuild`.

- **Namespace**: `@config-plugins/*`
- **Package manager**: Yarn v1 with workspaces
- **Orchestrator**: Lerna 3.4.1 (independent versioning)
- **Package manager**: pnpm with workspaces
- **Publishing**: `pnpm publish` (independent versioning)

## Common Commands

```bash
# Install dependencies
yarn
pnpm install

# Build all packages
yarn prepare
pnpm prepare

# Watch build all packages
yarn start
pnpm start

# Generate a new plugin
yarn gen
pnpm gen

# Run tests for a specific package
cd packages/<name> && yarn test
cd packages/<name> && pnpm test

# Lint a specific package
cd packages/<name> && yarn lint --max-warnings 0
cd packages/<name> && pnpm lint --max-warnings 0

# Build a specific package
cd packages/<name> && yarn build
cd packages/<name> && pnpm build

# Clean a specific package
cd packages/<name> && yarn clean
cd packages/<name> && pnpm clean

# Rebuild an example app to test config plugins
cd apps/<name> && yarn expo prebuild --clean
cd apps/<name> && pnpm expo prebuild --clean
```

## Project Structure
Expand All @@ -52,20 +52,29 @@ cd apps/<name> && yarn expo prebuild --clean
- Branch naming: `@your-github-username/type/description`
- Each package delegates build/test/lint to `expo-module-scripts`
- TypeScript source in `src/`, compiled output in `build/`
- Shared dependency versions are defined in the `catalog:` block in `pnpm-workspace.yaml` and referenced with `catalog:` in each package's `package.json`
- Peer dependency on `expo@^55`
- Tests use Jest with `memfs` for virtual filesystem testing

## Upgrading Plugins for a New Expo SDK Version

When a new Expo SDK is released (e.g., SDK 54 → SDK 55), every package and example app must be updated. Use conventional commits scoped to the package name (e.g., `chore(react-native-foo): bump to expo@^55`).

### Catalog updates (`pnpm-workspace.yaml`)

Update the `catalog:` block with the new SDK versions for shared dependencies:

1. **`expo`** — Update to `^<NEW_SDK>` (used as `peerDependencies` in all packages).
2. **`expo-module-scripts`** — Update to `^<NEW_SDK>`.
3. **`@expo/config-plugins`** — Update to `^<NEW_SDK>`.
4. Review other catalog entries (`@expo/image-utils`, `@expo/plist`, etc.) and bump if needed.

### Per-package updates (`packages/<name>/`)

For each package:

1. **`package.json`** — Update `peerDependencies.expo` to `^<NEW_SDK>`.
2. **`README.md`** — Add a new row to the version compatibility table with the new SDK version, the latest compatible upstream package version, and the next config plugin major version.
3. **Build & test** — Run `yarn build` and `yarn test` (if tests exist) to verify nothing broke.
1. **`README.md`** — Add a new row to the version compatibility table with the new SDK version, the latest compatible upstream package version, and the next config plugin major version.
2. **Build & test** — Run `pnpm build` and `pnpm test` (if tests exist) to verify nothing broke.

### Example app updates (`apps/<name>/`)

Expand All @@ -77,21 +86,19 @@ For each example app:

### Monorepo root updates

1. **`package.json`** — Update `expo-module-scripts` to the version matching the new SDK (e.g., `^55.0.2`).
2. **`scripts/generate-plugin.ts`** — Update `SDK_VERSION` to the new SDK number.
3. **`scripts/template/package.json`** — Update the `expo` peer dependency version.
1. **`scripts/generate-plugin.ts`** — Update `SDK_VERSION` to the new SDK number.

### Final steps

1. Run `yarn` from the root to regenerate `yarn.lock`.
2. Run `yarn prepare` to verify all packages build.
1. Run `pnpm install` from the root to regenerate `pnpm-lock.yaml`.
2. Run `pnpm prepare` to verify all packages build.
3. Run tests for packages that have them.
4. Update `CLAUDE.md` if any conventions changed (e.g., the peer dependency version listed under Conventions).

## After Adding/Removing Packages

Run these from the root:
```bash
yarn update-dependabot-config
yarn update-issue-template
pnpm update-dependabot-config
pnpm update-issue-template
```
15 changes: 9 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@
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. Run `yarn` in the root directory to generate the build files.
2. Run `pnpm install` 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 title.
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`.
- Plugins can be generated by running `pnpm 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`
- Update dependabot: `pnpm update-dependabot-config`
- Update the issue template: `pnpm update-issue-template`

## Upgrading plugins for a new Expo version

- Update the `catalog:` block in `pnpm-workspace.yaml` with the new SDK versions for `expo`, `expo-module-scripts`, `@expo/config-plugins`, and any other shared dependencies
- Ensure every project under `apps/` is updated to latest version of Expo
- Ensure every library under `packages/` has a peer dependency on the same version of Expo
- Update each library’s `README.md`
- Ensuring the latest version of Expo is listed
- Ensure the upstream package version is correct
Expand All @@ -34,4 +34,7 @@ Be sure to run the following scripts in the **root directory** to update automat

## Publishing a release

All publishing should be handled automatically whenever code is merged to `main`.
Packages are published manually using the scripts in the root `package.json`:

1. `pnpm bump`: Increments the major version of all packages.
2. `pnpm release`: Publishes all packages to npm.
4 changes: 2 additions & 2 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"android": "expo run:android"
},
"dependencies": {
"@config-plugins/react-native-adjust": "*",
"@config-plugins/react-native-callkeep": "*",
"@config-plugins/react-native-adjust": "workspace:*",
"@config-plugins/react-native-callkeep": "workspace:*",
"expo": "~55",
"expo-localization": "~55.0.9",
"expo-splash-screen": "~55.0.12",
Expand Down
2 changes: 1 addition & 1 deletion apps/apple-settings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"e2e": "maestro test .maestro/"
},
"dependencies": {
"@config-plugins/apple-settings": "*",
"@config-plugins/apple-settings": "workspace:*",
"@react-native-community/slider": "5.1.2",
"@react-native-picker/picker": "2.11.4",
"expo": "~55",
Expand Down
2 changes: 1 addition & 1 deletion apps/ios-stickers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"android": "expo run:android"
},
"dependencies": {
"@config-plugins/ios-stickers": "*",
"@config-plugins/ios-stickers": "workspace:*",
"expo": "~55",
"expo-splash-screen": "~55.0.12",
"react": "19.2.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/react-native-branch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"android": "expo run:android"
},
"dependencies": {
"@config-plugins/react-native-branch": "*",
"@config-plugins/react-native-branch": "workspace:*",
"expo": "~55",
"expo-splash-screen": "~55.0.12",
"react": "19.2.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/react-native-dynamic-app-icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"android": "expo run:android"
},
"dependencies": {
"@config-plugins/react-native-dynamic-app-icon": "*",
"@config-plugins/react-native-dynamic-app-icon": "workspace:*",
"expo": "~55",
"expo-splash-screen": "~55.0.12",
"react": "19.2.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/react-native-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"android": "expo run:android"
},
"dependencies": {
"@config-plugins/react-native-blob-util": "*",
"@config-plugins/react-native-pdf": "*",
"@config-plugins/react-native-blob-util": "workspace:*",
"@config-plugins/react-native-pdf": "workspace:*",
"expo": "~55",
"expo-splash-screen": "~55.0.12",
"react": "19.2.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/react-native-siri-shortcut/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"android": "expo run:android"
},
"dependencies": {
"@config-plugins/react-native-siri-shortcut": "*",
"@config-plugins/react-native-siri-shortcut": "workspace:*",
"expo": "~55",
"expo-splash-screen": "~55.0.12",
"react": "19.2.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/react-native-webrtc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"android": "expo run:android"
},
"dependencies": {
"@config-plugins/react-native-webrtc": "*",
"@config-plugins/react-native-webrtc": "workspace:*",
"expo": "~55",
"expo-splash-screen": "~55.0.12",
"react": "19.2.0",
Expand Down
8 changes: 0 additions & 8 deletions lerna.json

This file was deleted.

21 changes: 6 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,24 @@
"name": "@config-plugins/repo",
"version": "1.0.0",
"private": true,
"packageManager": "pnpm@10.7.0",
"scripts": {
"postinstall": "expo-yarn-workspaces check-workspace-dependencies",
"gen": "tsx ./scripts/generate-plugin.ts",
"update-issue-template": "tsx ./scripts/gh-issues-config.ts",
"update-dependabot-config": "tsx ./scripts/update-dependabot-config.ts",
"start": "lerna run build --parallel -- --watch",
"publish": "lerna publish --no-private",
"prepare": "lerna run prepare --parallel"
},
"workspaces": [
"apps/*",
"packages/*"
],
"resolutions": {
"expo": "^55"
"start": "pnpm --filter './packages/*' --parallel run build -- --watch",
"bump": "pnpm --filter './packages/*' -r exec pnpm version major --no-git-tag-version",
"release": "pnpm publish -r --filter './packages/*'",
"prepare": "pnpm --filter './packages/*' --parallel run prepare"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@expo/package-manager": "^1.8.4",
"@types/js-yaml": "^4.0.5",
"@types/prompts": "^2.0.13",
"@types/react": "~18.3.12",
"@types/react": "^19.1.1",
"eslint": "^8.10.0",
"expo-module-scripts": "^55.0.2",
"expo-yarn-workspaces": "^2.3.2",
"js-yaml": "^4.1.0",
"lerna": "3.4.1",
"memfs": "^3.4.4",
"prettier": "^3",
"prompts": "^2.4.1",
Expand Down
15 changes: 8 additions & 7 deletions packages/apple-settings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"lint": "expo-module lint",
"test": "expo-module test",
"generate-types": "json2ts -i ./src/schema/SettingsPlist.json -o ./src/schema/SettingsPlist.ts --additionalProperties=false --unknownAny=false",
"prepare": "expo-module prepare && yarn generate-types",
"prepublishOnly": "expo-module prepublishOnly",
"prepare": "expo-module prepare && pnpm generate-types",
"expo-module": "expo-module"
},
"keywords": [
Expand All @@ -30,14 +29,16 @@
],
"dependencies": {
"@bacons/xcode": "^1.0.0-alpha.12",
"@expo/plist": "^0.3.4",
"@expo/plist": "catalog:",
"iconv-lite": "^0.6.3",
"schema-utils": "^4.2.0"
},
"peerDependencies": {
"expo": "^55"
"schema-utils": "catalog:"
},
"devDependencies": {
"expo-module-scripts": "catalog:",
"jest": "catalog:",
"json-schema-to-typescript": "^13.0.2"
},
"peerDependencies": {
"expo": "catalog:"
}
}
2 changes: 1 addition & 1 deletion packages/apple-settings/src/withLinkedSettingsBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async function applyXcodeChanges(
// Prevent duplicate.
if (
mainResourceBuildPhase?.props.files.find(
(file) => file.props.fileRef.props.name === "Settings.bundle",
(file) => file.props.fileRef?.props.name === "Settings.bundle",
)
) {
return project;
Expand Down
Loading
Loading