Conversation
Make @zearaez/devtool a pure-JS package that works in Expo Go, Expo dev builds, and bare React Native. Remove the native TurboModule (its only feature, clipboard, is now resolved at runtime via expo-clipboard / @react-native-clipboard/clipboard / a user override, with a safe no-op fallback). Add a managed Expo SDK 54 example (example-expo/) runnable in Expo Go, drop the native CI jobs, and add clipboard unit tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR converts @zearaez/devtool into a JS-only React Native devtool that works in Expo (including Expo Go) and bare React Native by removing the native TurboModule implementation and resolving clipboard support at runtime (expo-clipboard / @react-native-clipboard/clipboard / user override), plus adds an Expo SDK 54 example app and updates CI accordingly.
Changes:
- Removed the iOS/Android TurboModule implementation and podspec/codegen wiring; package now ships JS-only artifacts.
- Added runtime clipboard backend resolution with safe no-op fallback and new
DevLogger.init({ clipboard })override, plus unit tests. - Added a managed Expo SDK 54 example (
example-expo/) and removed native CI build jobs.
Reviewed changes
Copilot reviewed 25 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates lockfile for new workspace/example and dependencies (Expo SDK 54 example, clipboard packages). |
| src/NativeDevtool.ts | Removes the TurboModule JS spec/registry usage (native module entrypoint). |
| src/devLogger/types.ts | Adds ClipboardSetter type and DevLoggerConfig.clipboard option. |
| src/devLogger/global.d.ts | Adds typing for runtime require (but currently conflicts with existing node typings; see comment). |
| src/devLogger/clipboard.ts | Replaces native clipboard call with runtime backend detection + override + no-op fallback. |
| src/tests/clipboard.test.ts | Adds tests for override, async rejection swallowing, and no-backend safety. |
| README.md | Documents Expo compatibility, new Expo example, and clipboard setup/override behavior. |
| package.json | Removes native artifacts from published files, adds optional clipboard peer deps, adds Expo example workspace/script, removes codegen config. |
| ios/Devtool.mm | Deletes iOS native TurboModule implementation. |
| ios/Devtool.h | Deletes iOS native header/spec conformance. |
| Devtool.podspec | Deletes CocoaPods spec (no native code shipped). |
| android/src/main/java/com/zearaez/devtool/DevtoolPackage.kt | Deletes Android package registration for TurboModule. |
| android/src/main/java/com/zearaez/devtool/DevtoolModule.kt | Deletes Android native TurboModule implementation. |
| android/src/main/AndroidManifest.xml | Deletes Android manifest for the native library. |
| android/build.gradle | Deletes Android library Gradle build (no native build). |
| example/react-native.config.js | Updates example autolinking config to reflect JS-only library. |
| example/package.json | Adds @react-native-clipboard/clipboard dependency for the bare RN example. |
| example-expo/tsconfig.json | Adds Expo example TypeScript config. |
| example-expo/README.md | Adds run instructions and notes for the Expo Go example. |
| example-expo/package.json | Adds managed Expo SDK 54 example app dependencies/scripts. |
| example-expo/metro.config.js | Adds monorepo Metro config for consuming local workspace package in Expo. |
| example-expo/index.js | Adds Expo entrypoint registering root component. |
| example-expo/babel.config.js | Adds Expo Babel preset config. |
| example-expo/App.tsx | Adds Expo demo UI exercising fetch/console logging and DevLogger UI. |
| example-expo/app.json | Adds Expo app config. |
| example-expo/.gitignore | Adds Expo-specific gitignore entries. |
| .github/workflows/ci.yml | Removes native build jobs; keeps lint/test/build-library. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make @zearaez/devtool a pure-JS package that works in Expo Go, Expo dev builds, and bare React Native. Remove the native TurboModule (its only feature, clipboard, is now resolved at runtime via expo-clipboard / @react-native-clipboard/clipboard / a user override, with a safe no-op fallback). Add a managed Expo SDK 54 example (example-expo/) runnable in Expo Go, drop the native CI jobs, and add clipboard unit tests.