Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
17a915a
chore: step 1 define Migration strategy (sudden)
Simon1375 Feb 9, 2026
36cb26e
chore: step 2 add TypeScript and baseline @types
Simon1375 Feb 9, 2026
0e86405
chore: step 3 add and configure tsconfig
Simon1375 Feb 9, 2026
d954ca0
chore: step 4 add standalone TypeScript type Checking
Simon1375 Feb 9, 2026
2f25b57
chore: step 5 enable ESLint for TypeScript
Simon1375 Feb 9, 2026
877dae2
chore: step 6 document editor-independent TypeScript workflow
Simon1375 Feb 9, 2026
fdc1017
chore: step 7 mark API type generation as not applicable
Simon1375 Feb 9, 2026
ed6dfde
chore: step 8 document use of migration tools
Simon1375 Feb 9, 2026
e3bf177
chore: step 9 add migration checklist and start TypeScript migration
Simon1375 Feb 9, 2026
2eb4db8
chore: step 9 fix formatting in migration checklist
Simon1375 Feb 9, 2026
21e963d
tool: convert plot.js to plot.tsx
Simon1375 Feb 17, 2026
d843495
fix: make plot.tsx compile
Simon1375 Feb 17, 2026
e335596
refactor: cleanup plot.tsx
Simon1375 Feb 17, 2026
72c244e
rename: workerDirector.js to workerDirector.ts
Simon1375 Feb 18, 2026
4603d4e
chore: update migration steps to include file renaming step
Simon1375 Feb 18, 2026
f6bb584
tool: convert workerDirector.ts
Simon1375 Feb 18, 2026
76f3645
refactor: cleanup workerDirector.ts
Simon1375 Feb 18, 2026
5c6160a
chore: clarify required manual fixes during migration process
Simon1375 Feb 18, 2026
91c0b87
rename: FilterInputField.js to FilterInputField.tsx
Simon1375 Feb 18, 2026
488fb12
tool: convert FilterInputField.tsx
Simon1375 Feb 18, 2026
b9cce9a
refactor: cleanup FilterInputField.tsx
Simon1375 Feb 18, 2026
fe4e365
rename: index.js to index.ts
Simon1375 Feb 18, 2026
2113a2e
rename: MinMaxFilterInputField.js to MinMaxFilterInputField.tsx.ts
Simon1375 Feb 18, 2026
2596181
tool: convert MinMaxFilterInputField.tsx
Simon1375 Feb 18, 2026
4741b8d
refactor: cleanup MinMaxFilterInputField.tsx
Simon1375 Feb 18, 2026
22bf07b
rename: StatusFilter.js to StatusFilter.tsx
Simon1375 Feb 18, 2026
7a0e563
tool: convert StatusFilter.tsx
Simon1375 Feb 18, 2026
f855954
refactor: cleanup StatusFilter.tsx
Simon1375 Feb 18, 2026
acac47d
mark as complete: `src/components/Table/` migration task in MIGRATION.md
Simon1375 Feb 18, 2026
c751a00
rename: utils.js to utils.tsx
Simon1375 Feb 19, 2026
0002b05
tool: convert utils.tsx
Simon1375 Feb 19, 2026
fe46fca
fix: make utils.tsx compile
Simon1375 Feb 19, 2026
09d7fa8
refactor: cleanup utils.tsx
Simon1375 Feb 19, 2026
759c84c
rename: stats.js to stats.ts
Simon1375 Feb 19, 2026
9ce05e2
tool: convert stats.ts
Simon1375 Feb 19, 2026
35e6792
refactor: cleanup stats.ts
Simon1375 Feb 19, 2026
c289039
rename: filters.js to filters.ts
Simon1375 Feb 19, 2026
580761d
tool: convert filters.ts
Simon1375 Feb 19, 2026
d7f3d83
refactor: cleanup filters.ts
Simon1375 Feb 19, 2026
a742312
mark as complete: `src/utils/` migration task in MIGRATION.md
Simon1375 Feb 19, 2026
b98ee06
refactor: address review comments
Simon1375 Feb 20, 2026
db918e5
build: update `main.min.js` with latest changes
Simon1375 Feb 20, 2026
0e90677
refactor: remove JS->TS migration notes from code comments
Simon1375 Feb 20, 2026
f74da7f
refactor: eslint fix
Simon1375 Feb 20, 2026
37b56d2
build: update `main.min.js` with latest changes
Simon1375 Feb 20, 2026
3fbe608
Merge pull request #1250 from sosy-lab/typescript-migration/migration…
PhilippWendler Feb 20, 2026
566dc95
rename: FilterInputField.js to FilterInputField.tsx
Simon1375 Feb 18, 2026
c86f183
tool: convert FilterInputField.tsx
Simon1375 Feb 18, 2026
78cc045
refactor: cleanup FilterInputField.tsx
Simon1375 Feb 18, 2026
ebc80d7
rename: index.js to index.ts
Simon1375 Feb 18, 2026
0447148
rename: MinMaxFilterInputField.js to MinMaxFilterInputField.tsx.ts
Simon1375 Feb 18, 2026
68f6733
tool: convert MinMaxFilterInputField.tsx
Simon1375 Feb 18, 2026
27adf48
refactor: cleanup MinMaxFilterInputField.tsx
Simon1375 Feb 18, 2026
6a68f62
rename: StatusFilter.js to StatusFilter.tsx
Simon1375 Feb 18, 2026
22ec5e1
tool: convert StatusFilter.tsx
Simon1375 Feb 18, 2026
37ba925
refactor: cleanup StatusFilter.tsx
Simon1375 Feb 18, 2026
c36b92c
mark as complete: `src/components/Table/` migration task in MIGRATION.md
Simon1375 Feb 18, 2026
90ec73e
Merge remote-tracking branch 'origin/typescript-migration/migration/t…
Simon1375 Feb 20, 2026
977e4cb
refactor: update `hasSameEntries` to use `ReadonlyArray` for stricter…
Simon1375 Feb 20, 2026
e59cc9a
build: updates in react-table build
Simon1375 Feb 20, 2026
0a4b5c6
refactor: remove JS->TS migration notes from code comments
Simon1375 Feb 20, 2026
b87dbee
Merge pull request #1251 from sosy-lab/typescript-migration/migration…
PhilippWendler Feb 20, 2026
06c9886
rename: TaskFilterCard.js to TaskFilterCard.tsx
Simon1375 Feb 20, 2026
86a3a9f
tool: convert TaskFilterCard.tsx
Simon1375 Feb 20, 2026
2260008
fix: make TaskFilterCard.tsx compile
Simon1375 Feb 20, 2026
f86f1be
refactor: cleanup TaskFilterCard.tsx
Simon1375 Feb 20, 2026
c1c14ec
rename: FilterCard.js to FilterCard.tsx
Simon1375 Feb 20, 2026
2932104
tool: convert FilterCard.tsx
Simon1375 Feb 20, 2026
8425862
fix: make FilterCard.tsx compile
Simon1375 Feb 20, 2026
506edf9
refactor: cleanup FilterCard.tsx
Simon1375 Feb 21, 2026
11b0aa4
rename: FilterContainer.js to FilterContainer.tsx
Simon1375 Feb 21, 2026
c744679
tool: convert FilterContainer.tsx
Simon1375 Feb 21, 2026
b303c36
fix: make FilterContainer.tsx compile
Simon1375 Feb 21, 2026
8d6c92d
refactor: cleanup FilterContainer.tsx
Simon1375 Feb 21, 2026
44e4c3d
rename: FilterBox.js to FilterBox.tsx
Simon1375 Feb 21, 2026
1b01368
tool: convert FilterBox.tsx
Simon1375 Feb 21, 2026
2d887a6
fix: make FilterBox.tsx compile
Simon1375 Feb 21, 2026
3af8b2d
refactor: cleanup FilterBox.tsx
Simon1375 Feb 21, 2026
f317605
mark as complete: `src/components/FilterBox`
Simon1375 Feb 21, 2026
a885fc4
refactor: bugfix in utils/filters.ts
Simon1375 Feb 21, 2026
370f667
build: updates in react-table build
Simon1375 Feb 21, 2026
146a6d2
refactor: address review comments
Simon1375 Feb 23, 2026
ebaff78
rename: FilterInfoButton.js to FilterInfoButton.tsx
Simon1375 Feb 23, 2026
fa89cfe
tool: convert FilterInfoButton.tsx
Simon1375 Feb 23, 2026
e71a17d
rename: Info.js to Info.tsx
Simon1375 Feb 23, 2026
ec64378
tool: convert Info.tsx
Simon1375 Feb 23, 2026
7361dfb
fix: make Info.tsx compile
Simon1375 Feb 23, 2026
d0e85be
rename: TaskDefinitionViewer.js to TaskDefinitionViewer.tsx
Simon1375 Feb 23, 2026
82a257e
tool: convert TaskDefinitionViewer.tsx
Simon1375 Feb 23, 2026
b9e04a7
refactor: cleanup TaskDefinitionViewer.tsx
Simon1375 Feb 23, 2026
b4bc646
rename: TableComponents.js to TableComponents.tsx
Simon1375 Feb 23, 2026
4d2124d
tool: convert TableComponents.tsx
Simon1375 Feb 23, 2026
3245137
rename: Summary.js to Summary.tsx
Simon1375 Feb 23, 2026
cff1e2b
tool: convert Summary.tsx
Simon1375 Feb 23, 2026
23f5a91
refactor: cleanup Summary.tsx
Simon1375 Feb 23, 2026
ac83d4b
rename: StatisticsTable.js to StatisticsTable.tsx
Simon1375 Feb 23, 2026
cf6db53
tool: convert StatisticsTable.tsx
Simon1375 Feb 23, 2026
12a4475
fix: make StatisticsTable.tsx compile
Simon1375 Feb 23, 2026
a52d4a8
rename: SelectColumn.js to SelectColumn.tsx
Simon1375 Feb 23, 2026
3b013e8
tool: convert SelectColumn.tsx
Simon1375 Feb 23, 2026
18b84c6
fix: make SelectColumn.tsx compile
Simon1375 Feb 23, 2026
a4a27ee
fix: address review comment and resolve regression in filters.ts
Simon1375 Feb 24, 2026
7d3cc1a
fix: address review comment of the optional number_of_significant_digits
Simon1375 Feb 24, 2026
b7a1c22
fix: address review comment of the slider bug
Simon1375 Feb 24, 2026
7b2d092
fix: ensure consistent handling of step attribute in FilterCard inputs
Simon1375 Feb 24, 2026
be65657
fix: address review comment of standardizing sliderMin and sliderMax …
Simon1375 Feb 24, 2026
dde86be
rename: LinkOverlay.js to LinkOverlay.tsx
Simon1375 Feb 24, 2026
ddfc99f
tool: convert LinkOverlay.tsx
Simon1375 Feb 24, 2026
3574fcb
Revert "fix: address review comment of standardizing sliderMin and sl…
Simon1375 Feb 24, 2026
d42450e
fix: LinkOverlay.tsx compile
Simon1375 Feb 24, 2026
5f44ad6
fix: replace numericMin/numericMax with inputMin/inputMax in FilterCa…
Simon1375 Feb 24, 2026
895d77f
fix: ensure significantDigits check is consistent in format function …
Simon1375 Feb 25, 2026
c139e76
refactor: remove JS->TS migration notes
Simon1375 Feb 25, 2026
fbf5583
build: update build files
Simon1375 Feb 25, 2026
d43feb6
Merge pull request #1253 from sosy-lab/typescript-migration/migration…
PhilippWendler Feb 25, 2026
5463ee7
rename: FilterInfoButton.js to FilterInfoButton.tsx
Simon1375 Feb 23, 2026
2c2427d
tool: convert FilterInfoButton.tsx
Simon1375 Feb 23, 2026
ab0f1a9
rename: Info.js to Info.tsx
Simon1375 Feb 23, 2026
f0480f1
tool: convert Info.tsx
Simon1375 Feb 23, 2026
c665278
fix: make Info.tsx compile
Simon1375 Feb 23, 2026
9a0fe96
rename: TaskDefinitionViewer.js to TaskDefinitionViewer.tsx
Simon1375 Feb 23, 2026
18ffb94
tool: convert TaskDefinitionViewer.tsx
Simon1375 Feb 23, 2026
583aca6
refactor: cleanup TaskDefinitionViewer.tsx
Simon1375 Feb 23, 2026
25b8a93
rename: TableComponents.js to TableComponents.tsx
Simon1375 Feb 23, 2026
ae4baa0
tool: convert TableComponents.tsx
Simon1375 Feb 23, 2026
aaec372
rename: Summary.js to Summary.tsx
Simon1375 Feb 23, 2026
405e63d
tool: convert Summary.tsx
Simon1375 Feb 23, 2026
4e97994
refactor: cleanup Summary.tsx
Simon1375 Feb 23, 2026
7d95921
rename: StatisticsTable.js to StatisticsTable.tsx
Simon1375 Feb 23, 2026
bcec7bb
tool: convert StatisticsTable.tsx
Simon1375 Feb 23, 2026
ae071de
fix: make StatisticsTable.tsx compile
Simon1375 Feb 23, 2026
6443275
rename: SelectColumn.js to SelectColumn.tsx
Simon1375 Feb 23, 2026
93026ec
tool: convert SelectColumn.tsx
Simon1375 Feb 23, 2026
b31c43c
fix: make SelectColumn.tsx compile
Simon1375 Feb 23, 2026
707b201
rebase: components-folder-part1 onto filterbox-folder
Simon1375 Feb 24, 2026
0313e17
tool: convert LinkOverlay.tsx
Simon1375 Feb 24, 2026
653fd47
fix: LinkOverlay.tsx compile
Simon1375 Feb 24, 2026
2db69ff
Merge remote-tracking branch 'origin/typescript-migration/migration/c…
Simon1375 Feb 25, 2026
7f76118
fix: update package.json
Simon1375 Feb 25, 2026
eb1887b
fix: refine typings and key generation in StatisticsTable and Summary…
Simon1375 Feb 25, 2026
c5bb6ec
fix: simplify dependenciesJson usage in Info.tsx
Simon1375 Feb 26, 2026
e922cfc
fix: standardize constants in TaskDefinitionViewer
Simon1375 Feb 26, 2026
81e9047
fix: remove redundant string handling in TaskDefinitionViewer
Simon1375 Feb 26, 2026
138b51c
Revert "fix: remove redundant string handling in TaskDefinitionViewer"
Simon1375 Feb 26, 2026
bef8d90
refactor: remove JS->TS migration notes
Simon1375 Feb 26, 2026
a1acecb
refactor: make ReactModal app element handling in SelectColumn consis…
Simon1375 Feb 26, 2026
010abec
build: update build files
Simon1375 Feb 26, 2026
d89d1aa
rename: App.js to App.tsx
Simon1375 Feb 26, 2026
ab178e7
tool: convert App.tsx
Simon1375 Feb 26, 2026
76d3f41
rename: index.js to index.tsx
Simon1375 Feb 26, 2026
9a0bcc3
tool: convert index.tsx
Simon1375 Feb 26, 2026
d5f2815
fix: remove redundant Scalar check in TaskDefinitionViewer
Simon1375 Feb 27, 2026
8333ce0
build: update build files
Simon1375 Feb 27, 2026
332cb2f
Merge pull request #1256 from sosy-lab/typescript-migration/migration…
PhilippWendler Feb 27, 2026
626c724
rename: App.js to App.tsx
Simon1375 Feb 26, 2026
3208b81
tool: convert App.tsx
Simon1375 Feb 26, 2026
7e2ea48
rename: index.js to index.tsx
Simon1375 Feb 26, 2026
4985319
tool: convert index.tsx
Simon1375 Feb 26, 2026
9a0793a
Merge remote-tracking branch 'origin/typescript-migration/migration/e…
Simon1375 Feb 27, 2026
76147db
refactor: remove JS->TS migration notes
Simon1375 Feb 27, 2026
d4c32d2
refactor: simplify element removal in index.tsx
Simon1375 Feb 27, 2026
4f72f16
build: update build files
Simon1375 Feb 27, 2026
32d3ffa
Merge pull request #1257 from sosy-lab/typescript-migration/migration…
PhilippWendler Feb 27, 2026
eaacd18
refactor: remove JS->TS migration notes
Simon1375 Feb 27, 2026
18df501
Merge branch 'typescript-migration/typescript-full-migration' into ty…
Simon1375 Feb 27, 2026
b616459
fix: make `columnType` optional in workerDirector to match required t…
Simon1375 Feb 27, 2026
ef26dec
build: update build files
Simon1375 Feb 27, 2026
d1ccb4b
Merge pull request #1258 from sosy-lab/typescript-migration/migration…
PhilippWendler Feb 27, 2026
fefa087
rename: App.test.js to App.test.tsx
Simon1375 Feb 28, 2026
c7f4215
tool: convert App.test.tsx
Simon1375 Feb 28, 2026
38381da
rename: components.test.js to components.test.tsx
Simon1375 Feb 28, 2026
e04b7b2
tool: convert components.test.tsx
Simon1375 Feb 28, 2026
2a7b139
rename: FilterCard.test.js to FilterCard.test.tsx
Simon1375 Feb 28, 2026
529070d
tool: convert FilterCard.test.tsx
Simon1375 Feb 28, 2026
6574dc6
fix: make FilterCard.test.tsx compile
Simon1375 Feb 28, 2026
3b78d78
rename: filters.test.js to filters.test.tsx
Simon1375 Feb 28, 2026
d1ce68b
tool: convert filter.test.tsx
Simon1375 Feb 28, 2026
5e0a814
fix: make filter.test.tsx compile
Simon1375 Feb 28, 2026
81a40d7
build: update snapshot
Simon1375 Feb 28, 2026
d2f77f3
build: run esLint
Simon1375 Feb 28, 2026
a7b1329
rename: InitialState.test.js to InitialState.test.tsx
Simon1375 Feb 28, 2026
1cafb80
tool: convert InitialState.test.tsx
Simon1375 Feb 28, 2026
d8926b8
fix: make InitialState.test.tsx compile
Simon1375 Feb 28, 2026
4a06b30
rename: QuantilePlot.test.js to QuantilePlot.test.tsx
Simon1375 Feb 28, 2026
7d6c8bf
tool: convert QuantilePlot.test.tsx
Simon1375 Feb 28, 2026
bb0a185
fix: make QuantilePlot.test.tsx compile
Simon1375 Feb 28, 2026
2df822b
rename: ReactTable.test.js to ReactTable.test.tsx
Simon1375 Feb 28, 2026
c60e482
tool: convert ReactTable.test.tsx
Simon1375 Feb 28, 2026
36da320
fix: make ReactTable.test.tsx compile
Simon1375 Feb 28, 2026
0822a41
rename: ScatterPlot.test.js to ScatterPlot.test.tsx
Simon1375 Feb 28, 2026
8206ded
tool: convert ScatterPlot.test.tsx
Simon1375 Feb 28, 2026
f901574
fix: make ScatterPlot.test.tsx compile
Simon1375 Feb 28, 2026
fc6515e
rename: SelectColumn.test.js to SelectColumn.test.tsx
Simon1375 Feb 28, 2026
7e986d4
tool: convert SelectColumn.test.tsx
Simon1375 Feb 28, 2026
7740dcd
fix: make SelectColumn.test.tsx compile
Simon1375 Feb 28, 2026
2f30856
rename: StatsCalculation.test.js to StatsCalculation.test.tsx
Simon1375 Feb 28, 2026
b208afc
tool: convert StatsCalculation.test.tsx
Simon1375 Feb 28, 2026
1d133fb
fix: make StatsCalculation.test.tsx compile
Simon1375 Feb 28, 2026
5d5b0fd
rename: Summary.test.js to Summary.test.tsx
Simon1375 Feb 28, 2026
9ba99c0
tool: convert Summary.test.tsx
Simon1375 Feb 28, 2026
e657741
rename: TaskDefinitionViewer.test.js to TaskDefinitionViewer.test.tsx
Simon1375 Feb 28, 2026
295a4a1
tool: convert TaskDefinitionViewer.test.tsx
Simon1375 Feb 28, 2026
2e1be68
rename: utils.js to utils.tsx
Simon1375 Feb 28, 2026
90cafb3
fix: make utils.tsx compile
Simon1375 Feb 28, 2026
0689f1f
rename: utils.test.js to utils.test.tsx
Simon1375 Feb 28, 2026
b4f4e47
tool: convert utils.test.tsx
Simon1375 Feb 28, 2026
f7d8201
fix: make utils.test.tsx compile
Simon1375 Feb 28, 2026
248d026
refactor: cleanup ReactTable.test.tsx
Simon1375 Feb 28, 2026
65fbc6c
refactor: cleanup ScatterPlot.test.tsx
Simon1375 Feb 28, 2026
f746800
refactor: cleanup SelectColumn.test.tsx
Simon1375 Feb 28, 2026
1d65b7f
refactor: cleanup StatsCalculation.test.tsx
Simon1375 Feb 28, 2026
a773b55
refactor: cleanup Summary.test.tsx
Simon1375 Feb 28, 2026
1e08593
refactor: cleanup TaskDefinitionViewer.test.tsx
Simon1375 Feb 28, 2026
0a66168
refactor: cleanup utils.test.tsx
Simon1375 Feb 28, 2026
80f181f
refactor: cleanup utils.tsx
Simon1375 Feb 28, 2026
0551d5d
Merge pull request #1260 from sosy-lab/typescript-migration/migration…
PhilippWendler Mar 2, 2026
3b4ce3e
chore: remove MIGRATION.md as TypeScript migration is complete
Simon1375 Mar 9, 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
2 changes: 1 addition & 1 deletion benchexec/tablegenerator/react-table/build/main.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion benchexec/tablegenerator/react-table/build/vendors.min.js

