Cleanup our dependencies #3572

Merged
hj merged 20 commits from weight-removal into develop 2026-09-04 13:48:46 +00:00
Member
  • Remove multiple dependencies:
    • Babel was only ever used by ESLint for parsing. Vite handles compilation.
    • Nightwatch was not used at all
    • ESLint is replaced by Biome. Biome can do Vue linting now
    • MSW (Mock Serviceworker) - replaced msw with vi.stubGlobal('fetch', ...) - it's much simpler to use and lets us actually test that fetch call has been made. It also makes our tests more consistent.
    • parse-link-header Dunno why we have it, we use @web3-storage/parse-link-header instead
    • Chai and Sinon replaced by Vitest
    • custom-event-polyfill not used anymore, we subclass Event now
    • querystring-es3, url, express, function-bind, http-proxy-middleware, selenium-server, oxc, eventsource-polyfill, shelljs seemingly unused
  • Remove gitlab-ci configuration, if needed it can be recovered from git history
  • Add vue devtools (dev mode overlay)
  • Add biome plugin for vite to show errors/warning in dev mode overlay
  • Update most of the remaining packages, bump node version to 24
- Remove multiple dependencies: - **Babel** was only ever used by **ESLint** for parsing. **Vite** handles compilation. - **Nightwatch** was not used at all - **ESLint** is replaced by **Biome**. Biome can do Vue linting now - **MSW** (Mock Serviceworker) - replaced msw with `vi.stubGlobal('fetch', ...)` - it's *much* simpler to use and lets us actually test that fetch call has been made. It also makes our tests more consistent. - **parse-link-header** Dunno why we have it, we use **@web3-storage/parse-link-header** instead - **Chai** and **Sinon** replaced by **Vitest** - **custom-event-polyfill** not used anymore, we subclass `Event` now - **querystring-es3**, **url**, **express**, **function-bind**, **http-proxy-middleware**, **selenium-server**, **oxc**, **eventsource-polyfill**, **shelljs** seemingly unused - Remove **gitlab-ci configuration**, if needed it can be recovered from git history - Add **vue devtools** (dev mode overlay) - Add **biome plugin** for vite to show errors/warning in dev mode overlay - Update most of the remaining packages, **bump node version to 24**
hj added 12 commits 2026-09-03 22:20:19 +00:00
yarn for old alpine
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/test-e2e unknown status
15b911b7b3
seriously...
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/test-e2e unknown status
a417ea0f2c
reduce node version to 24 (what's used in playwright)
Some checks failed
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/pr/changelog Pipeline failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/test unknown status
ci/woodpecker/pr/test-e2e unknown status
70e8a58952
revert global yarn install
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was successful
a4f45f23ab
Author
Member

/oc review

/oc review
opencode-fix-bot left a comment

opencode-agent:job=82:generation=1

Review of developweight-removal (16 commits, 27 files, +1700/−7304)

Reviewed the full base-to-head diff at 7bc4fd7ba4f45f23, cross-checked against the live CI status, and did a local verification pass (anonymous clone of the exact head SHA, yarn install --frozen-lockfile, biome check, targeted vitest runtime checks).

Verified working

  • Babel/ESLint/Nightwatch removal is clean. No leftover imports or references to @babel/*, eslint, or nightwatch in src/, test/unit/, vite.config.js, or package.json. .babelrc, eslint.config.mjs, the nightwatch e2e harness (test/e2e/*), and .gitlab-ci.yml are all gone; yarn.lock shrank by ~7.3k lines. The stale // eslint-disable comments and !! coercions were swept too.
  • Biome replacement holds up. Biome 2.3.11 → 2.5.11 with vue: "recommended" (so it covers Vue files, as claimed), and vite-plugin-eslint2vite-plugin-biome (mode: 'check') in vite.config.js — the plugin correctly surfaces diagnostics during test/dev runs. biome check passes on 684 files locally at this head.
  • Removing chai, sinon, sinon-chai is sound. The retained chai-style assertions in specs (expect(x).to.have.property(...), expect(mock).to.have.been.calledWith(...)) resolve natively: vitest's expect is chai-based and @vitest/expect 4.1.11 registers defMethod("calledWith", "toHaveBeenCalledWith") (plus been is a core chai language chain). Confirmed empirically and against the green ci/woodpecker/pr/test pipeline on this commit.
  • Vue devtools overlay (vite-plugin-vue-devtools) is wired into the plugin chain in vite.config.js, alongside @vitejs/devtools / @vue/devtools-api.
  • CI edits are consistent: the eslint step is dropped from .woodpecker/lint.yaml, node images move 20 → 24-alpine, and test.yaml deliberately keeps the npm install --global yarn workaround (playwright image; the revert commit intentionally did not touch it).

Blocking/CI issue

  • ci/woodpecker/pr/changelog fails on this head. The diff adds nothing under changelog.d/, but tools/check-changelog requires an added changelog.d/*.{skip,add,remove,fix,security,change} file vs. the target branch. A dependency-cleanup entry (e.g. changelog.d/3572.add or .remove) — or an explicit .skip if intentionally omitted — would turn the pipeline green.

⚠️ Worth a follow-up

  • Duplicate Vue compiler tree: @vue/compiler-sfc is pinned to exactly 3.5.22 while vue is 3.5.42, so yarn.lock carries two full compiler trees (compiler-sfc/compiler-core/compiler-dom/compiler-ssr/shared at both versions, the 3.5.22 one with its own @babel/parser). Aligning the pin to 3.5.42 would drop the duplicate tree — very much in this PR's spirit.
  • Major bumps inside a cleanup PR: pinia 3 → 4, vue-router 4 → 5, vue-virtual-scroller 2-beta → 3. Green unit + e2e pipelines mitigate this, but these deserve a manual smoke pass of routing/virtualized lists in dev.
  • Description drift: the PR description says "bump node version to 26", but the branch ships node 24 (engines.node >= 24, node:24-alpine CI images; per the "reduce node version to 24" commits, matching playwright's runtime). Worth updating the description so it matches what lands.

Overall: the removal work is genuinely clean and well-verified by CI; the only concrete action item is the missing changelog.d entry (already failing CI), plus the optional compiler-pin alignment.

opencode-agent:job=82:generation=1 ## Review of `develop` → `weight-removal` (16 commits, 27 files, +1700/−7304) Reviewed the full base-to-head diff at `7bc4fd7b` → `a4f45f23`, cross-checked against the live CI status, and did a local verification pass (anonymous clone of the exact head SHA, `yarn install --frozen-lockfile`, `biome check`, targeted vitest runtime checks). ### ✅ Verified working - **Babel/ESLint/Nightwatch removal is clean.** No leftover imports or references to `@babel/*`, `eslint`, or `nightwatch` in `src/`, `test/unit/`, `vite.config.js`, or `package.json`. `.babelrc`, `eslint.config.mjs`, the nightwatch e2e harness (`test/e2e/*`), and `.gitlab-ci.yml` are all gone; `yarn.lock` shrank by ~7.3k lines. The stale `// eslint-disable` comments and `!!` coercions were swept too. - **Biome replacement holds up.** Biome 2.3.11 → 2.5.11 with `vue: "recommended"` (so it covers Vue files, as claimed), and `vite-plugin-eslint2` → `vite-plugin-biome` (`mode: 'check'`) in `vite.config.js` — the plugin correctly surfaces diagnostics during test/dev runs. `biome check` passes on 684 files locally at this head. - **Removing `chai`, `sinon`, `sinon-chai` is sound.** The retained chai-style assertions in specs (`expect(x).to.have.property(...)`, `expect(mock).to.have.been.calledWith(...)`) resolve natively: vitest's `expect` is chai-based and `@vitest/expect` 4.1.11 registers `defMethod("calledWith", "toHaveBeenCalledWith")` (plus `been` is a core chai language chain). Confirmed empirically and against the green `ci/woodpecker/pr/test` pipeline on this commit. - **Vue devtools overlay** (`vite-plugin-vue-devtools`) is wired into the plugin chain in `vite.config.js`, alongside `@vitejs/devtools` / `@vue/devtools-api`. - **CI edits are consistent:** the eslint step is dropped from `.woodpecker/lint.yaml`, node images move 20 → 24-alpine, and `test.yaml` deliberately keeps the `npm install --global yarn` workaround (playwright image; the revert commit intentionally did not touch it). ### ❌ Blocking/CI issue - **`ci/woodpecker/pr/changelog` fails on this head.** The diff adds nothing under `changelog.d/`, but `tools/check-changelog` requires an added `changelog.d/*.{skip,add,remove,fix,security,change}` file vs. the target branch. A dependency-cleanup entry (e.g. `changelog.d/3572.add` or `.remove`) — or an explicit `.skip` if intentionally omitted — would turn the pipeline green. ### ⚠️ Worth a follow-up - **Duplicate Vue compiler tree:** `@vue/compiler-sfc` is pinned to exactly `3.5.22` while `vue` is `3.5.42`, so `yarn.lock` carries two full compiler trees (`compiler-sfc`/`compiler-core`/`compiler-dom`/`compiler-ssr`/`shared` at both versions, the 3.5.22 one with its own `@babel/parser`). Aligning the pin to `3.5.42` would drop the duplicate tree — very much in this PR's spirit. - **Major bumps inside a cleanup PR:** `pinia` 3 → 4, `vue-router` 4 → 5, `vue-virtual-scroller` 2-beta → 3. Green unit + e2e pipelines mitigate this, but these deserve a manual smoke pass of routing/virtualized lists in dev. - **Description drift:** the PR description says "bump node version to 26", but the branch ships node 24 (`engines.node >= 24`, `node:24-alpine` CI images; per the "reduce node version to 24" commits, matching playwright's runtime). Worth updating the description so it matches what lands. Overall: the removal work is genuinely clean and well-verified by CI; the only concrete action item is the missing `changelog.d` entry (already failing CI), plus the optional compiler-pin alignment.
hj added 3 commits 2026-09-04 13:09:09 +00:00
get rid of msw, use fetch mock instead
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was successful
341803dac2
Author
Member

/oc review

/oc review
Author
Member

Benchmark

Note: yarn cache was used for dependency pulling

Develop

yarn && yarn build: Done in 6.13s; Done in 4.42s.

rm -fr dist/**/*.map dist/static/ruffle && du --summarize dist node_modules 
12508   dist
816804  node_modules

This branch

yarn && yarn build: Done in 4.15s.; Done in 3.76s.

rm -fr dist/**/*.map dist/static/ruffle && du --summarize dist node_modules
12576   dist
478296  node_modules

Resulting build ends up just a tiny bit bigger than before, unfortunately

## Benchmark Note: yarn cache was used for dependency pulling ### Develop `yarn && yarn build`: Done in 6.13s; Done in 4.42s. ``` rm -fr dist/**/*.map dist/static/ruffle && du --summarize dist node_modules 12508 dist 816804 node_modules ``` ### This branch `yarn && yarn build`: Done in 4.15s.; Done in 3.76s. ``` rm -fr dist/**/*.map dist/static/ruffle && du --summarize dist node_modules 12576 dist 478296 node_modules ``` Resulting build ends up just a tiny bit bigger than before, unfortunately
First-time contributor

opencode-agent:job=83:generation=1

Review of developweight-removal (19 commits, 52 files, +2332/−8668)

Reviewed the full base-to-head diff (7bc4fd7b341803da) and reproduced the verification locally on Node v24.20.0 (fresh anonymous clone, exact head commit checked out).

Verification performed (all green)

  • yarn install --frozen-lockfile — lockfile in sync
  • yarn unit-ci (vitest 5, headless chromium) — 37 files, 471 passed / 2 skipped
  • yarn ci-biome — 681 files clean · yarn ci-stylelint — clean
  • yarn build — production client + service worker build OK
  • Confirmed no vue-devtools code in the production bundle (plugin is dev-serve-only)
  • Live Woodpecker CI on 341803da: build / changelog / lint / test / test-e2e all success
  • The benchmark posted by @hj (faster install + build, smaller install tree) is consistent with what this diff does

Dependency removals — checked for stragglers

Babel (incl. .babelrc, @vue/babel-*), ESLint (config + 8 plugins + vue-eslint-parser + vite-plugin-eslint2), Nightwatch (+ chromedriver, selenium-server, test/e2e/*), msw (+ build/msw_plugin.js, test/fixtures/*), parse-link-header (kept @web3-storage/parse-link-header — now the only link-header parser, used in entity_normalizer), Chai/Sinon/sinon-chai, custom-event-polyfill, and querystring-es3, url, express, function-bind, http-proxy-middleware, oxc, eventsource-polyfill, shelljs, connect-history-api-fallback, semver. Grep over src/, test/, build/, tools/: no remaining imports of any removed package. The .gitlab-ci.yml removal leaves no dangling references.

Test migration (msw → vi.stubGlobal('fetch'))

The rewrites (oauth.spec.js is the big one) are a clear improvement: msw handlers became plain vi.fn() mocks, and assertions now check the actual fetch calls (URL + options) instead of trusting an interceptor layer. One note: the legacy expect(x).to.have.been.called style still works only because Vitest bundles Chai with a sinon-chai-compatible integration (verified: these assertions pass under Vitest 5's bundled Chai; standalone Chai 6 rejects them). Fine today, just a hidden coupling worth knowing about.

Non-blocking notes

  1. Major bumps ride along: vue-router 4→5, pinia 3→4, vue-virtual-scroller 2-beta→3.0.5, uuid 11→14, stylelint 16→17, vitest 4→5, vite 8.0→8.2.2. Suite/build/CI are green, but router/pinia/virtual-scroller runtime behavior deserves one manual smoke pass in the dev server, since unit coverage can't fully exercise navigation and virtualized lists.
  2. Two unused devDeps survived: chalk (bumped to 6 — already unused at base) and cross-spawn (its only consumer, the deleted test/e2e/runner.js, is gone). Safe to drop in a follow-up.
  3. iso-639-1 is imported from src/ but sits in devDependencies — pre-existing and harmless with Vite, but misclassified.
  4. Node 24: engines bumped to >= 24 with a changelog fragment; all Woodpecker images moved to node:24-alpine; playwright devDep 1.61.0 matches the CI image tag. Downstream packagers will need Node 24 — the changelog entry covers that.
  5. @ruffle-rs/ruffle is pinned to a nightly (0.6.0-nightly.2026.9.4) — reproducible via the lockfile, but expect churn on future updates.
  6. vueDevTools() / biomePlugin({mode:'check'}) are added unconditionally in vite.config.js — both are no-ops outside dev serve, verified in the prod build output.

Verdict

Positive. The PR does exactly what it describes, the codebase comes out cleaner, tests got stricter (real fetch-call assertions), and every check is green both live and locally reproduced. All notes above are optional polish, not blockers.

opencode-agent:job=83:generation=1 ## Review of `develop` → `weight-removal` (19 commits, 52 files, +2332/−8668) Reviewed the full base-to-head diff (`7bc4fd7b` → `341803da`) and reproduced the verification locally on **Node v24.20.0** (fresh anonymous clone, exact head commit checked out). ### Verification performed (all green) - `yarn install --frozen-lockfile` — lockfile in sync - `yarn unit-ci` (vitest 5, headless chromium) — **37 files, 471 passed / 2 skipped** - `yarn ci-biome` — 681 files clean · `yarn ci-stylelint` — clean - `yarn build` — production client + service worker build OK - Confirmed **no vue-devtools code in the production bundle** (plugin is dev-serve-only) - Live Woodpecker CI on `341803da`: build / changelog / lint / test / test-e2e all **success** - The benchmark posted by @hj (faster install + build, smaller install tree) is consistent with what this diff does ### Dependency removals — checked for stragglers Babel (incl. `.babelrc`, `@vue/babel-*`), ESLint (config + 8 plugins + `vue-eslint-parser` + `vite-plugin-eslint2`), Nightwatch (+ `chromedriver`, `selenium-server`, `test/e2e/*`), msw (+ `build/msw_plugin.js`, `test/fixtures/*`), `parse-link-header` (kept `@web3-storage/parse-link-header` — now the only link-header parser, used in `entity_normalizer`), Chai/Sinon/`sinon-chai`, `custom-event-polyfill`, and `querystring-es3`, `url`, `express`, `function-bind`, `http-proxy-middleware`, `oxc`, `eventsource-polyfill`, `shelljs`, `connect-history-api-fallback`, `semver`. Grep over `src/`, `test/`, `build/`, `tools/`: **no remaining imports** of any removed package. The `.gitlab-ci.yml` removal leaves no dangling references. ### Test migration (msw → `vi.stubGlobal('fetch')`) The rewrites (`oauth.spec.js` is the big one) are a clear improvement: msw handlers became plain `vi.fn()` mocks, and assertions now check the actual `fetch` calls (URL + options) instead of trusting an interceptor layer. One note: the legacy `expect(x).to.have.been.called` style still works only because Vitest bundles Chai with a sinon-chai-compatible integration (verified: these assertions pass under Vitest 5's bundled Chai; standalone Chai 6 rejects them). Fine today, just a hidden coupling worth knowing about. ### Non-blocking notes 1. **Major bumps ride along**: vue-router 4→5, pinia 3→4, vue-virtual-scroller 2-beta→3.0.5, uuid 11→14, stylelint 16→17, vitest 4→5, vite 8.0→8.2.2. Suite/build/CI are green, but router/pinia/virtual-scroller runtime behavior deserves one manual smoke pass in the dev server, since unit coverage can't fully exercise navigation and virtualized lists. 2. **Two unused devDeps survived**: `chalk` (bumped to 6 — already unused at base) and `cross-spawn` (its only consumer, the deleted `test/e2e/runner.js`, is gone). Safe to drop in a follow-up. 3. `iso-639-1` is imported from `src/` but sits in devDependencies — pre-existing and harmless with Vite, but misclassified. 4. **Node 24**: engines bumped to `>= 24` with a changelog fragment; all Woodpecker images moved to `node:24-alpine`; `playwright` devDep 1.61.0 matches the CI image tag. Downstream packagers will need Node 24 — the changelog entry covers that. 5. `@ruffle-rs/ruffle` is pinned to a nightly (`0.6.0-nightly.2026.9.4`) — reproducible via the lockfile, but expect churn on future updates. 6. `vueDevTools()` / `biomePlugin({mode:'check'})` are added unconditionally in `vite.config.js` — both are no-ops outside dev serve, verified in the prod build output. ### Verdict **Positive.** The PR does exactly what it describes, the codebase comes out cleaner, tests got *stricter* (real fetch-call assertions), and every check is green both live and locally reproduced. All notes above are optional polish, not blockers.
more unused deps
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was successful
b5edf601f4
hj merged commit b90938c7bc into develop 2026-09-04 13:48:46 +00:00
hj deleted branch weight-removal 2026-09-04 13:48:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pleroma/pleroma-fe!3572
No description provided.