Skip to content

EPBDS-16211 F1 step 4: delete semantic-ui-less and the theme.config machinery - #46

Merged
AlexSamBY merged 1 commit into
masterfrom
f1-step4-drop-semantic-ui-less
Sep 15, 2026
Merged

AlexSamBY merged 1 commit into
masterfrom
f1-step4-drop-semantic-ui-less

Conversation

@AlexSamBY

Copy link
Copy Markdown
Member

Step 4 complete. semantic-ui-less is out of devDependencies and out of package-lock.json — and the whole exit is invisible to a consumer: the published static/all.css still has the sha256 it had before any of step 4 (dcdb0a40…). Byte-for-byte, not "looks the same".

What went

semantic-ui-less devDependencies + lockfile
three webpack theme.config aliases UPGRADE-PLAN named two; webpack.watch.config.mjs was the third and nothing had noticed
node_modules lessOptions.paths demo and library configs (the library's paths: [src/style] stays — that is the font compile)
scripts/install-theme-config.js + 3 call sites npx jest no longer mutates node_modules — a gotcha CLAUDE.md carried for months
89 of 97 files 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 4 live files under override/.

A first attempt using grep over basenames produced obvious nonsense — it matched site inside site.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.variables and theme.config. Keeping them is what makes scripts/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 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

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, along with the build-css gotcha and the alias list.

_semantic.less keeps 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-lib and build-css all green. Published CSS byte-identical.

🤖 Generated with Claude Code

…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.
@AlexSamBY
AlexSamBY merged commit 9f39395 into master Sep 15, 2026
5 checks passed
@AlexSamBY
AlexSamBY deleted the f1-step4-drop-semantic-ui-less branch September 15, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant