Skip to content
Merged

Next #30

Show file tree
Hide file tree
Changes from 7 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
56 changes: 32 additions & 24 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,52 @@
version: 2

enable-beta-ecosystems: true
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'
labels:
- "dependencies"
- 'dependencies'

- package-ecosystem: "gradle"
- package-ecosystem: 'gradle'
directories:
- "/package/android/"
- "/example/android/"
- '/android/'
- '/example/android/'
schedule:
interval: 'daily'
labels:
- 'nitro-core'
- 'nitrogen'
- 'dependencies'
- 'kotlin'

Comment on lines +11 to +22
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Issue with 'directories' key for gradle ecosystem

The Dependabot configuration uses directories (plural) for the gradle ecosystem, but Dependabot expects directory (singular). This might cause Dependabot to ignore these configurations.

   - package-ecosystem: 'gradle'
-    directories:
-      - '/android/'
-      - '/example/android/'
+    directory: '/android/'
+    schedule:
+      interval: 'daily'
+    labels:
+      - 'nitro-core'
+      - 'nitrogen'
+      - 'dependencies'
+      - 'kotlin'
+
+  - package-ecosystem: 'gradle'
+    directory: '/example/android/'
     schedule:
       interval: 'daily'
     labels:
       - 'nitro-core'
       - 'nitrogen'
       - 'dependencies'
       - 'kotlin'
🤖 Prompt for AI Agents
In the .github/dependabot.yml file between lines 11 and 22, the key for
specifying the path for the gradle ecosystem is incorrectly set as 'directories'
(plural). Change this key to 'directory' (singular) to comply with Dependabot's
expected configuration format and ensure the gradle updates are properly
detected and processed.

- package-ecosystem: 'bundler'
directory: '/example/'
schedule:
interval: "daily"
interval: 'daily'
labels:
- "nitro-core"
- "nitrogen"
- "dependencies"
- "kotlin"
- 'dependencies'
- 'ruby'

- package-ecosystem: "npm"
- package-ecosystem: 'npm'
directories:
- "/package/"
- "/example/"
- '/example/'
- '/'
schedule:
interval: "daily"
interval: 'daily'
labels:
- "nitro-core"
- "dependencies"
- "typescript"
- "nitrogen"
- 'nitro-core'
- 'dependencies'
- 'typescript'
- 'nitrogen'

groups:
react-native-cli:
patterns:
- "@react-native-community/cli*"
- '@react-native-community/cli*'
babel:
patterns:
- "@babel/*"
- '@babel/*'
react-native:
patterns:
- "@react-native/*"
- '@react-native/*'
42 changes: 15 additions & 27 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
paths:
- '.github/workflows/android-build.yml'
- 'example/android/**'
- '**/nitrogen/generated/shared/**'
- '**/nitrogen/generated/android/**'
- 'react-native-nitro-in-app-browser/cpp/**'
- 'react-native-nitro-in-app-browser/android/**'
- '**/bun.lockb'
- 'nitrogen/generated/shared/**'
- 'nitrogen/generated/android/**'
- 'cpp/**'
- 'android/**'
- '**/bun.lock'
- '**/react-native.config.js'
- '**/nitro.json'
pull_request:
Expand All @@ -20,12 +20,16 @@ on:
- 'example/android/**'
- '**/nitrogen/generated/shared/**'
- '**/nitrogen/generated/android/**'
- 'react-native-nitro-in-app-browser/cpp/**'
- 'react-native-nitro-in-app-browser/android/**'
- '**/bun.lockb'
- 'cpp/**'
- 'android/**'
- '**/bun.lock'
- '**/react-native.config.js'
- '**/nitro.json'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_new:
name: Build Android Example App (new architecture)
Expand All @@ -43,20 +47,12 @@ jobs:
distribution: 'zulu'
java-version: 17
java-package: jdk
cache: gradle

- name: Restore Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Gradle Build for example/android/
working-directory: example/android
run: ./gradlew assembleDebug --no-daemon --build-cache

# Gradle cache doesn't like daemons
- name: Stop Gradle Daemon
working-directory: example/android
run: ./gradlew --stop
Expand All @@ -80,20 +76,12 @@ jobs:
distribution: 'zulu'
java-version: 17
java-package: jdk
cache: gradle

- name: Restore Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Gradle Build for example/android/
working-directory: example/android
run: ./gradlew assembleDebug --no-daemon --build-cache

