Skip to content

chore(deps): axe-core is a testing library — move it to devDependencies - #757

Merged
rubenvdlinde merged 1 commit into
developmentfrom
chore/axe-core-devdep
Aug 6, 2026
Merged

chore(deps): axe-core is a testing library — move it to devDependencies#757
rubenvdlinde merged 1 commit into
developmentfrom
chore/axe-core-devdep

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

axe-core sat in dependencies, declaring an accessibility testing library as an application runtime dependency.

Measured, not assumed

  • Nothing under src/ imports axe-core — 0 hits for axe-core / axe.run.
  • The built production bundle does not contain it. 0 hits in js/ for axe-core, axe.run, and axe's own signature strings (aria-allowed-attr, color-contrast). Positive control: those same strings match 20 files under node_modules/axe-core, so the grep can find axe when axe is there — the zero is a real absence, not a broken search.
  • @conduction/nextcloud-vue declares axe-core as an OPTIONAL peerDependency (peerDependenciesMeta["axe-core"].optional === true). nc-vue does use it, but only in src/testing/a11y.js — a testing helper that is never imported from src/index.js, so it never reaches an app bundle. nc-vue's own file header states axe-core "is a devDependency" and that consumers wanting the a11y assertion "add axe-core to their OWN devDependencies". This change follows that instruction.
  • The real browser-side accessibility tooling is a different package: Playwright scanning uses @axe-core/playwright, and the hydra WCAG gate injects axe from cdnjs.

What this actually fixes

Not bundle size — the bundle is byte-identical. It stops a test dependency being declared as production surface, which matters for SBOM generation, for npm ci --omit=dev release installs, and for advisory triage. An optional peer is satisfied by a devDependency, so nothing breaks.

Verification

  • npm ci (npm 10.8.2, matching engines) → exit 0
  • production build → exit 0, pre-existing size warnings unchanged
  • axe-core still present in node_modules after install

⚠️ The lockfile was regenerated with npm 10.8.2 and without --legacy-peer-deps. Using --legacy-peer-deps here strips every peer: true entry and produces a ~12k-line deletion; the intended diff is 3 lines.

Replicates ConductionNL/doriath#174.

axe-core sat in `dependencies`, declaring an accessibility *testing*
library as an application runtime dependency.

Measured: nothing under src/ imports axe-core, and the built bundle never
contained it (webpack only emits what the import graph reaches). What put
it in every app manifest is a bogus peerDependency on
`axe-core: ^4.10.0` declared by @conduction/nextcloud-vue, which does not
import it either. Real accessibility scanning uses @axe-core/playwright,
and the hydra WCAG gate injects axe from cdnjs — neither needs this entry.

Not a bundle-size fix; the bundle is unchanged. It stops a test dependency
being declared as production surface (SBOM, `npm ci --omit=dev`, advisory
triage). devDependencies still satisfy nc-vue's peer.

Verified: npm ci + production build both exit 0.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/procest @ afaf76c

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
check-vue3-compile
test-l10n
composer ✅ 100/100
npm ✅ 552/552
PHPUnit
Newman ⏭️
Playwright
Hydra gates

Quality workflow — 2026-08-06 13:32 UTC

Download the full PDF report from the workflow artifacts.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/procest @ afaf76c

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
check-vue3-compile
test-l10n
composer ✅ 100/100
npm ✅ 552/552
PHPUnit
Newman ⏭️
Playwright
Hydra gates

Quality workflow — 2026-08-06 14:02 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit ce9e28e into development Aug 6, 2026
62 of 64 checks passed
@rubenvdlinde
rubenvdlinde deleted the chore/axe-core-devdep branch August 6, 2026 14:04
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