mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 10:51:36 -04:00
The React /map page rendered blank (only pins) on fresh builds while the
standalone :8084 viewer worked. maplibre-gl's Web Worker (inlined into the
production main.js) threw `ReferenceError: a is not defined` in its setLayers
handler, so the worker's style-layer index never built and every vector
source's tiles failed to parse ("Cannot read properties of undefined
(reading '<source>')"). The unminified dev build was unaffected — it is a
production minification bug: Terser mangles the inlined worker into broken code.
Root cause: the "npm audit fix" in 62660529 (intended for shell-quote/
form-data/ws) regenerated the lockfile and dragged @babel/core 7.20.12 ->
7.29.7 (whole @babel core pipeline). Babel 7.29 transpiles the maplibre worker
differently; CRA's (unchanged) Terser mangle pass then breaks it. Proven on
10.0.0.8: rebuilding the minified prod bundle with @babel 7.20 renders the map
(0 worker errors); rebuilding back to 7.29 breaks it again with the identical
bundle hash. The transform plugins were never bumped, so pinning @babel/core
alone is insufficient — the core AST pipeline (traverse/generator/types/
helpers) must be pinned too.
Fix: pin the 16 @babel packages that differ from the last-good tree
(6b7bd079) via package.json overrides, keeping the shell-quote/form-data/ws
security fixes. Frontend jest suite passes (810/810).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
90 lines
2.4 KiB
JSON
90 lines
2.4 KiB
JSON
{
|
|
"name": "wrolpi-app",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"dependencies": {
|
|
"@acalcutt/maplibre-contour-pmtiles": "^0.1.2",
|
|
"@artsy/fresnel": "^8.5.0",
|
|
"@cypress/react18": "^2.0.1",
|
|
"@testing-library/react": "^13.4.0",
|
|
"@testing-library/user-event": "^13.5.0",
|
|
"cypress": "^13.15.2",
|
|
"esptool-js": "^0.6.0",
|
|
"lodash": "^4.18.1",
|
|
"maplibre-gl": "^5.24.0",
|
|
"mathjs": "^15.2.0",
|
|
"pmtiles": "^4.4.1",
|
|
"protomaps-themes-base": "^4.5.0",
|
|
"query-string": "^9.4.1",
|
|
"react": "^18.2.0",
|
|
"react-colorful": "^5.8.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-dropzone": "^14.2.3",
|
|
"react-hotkeys-hook": "^5.3.3",
|
|
"react-qr-code": "^2.2.0",
|
|
"react-router": "^7.18.1",
|
|
"react-scripts": "5.0.1",
|
|
"react-semantic-toasts-2": "^0.6.7",
|
|
"react-stl-viewer": "^2.5.0",
|
|
"semantic-ui-offline": "^2.5.1",
|
|
"semantic-ui-react": "^2.1.5",
|
|
"three": "^0.185",
|
|
"web-vitals": "^5.3.0"
|
|
},
|
|
"scripts": {
|
|
"start": "react-scripts start",
|
|
"build": "BROWSERSLIST_IGNORE_OLD_DATA=true react-scripts build",
|
|
"test": "react-scripts test",
|
|
"eject": "react-scripts eject",
|
|
"cy:run": "cypress run",
|
|
"cy:open": "cypress open"
|
|
},
|
|
"eslintConfig": {
|
|
"extends": [
|
|
"react-app"
|
|
]
|
|
},
|
|
"browserslist": {
|
|
"production": [
|
|
">0.2%",
|
|
"not dead",
|
|
"not op_mini all"
|
|
],
|
|
"development": [
|
|
"last 1 chrome version",
|
|
"last 1 firefox version",
|
|
"last 1 safari version"
|
|
]
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@types/lodash": "^4.17.24",
|
|
"@types/node": "^26.0.1",
|
|
"@types/react": "^18.3.17",
|
|
"@types/react-dom": "^18.3.5",
|
|
"typescript": "^4.9.5"
|
|
},
|
|
"jest": {
|
|
"transformIgnorePatterns": [
|
|
"node_modules/(?!(react-hotkeys-hook)/)"
|
|
]
|
|
},
|
|
"overrides": {
|
|
"@babel/code-frame": "7.29.0",
|
|
"@babel/compat-data": "7.20.14",
|
|
"@babel/core": "7.20.12",
|
|
"@babel/generator": "7.29.1",
|
|
"@babel/helper-compilation-targets": "7.20.7",
|
|
"@babel/helper-globals": "7.28.0",
|
|
"@babel/helper-module-imports": "7.28.6",
|
|
"@babel/helper-module-transforms": "7.28.6",
|
|
"@babel/helper-string-parser": "7.27.1",
|
|
"@babel/helper-validator-identifier": "7.28.5",
|
|
"@babel/helper-validator-option": "7.18.6",
|
|
"@babel/helpers": "7.27.0",
|
|
"@babel/parser": "7.29.3",
|
|
"@babel/template": "7.28.6",
|
|
"@babel/traverse": "7.29.0",
|
|
"@babel/types": "7.29.0"
|
|
}
|
|
}
|