# Gradle cache doesn't like daemons
- name: Stop Gradle Daemon
working-directory: example/android
run: ./gradlew --stop
run: ./gradlew --stop
29 changes: 18 additions & 11 deletions .github/workflows/ios-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,40 @@ on:
paths:
- '.github/workflows/ios-build.yml'
- 'example/ios/**'
- 'example/Gemfile'
- 'example/Gemfile.lock'
- '**/nitrogen/generated/shared/**'
- '**/nitrogen/generated/ios/**'
- 'react-native-nitro-in-app-browser/cpp/**'
- 'react-native-nitro-in-app-browser/ios/**'
- 'cpp/**'
- 'ios/**'
- '**/Podfile.lock'
- '**/bun.lock'
- '**/*.podspec'
- '**/react-native.config.js'
- '**/nitro.json'
pull_request:
paths:
- '.github/workflows/ios-build.yml'
- 'example/ios/**'
- 'example/Gemfile'
- 'example/Gemfile.lock'
- '**/nitrogen/generated/shared/**'
- '**/nitrogen/generated/ios/**'
- 'react-native-nitro-in-app-browser/cpp/**'
- 'react-native-nitro-in-app-browser/ios/**'
- 'cpp/**'
- 'ios/**'
- '**/Podfile.lock'
- '**/bun.lock'
- '**/*.podspec'
- '**/react-native.config.js'
- '**/nitro.json'

env:
USE_CCACHE: 1

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

Comment on lines +40 to +43
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix indentation and trailing spaces in the concurrency block

The current indentation (4 spaces) will fail YAML parsing, and there are trailing spaces on line 43. Adjust to 2-space indentation and remove trailing spaces:

-concurrency:
-    group: ${{ github.workflow }}-${{ github.ref }}
-    cancel-in-progress: true 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 41-41: wrong indentation: expected 2 but found 4

(indentation)


[error] 43-43: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In .github/workflows/ios-build.yml at lines 40 to 43, the concurrency block uses
4-space indentation and has trailing spaces on line 43, causing YAML parsing
errors. Fix this by changing the indentation to 2 spaces for each level and
removing any trailing spaces at the end of line 43.

jobs:
build_new:
name: Build iOS Example App (new architecture)
Expand All @@ -42,9 +52,6 @@ jobs:
- name: Install npm dependencies (bun)
run: bun install

- name: Restore ccache
uses: hendrikmuhs/ccache-action@v1.2

- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
Expand All @@ -70,8 +77,8 @@ jobs:
run: "set -o pipefail && xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace ExampleApp.xcworkspace \
-scheme ExampleApp \
-workspace NitroInAppBrowserExample.xcworkspace \
-scheme NitroInAppBrowserExample \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 16' \
Expand Down Expand Up @@ -120,8 +127,8 @@ jobs:
run: "set -o pipefail && xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace ExampleApp.xcworkspace \
-scheme ExampleApp \
-workspace NitroInAppBrowserExample.xcworkspace \
-scheme NitroInAppBrowserExample \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 16' \
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/release-android.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
push:
branches:
- main
- next

permissions:
contents: read
Comment on lines +9 to +10
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Check permission configuration inconsistency

There's a potential issue with permissions. The top-level permission grants only read access, but the job-level permissions grant write access to multiple resources. Consider removing the top-level permission or aligning them.

 permissions:
-  contents: read
+  # No need for top-level permissions when they're defined at the job level

Also applies to: 20-24

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 10-10: wrong indentation: expected 4 but found 2

(indentation)

🤖 Prompt for AI Agents
In .github/workflows/release.yml around lines 9-10 and 20-24, there is an
inconsistency between the top-level permissions granting only read access to
contents and the job-level permissions granting write access to multiple
resources. To fix this, either remove the top-level permissions block entirely
or update it to align with the job-level permissions by granting the necessary
write access to the same resources.


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun.js
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Cache bun dependencies
id: bun-cache
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install npm dependencies (bun)
run: bun install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: bun release
12 changes: 1 addition & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#
.DS_Store

**/.xcode.env.local

# XDE
.expo/

Expand Down Expand Up @@ -56,10 +54,6 @@ npm-debug.log
yarn-debug.log
yarn-error.log

# Bun
package-lock.json
**/*.bun

# BUCK
buck-out/
\.buckd/
Expand All @@ -73,15 +67,11 @@ android/keystores/debug.keystore
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.kotlin

# Expo
.expo/

# Turborepo
.turbo/

# generated by bob
lib/

# TypeScript
tsconfig.tsbuildinfo
File renamed without changes.
Loading
Loading