Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
830f55f
Update bugsnag-cocoa to v6.34.0 [full ci]
Sep 25, 2025
0af2aa1
ci: :twisted_rightwards_arrows: add github action to keep next in syn…
gingerbenw Sep 26, 2025
7179feb
build(deps): bump github/codeql-action from 3.30.3 to 3.30.5
dependabot[bot] Sep 29, 2025
9c75772
build(deps): bump actions/cache from 4.2.4 to 4.3.0
dependabot[bot] Sep 29, 2025
51bdf10
build(deps): bump ruby/setup-ruby from 1.262.0 to 1.263.0
dependabot[bot] Sep 29, 2025
286caed
ci: :twisted_rightwards_arrows: add github action to keep next in syn…
gingerbenw Sep 29, 2025
1e9fd59
Merge pull request #2571 from bugsnag/bumpsnag-bugsnag-cocoa-v6.34.0
gingerbenw Sep 30, 2025
e34e052
Merge pull request #2573 from bugsnag/dependabot/github_actions/githu…
dependabot[bot] Sep 30, 2025
423aa9f
Merge pull request #2574 from bugsnag/dependabot/github_actions/actio…
dependabot[bot] Sep 30, 2025
d4f476b
Merge pull request #2575 from bugsnag/dependabot/github_actions/ruby/…
dependabot[bot] Sep 30, 2025
829d454
ci: update expo pipeline for v54 (#2562)
yousif-bugsnag Sep 30, 2025
9db3d94
Merge pull request #2481 from bugsnag/update-e2e-ios-12
gingerbenw Oct 1, 2025
3931349
Sync main to next (#2576)
gingerbenw Oct 1, 2025
d9a21d7
Merge pull request #2577 from bugsnag/PLAT-14963/electron-code-bundle-id
gingerbenw Oct 7, 2025
a5fc9f0
test: :white_check_mark: skip failing react native navigation tests o…
gingerbenw Oct 9, 2025
d13ed53
Revert browserstack non-https tests to ios_11 (#2586)
gingerbenw Oct 10, 2025
ce61cb0
update CHANGELOG.md
gingerbenw Oct 8, 2025
5b37ac5
Update CHANGELOG.md
gingerbenw Oct 9, 2025
4673d61
docs: :memo: update CHANGELOG.md
gingerbenw Oct 9, 2025
5549682
update release date
gingerbenw Oct 10, 2025
a0d2fbd
fix: use common.determineVersion instead of common.getCommitId when i…
gingerbenw Oct 13, 2025
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
7 changes: 3 additions & 4 deletions .buildkite/basic/browser-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ steps:
#
- label: ":browserstack: {{matrix}} non-https tests"
matrix:
# - ios_11 - Skipped pending PLAT-14437
- ios_11
- safari_16
depends_on: "browser-maze-runner-bs"
timeout_in_minutes: 30
Expand Down Expand Up @@ -82,7 +82,7 @@ steps:
- edge_17
- safari_10
- ios_15
- android_8
- android_9
- chrome_43
- chrome_72
- firefox_78
Expand All @@ -109,7 +109,6 @@ steps:
concurrency_group: "browserstack"
concurrency_method: eager


#
# BitBar tests
#
Expand Down Expand Up @@ -170,4 +169,4 @@ steps:
concurrency_group: "bitbar"
concurrency_method: eager
env:
HOST: "localhost" # IE11 needs the host set to localhost for some reason
HOST: "localhost" # IE11 needs the host set to localhost
10 changes: 5 additions & 5 deletions .buildkite/basic/expo-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ steps:
depends_on: "publish-js"
trigger: "bugsnag-expo"
build:
branch: "v53/next"
branch: "v54/next"
env:
BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}"
BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}"
# a branch name that's safe to use as a docker cache identifier
BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}"

- label: "@bugsnag/expo v52/next"
- label: "@bugsnag/expo v53/next"
depends_on: "publish-js"
trigger: "bugsnag-expo"
build:
branch: "v52/next"
branch: "v53/next"
env:
BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}"
BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}"
# a branch name that's safe to use as a docker cache identifier
BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}"

- label: "@bugsnag/expo v51/next"
- label: "@bugsnag/expo v52/next"
depends_on: "publish-js"
trigger: "bugsnag-expo"
build:
branch: "v51/next"
branch: "v52/next"
env:
BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}"
BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}"
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/basic/react-native-android-full-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ steps:
- "0.79"

