You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vendor acquisition-sdk instead of depending on the code-push npm package
Adds src/acquisition-sdk/ (vendored TypeScript from the archived
microsoft/code-push repo, trimmed types.ts to only what's used, tests
ported for future reference but not wired into any runner), a
tsconfig.build.json + build:ts script compiling it to lib/ at
prepack/setup time, and points CodePush.js at the compiled output
instead of the code-push package. Drops the code-push dependency
entirely, which was only ever used for this one submodule and pulled
in the superagent/proxy-agent/vm2 CLI dependency chain that never
actually shipped in the bundled app JS.
Copy file name to clipboardExpand all lines: CLAUDE.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,8 @@ React Native CodePush is a native module that enables over-the-air updates for R
16
16
### Build
17
17
-`npm run build` - Build TypeScript tests to bin/ directory
18
18
-`npm run tsc` - TypeScript compilation
19
+
-`npm run build:ts` - Compiles `src/` (currently just the vendored `acquisition-sdk`) to `lib/`, which is what ships to consumers instead of raw `.ts`. Wired into `setup` (so local dev/tests have `lib/` available) and `prepare` (so `npm publish`/`npm pack` always ship a freshly built `lib/`).
20
+
- This split (a separate `tsconfig.build.json` and `tsconfig.json` for `test/` -> `bin/`) is temporary. Once `CodePush.js` and the rest of this repo's runtime JS are migrated to TypeScript, these should be unified into a single build, and adopting `react-native-builder-bob` (or some other common tool) is worth considering at that point instead of hand-rolled `tsc` + npm script wiring.
19
21
20
22
### Platform Testing
21
23
- Tests run on actual emulators/simulators with real React Native apps
@@ -28,7 +30,7 @@ React Native CodePush is a native module that enables over-the-air updates for R
28
30
-**JavaScript Bridge** (`CodePush.js`): Main API layer exposing update methods
-**Update Manager**: Handles download, installation, and rollback logic
31
-
-**Acquisition SDK**: Manages server communication and update metadata
33
+
-**Acquisition SDK** (`src/acquisition-sdk/`): Manages server communication and update metadata
32
34
33
35
### Platform Structure
34
36
-**iOS**: `ios/` - Objective-C implementation with CocoaPods integration
@@ -46,6 +48,7 @@ React Native CodePush is a native module that enables over-the-air updates for R
46
48
-**Custom Test Runner**: TypeScript-based test framework in `test/`
47
49
-**Real App Testing**: Creates actual React Native apps for integration testing
48
50
-**Scenario Testing**: Update, rollback, and error scenarios
51
+
-**No unit test infra yet**: this repo only has the mocha-based integration suite above. `src/acquisition-sdk/__tests__/` contains tests ported from upstream `microsoft/code-push`, kept for future reference - they are deliberately not wired into `npm test` or any runner. Don't assume they're dead/forgotten code, and don't wire them in without setting up real unit test infra first.
49
52
-**Templates**: `test/template/` holds native files (Podfile, AppDelegate, Android app files) and JS scenarios copied over top of a freshly generated RN/Expo app during test setup, overwriting its defaults — edit files here, not the generated project, for changes to persist
50
53
-**`test:ios` vs `test:setup:ios` vs `test:fast:ios`**: `test:ios` is just `test:setup:ios` followed by `test:fast:ios` — the two are meant to be split apart for local iteration.
51
54
-`test:setup:ios` (mocha `--ios --setup`) boots the simulator and provisions the test app once: copies templates, runs `pod install`, patches Info.plist/AppDelegate. It never builds or runs any test scenario.
@@ -61,3 +64,4 @@ React Native CodePush is a native module that enables over-the-air updates for R
61
64
-**Android Gradle Plugin**: Automatically generates bundle hashes and processes assets
62
65
-**iOS CocoaPods**: Manages native dependencies and build configuration
63
66
-**Bundle Processing**: Automated zip creation and hash calculation for OTA updates
67
+
-**`.npmignore` is a blocklist, not an allowlist**: `package.json` has no `files` field, so any new top-level file/dir ships to npm by default unless explicitly excluded. When adding new repo tooling/config, check whether it needs a `.npmignore` entry. Verify with `npm pack --dry-run`.
0 commit comments