Skip to content

Commit d9ad357

Browse files
committed
fix: address stability sweep pre-merge findings
- ensure clean example prebuild paths generate Apple targets in local scripts and CI - enforce JS runtime/plugin tests in CI and release gates - restore SwiftLint and Swift format coverage for production iOS module files - exclude dev-only harness/test artifacts from published npm package
1 parent 76034f1 commit d9ad357

6 files changed

Lines changed: 32 additions & 4 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737

3838
- run: bun typecheck
3939

40+
- run: bun run test
41+
4042
publish-to-npm:
4143
needs: test
4244
runs-on: ubuntu-latest

.github/workflows/test.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ jobs:
3737

3838
- run: bun typecheck
3939

40+
test-js:
41+
name: JS Tests
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 10
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- uses: oven-sh/setup-bun@v2
48+
with:
49+
bun-version: latest
50+
51+
- run: bun install
52+
53+
- run: bun run test
54+
4055
typecheck-example:
4156
name: Typecheck (example project)
4257
runs-on: ubuntu-latest
@@ -98,7 +113,7 @@ jobs:
98113

99114
- run: bun install
100115

101-
- run: bunx expo prebuild
116+
- run: bun run prebuild
102117
working-directory: apps/example
103118

104119
swift-lint:

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
swift format -i -p -r ./packages/react-native-device-activity/ios/Tests ./packages/react-native-device-activity/targets ./packages/react-native-device-activity/ios/TestHarness/reactnativedeviceactivityexample
2-
swift format -i -p ./packages/react-native-device-activity/ios/Shared.swift
2+
swift format -i -p ./packages/react-native-device-activity/ios/Shared.swift ./packages/react-native-device-activity/ios/ReactNativeDeviceActivityModule.swift ./packages/react-native-device-activity/ios/ReactNativeDeviceActivityView.swift ./packages/react-native-device-activity/ios/ReactNativeDeviceActivityViewPersisted.swift ./packages/react-native-device-activity/ios/ScreenTimeActivityPicker.swift
33
packages/react-native-device-activity/ios/TestHarness/Pods/SwiftLint/swiftlint lint --fix --config .swiftlint.yml

.swiftlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ disabled_rules:
1212
- inclusive_language
1313

1414
included:
15+
- packages/react-native-device-activity/ios/ReactNativeDeviceActivityModule.swift
16+
- packages/react-native-device-activity/ios/ReactNativeDeviceActivityView.swift
17+
- packages/react-native-device-activity/ios/ReactNativeDeviceActivityViewPersisted.swift
18+
- packages/react-native-device-activity/ios/ScreenTimeActivityPicker.swift
1519
- packages/react-native-device-activity/ios/Tests
1620
- packages/react-native-device-activity/ios/Shared.swift
1721
- packages/react-native-device-activity/ios/TestHarness/reactnativedeviceactivityexample

apps/example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"main": "index.js",
55
"scripts": {
66
"start": "INTERNALLY_TEST_EXAMPLE_PROJECT=true expo start",
7-
"android": "INTERNALLY_TEST_EXAMPLE_PROJECT=true expo run:android",
8-
"ios": "INTERNALLY_TEST_EXAMPLE_PROJECT=true expo run:ios",
7+
"android": "COPY_TO_TARGET_FOLDER=true INTERNALLY_TEST_EXAMPLE_PROJECT=true expo run:android",
8+
"ios": "COPY_TO_TARGET_FOLDER=true INTERNALLY_TEST_EXAMPLE_PROJECT=true expo run:ios",
99
"web": "INTERNALLY_TEST_EXAMPLE_PROJECT=true expo start --web",
1010
"bundle": "INTERNALLY_TEST_EXAMPLE_PROJECT=true expo export",
1111
"typecheck": "tsc --noEmit",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Package-local dev/test files
2+
ios/TestHarness/
3+
ios/Tests/
4+
plugin/__tests__/
5+
src/*.test.ts
6+
jest.runtime.config.js
7+
plugin/jest.config.js

0 commit comments

Comments
 (0)