EPBDS-16211 F1 step 4: delete semantic-ui-less and the theme.config machinery - #46
Merged
Merged
Conversation
…achinery
Step 4 complete, and the whole exit is invisible to a consumer: `static/all.css`
still has the sha256 it had before any of it (dcdb0a40…). Byte-for-byte, not
"looks the same".
WHAT WENT:
- `semantic-ui-less` from `devDependencies` and from `package-lock.json`;
- THREE webpack `theme.config` aliases. UPGRADE-PLAN named two;
`webpack.watch.config.mjs` was the third and nothing had noticed;
- the `node_modules` `lessOptions.paths` entries in the demo and library
configs (the library's `paths: [src/style]` stays — that is the font compile);
- `scripts/install-theme-config.js` and its three call sites, so `npx jest` no
longer mutates `node_modules`. That gotcha has been in CLAUDE.md for months;
- 89 of the 97 files under `src/style/override/`.
THE DELETION WAS DECIDED BY THE IMPORT GRAPH, NOT BY READING. `less.render`
reports the files it actually read; run against `index.less` it showed 0
semantic-ui-less files and only FOUR live files under `override/`. A first
attempt with `grep` over basenames produced obvious nonsense — it matched `site`
inside `site.variables` — and was thrown away rather than trusted.
EIGHT FILES KEPT, and the four beyond the live set are deliberate: the vendoring
compile reads `globals/reset.variables`, `globals/site.variables`,
`modules/dropdown.variables` and `theme.config`. Keeping them is what makes
`scripts/vendor-semantic-css.js`'s stated recipe — install the package with
`--no-save` and re-run — TRUE rather than a note about digging in git history.
Vendored third-party code without a reproducible derivation is a dead end. The
script inlines the one `theme.config` copy it needs and says up front that it
cannot run as the repository stands.
THE LESS 3 PIN DOES NOT DISSOLVE WITH THE PACKAGE, which the plan predicted it
would (R8, §9.8). Both anchors are ours, measured: `javascriptEnabled` is
required by `_variables.less:23` (a `Math.random()` cache-buster) and
`less-plugin-functions` by `round()` at `_variables.less:264`. Unpinning LESS is
separate work with two named targets. CLAUDE.md said the opposite and is fixed.
`_semantic.less` keeps its history note but loses the ~50 commented-out
`@{libPath}` imports: leaving a menu of imports that can no longer resolve would
be worse than no menu.
Gates, by exit code rather than by reading output: jsdom 167 suites / 2540 tests
/ 38 snapshots on React 16.14, 17 and 18.3; Chrome 41/41; `lint:js`, `lint:css`,
`css:fixture:check`, both docs checks, `build-lib` and `build-css` all green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 4 complete.
semantic-ui-lessis out ofdevDependenciesand out ofpackage-lock.json— and the whole exit is invisible to a consumer: the publishedstatic/all.cssstill has the sha256 it had before any of step 4 (dcdb0a40…). Byte-for-byte, not "looks the same".What went
semantic-ui-lessdevDependencies+ lockfiletheme.configaliaseswebpack.watch.config.mjswas the third and nothing had noticednode_moduleslessOptions.pathspaths: [src/style]stays — that is the font compile)scripts/install-theme-config.js+ 3 call sitesnpx jestno longer mutatesnode_modules— a gotcha CLAUDE.md carried for monthssrc/style/override/The deletion was decided by the import graph, not by reading
less.renderreports the files it actually read. Run againstindex.lessit showed 0semantic-ui-lessfiles and only 4 live files underoverride/.A first attempt using
grepover basenames produced obvious nonsense — it matchedsiteinsidesite.variables— and was thrown away rather than trusted. Worth saying because the tempting move was to eyeball that list and delete from it.Eight files kept, and four of them deliberately
Beyond the four live ones, the vendoring compile reads
globals/reset.variables,globals/site.variables,modules/dropdown.variablesandtheme.config. Keeping them is what makesscripts/vendor-semantic-css.js's stated recipe — install the package with--no-save, re-run — true, rather than a note about digging through git history. Vendored third-party code without a reproducible derivation is a dead end. The script inlines the onetheme.configcopy it needs and says up front that it cannot run as the repository stands.The LESS 3 pin does not dissolve with the package
The plan predicted it would (R8, §9.8). Both anchors are ours, measured:
javascriptEnabledis required by_variables.less:23(a`Math.random()`cache-buster) andless-plugin-functionsbyround()at_variables.less:264. Unpinning LESS is separate work with two named targets. CLAUDE.md said the opposite and is fixed, along with thebuild-cssgotcha and the alias list._semantic.lesskeeps its history note but loses the ~50 commented-out@{libPath}imports: a menu of imports that can no longer resolve is worse than no menu.Gates — by exit code, not by reading output
jsdom 167 suites / 2540 tests / 38 snapshots on React 16.14, 17 and 18.3; Chrome 41/41;
lint:js,lint:css,css:fixture:check,docs:props:check,docs:views:check,build-libandbuild-cssall green. Published CSS byte-identical.🤖 Generated with Claude Code