Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase from next #2261

Merged
merged 56 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
0577f8e
https wip
Nov 14, 2024
283de9d
update fixtures for new docs server endpoint
Nov 14, 2024
ae25890
test(ReactNative): replace `api` with `compileOnly` for bugsnag-andro…
lemnik Nov 15, 2024
367ae58
Merge pull request #2254 from bugsnag/PLAT-13077/fix-rn-fixture
lemnik Nov 15, 2024
0bbb1ee
fix and simplify get_test_url
Nov 15, 2024
c202b38
non-https for devices that dont work with it
Nov 15, 2024
354ec42
remove maze-runner.log
Nov 15, 2024
07d479c
add .gitignore
Nov 15, 2024
35ba982
remove Gemfile.lock
Nov 20, 2024
56fa012
Merge pull request #2253 from bugsnag/https
djskinner Nov 20, 2024
4c28ae1
Ensure the update dependencies script is executable (#2259)
Cawllec Nov 22, 2024
c80842f
chore: :arrow_up: update browserify to v17 (#2257)
gingerbenw Nov 22, 2024
0fea542
chore: :construction_worker: install rollup
gingerbenw Oct 15, 2024
69a24a8
refactor: :recycle: convert plugin-window-onerror to typescript
gingerbenw Oct 15, 2024
224ee1a
update rollup configuration
gingerbenw Oct 15, 2024
a917320
install additional rollup plugins
gingerbenw Oct 15, 2024
0ec2023
remove optional chaining
gingerbenw Oct 15, 2024
e2e66f9
update eslint rules
gingerbenw Oct 15, 2024
3a47c30
copy rollup config
gingerbenw Oct 15, 2024
72946b9
update main and browser fields
gingerbenw Oct 15, 2024
2fba538
update main entry
gingerbenw Oct 15, 2024
6759528
update test import
gingerbenw Oct 15, 2024
ec485dd
copy rollup config
gingerbenw Oct 15, 2024
775a380
move types before module exports
gingerbenw Oct 15, 2024
eb2cdd3
exclude built js files from type check
gingerbenw Oct 15, 2024
5b66522
build all packages for electron
gingerbenw Oct 15, 2024
05414d7
chore: :label: add type definition for isError
gingerbenw Oct 16, 2024
17c9cb2
refactor: :recycle: convert plugin-window-unhandled-rejection to type…
gingerbenw Oct 16, 2024
830814d
fix: :building_construction: fix rollup configuration
gingerbenw Oct 16, 2024
1b62926
refactor: :recycle: refactor plugin-app-duration to typescript es module
gingerbenw Oct 16, 2024
fd951ce
refactor: :recycle: simplify rollup config
gingerbenw Oct 16, 2024
2bd91b6
refactor: :recycle: convert plugin-browser-device to typescript es mo…
gingerbenw Oct 16, 2024
c1b78ee
fix rollup config
gingerbenw Oct 16, 2024
081d827
fix main entry point
gingerbenw Oct 16, 2024
fdad689
update rollup config and ts test
gingerbenw Oct 17, 2024
d58a471
add missing @ts-expect-error comment
gingerbenw Oct 24, 2024
b513a37
Convert @bugsnag/plugin-browser-request to TypeScript (#2236)
AnastasiiaSvietlova Oct 28, 2024
93d05ec
Convert @bugsnag/plugin-browser-context to TypeScript (#2240)
AnastasiiaSvietlova Oct 28, 2024
af39cc2
Convert plugin-console-breadcrumbs to TypeScript
AnastasiiaSvietlova Oct 28, 2024
58f21cc
fix: process TS error
AnastasiiaSvietlova Oct 28, 2024
75dd156
fix: console methods type
AnastasiiaSvietlova Oct 28, 2024
d6d6694
chore: :label: fix rollup build by updating types
gingerbenw Oct 29, 2024
13aaae9
chore: :label: fix types and remove usage of ts-expect-error
gingerbenw Oct 30, 2024
500a600
fix: :adhesive_bandage: update types and exports
gingerbenw Oct 30, 2024
d55ed32
Convert plugin-network-breadcrumbs to TypeScript
AnastasiiaSvietlova Oct 29, 2024
258c27e
fix: types
AnastasiiaSvietlova Oct 29, 2024
a46e2c2
update types and exports
gingerbenw Oct 30, 2024
020790e
chore: :adhesive_bandage: simplify types
gingerbenw Nov 5, 2024
2eb67a5
Convert @bugsnag/plugin-simple-throttle to TypeScript (#2242)
AnastasiiaSvietlova Nov 15, 2024
334eb40
refactor: :recycle: refactor delivery-x-domain-request to TypeScript …
gingerbenw Nov 20, 2024
09f0d07
chore: :label: update type definition
gingerbenw Nov 20, 2024
30783a0
update json-payload declaraiton
gingerbenw Nov 21, 2024
f30a045
update files list to include 'dist'
gingerbenw Nov 21, 2024
73f545d
refactor: :recycle: refactor @bugsnag/delivery-xml-http-request
gingerbenw Nov 20, 2024
8bee669
remove delivery-xml-http-request from root tsconfig
gingerbenw Nov 21, 2024
f66cf12
update files list
gingerbenw Nov 21, 2024
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
36 changes: 31 additions & 5 deletions .buildkite/basic/browser-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ steps:
service-ports: true
use-aliases: true
command:
- "--https"
- "--farm=bb"
- "--browser={{matrix}}"
- "--no-tunnel"
Expand Down Expand Up @@ -135,15 +136,10 @@ steps:
env:
HOST: "localhost" # IE11 needs the host set to localhost for some reason

#
# BrowserStack tests
#
- label: ":browserstack: {{matrix}} tests"
matrix:
- edge_17
- safari_10
- safari_16
- ios_10
- ios_15
- android_7
# TODO: Move these to BitBar
Expand All @@ -158,6 +154,7 @@ steps:
run: browser-maze-runner-bs
use-aliases: true
command:
- "--https"
- "--farm=bs"
- "--browser={{matrix}}"
artifacts#v1.5.0:
Expand All @@ -171,3 +168,32 @@ steps:
concurrency: 2
concurrency_group: "browserstack"
concurrency_method: eager

#
# BrowserStack non-https tests
#
- label: ":browserstack: {{matrix}} non-https tests"
matrix:
- safari_16
- ios_10
depends_on: "browser-maze-runner-bs"
timeout_in_minutes: 30
plugins:
docker-compose#v4.12.0:
pull: browser-maze-runner-bs
run: browser-maze-runner-bs
use-aliases: true
command:
- "--farm=bs"
- "--browser={{matrix}}"
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: 2
concurrency_group: "browserstack"
concurrency_method: eager
2 changes: 1 addition & 1 deletion .buildkite/basic/electron-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:
- echo "Running on Node `node -v`"
- npm install electron@${ELECTRON_VERSION} --no-audit --progress=false --no-save
- npm ci --no-audit --progress=false
- npm run build:electron
- npm run build
- defaults write com.apple.CrashReporter DialogType none
- npm run test:unit:electron-runner
- npm run test:electron
9 changes: 8 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ const ruleOverrides = {
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
'@typescript-eslint/prefer-includes': 'off',
'@typescript-eslint/no-for-in-array': 'off',

// Optional chaining compiles to a lot more code
'@typescript-eslint/prefer-optional-chain': 'off',

// Support TypeScript 3.8 by disallowing import { type Module } from 'module'
'import/consistent-type-specifier-style': ['warn', 'prefer-top-level']
}

module.exports = {
Expand All @@ -44,7 +50,8 @@ module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
jsx: true,
ecmaVersion: 2018
ecmaVersion: 2018,
sourceType: 'module'
},
overrides: [
// linting for js files
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 @@ -43,7 +43,7 @@ jobs:
- run: npm ci --no-audit --progress=false
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npm run build:electron
- run: npm run build
shell: bash
- run: sudo apt-get install cppcheck --assume-yes
name: Install cppcheck
Expand Down
67 changes: 67 additions & 0 deletions .rollup/index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import typescript from '@rollup/plugin-typescript'
import replace from '@rollup/plugin-replace'
import fs from 'fs'

const defaultOptions = () => ({
// additional variables to define with '@rollup/plugin-replace'
// e.g. '{ ABC: 123 }' is equivalent to running 'globalThis.ABC = 123'
additionalReplacements: {},
// additional external dependencies, such as '@bugsnag/browser'
external: [],
// the entry point for the bundle
input: undefined,
// output directory for the bundle
output: undefined
})

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,
entryFileNames: '[name].js',
format: 'cjs'
},
{
...sharedOutput,
preserveModules: true,
entryFileNames: '[name].mjs',
format: 'esm'
}
],
external: ['@bugsnag/core'].concat(options.external),
plugins: [
replace({
preventAssignment: true,
values: {
__VERSION__: packageJson.version,
...options.additionalReplacements,
}
}),
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',
}
})
]
}
}

export default createRollupConfig
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.browser
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ WORKDIR /app
COPY package*.json ./
COPY babel.config.js lerna.json .eslintignore .eslintrc.js jest.config.js tsconfig.json ./
ADD min_packages.tar .
COPY .rollup ./.rollup
COPY bin ./bin
COPY packages ./packages

Expand Down
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ WORKDIR /app
COPY package*.json ./
COPY babel.config.js lerna.json .eslintignore .eslintrc.js jest.config.js tsconfig.json ./
ADD min_packages.tar .
COPY .rollup ./.rollup
COPY bin ./bin
COPY scripts ./scripts
COPY test ./test
Expand Down
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.node
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ WORKDIR /app
COPY package*.json ./
COPY babel.config.js lerna.json .eslintignore .eslintrc.js jest.config.js tsconfig.json ./
ADD min_packages.tar .
COPY .rollup ./.rollup
COPY bin ./bin
COPY packages ./packages

Expand Down
Loading
Loading