Skip to content

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

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#2375
rubenvdlinde merged 1 commit into
developmentfrom
chore/axe-core-devdep

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

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

Replicates ConductionNL/doriath#174 across the fleet.

Measured, not assumed

  • Nothing under src/ imports axe-core — 0 hits for axe-core / from 'axe' / require('axe.
  • The built production bundle does not contain it. Grepped the freshly-built js/ output for the axe-specific markers axe-core, axe.run and aria-allowed-attr0 hits. Positive control: aria-allowed-attr is present in the installed node_modules/axe-core/axe.min.js, so the grep can match. (Note: color-contrast alone is a poor discriminator — it matches an unrelated colour utility in these bundles.)
  • Why it was in the manifest. @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.

What this actually fixes

Not bundle size — the bundle is unchanged. It stops a test dependency being declared as production surface, which matters for the CycloneDX SBOM, for npm ci --omit=dev release installs, and for advisory triage.

An optional peer is satisfied by a devDependency, so nothing breaks — axe-core is still present in node_modules after npm ci (verified), the lock entry just becomes devOptional.

Verification

  • npm ci (npm 10.8.2, matching engines) → exit 0
  • production build → exit 0
  • axe-core still installed in node_modules afterwards → confirmed
  • Diff is 1 line in package.json, 3 in package-lock.json.

⚠️ 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.

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 production
bundle does not contain it — 0 hits for `axe-core`, `axe.run` and axe's
own signature strings (`aria-allowed-attr`, `color-contrast`), while those
strings are present in the installed axe-core (positive control).

What put it in every app manifest is @conduction/nextcloud-vue, which
declares axe-core as an OPTIONAL peerDependency. 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.

Not a bundle-size fix; the bundle is byte-identical. It stops a test
dependency being declared as production surface (SBOM, `npm ci --omit=dev`,
advisory triage). An optional peer is satisfied by a devDependency, so
nothing breaks.

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/openregister @ 47f2510

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-specs
test-l10n
composer ✅ 173/173
npm ✅ 713/713
PHPUnit
Newman
Playwright
Hydra gates

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

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit 1972425 into development Aug 6, 2026
30 checks passed
@rubenvdlinde
rubenvdlinde deleted the chore/axe-core-devdep branch August 6, 2026 13:37
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