- label: ':android: Build react-native-navigation {{matrix}} test fixture APK (Old Arch)'
skip: true # Skipped pending PLAT-15027
key: "build-react-native-navigation-android-fixture-old-arch"
timeout_in_minutes: 30
agents:
Expand All @@ -98,6 +99,7 @@ steps:
limit: 1

- label: ':android: Build react-native-navigation {{matrix}} test fixture APK (New Arch)'
skip: true # Skipped pending PLAT-15027
key: "build-react-native-navigation-android-fixture-new-arch"
timeout_in_minutes: 30
agents:
Expand Down Expand Up @@ -216,6 +218,7 @@ steps:
- "0.79"

- label: ":bitbar: :android: react-native-navigation {{matrix}} Android 12 (Old Arch) end-to-end tests"
skip: true # Skipped pending PLAT-15027
depends_on: "build-react-native-navigation-android-fixture-old-arch"
timeout_in_minutes: 10
plugins:
Expand Down Expand Up @@ -257,6 +260,7 @@ steps:
- "0.72"

- label: ":bitbar: :android: react-native-navigation {{matrix}} Android 12 (New Arch) end-to-end tests"
skip: true # Skipped pending PLAT-15027
depends_on: "build-react-native-navigation-android-fixture-new-arch"
timeout_in_minutes: 10
plugins:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/aws-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- name: Install Ruby
uses: ruby/setup-ruby@cf7216d52fba1017929b4d7162fabe2b30af5b49
uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a
with:
ruby-version: '3.1'

Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/branch-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Sync main to next
on:
push:
branches: [main]

jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Sync main to next
uses: bugsnag/github-action-branch-sync@v1
with:
source-branch: main
target-branch: next
labels: automation
reviewers: ${{ secrets.AUTOMATION_REVIEWERS }}
team-reviewers: ${{ secrets.AUTOMATION_TEAM_REVIEWERS }}
github-token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -61,7 +61,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
uses: github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -74,6 +74,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
with:
sarif_file: results.sarif

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
if: ${{ !env.ACT }}
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: npm-cache
if: ${{ !env.ACT }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- run: git submodule update --init --recursive

- name: Install ruby
uses: ruby/setup-ruby@cf7216d52fba1017929b4d7162fabe2b30af5b49 # v1.262.0
uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a # v1.263.0
with:
ruby-version: 2.7

Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [8.7.0] - 2025-10-13

### Added

- (electron) Add `codeBundleId` config option to main process [#2577](https://github.com/bugsnag/bugsnag-js/pull/2577)

### Changed

- Update bugsnag-cocoa to [v6.34.0](https//github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.34.0) [#2571](https://github.com/bugsnag/bugsnag-js/pull/2571)

## [8.6.0] - 2025-09-25

### Added
Expand Down
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/electron/src/config/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ module.exports.schema = {
validate: value => value === null || stringWithLength(value),
message: 'should be string'
},
codeBundleId: {
defaultValue: () => undefined,
message: 'should be a string',
validate: val => (val === undefined || stringWithLength(val))
},
releaseStage: {
...schema.releaseStage,
defaultValue: () => app.isPackaged ? 'production' : 'development'
Expand Down
1 change: 1 addition & 0 deletions packages/electron/types/notifier.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface MainConfig extends Config {
projectRoot?: string
launchDurationMillis?: number
sendCode?: boolean
codeBundleId?: string
}

// a renderer is only allowed a subset of properties from Config
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-electron-app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ module.exports = (NativeClient, process, electronApp, BrowserWindow, filestore,
isLaunching: true,
releaseStage: client._config.releaseStage,
type: client._config.appType || osToAppType.get(process.platform),
version: client._config.appVersion
version: client._config.appVersion,
codeBundleId: client._config.codeBundleId
})

client.addMetadata('app', {
Expand Down
19 changes: 19 additions & 0 deletions packages/plugin-electron-app/test/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const makeExpectedSessionApp = (customisations = {}) => ({
releaseStage: 'production',
type: undefined,
version: '1.2.3',
codeBundleId: undefined,
...customisations
})

Expand Down Expand Up @@ -181,6 +182,19 @@ describe('plugin: electron app info', () => {
expect(session.app).toEqual(makeExpectedSessionApp())
})

it('reports app.codeBundleId when configured', async () => {
const config = { codeBundleId: 'test-bundle-123' }

const { sendEvent, sendSession } = makeClient({ config })

const event = await sendEvent()
expect(event.app).toEqual(makeExpectedEventApp({ codeBundleId: 'test-bundle-123' }))
expect(event.getMetadata('app')).toEqual(makeExpectedMetadataApp())

const session = await sendSession()
expect(session.app).toEqual(makeExpectedSessionApp({ codeBundleId: 'test-bundle-123' }))
})

it('tracks focus and blur events for inForeground', async () => {
const BrowserWindow = makeBrowserWindow()
const electronApp = makeElectronApp({ BrowserWindow })
Expand Down Expand Up @@ -801,6 +815,11 @@ const schema = {
}),
allowPartialObject: true,
validate: value => true
},
codeBundleId: {
defaultValue: () => undefined,
message: 'should be a string',
validate: val => (val === undefined || typeof val === 'string')
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-electron-ipc/bugsnag-ipc-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ module.exports = class BugsnagIpcMain {
...event.app,
releaseStage: this.client._config.releaseStage,
version: this.client._config.appVersion,
type: this.client._config.appType
type: this.client._config.appType,
codeBundleId: this.client._config.codeBundleId
}
event.context = event.context || this.client._context
event.groupingDiscriminator = event.groupingDiscriminator || this.client._groupingDiscriminator
Expand Down
32 changes: 31 additions & 1 deletion packages/plugin-electron-ipc/test/bugsnag-ipc-main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ describe('BugsnagIpcMain', () => {
releaseStage: 'production',
name: 'testApp',
type: 'test',
version: undefined
version: undefined,
codeBundleId: undefined
},
breadcrumbs: client._breadcrumbs,
context: 'ctx',
Expand All @@ -335,6 +336,35 @@ describe('BugsnagIpcMain', () => {
})
})

it('should include codeBundleId in app object when configured', async () => {
const schema = {
codeBundleId: {
defaultValue: () => undefined,
message: 'should be a string',
validate: (val: unknown) => (val === undefined || typeof val === 'string')
},
releaseStage: {
defaultValue: () => 'production',
message: 'should be a string',
validate: (val: unknown) => typeof val === 'string'
}
}
const client = new Client({
apiKey: '123',
codeBundleId: 'test-bundle-456'
}, schema, [mockClientStateManagerPlugin], Notifier)

const bugsnagIpcMain = new BugsnagIpcMain(client)
const payloadInfo = await bugsnagIpcMain.getPayloadInfo()

expect(payloadInfo.app).toEqual({
releaseStage: 'production',
version: undefined,
type: undefined,
codeBundleId: 'test-bundle-456'
})
})

it('should return shouldSend=false when a callback returns false', async () => {
const cb = jest.fn(() => false)
// @ts-expect-error _internal is not a property of jest mocks but if we
Expand Down
32 changes: 32 additions & 0 deletions packages/plugin-electron-ipc/test/bugsnag-ipc-renderer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,36 @@ describe('BugsnagIpcRenderer', () => {
await BugsnagIpcRenderer.dispatch(event)
expect(electron.ipcRenderer.invoke).toHaveBeenCalledWith(CHANNEL_RENDERER_TO_MAIN, 'dispatch', JSON.stringify(event))
})

it('should receive main process codeBundleId via getPayloadInfo but not use it when renderer has no codeBundleId', async () => {
// Mock the electron.ipcRenderer.invoke to return payload info with main's codeBundleId
const mockPayloadInfo = {
app: {
releaseStage: 'production',
version: '1.0.0',
type: 'electron',
codeBundleId: 'main-bundle-abc123'
},
breadcrumbs: [],
context: null,
device: {},
metadata: {},
features: [],
user: {},
groupingDiscriminator: null
};

(electron.ipcRenderer.invoke as jest.Mock).mockResolvedValueOnce(mockPayloadInfo)

// Verify that getPayloadInfo returns the main's codeBundleId
const result = await BugsnagIpcRenderer.getPayloadInfo()

expect(electron.ipcRenderer.invoke).toHaveBeenCalledWith(CHANNEL_RENDERER_TO_MAIN, 'getPayloadInfo')
expect(result.app.codeBundleId).toBe('main-bundle-abc123')

// Note: This test verifies the IPC transport mechanism works correctly.
// The actual isolation behavior (preventing main's codeBundleId from being used
// when renderer has no codeBundleId) is enforced by the renderer-event-data plugin
// which explicitly sets codeBundleId from the renderer's own config.
})
})
Loading