Large diffs are not rendered by default.

408 changes: 356 additions & 52 deletions benchexec/tablegenerator/react-table/package-lock.json

Large diffs are not rendered by default.

45 changes: 41 additions & 4 deletions benchexec/tablegenerator/react-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,44 @@
"node": ">=18.0.0"
},
"scripts": {
"typecheck": "tsc --noEmit",
"injectWorkers": " node scripts/workerDataUrls.js && eslint --fix ./src/workers/dataUrls.js",
"start": "(test -f src/data/dependencies.json || node scripts/dependencies.js) && npm run injectWorkers && node scripts/start.js",
"build": "node scripts/dependencies.js && npm run injectWorkers && react-app-rewired build",
"test": "(test -f src/data/dependencies.json || node scripts/dependencies.js) && npm run injectWorkers && react-app-rewired test",
"lint:fix": "(test -f src/data/dependencies.json || node scripts/dependencies.js) && eslint --fix --ignore-path .lintignores $(pwd)'/**/*.js' && prettier --ignore-path .lintignores --write $(pwd)'/**/*.+(css|scss|json)'",
"lint": "(test -f src/data/dependencies.json || node scripts/dependencies.js) && eslint --max-warnings 0 --ignore-path .lintignores . && prettier --ignore-path .lintignores --check $(pwd)'/**/*.+(css|scss|json)'"
"lint:fix": "(test -f src/data/dependencies.json || node scripts/dependencies.js) && eslint --fix --ignore-path .lintignores --ext .js,.jsx,.ts,.tsx . && prettier --ignore-path .lintignores --write \"**/*.{css,scss,json}\"",
"lint": "(test -f src/data/dependencies.json || node scripts/dependencies.js) && eslint --max-warnings 0 --ignore-path .lintignores --ext .js,.jsx,.ts,.tsx . && prettier --ignore-path .lintignores --check \"**/*.{css,scss,json}\""
},
"eslintConfig": {
"extends": [
"react-app",
"plugin:prettier/recommended",
"prettier"
],
"overrides": [
{
"files": [
"**/*.ts",
"**/*.tsx"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
]
}
}
],
"rules": {
"prettier/prettier": "warn"
}
Expand All @@ -54,7 +79,8 @@
"src/vendor/"
],
"prettier": {
"trailingComma": "all"
"trailingComma": "all",
"endOfLine": "auto"
},
"browserslist": {
"production": [
Expand All @@ -81,13 +107,24 @@
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^13.5.0",
"@types/deep-equal": "^1.0.4",
"@types/node": "^18.19.130",
"@types/path-browserify": "^1.0.3",
"@types/react": "^17.0.91",
"@types/react-dom": "^17.0.26",
"@types/react-modal": "^3.16.3",
"@types/react-table": "^7.7.20",
"@types/react-test-renderer": "^19.1.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"license-checker": "^25.0.1",
"prettier": "^2.7.1",
"react-app-rewired": "^2.2.1",
"react-scripts": "5.0.1",
"react-test-renderer": "^17.0.2",
"sass": "^1.53.0"
"sass": "^1.53.0",
"typescript": "^4.9.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ checker.init(
// The following is the list of currently allowed licenses for bundled code.
// We can add other free licenses, but must adjust the licences for
// build/vendors.min* in ../../../.reuse/dep5, the linkification code in
// src/components/Info.js and pyproject.toml accordingly,
// src/components/Info.tsx and pyproject.toml accordingly,
// and run "reuse download --all".
onlyAllow: "BSD-3-Clause; CC-BY-4.0; ISC; MIT",
customFormat: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ import ReactDOM from "react-dom";
import { act } from "react-dom/test-utils";
import App from "./App";

type StatsReadyResolver = () => void;

it("renders without crashing", async () => {
const div = document.createElement("div");
let statsResolver;
const StatsReadyPromise = new Promise((resolve) => (statsResolver = resolve));
let statsResolver: StatsReadyResolver;
const StatsReadyPromise = new Promise<void>((resolve) => {
statsResolver = resolve;
});
await act(async () => {
ReactDOM.render(<App onStatsReady={statsResolver} />, div);
await StatsReadyPromise;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,39 @@ import "./App.scss";
import React from "react";
import Overview from "./components/Overview";

// ==============================
// Global augmentations
// ==============================

declare global {
interface Window {
// Global injected app data (loaded via @data in dev and via index.html in prod).
data: unknown;
}
}

// ==============================
// Component props
// ==============================

interface AppProps {
// Callback that is forwarded to Overview. We keep it generic here
// because the exact payload type is defined by Overview.
onStatsReady?: (stats: unknown) => void;
}

if (process.env.NODE_ENV !== "production") {
// Load example data for development
window.data = require("@data");
window.data.version = "(development build)";
// `require` is used here intentionally because @data is only available in dev builds.
// eslint-disable-next-line @typescript-eslint/no-var-requires
window.data = require("@data") as unknown;

// `window.data` is `unknown` on purpose (shape depends on runtime data).
// We keep the original behavior and only narrow locally for this assignment.
(window.data as { version?: string }).version = "(development build)";
}

const App = (props) => {
const App = (props: AppProps): JSX.Element => {
// If we visit this page without a hash, like www.domain.com/ or www.domain.com/subpage, we
// append a hash to the URL to ensure that the page is loaded correctly. This is necessary
// to ensure correct routing in the app.
Expand Down
Loading