wrolpi/app/package.json
lrnselfreliance 1867382d7b
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
test: the component suite has not run since cypress 15, on any machine (#661)
* test: the component suite has not run since cypress 15, on any machine

Six component spec files -- 334 tests, including the 4,300-line layout suite -- could not
start.  Cypress exited before printing anything, and under its default Electron browser it
did not even do that: it hung at 0% CPU until killed.  Chrome prints the error in seconds,
which is the only reason this was findable.

Three things broke, all of them from the 13.17.0 -> 15.20.0 bump.

`baseUrl: "src"`.  Cypress 15 loads its config with tsx, and tsx honours tsconfig path
resolution.  Cypress requires Node's core `events` module; with that baseUrl the bare
specifier resolves against `src`, and on a case-insensitive filesystem it matches
`src/Events.js`.  That file imports the app, so the whole component tree was required in
Node: JSX in `.js` files, which esbuild will not parse.

This is why CI stayed green while every local run died.  Linux is case-sensitive, `events`
never matched `Events.js`, and it resolved to the built-in.  The baseUrl buys nothing --
there is not one absolute import in the codebase -- so it goes.

`framework: "create-react-app"`.  Cypress 14 removed that dev server; the handler is in the
13.17.0 binary and absent from 15.  The webpack config is handed over explicitly now, taken
from react-scripts so components compile exactly as `npm start` compiles them.  Two things
follow from that: `webpack-dev-server` 5 is a devDependency because Cypress requires 5 and
react-scripts pins 4 (npm nests react-scripts' copy, and the production build is unchanged),
and babel-loader is widened to `cypress/`, which react-scripts does not compile -- the
support file is JSX and was reaching babel with no preset.

The suite ran nowhere.  `cypress run` means e2e -- its specPattern is `cypress/e2e/**` --
and these specs sit beside the components in `src`, so no job has ever executed them.  A
`cypress-component-tests` job runs them now; without it this breaks again in silence.

One test fails the moment the suite can run, and it is mine, from #660: it asserted the URL
column is the widest in the row.  It is not, and never was -- at that width the fixed columns
take ~307px of 400, leaving the URL ~93 against Control's 146.  It shipped green because
nothing could run it.  It asserts a usable remainder instead.

334 component tests pass, 69 suites / 1214 jest tests pass, `npm run build` is clean.

* review: an assertion with a floor, and comments that told the story instead of the rule

The leftover-width test had a lower bound and nothing else, so it passed on any column
wide enough to have padding -- including one that had grown, which is what losing
table-layout: fixed does.  It measures the leftover now: the sized columns are held to
the widths they declare, and the truncating column to exactly what they did not take.

Comments in the config, the CI job and the spec cut back to the rule a reader needs.  The
version history and the measurements are in the PR.
2026-08-12 21:57:07 -06:00

97 lines
2.7 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",
"@mantine/core": "^8.3.18",
"@mantine/hooks": "^8.3.18",
"@mantine/notifications": "^8.3.18",
"@tabler/icons-react": "^3.46.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.6.1",
"cypress": "^15.20.0",
"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.2",
"react-scripts": "5.0.1",
"react-stl-viewer": "^2.5.0",
"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/dom": "^10.4.1",
"@testing-library/jest-dom": "^7.0.0",
"@types/lodash": "^4.17.24",
"@types/node": "^26.1.2",
"@types/react": "^18.3.17",
"@types/react-dom": "^18.3.5",
"typescript": "^5.9.3",
"webpack-dev-server": "^5.2.6"
},
"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",
"react-scripts": {
"typescript": "$typescript"
},
"fork-ts-checker-webpack-plugin": "^6.5.3"
}
}