Skip to content
Draft
Show file tree
Hide file tree
Changes from 154 commits
Commits
Show all changes
435 commits
Select commit Hold shift + click to select a range
c644f6b
node: prefixes are not supported in node 12
Jan 31, 2025
ad1537d
fix test import
Jan 31, 2025
5fd4fcd
fix handling of version injection
Jan 31, 2025
cb227a1
Merge branch 'dash-13423-2' into plat-12947
Jan 31, 2025
470f373
fix imports
Jan 31, 2025
c46c43a
fix imports
Jan 31, 2025
bab00de
fix jest resolution
Feb 3, 2025
95ea781
Merge branch 'next' into integration/typescript
Feb 3, 2025
7d10e59
Merge branch 'integration/typescript' into dash-13423-2
Feb 3, 2025
4bea0c0
Merge branch 'dash-13423-2' into plat-12947
Feb 3, 2025
6a5a8ab
rebuild package-lock.json from main
Feb 3, 2025
3eb6a75
fix web worker delivery instantiation
Feb 3, 2025
164e673
Merge branch 'integration/typescript' into dash-13423-2
Feb 3, 2025
697fc01
update package-lock.json
Feb 3, 2025
13e28c4
Merge branch 'dash-13423-2' into plat-12947
Feb 3, 2025
7a842ec
add core to local-test-util install steps
Feb 3, 2025
63df48b
avoid ref to @bugsnag/core/event in generated types
Feb 3, 2025
a50c977
core: move tests from src to test
Feb 4, 2025
13a0e3c
core: use dist assets for root export
Feb 4, 2025
fe1a925
try target es5 against electron
Feb 4, 2025
4233e12
fix node-exports-resolver
Feb 10, 2025
87e9012
drop @bugsnag/core/breadcrumb export
Feb 10, 2025
944ebf1
remove @bugsnag/core/client export
Feb 10, 2025
fbfd2ab
Merge branch 'next' into integration/typescript
Feb 10, 2025
c8b341d
Merge pull request #2286 from bugsnag/dash-13423-2
Feb 11, 2025
50bebe4
remove es3ify-webpack-plugin
Feb 11, 2025
a1d1a39
combine method description
Feb 11, 2025
24f08b7
Merge branch 'integration/typescript' into plat-12947
Feb 11, 2025
ae50436
Merge pull request #2304 from bugsnag/plat-12947-3
Feb 11, 2025
bb285ca
Merge pull request #2296 from bugsnag/plat-12947
Feb 11, 2025
853a2f0
Merge branch 'integration/typescript' into plat-12947-4
Feb 11, 2025
9da1301
fix type tests
Feb 11, 2025
8995fc7
fix type tests
Feb 11, 2025
8bfb266
Merge branch 'plat-12947-4' into plat-12947-5
Feb 11, 2025
7c5083b
Merge pull request #2305 from bugsnag/plat-12947-4
Feb 11, 2025
efb34a4
fix @bugsnag/core being externalised
Feb 11, 2025
b8c07a9
fix @bugsnag/core pkg.main
Feb 11, 2025
57b0f2d
Merge branch 'plat-12947-5' into plat-12947-6
Feb 12, 2025
bd375c7
remove @bugsnag/core/(event|session) export
Feb 12, 2025
2264e53
remove @bugsnag/core/(client|config) export
Feb 12, 2025
457bb7b
Revert "remove es3ify-webpack-plugin"
Feb 12, 2025
35e8daf
Merge pull request #2316 from bugsnag/plat-12947-5
Feb 13, 2025
7aa2b1d
convert Client, Session, Breadcrumb, Event, Config to TypeScript
Feb 13, 2025
04704ba
revert babel config change non test
Feb 13, 2025
49d3129
switch to generated type declarations
Feb 14, 2025
8d59787
Merge branch 'next' into integration/typescript
Feb 14, 2025
a56a78d
Merge branch 'integration/typescript' of github.com:bugsnag/bugsnag-j…
Feb 14, 2025
dc7c41e
Merge branch 'integration/typescript' into plat-12947-6
Feb 14, 2025
9d445f6
Merge branch 'plat-12947-6' into plat-12947-7
Feb 14, 2025
1653316
Merge branch 'plat-12947-7' into plat-12947-8
Feb 14, 2025
419f45f
Merge pull request #2317 from bugsnag/plat-12947-6
Feb 14, 2025
834e673
skip constructor when adding client methods
Feb 14, 2025
4f7a2d8
Merge branch 'integration/typescript' into plat-12947-7
Feb 14, 2025
1832f3d
update package-lock.json
Feb 17, 2025
0b2a75e
Merge pull request #2323 from bugsnag/plat-12947-7
Feb 17, 2025
92bd1d0
Merge branch 'next' into integration/typescript
Feb 17, 2025
b32a393
Merge branch 'integration/typescript' into plat-12947-8
Feb 17, 2025
fc89d05
reinstate map
Feb 17, 2025
43724bd
prefer ts-expect-error
Feb 17, 2025
8a88598
fix package-lock.json
Feb 17, 2025
3ccba8a
update package-lock.json
Feb 17, 2025
cdbf54e
Merge branch 'integration/typescript' into plat-12947-8
Feb 17, 2025
d7014b9
prefer ts-expect-error
Feb 17, 2025
2d00ced
remove unused ts directives
Feb 17, 2025
5f6b926
Merge branch 'next' into integration/typescript
Mar 18, 2025
c26641c
try fix package-lock.json
Mar 18, 2025
9b675e2
try fix package-lock.json
Mar 18, 2025
80b1e18
diagnose failing ci
Mar 18, 2025
e243b66
try fix package-lock.json
Mar 18, 2025
18ecdf1
add tslib to core
Mar 18, 2025
b9477c8
Revert "diagnose failing ci"
Mar 18, 2025
c2612ae
add @angular/compiler to plugin-angular
Mar 18, 2025
28195ff
do not remove node_modules from browser ci docker container
Mar 18, 2025
fa392a6
install packed core package
Mar 18, 2025
3357eaf
install packed core package
Mar 18, 2025
5c5d706
add no-op build step to js package
Mar 19, 2025
d0b5131
fix path to core pack
Mar 19, 2025
dab300a
build all packages for electron tests
Mar 19, 2025
825cfff
convert @bugsnag/plugin-inline-script-content to TypeScript and rollup
Mar 19, 2025
6d7c26a
undo change to docker steps
Mar 19, 2025
a7b881f
update package-lock.json
Mar 19, 2025
2561f92
Merge branch 'update-integration-typescript' into plat-13682
Mar 19, 2025
11db07d
Merge branch 'plat-13682' into plat-12947-8
Mar 20, 2025
30a6073
remove manual types for plugin-react
Mar 20, 2025
79ad3b8
type fixes
Mar 20, 2025
7b51408
type fixes
Mar 20, 2025
ac1f8fc
remove unused comment
Mar 20, 2025
b57f246
improve types
Mar 20, 2025
e3328f6
Merge pull request #2381 from bugsnag/update-integration-typescript
gingerbenw Apr 1, 2025
dae4b89
Merge pull request #2327 from bugsnag/plat-12947-8
gingerbenw Apr 1, 2025
2083f12
Merge pull request #2382 from bugsnag/plat-13682
gingerbenw Apr 1, 2025
76df3c6
core: convert clone-client to typescript
AnastasiiaSvietlova Mar 28, 2025
c6651c2
core: fix types and imports
AnastasiiaSvietlova Mar 28, 2025
1f4b4e9
fix imports
AnastasiiaSvietlova Mar 28, 2025
fb160d0
core: add type declaration
AnastasiiaSvietlova Mar 31, 2025
f6fe3e2
fix import clone-client in in-flight
AnastasiiaSvietlova Apr 1, 2025
ad15044
fix test assertions
gingerbenw Apr 1, 2025
efb4967
remove unused public type
gingerbenw Apr 1, 2025
203c48d
update peer dependencies and dockerfile
gingerbenw Apr 1, 2025
0becb51
ensure peerDependency matches latest version
gingerbenw Apr 1, 2025
90db57b
add build:node script
gingerbenw Apr 1, 2025
30ea129
remove deprecated version from docker-compose
gingerbenw Apr 1, 2025
cd2469e
ensure bugsnag-core is installed from repo, not npm
gingerbenw Apr 1, 2025
049691b
remove build:node script
gingerbenw Apr 1, 2025
5d62bd1
core: convert json-payload to typescript
AnastasiiaSvietlova Apr 3, 2025
63babd2
Merge branch 'integration/typescript' into PLAT-13702-json-payload
AnastasiiaSvietlova Apr 3, 2025
9c40559
fix imports
AnastasiiaSvietlova Apr 3, 2025
149b070
fix electron test
AnastasiiaSvietlova Apr 3, 2025
1188b80
core: create new type JsonPayloadEvent
AnastasiiaSvietlova Apr 7, 2025
50bf040
fix imports and declare module for safe-json-stringify
AnastasiiaSvietlova Apr 8, 2025
5baa2b4
fix formatting
AnastasiiaSvietlova Apr 8, 2025
05468e6
fix jsonPayload.event types
gingerbenw Apr 8, 2025
92649a4
remove unused type import
gingerbenw Apr 8, 2025
97a1a54
remove unused EventPayload type
gingerbenw Apr 8, 2025
b466c31
Merge branch 'next' into integration/typescript
gingerbenw Apr 8, 2025
04b5760
Merge pull request #2394 from bugsnag/PLAT-13703-clone-client
gingerbenw Apr 9, 2025
43d51fc
Merge branch 'integration/typescript' into PLAT-13702-json-payload
AnastasiiaSvietlova Apr 9, 2025
ff43822
fix type in tests
AnastasiiaSvietlova Apr 9, 2025
60e5f3c
Revert "reinstate map"
Feb 17, 2025
5113999
external all node_modules in plugins
Feb 17, 2025
edf2ef0
remove es-utils/map
Mar 20, 2025
dd2cdf2
remove es-utils/map as external from rollup
Mar 20, 2025
97d43ba
external all node_modules in plugins
Mar 20, 2025
2182568
undo changes to assign usage
Mar 20, 2025
26f2412
revert rebase
gingerbenw Apr 11, 2025
a46459a
Merge pull request #2412 from bugsnag/plat-12947-9
gingerbenw Apr 11, 2025
dd756de
skip ie11 tests
gingerbenw Apr 15, 2025
d7af2c8
remove skip code for unsupported browsers
gingerbenw Apr 15, 2025
82b860a
Merge pull request #2419 from bugsnag/skip-ie-tests
gingerbenw Apr 15, 2025
913cc6f
Merge branch 'integration/typescript' into PLAT-13702-json-payload
gingerbenw Apr 15, 2025
a1117fa
core: convert int-range validator to typescript
AnastasiiaSvietlova Apr 8, 2025
ec8e349
refactor: :recycle: convert plugin-aws-lambda to typescript
gingerbenw Apr 17, 2025
8905eea
refactor: :fire: remove unused types
gingerbenw Apr 17, 2025
7a9a27d
Update packages/plugin-aws-lambda/src/lambda-timeout-approaching.ts
gingerbenw Apr 17, 2025
0618455
Merge pull request #2421 from bugsnag/PLAT-13168/plugin-aws-lambda
gingerbenw Apr 17, 2025
dcc0a89
Merge branch 'integration/typescript' into PLAT-13702-json-payload
AnastasiiaSvietlova Apr 22, 2025
4001fdc
Merge pull request #2399 from bugsnag/PLAT-13702-json-payload
gingerbenw Apr 28, 2025
9a51039
Merge branch 'integration/typescript' into PLAT-13701-int-range
AnastasiiaSvietlova Apr 28, 2025
fc103ad
Merge pull request #2405 from bugsnag/PLAT-13701-int-range
gingerbenw Apr 28, 2025
04de466
run codeql on pr's into integration branches
gingerbenw Apr 28, 2025
bbcff4a
Merge pull request #2432 from bugsnag/gingerbenw/run-code-ql
gingerbenw Apr 28, 2025
7d5787a
Convert @bugsnag/core/lib/iserror to TypeScript (#2422)
AnastasiiaSvietlova May 12, 2025
c9ca367
Merge branch 'next' into new-fixup
gingerbenw Jun 12, 2025
427a10f
add missing angular-devkit core
gingerbenw Jun 16, 2025
8ff4e07
cast React to any to resolve type issue in build
gingerbenw Jun 16, 2025
16042d9
install core from repo
gingerbenw Jun 17, 2025
16a3b36
update main and types
gingerbenw Jun 17, 2025
dde1264
Merge branch 'next' into merge-latest-from-next
gingerbenw Jun 23, 2025
414fe4c
Merge pull request #2462 from bugsnag/merge-latest-from-next
gingerbenw Jun 23, 2025
4d43184
test: :test_tube: temporarily disable failing ios_11 non-https tests
gingerbenw Jun 23, 2025
6026ec4
comment skipped test
gingerbenw Jun 24, 2025
a85e8c2
Merge pull request #2478 from bugsnag/gingerbenw/disable-ios-11-tests
gingerbenw Jun 24, 2025
af4d423
core: convert metadata-delegate to typescript
AnastasiiaSvietlova May 12, 2025
95413b4
change type of key in metadataDelegate
AnastasiiaSvietlova May 21, 2025
f52da9b
change key type
AnastasiiaSvietlova May 21, 2025
57a421c
Convert @bugsnag/core/lib/sync-callback-runner to TypeScript (#2446)
AnastasiiaSvietlova Jun 24, 2025
fd6b092
Merge branch 'integration/typescript' into PLAT-13698-metadata-delegate
AnastasiiaSvietlova Jun 24, 2025
b3d5c1d
convert node-fallback-stack to typescript (#2447)
AnastasiiaSvietlova Jun 24, 2025
45ef2af
Merge branch 'integration/typescript' into PLAT-13698-metadata-delegate
AnastasiiaSvietlova Jun 24, 2025
1009db3
Merge pull request #2437 from bugsnag/PLAT-13698-metadata-delegate
gingerbenw Jun 24, 2025
5c028fe
convert stringWithLength to TypeScript (#2449)
AnastasiiaSvietlova Jun 25, 2025
144d4c6
Remove @bugsnag/core/lib/es-utils/filter (#2469)
AnastasiiaSvietlova Jun 25, 2025
a3daa7c
Convert string-with-length to TypeScript (#2455)
AnastasiiaSvietlova Jun 25, 2025
0f3c39c
Convert extract-object to TypeScript (#2456)
AnastasiiaSvietlova Jun 26, 2025
a4926be
convert hasStack to TS (#2471)
AnastasiiaSvietlova Jun 26, 2025
e4743af
Remove reduce and keys
AnastasiiaSvietlova Jun 16, 2025
99ffc76
fix types error
AnastasiiaSvietlova Jun 16, 2025
4becbd0
Convert feature-flag-delegate to TypeScript
AnastasiiaSvietlova Jun 9, 2025
c0bbe17
add some types
AnastasiiaSvietlova Jun 9, 2025
b134a3f
Merge pull request #2470 from bugsnag/PLAT-13686-reduce
gingerbenw Jun 27, 2025
ed70302
Merge pull request #2459 from bugsnag/PLAT-13690-feature-flag-delegate
gingerbenw Jun 27, 2025
81b13e5
core: convert callback-runner to typescript
AnastasiiaSvietlova May 12, 2025
7bd1bba
fixed types
AnastasiiaSvietlova May 12, 2025
820c909
fixed types
AnastasiiaSvietlova May 12, 2025
d5f86d8
add callbecks type
AnastasiiaSvietlova May 26, 2025
184a264
fix types for tests
AnastasiiaSvietlova Jun 9, 2025
b43ab9e
convert async-every to TS
AnastasiiaSvietlova Jun 17, 2025
4cccb66
change the import in callback runner
AnastasiiaSvietlova Jun 26, 2025
2b1ce6a
core: convert callback-runner to typescript
AnastasiiaSvietlova May 12, 2025
1b86a47
fixed types
AnastasiiaSvietlova May 12, 2025
0c49a62
add callbecks type
AnastasiiaSvietlova May 26, 2025
7072959
fix types for tests
AnastasiiaSvietlova Jun 9, 2025
8ef69af
fix ts issues
gingerbenw Jun 23, 2025
0458b08
Convert string-with-length to TypeScript
AnastasiiaSvietlova Jun 6, 2025
32c57e9
convert isArray to TypeScript
AnastasiiaSvietlova Jun 25, 2025
e9a1e44
delete es-utils is-array
AnastasiiaSvietlova Jun 25, 2025
24394fd
remove import
gingerbenw Jun 27, 2025
dda5029
Merge pull request #2482 from bugsnag/PLAT-14450-is-array
gingerbenw Jun 30, 2025
259ce15
Merge branch 'integration/typescript' into PLAT-13697-callback-runner
gingerbenw Jun 30, 2025
4e50c4e
update @inquirer/core
gingerbenw Jul 2, 2025
0c3da73
test: :white_check_mark: add script to check that built files are typ…
gingerbenw Jun 30, 2025
560c7ed
add ts feature
gingerbenw Jun 30, 2025
e1a0852
rename fixture
gingerbenw Jun 30, 2025
441be66
make typescript a dev dependency
gingerbenw Jun 30, 2025
680d3ba
add logging
gingerbenw Jun 30, 2025
a825788
install bugsnag browser in ts package
gingerbenw Jun 30, 2025
afdecf9
rename fixture
gingerbenw Jun 30, 2025
0b52b2d
fix test fixture
gingerbenw Jul 1, 2025
9420bff
Update Dockerfile.browser
gingerbenw Jul 1, 2025
66b2c1d
remove unused package
gingerbenw Jul 2, 2025
8712120
remove warnings from build
gingerbenw Jul 2, 2025
7f4eac6
Merge pull request #2487 from bugsnag/PLAT-13519/ts-3.8-testing
gingerbenw Jul 2, 2025
21a5302
add custom linting rule to prevent inline type exports
gingerbenw Jul 3, 2025
23f43ab
Update .gitignore
gingerbenw Jul 3, 2025
6b475cc
style: :rotating_light: Update eslint configuration with additional T…
gingerbenw Jul 3, 2025
3dd4b27
copy eslint-rules dir
gingerbenw Jul 3, 2025
0852a76
Merge pull request #2438 from bugsnag/PLAT-13697-callback-runner
gingerbenw Jul 7, 2025
66a7cbb
Convert @bugsnag/core/lib/derecursify to TypeScript (#2428)
AnastasiiaSvietlova Jul 8, 2025
b53145d
Convert @bugsnag/core/lib/path-normalizer to TypeScript (#2448)
AnastasiiaSvietlova Jul 9, 2025
fe8e200
refactor: :fire: remove assign es-util
gingerbenw Jul 9, 2025
3e9a818
refactor: :wrench: configure babel
gingerbenw Jul 9, 2025
e711de5
update babel config
gingerbenw Jul 9, 2025
7a732ab
skip test on chrome 43
gingerbenw Jul 10, 2025
c6b9ae7
skip test on safari 10
gingerbenw Jul 10, 2025
b7d1ef4
Merge pull request #2495 from bugsnag/gingerbenw/typescript-babel
gingerbenw Jul 11, 2025
9b18fb1
Remove @bugsnag/core/lib/es-utils/includes (#2465)
AnastasiiaSvietlova Jul 21, 2025
6556703
Merge branch 'next' into merge-next-integration
gingerbenw Jul 22, 2025
238bec8
Merge branch 'next' into merge-next-integration
gingerbenw Jul 22, 2025
79c3121
Merge pull request #2500 from bugsnag/merge-next-integration
gingerbenw Jul 22, 2025
a824981
refactor: :truck: move json-payload to standalone package
gingerbenw Jul 16, 2025
2081aa6
refactor: :fire: remove unused @bugsnag/delivery-xml-http-request pac…
gingerbenw Jul 16, 2025
f6dfa44
refactor: :wrench: update rollup configuration to ensure smaller bund…
gingerbenw Jul 16, 2025
234a6ef
test: :test_tube: skip webpack3 tests
gingerbenw Jul 16, 2025
bf82be0
refactor: :wrench: remove unsafe_comps option causing stacktrack file…
gingerbenw Jul 18, 2025
be18985
fix chrome 43 compatibility
gingerbenw Jul 21, 2025
54a12fb
update treeshaking preset
gingerbenw Jul 22, 2025
c8493a3
additional bundle shrinkage
gingerbenw Jul 22, 2025
9f0810e
bump android tests to v8
gingerbenw Jul 23, 2025
74d4c2c
additional shrinkage
gingerbenw Jul 23, 2025
4686991
disable chrome 43 tests
gingerbenw Jul 23, 2025
be6f4c7
disable angular 12 tests
gingerbenw Jul 23, 2025
514f14a
Revert "disable angular 12 tests"
gingerbenw Jul 23, 2025
ec28d5a
use stylus version from github
gingerbenw Jul 23, 2025
902757a
Revert "additional shrinkage"
gingerbenw Jul 23, 2025
7aa795e
resolve angular dependency
gingerbenw Jul 23, 2025
eda561d
additional bundle shrinkage
gingerbenw Jul 23, 2025
60bc9f3
update bundle exports
gingerbenw Jul 23, 2025
d919051
add missing notifiable error
gingerbenw Jul 23, 2025
a137f6e
update configuration
gingerbenw Jul 23, 2025
1eefb25
add android 8 error reference
gingerbenw Jul 24, 2025
b5ebb60
update terser configuration
gingerbenw Jul 24, 2025
a89bae0
make modues external
gingerbenw Jul 24, 2025
1ac9077
Merge branch 'next' into integration/typescript
gingerbenw Jul 25, 2025
b22cfd5
disable IE11 tests
gingerbenw Jul 25, 2025
7286d28
update README
gingerbenw Jul 28, 2025
6b4f022
Merge branch 'integration/typescript' into PLAT-13684/json-payload
gingerbenw Jul 28, 2025
e480b88
remove unused rollup config
gingerbenw Jul 31, 2025
1638ef8
Merge pull request #2496 from bugsnag/PLAT-13684/json-payload
gingerbenw Jul 31, 2025
c90570d
Merge pull request #2491 from bugsnag/PLAT-13605/update-linting-rules
gingerbenw Aug 7, 2025
e2c2258
Merge branch 'next' into integration/typescript
gingerbenw Sep 5, 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
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
12 changes: 0 additions & 12 deletions .eslintignore

This file was deleted.

94 changes: 0 additions & 94 deletions .eslintrc.js

This file was deleted.

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
68 changes: 68 additions & 0 deletions .rollup/index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
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
})

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,
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',
}
}),
...(options.plugins ?? [])
]
}
}

export default createRollupConfig
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 18.20.5
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ npm run test:types

## Linting

Lints the entire repo with ESLint. On JavaScript files this uses the [standard](https://github.com/standard/eslint-config-standard) ruleset and on TypeScript files this uses the [@typescript/eslint](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin) recommended set of rules.
Lints the entire repo with ESLint.

```sh
npm run test:lint
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/Dockerfile.browser
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ 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 .eslintignore .eslintrc.js jest.config.js tsconfig.json ./
COPY babel.config.js lerna.json eslint.config.mjs jest.config.js tsconfig.json ./
COPY jest ./jest
ADD min_packages.tar .
COPY .rollup ./.rollup
COPY bin ./bin
COPY packages ./packages

Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ 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 .eslintignore .eslintrc.js jest.config.js tsconfig.json ./
COPY babel.config.js lerna.json eslint.config.mjs jest.config.js tsconfig.json ./
COPY jest ./jest
ADD min_packages.tar .
COPY .rollup ./.rollup
COPY bin ./bin
COPY scripts ./scripts
COPY test ./test
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/Dockerfile.node
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ 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 .eslintignore .eslintrc.js jest.config.js tsconfig.json ./
COPY babel.config.js lerna.json eslint.config.mjs jest.config.js tsconfig.json ./
COPY jest ./jest
ADD min_packages.tar .
COPY .rollup ./.rollup
COPY bin ./bin
COPY packages ./packages

Expand Down
143 changes: 143 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
import { fileURLToPath } from 'node:url';

import eslint from '@eslint/js';
import eslintPluginImport from 'eslint-plugin-import';
import eslintPluginJest from 'eslint-plugin-jest';
import globals from 'globals';
import tseslint from 'typescript-eslint';

const __filename = fileURLToPath(import.meta.url);

const c = tseslint.config(
// Files to ignore
{
ignores: [
'**/dist',
'examples',
'scratch',
'coverage',
'packages/core/types/test/*.js',
'packages/react-native/android/build/reports',
'packages/**/features',
'packages/**/fixtures',
'test/browser',
'test/node',
'test/react-native-cli/features/fixtures',
'packages/react-native/ios/vendor'
],
},
eslint.configs.recommended,
{
rules: {
'no-undef': 'warn',
'no-unused-vars': 'warn',
'no-empty': 'warn',
'no-redeclare': 'warn',
'no-func-assign': 'warn',
'no-prototype-builtins': 'warn',
'require-yield': 'warn',
},
},
{
plugins: {
'@typescript-eslint': tseslint.plugin,
import: eslintPluginImport,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
/**
* This config also targets files not included in tsconfig so this must be false
* and rules requiring type information cannot be used
*/
project: false,
},
},
},
// Base linting config
{
files: ['**/*.json', '**/*.[tj]s?(x)', '**/*.cjs', '**/*.mjs'],
},
// Linting config for TypeScript
{
files: [
'**/*.ts?(x)'
],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: false, // Allows use of rules which require type information
},
},
plugins: {
'@typescript-eslint': tseslint.plugin,
},
rules: {
...tseslint.configs.recommended[1].rules,
...tseslint.configs.recommended[2].rules,
...tseslint.configs.strict[2].rules,

// Let TypeScript inference work without being verbose
'@typescript-eslint/explicit-function-return-type': 'off',

// (Explicit) any has its valid use cases
'@typescript-eslint/no-explicit-any': 'off',

// We use noop functions liberally (() => {})
'@typescript-eslint/no-empty-function': 'off',

// This incorrectly fails on TypeScript method override signatures
'no-dupe-class-members': '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'],

'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-require-imports': 'warn',
'prefer-rest-params': 'warn',
'prefer-spread': 'warn',
'@typescript-eslint/no-unsafe-function-type': 'warn',
'@typescript-eslint/no-wrapper-object-types': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-unsafe-declaration-merging': 'warn',
'@typescript-eslint/no-invalid-void-type': 'warn',
},
},
// Jest tests
{
files: [
'**/*.test.ts?(x)'
],
languageOptions: {
globals: {
...globals.jest,
...globals.node,
...globals.browser,
process: 'readonly', // require to access process.env values
},
},
plugins: {
jest: eslintPluginJest,
},
rules: {
...eslintPluginJest.configs['flat/recommended'].rules,

// Disable preferring Promise-based async tests
'jest/no-test-callback': 'off',

'jest/no-done-callback': 'warn',
'jest/no-alias-methods': 'warn',
'jest/no-conditional-expect': 'warn',
'jest/valid-title': 'warn',
'jest/no-standalone-expect': 'warn',
'jest/no-deprecated-functions': 'warn',
'no-var': 'warn',
},
},
);

export default c;
Loading
Loading