Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
29308ca
fix malformed package.json files and regenerate lockfile
hamudi-ahmed Apr 8, 2026
38c6b27
chore: replace rollup builds with tsc
hamudi-ahmed Jan 19, 2026
afce456
chore: move all rollup deps to repo root
hamudi-ahmed Jan 26, 2026
936929b
chore(plugin-aws-lambda): remove erroneous files
hamudi-ahmed Jan 26, 2026
822c4f0
fixup: replace rollup builds with tsc
hamudi-ahmed Jan 26, 2026
fac6b6e
chore: update typescript to 5.9
hamudi-ahmed Jan 30, 2026
422becd
chore: use root typescript dependency for all packages
hamudi-ahmed Jan 30, 2026
c498a6b
chore: update eslint config
hamudi-ahmed Jan 30, 2026
31c62ba
build: reintroduce rollup builds for internal packages (excludes brow…
hamudi-ahmed Jan 30, 2026
ae8c283
build(browser): add back rollup config (wip)
hamudi-ahmed Jan 30, 2026
7469581
chore: update jest to v29 and add ts-jest
hamudi-ahmed Jan 30, 2026
b46be16
test: update jest config
hamudi-ahmed Jan 30, 2026
72b37dd
test: fix some failing tests
hamudi-ahmed Jan 30, 2026
03f9856
regenerate lockfile
hamudi-ahmed Apr 8, 2026
7c580c3
fix(core): add response type to event.ts
hamudi-ahmed Apr 8, 2026
424c905
refactor: convert @bugsnag/request-tracker to typescript
hamudi-ahmed Apr 9, 2026
6915498
refactor: update plugin-network-breadcrumbs
hamudi-ahmed Apr 9, 2026
84250fa
test: fix missing comma in jest config
hamudi-ahmed Apr 9, 2026
f153eda
build: exclude test directories from eslint config
hamudi-ahmed Apr 9, 2026
8f719a1
build(deps): update react native dev dependencies and fix react-navig…
hamudi-ahmed Apr 9, 2026
42b3872
build(deps): remove @types/react-native dev dependencies from individ…
hamudi-ahmed Apr 9, 2026
1c8b031
chore: fix missing comma in RN fixture generation script
hamudi-ahmed Apr 13, 2026
172a27c
build: fix ts-expect-error linter errors
hamudi-ahmed Apr 13, 2026
f509caf
build(web-worker): move eslint env config to eslint.config.mjs
hamudi-ahmed Apr 13, 2026
b8f7a43
build: use tsconfig.test.json in jest config
hamudi-ahmed Apr 13, 2026
bdc272d
test: map bugsnag packages to source directories for unit tests
hamudi-ahmed Apr 13, 2026
be39609
test: suppress some ts diagnostic checks for unit tests
hamudi-ahmed Apr 13, 2026
e7716f2
test(request-tracker): convert request-tracker unit tests to typescript
hamudi-ahmed Apr 13, 2026
fb4093a
build(path-normalizer): use rollup for build
hamudi-ahmed Apr 13, 2026
bfe7bd6
test(plugin-network-instrumentation): fix imports from @bugsnag/core
hamudi-ahmed Apr 13, 2026
6b5159c
test: disable extra jest config and reinstate FixJSDOMEnvironment set…
hamudi-ahmed Apr 13, 2026
d333b36
fuxip fixjsdom
hamudi-ahmed Apr 13, 2026
8d88b96
test(electron): fix electron tests
hamudi-ahmed Apr 13, 2026
18bff43
test(json-payload): fix json-payload unit tests
hamudi-ahmed Apr 13, 2026
32a18e6
chore(core): remove deleted package from package.json
hamudi-ahmed Apr 13, 2026
532945f
build(plugin-react): use rollup for build
hamudi-ahmed Apr 13, 2026
c2ffb0b
test: fix react-based tests
hamudi-ahmed Apr 13, 2026
6021e5f
test(react-native): fix issue with react-test-renderer
hamudi-ahmed Apr 13, 2026
a3b860f
test(request-tracker): move request-tracker to browser jest project
hamudi-ahmed Apr 13, 2026
d0124d8
test(react-native): fix ts errors in react-native unit tests
hamudi-ahmed Apr 13, 2026
9156837
test: :white_check_mark: update imports to resolve failing network in…
gingerbenw Apr 13, 2026
bce1561
test: use ts-jest transformer and moduleNameMapper for unit tests
hamudi-ahmed Apr 13, 2026
91921aa
test: fix typescript errors in unit tests
hamudi-ahmed Apr 13, 2026
0d9ff34
chore: add clean script to root package.json
hamudi-ahmed Apr 13, 2026
c86517a
build(derecursify): add rollup build
hamudi-ahmed Apr 14, 2026
ba83c0a
build(deps): bump cuid to v3.2.2
hamudi-ahmed Apr 14, 2026
bf38328
build: :wrench: build node package with rollup, update base rollup co…
gingerbenw Apr 14, 2026
6939122
refactor: :truck: rename index to bugsnag
gingerbenw Apr 14, 2026
25625c9
chore: :package: update files list in package.json
gingerbenw Apr 14, 2026
9677260
chore: :package: update files list in package.json
gingerbenw Apr 14, 2026
bd67b5a
update files entries for remaining packages
gingerbenw Apr 14, 2026
53240fe
add plugin-stackframe-path-normaliser to fixture build script
gingerbenw Apr 14, 2026
ec0dcf0
bundle node dependencies
gingerbenw Apr 14, 2026
1f67f15
update trace length assertions
gingerbenw Apr 15, 2026
39289ee
fix linting issues, and remove unused package from build script
gingerbenw Apr 15, 2026
28a06bf
test: :wrench: update tsconfig type checking configuration
gingerbenw Apr 15, 2026
ee347b4
copy test tsconfig
gingerbenw Apr 15, 2026
f7a0213
refactor: :recycle: finish refactoring plugin-vue
gingerbenw Apr 16, 2026
6785ebc
reinstate promise_catch test
gingerbenw Apr 16, 2026
c0df8ba
fix vuew tests
gingerbenw Apr 16, 2026
29bf2a9
refactor: :wrench: update rollup config
gingerbenw Apr 17, 2026
a50febc
ci: set maxWorkers=2 for ci unit tests
hamudi-ahmed Apr 20, 2026
4c94879
chore: fix submodule update
hamudi-ahmed Apr 20, 2026
b1c0a04
build: output files with .js extension for compatibility with older b…
hamudi-ahmed Apr 22, 2026
5657b08
build: fix tsconfig
hamudi-ahmed Apr 22, 2026
387d995
test(cloudflare-workers): fix import in unit tests
hamudi-ahmed Apr 22, 2026
68cbd96
build(node): drop top-level module field from package.json
hamudi-ahmed Apr 22, 2026
50a01ca
test: remove unused jest config
hamudi-ahmed Apr 22, 2026
bd393d1
fix(electron): fix type declaration for plugin-electron-renderer-stri…
hamudi-ahmed Apr 22, 2026
320d748
test(plugin-aws-lambda): convert serverless-express unit tests to typ…
hamudi-ahmed Apr 22, 2026
834c8db
ci(browser): remove fail-fast flag
hamudi-ahmed Apr 22, 2026
150dfd4
test(cloudflare-workers): add missing packages to fixture build script
hamudi-ahmed Apr 22, 2026
a000ae8
build: reinstate babel for react and vue plugin builds
hamudi-ahmed Apr 22, 2026
769e8d2
test: prevent ts-jest worker OOM in CI unit tests
hamudi-ahmed Apr 23, 2026
9475ffb
test(electron): switch to @kayahr/jest-electron-runner and fix electr…
hamudi-ahmed Apr 23, 2026
06b8fa9
ci: remove IE 11 tests and bump chrome 43 to chrome 47
hamudi-ahmed Apr 23, 2026
0802b68
ci(browser): use chrome 53 for now
hamudi-ahmed Apr 23, 2026
07f3919
ci(browser): update browser_errors.yml
hamudi-ahmed Apr 24, 2026
a65ab97
test(browser): update skip tags for updated chrome versions
hamudi-ahmed Apr 24, 2026
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
33 changes: 1 addition & 32 deletions .buildkite/basic/browser-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ steps:
run: "browser-maze-runner-bs"
use-aliases: true
command:
- "--fail-fast"
- "--farm=bs"
- "--browser={{matrix}}"
artifacts#v1.5.0:
Expand All @@ -83,7 +82,7 @@ steps:
- "safari_10"
- "ios_15"
- "android_9"
- "chrome_43"
- "chrome_53" # TODO: Revert to Chrome 47 when Maze Runner supports it again (see PLAT-16280)
- "chrome_72"
- "firefox_78"
depends_on: "browser-maze-runner-bs"
Expand All @@ -94,7 +93,6 @@ steps:
run: "browser-maze-runner-bs"
use-aliases: true
command:
- "--fail-fast"
- "--https"
- "--farm=bs"
- "--browser={{matrix}}"
Expand Down Expand Up @@ -127,7 +125,6 @@ steps:
service-ports: true
use-aliases: true
command:
- "--fail-fast"
- "--https"
- "--farm=bb"
- "--browser={{matrix}}"
Expand All @@ -145,31 +142,3 @@ steps:
concurrency_group: "bitbar"
concurrency_method: "eager"

- label: ":bitbar: ie_11 Browser tests (EU hub)"
depends_on: "browser-maze-runner-bb"
timeout_in_minutes: 30
plugins:
docker-compose#v4.12.0:
pull: "browser-maze-runner-bb"
run: "browser-maze-runner-bb"
service-ports: true
use-aliases: true
command:
- "--fail-fast"
- "--farm=bb"
- "--browser=ie_11"
- "--no-tunnel"
- "--aws-public-ip"
artifacts#v1.5.0:
upload:
- "./test/browser/maze_output/failed/**/*"
test-collector#v1.10.2:
files: "reports/TEST-*.xml"
format: "junit"
branch: "^main|next$$"
api-token-env-name: "BROWSER_BUILDKITE_ANALYTICS_TOKEN"
concurrency: 25
concurrency_group: "bitbar"
concurrency_method: "eager"
env:
HOST: "localhost" # IE11 needs the host set to localhost
3 changes: 2 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ steps:
plugins:
docker-compose#v4.12.0:
run: ci
command: "npm run test:unit"
command:
- "npm run test:unit"

- label: "Type checks/tests"
depends_on: "ci-image"
Expand Down
134 changes: 87 additions & 47 deletions .rollup/index.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

import typescript from '@rollup/plugin-typescript'
import commonjs from '@rollup/plugin-commonjs'
import nodeResolve from '@rollup/plugin-node-resolve'
import replace from '@rollup/plugin-replace'
import fs from 'fs'

Expand All @@ -10,59 +13,96 @@ const defaultOptions = () => ({
external: [],
// the entry point for the bundle
input: undefined,
// output directory for the bundle
output: undefined
// additional rollup plugins
plugins: []
})

export const sharedOutput = {
dir: 'dist',
generatedCode: {
preset: 'es2015',
}
}

function createRollupConfig (options = defaultOptions()) {
const packageJson = JSON.parse(fs.readFileSync(`${process.cwd()}/package.json`))

return {
input: options.input || 'src/index.ts',
output: options.output || [
{
...sharedOutput,
return [
// ESM build
{
input: options.input || './src/index.ts',
output: {
dir: 'dist/esm',
entryFileNames: '[name].js',
format: 'cjs'
},
{
...sharedOutput,
preserveModules: true,
entryFileNames: '[name].mjs',
format: 'esm'
}
],
external: options.external,
plugins: [
replace({
preventAssignment: true,
values: {
__VERSION__: packageJson.version,
...options.additionalReplacements,
format: 'es',
sourcemap: true,
generatedCode: {
preset: 'es2015',
}
}),
typescript({
removeComments: true,
// don't output anything if there's a TS error
noEmitOnError: true,
// turn on declaration files and declaration maps
compilerOptions: {
declaration: true,
declarationMap: true,
emitDeclarationOnly: true,
declarationDir: 'dist/types',
}
}),
...(options.plugins ?? [])
]
}
},
external: options.external,
plugins: [
replace({
preventAssignment: true,
values: {
__BUGSNAG_NOTIFIER_VERSION__: packageJson.version,
...options.additionalReplacements,
}
}),
nodeResolve({
preferBuiltins: true
}),
commonjs(),
typescript({
tsconfig: './tsconfig.json',
declarationDir: 'dist/esm',
outDir: 'dist/esm',
noEmitOnError: true
}),
...(options.plugins ?? [])
]
},
// CJS build
{
input: options.input || './src/index.ts',
output: {
dir: 'dist/cjs',
entryFileNames: '[name].js',
format: 'cjs',
sourcemap: true,
generatedCode: {
preset: 'es2015',
},
exports: 'named',
interop: 'auto',
footer: 'module.exports = Object.assign(exports.default || {}, exports);'
},
external: options.external,
plugins: [
replace({
preventAssignment: true,
values: {
__BUGSNAG_NOTIFIER_VERSION__: packageJson.version,
...options.additionalReplacements,
}
}),
nodeResolve({
preferBuiltins: true
}),
commonjs(),
typescript({
tsconfig: './tsconfig.json',
declarationDir: 'dist/cjs',
outDir: 'dist/cjs',
noEmitOnError: true
}),
{
name: 'emit-cjs-package-json',
generateBundle() {
this.emitFile({
type: 'asset',
fileName: 'package.json',
source: JSON.stringify({ type: 'commonjs' }, null, 2)
});
}
},
...(options.plugins ?? [])
]
}
]
}

export default createRollupConfig
export default createRollupConfig
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = api => {
presets.push(['@babel/preset-env', {targets: {node: 'current'}}])
presets.push('@babel/preset-typescript')
overrides.push({
test: '**/node_modules/react-native/**/*',
test: ['node_modules/react-native/**/*', 'node_modules/@react-native/**/*'],
presets: ['module:metro-react-native-babel-preset', '@babel/preset-typescript']
})
overrides.push({
Expand Down
51 changes: 47 additions & 4 deletions config/electron-jest.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,64 @@
// these paths must be specified because otherwise typescript relies on the
// "main" field in each package.json file, which points to the compiled JS and
// we want to run Jest against the TS source
const paths = {
// @bugsnag/core must resolve to source so that module-level singleton state
// (e.g. clone-client's onCloneCallbacks) is shared across jest.isolateModules
// boundaries. Without this, bundled dist creates duplicate state.
'@bugsnag/core': ['./packages/core/src/index.ts']
}

const moduleNameMapper = Object.fromEntries(
Object.entries(paths)
.map(([name, directories]) => [
`^${name}$`,
directories.map(directory => directory.replace('./', '<rootDir>/'))
])
)

const defaultModuleConfig = {
preset: 'ts-jest/presets/js-with-ts',
moduleNameMapper,
transform: {
'^.+\\.m?[tj]sx?$': [
'ts-jest',
{
isolatedModules: true,
tsconfig: {
module: 'commonjs',
target: 'ES2019',
esModuleInterop: true,
allowSyntheticDefaultImports: true,
allowJs: true,
skipLibCheck: true,
jsx: 'react',
paths
}
}
]
}
}

module.exports = {
projects: [
{
resolver: '<rootDir>/jest/node-exports-resolver',
...defaultModuleConfig,
setupFilesAfterEnv: ['<rootDir>/test/electron/setup.ts'],
clearMocks: true,
modulePathIgnorePatterns: ['.verdaccio', 'fixtures', 'examples'],
displayName: 'electron main',
runner: '@jest-runner/electron/main',
runner: '@kayahr/jest-electron-runner/main',
testEnvironment: 'node',
testMatch: ['**/test/**/*.test-main.ts']
},
{
resolver: '<rootDir>/jest/node-exports-resolver',
...defaultModuleConfig,
setupFilesAfterEnv: ['<rootDir>/test/electron/setup.ts'],
clearMocks: true,
modulePathIgnorePatterns: ['.verdaccio', 'fixtures', 'examples'],
displayName: 'electron renderer',
runner: '@jest-runner/electron',
runner: '@kayahr/jest-electron-runner',
testEnvironment: '@kayahr/jest-electron-runner/environment',
testMatch: ['**/test/**/*.test-renderer.ts']
}
]
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apk add --update bash python3 make gcc g++ musl-dev xvfb-run curl
WORKDIR /app

COPY package*.json ./
COPY babel.config.js lerna.json eslint.config.mjs jest.config.js tsconfig.json ./
COPY babel.config.js lerna.json eslint.config.mjs jest.config.js tsconfig.json tsconfig.test.json ./
COPY jest ./jest
ADD min_packages.tar .
COPY .rollup ./.rollup
Expand Down
Loading