Skip to content

Commit f8f3c39

Browse files
Remove obsolete polyfills and unused devDependencies
- Removed `core-js` and `regenerator-runtime` as explicit imports in `src`. The library targets ES2015+ (as per tsconfig) and modern environments. Polyfilling should be handled by the consumer or build tool configuration if needed, not hardcoded in the library source. - Removed unused devDependencies: `@eslint/js`, `eslint-define-config`. - Added `lint` and `type-check` scripts to `package.json`. - Enabled `skipLibCheck` in `tsconfig.json` to resolve type errors in `node_modules` exposed by the environment changes. - Verified changes with `npm run lint`, `npm run type-check`, `npm test` (unit/integration/visual), and `npm run build`.
1 parent fcc02f1 commit f8f3c39

File tree

9 files changed

+3097
-10835
lines changed

9 files changed

+3097
-10835
lines changed

dist/unipept-visualizations.js

Lines changed: 3010 additions & 10284 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/unipept-visualizations.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 82 additions & 537 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
"test": "vitest run",
1515
"build": "vite build",
1616
"dev": "vite",
17-
"preview": "vite preview"
17+
"preview": "vite preview",
18+
"lint": "eslint .",
19+
"type-check": "tsc --noEmit"
1820
},
1921
"repository": "github:unipept/unipept-visualizations",
2022
"keywords": [
@@ -32,22 +34,18 @@
3234
"d3": "^7.9.0"
3335
},
3436
"devDependencies": {
35-
"@eslint/js": "^9.0.0",
3637
"@types/d3": "^7.4.3",
3738
"@types/jsdom": "^16.2.7",
3839
"@typescript-eslint/eslint-plugin": "^8.29.0",
3940
"@typescript-eslint/parser": "^8.29.0",
4041
"@vitest/ui": "^3.1.2",
4142
"canvas": "^3.1.0",
42-
"core-js": "^3.8.1",
4343
"eslint": "^9.0.0",
44-
"eslint-define-config": "^2.1.0",
4544
"flush-promises": "^1.0.2",
4645
"jsdom": "^26.1.0",
4746
"pixelmatch": "^7.1.0",
4847
"pngjs": "^7.0.0",
4948
"puppeteer": "^24.7.2",
50-
"regenerator-runtime": "^0.13.7",
5149
"typescript": "^4.1.2",
5250
"vite": "^4.4.9",
5351
"vite-plugin-dts": "^3.5.3",

src/visualizations/heatmap/Heatmap.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {HeatmapFeature} from "./HeatmapFeature";
77
import {HeatmapValue} from "./HeatmapValue";
88
import Preprocessor from "./Preprocessor";
99

10-
import "core-js/stable";
11-
import "regenerator-runtime/runtime";
1210
import CanvasRenderHelper from "./../../render/CanvasRenderHelper";
1311
import RenderHelper from "./../../render/RenderHelper";
1412

src/visualizations/sunburst/Sunburst.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import TooltipUtilities from "./../../utilities/TooltipUtilities";
77
import NodeUtils from "./../../utilities/NodeUtils";
88
import ColorUtils from "./../../color/ColorUtils";
99

10-
import "core-js/stable";
11-
import "regenerator-runtime/runtime";
1210

1311
type HRN<T> = d3.HierarchyRectangularNode<T>;
1412

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"strict": true,
1313
"moduleResolution": "node",
1414
"resolveJsonModule": true,
15+
"skipLibCheck": true,
1516
"isolatedModules": true,
1617
"declaration": true,
1718
"declarationDir": "./dist",

types/visualizations/heatmap/Heatmap.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import HeatmapSettings from "./HeatmapSettings";
2-
import "core-js/stable";
3-
import "regenerator-runtime/runtime";
42
export default class Heatmap {
53
private element;
64
private settings;

types/visualizations/sunburst/Sunburst.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import SunburstSettings from "./SunburstSettings";
22
import { DataNodeLike } from "./../../DataNode";
3-
import "core-js/stable";
4-
import "regenerator-runtime/runtime";
53
export default class Sunburst {
64
private readonly element;
75
private readonly settings;

0 commit comments

Comments
 (0)