Skip to content

chore: add missing npm engine constraint to stats/base/dists/*/ctor#11686

Merged
kgryte merged 1 commit intodevelopfrom
philipp/drift-stats-base-dists-uniform-2026-04-21
Apr 21, 2026
Merged

chore: add missing npm engine constraint to stats/base/dists/*/ctor#11686
kgryte merged 1 commit intodevelopfrom
philipp/drift-stats-base-dists-uniform-2026-04-21

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

@Planeshifter Planeshifter commented Apr 21, 2026

Description

Adds the missing "npm": ">2.7.0" entry to the engines field in the package.json of every distribution-constructor package under @stdlib/stats/base/dists/*/ctor. All 34 ctor packages specified only "node": ">=0.10.0" while 5,418 of 5,469 (99.07%) @stdlib/* packages specify both node and npm engines. Root cause is template-copy drift in the distribution-constructor scaffold.

Changes

Applied a uniform edit to 34 files — one package.json per distribution constructor:

   "engines": {
-    "node": ">=0.10.0"
+    "node": ">=0.10.0",
+    "npm": ">2.7.0"
   },

Packages updated (34):

arcsine, bernoulli, beta, betaprime, binomial, cauchy, chi, chisquare, cosine, degenerate, discrete-uniform, erlang, exponential, f, frechet, gamma, geometric, gumbel, hypergeometric, invgamma, kumaraswamy, laplace, levy, logistic, lognormal, negative-binomial, normal, pareto-type1, poisson, rayleigh, t, triangular, uniform, weibull.

No behavior, signatures, tests, or docs are affected. The diff on every file is identical (+2 / -1).

How this was found

A majority-vote drift pass over the 14 members of @stdlib/stats/base/dists/uniform flagged uniform/ctor as missing the npm engine constraint (13/14 = 93% conformance within the namespace). A follow-up codebase-wide audit over 5,469 @stdlib/* packages revealed the same drift across every stats/base/dists/*/ctor package — a template-copy pattern:

engines shape Count
{"node": ">=0.10.0", "npm": ">2.7.0"} 5,418
{"node": ">=0.10.0"} ← drift 34
Other (non-standard node constraint, all include npm) 18

All 34 offenders are stats/base/dists/*/ctor packages; no other namespace exhibits the drift.

Related Issues

None.

Questions

None.

Other

The uniform namespace drift routine also surfaced uniform/mgf as missing the "probability" keyword (13/14 siblings within the namespace). A cross-distribution check revealed only 2 of 21 other stats/base/dists/*/mgf packages (cosine, degenerate) include "probability" — the uniform namespace convention appears to be a local template-copy, not a cross-distribution norm. That correction was dropped from this PR.

Checklist

AI Assistance

  • Yes
  • No

Used AI assistance for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored end-to-end by Claude Code running a cross-package API drift detection routine, extended with a codebase-wide audit of the engines field. The scope expanded from one package (uniform/ctor) to 34 after discovery that the drift pattern covered every stats/base/dists/*/ctor package. All changes are identical, mechanical package.json edits with no behavioral impact; maintainer audit still recommended before promoting out of draft.


@stdlib-js/reviewers

@Planeshifter Planeshifter force-pushed the philipp/drift-stats-base-dists-uniform-2026-04-21 branch from 58d536c to f69824c Compare April 21, 2026 03:25
@Planeshifter Planeshifter changed the title style: align outliers in stats/base/dists/uniform with namespace majority chore: align package.json metadata in stats/base/dists/uniform/{mgf,ctor} Apr 21, 2026
@Planeshifter Planeshifter force-pushed the philipp/drift-stats-base-dists-uniform-2026-04-21 branch from f69824c to 631f2d6 Compare April 21, 2026 03:44
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Apr 21, 2026
Adds `"npm": ">2.7.0"` to the `engines` field in the `package.json` of every distribution constructor package under `@stdlib/stats/base/dists/*/ctor`. All 34 constructor packages had only `"node": ">=0.10.0"` while 99% of `@stdlib/*` packages (5,418 of 5,469) specify both `node` and `npm` engines. Root cause is template-copy drift in the distribution-constructor scaffold; no behavior, signatures, tests, or docs are affected.

Packages updated: arcsine, bernoulli, beta, betaprime, binomial, cauchy, chi, chisquare, cosine, degenerate, discrete-uniform, erlang, exponential, f, frechet, gamma, geometric, gumbel, hypergeometric, invgamma, kumaraswamy, laplace, levy, logistic, lognormal, negative-binomial, normal, pareto-type1, poisson, rayleigh, t, triangular, uniform, weibull.
@Planeshifter Planeshifter force-pushed the philipp/drift-stats-base-dists-uniform-2026-04-21 branch from 631f2d6 to 24701a0 Compare April 21, 2026 03:47
@Planeshifter Planeshifter changed the title chore: align package.json metadata in stats/base/dists/uniform/{mgf,ctor} chore: add missing npm engine constraint to stats/base/dists/*/ctor Apr 21, 2026
@Planeshifter Planeshifter marked this pull request as ready for review April 21, 2026 03:48
@Planeshifter Planeshifter requested review from a team and kgryte April 21, 2026 03:48
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

No coverage information available.

@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Apr 21, 2026
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Apr 21, 2026
@kgryte kgryte merged commit 187e141 into develop Apr 21, 2026
37 checks passed
@kgryte kgryte deleted the philipp/drift-stats-base-dists-uniform-2026-04-21 branch April 21, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants