Skip to content

chore: standardise website/ on npm and delete the duplicate lockfiles - #365

Merged
IanoNjuguna merged 5 commits into
IntersectMBO:mainfrom
Kshot3000:chore/standardise-npm
Nov 11, 2026
Merged

IanoNjuguna merged 5 commits into
IntersectMBO:mainfrom
Kshot3000:chore/standardise-npm

Conversation

@Kshot3000

Copy link
Copy Markdown
Contributor

Fixes #337 — standardises website/ on npm and deletes the duplicate lockfiles.

What changed

  • Deleted website/yarn.lock and the stray root package-lock.json (an empty packages: {} lock with no matching manifest). website/package-lock.json is now the only tracked lockfile — the one CI actually installs from. This is the duplication that double-counted the braces advisory as alerts 259 + 260 and produced the false node-forge alert 261 from a lockfile CI never installs; both should close on the post-merge Dependabot scan.
  • website/package.json: removed the "packageManager": "yarn@…" declaration and the yarn-only resolutions block. Nothing is lost: I verified resolutions and the npm overrides block are identical — same 32 pins, key for key — before deleting.
  • Docs describe npm only:
    • website/README.md — npm install, npm run start:dev (with a note that npm start is a full production build + serve, not the dev server), npm run build, npm run audit. The deployment section no longer tells contributors to yarn deploy to gh-pages by hand; it points at the deploy workflow that runs on push to main.
    • CONTRIBUTING.md — prerequisites are npm (not "npm or yarn"), and the local-server step is npm run start:dev.
    • website/SECURITY.md — one line in the same spirit: commit package.json and package-lock.json together (it previously told contributors to commit yarn.lock too, which would reintroduce the duplicate).
  • Guard against regression: pr-build-website.yml gains a step that fails the PR build if any tracked yarn.lock / pnpm-lock.yaml, or a root package-lock.json, exists — and the workflow's path triggers now include lockfile paths outside website/** so a root-level lockfile PR runs the gate too.

Verification

  • Guard tested both ways locally against the index: clean tree → no extra lockfiles (pass); website/yarn.lock force-added back → guard reports it (fail).
  • website/package.json parses as valid JSON after the deletions; the diff is deletions-only there (35 lines).
  • The workflow file parses as valid YAML.
  • The website build itself runs in this PR's own pr-build-website check (npm ci + npm run build from the surviving lockfile).

Notes


Built as an independent Cardano community contributor — not affiliated with the Cardano Foundation, IOG or Intersect.

@Kshot9000 · https://x.com/kshot9000
ADA: addr1q8hnl6vl5a6k3rw3n5g3jtte696zcl76kfatzv7gpswa9r0dj7fma6klq55y4ffm7tf0em09udnyhuk4ah92pl5x9jpqjae44v

cc @cardano-foundation @IntersectMBO

…IntersectMBO#337)

- Delete website/yarn.lock and the stray root package-lock.json, leaving website/package-lock.json as the only tracked lockfile — the duplicate was why Dependabot double-counted the braces advisory (alerts 259/260) and reported node-forge from a lockfile CI never installs (alert 261).
- Remove packageManager (yarn) and the yarn-only resolutions block from website/package.json; overrides already carries the identical 32 pins for npm (verified key-for-key), so nothing is lost.
- Docs now describe npm only: website/README.md (npm install, npm run start:dev, npm run build; deployment section now points at the deploy workflow instead of manual yarn deploy to gh-pages), CONTRIBUTING.md (npm, npm run start:dev), and website/SECURITY.md (commit package.json + package-lock.json together).
- Guard in pr-build-website.yml fails the PR build if any yarn.lock / pnpm-lock.yaml or a root package-lock.json is tracked again, and the workflow now also triggers on lockfile paths outside website/.

Acceptance criteria for IntersectMBO#337: only website/package-lock.json tracked; no packageManager/resolutions; README + CONTRIBUTING npm-only; guard fails on a reintroduced lockfile (tested both ways locally). The Dependabot alert closure follows the post-merge scan.
@Kshot3000
Kshot3000 force-pushed the chore/standardise-npm branch from cba7397 to 4e58a7d Compare October 18, 2026 10:48
@Kshot3000

Copy link
Copy Markdown
Contributor Author

Rebased onto main now that #342 has merged — the one conflict was in CONTRIBUTING.md (adjacent prerequisite lines) and is resolved keeping both changes: the Node 22 / .nvmrc prerequisite from #342 and this PR's npm-only wording. Head is now 4e58a7d; the PR is mergeable again.

@IanoNjuguna

Copy link
Copy Markdown
Contributor

Hey Kyle, Going to review this before merging.

@Kshot3000

Kshot3000 commented Oct 18, 2026 via email

Copy link
Copy Markdown
Contributor Author

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Is this pull request abandoned? It had no activity for 21 days. It has been marked stale and will be closed in 7 days if no further activity occurs. Add a comment or push a commit to keep it open. See TRIAGE.md for our triage cadence.

@github-actions github-actions Bot added the stale Applied automatically after prolonged inactivity label Nov 9, 2026
@Ranchhand87

Copy link
Copy Markdown
Contributor

Ping @IanoNjuguna @danbaruka

@danbaruka

Copy link
Copy Markdown
Member

Hi @Kshot3000,

This is the right fix for #337. resolutions and overrides are the same 32 pins on main, so dropping resolutions and website/yarn.lock loses nothing.

@danbaruka danbaruka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the right fix for #337. resolutions and overrides are the same 32 pins on main, so dropping resolutions and website/yarn.lock loses nothing.

@github-actions github-actions Bot removed the stale Applied automatically after prolonged inactivity label Nov 11, 2026
Conflicts:
- CONTRIBUTING.md: keep upstream's Node 22.23.4 prerequisite text, keep the
  npm-only package manager line from this branch.
- website/SECURITY.md: keep the single-lockfile commit rule from this branch,
  keep upstream's new Node runtime section, and correct that section's claim
  that packageManager still declares Yarn 1.22.22.
The pin narrative still described `resolutions` as a live, kept-in-sync block.
With yarn gone from the repo, `overrides` is the only pin mechanism CI applies.
Resolutions:
- website/yarn.lock: modified upstream, deleted here. Deletion wins, npm is
  the only installer.
- website/package.json: upstream's November override values are kept as-is
  (33 pins, verified identical to the resolutions block they replace);
  packageManager and resolutions stay removed.
- website/SECURITY.md: upstream's November pin table and residual finding are
  kept; the two sentences that described resolutions as live, and the one that
  pointed readers at a second block, now describe overrides only.
The skill blocked exactly the change this branch makes, and its preferred
workflow (yarn add) writes yarn.lock and never package-lock.json, so following
it produced a PR that fails npm ci. It now enforces the standard the workflows
actually run: one lockfile, npm ci, pins in overrides.
@IanoNjuguna

Copy link
Copy Markdown
Contributor

Conflicts resolved on main and pushed to this branch.

How each one was resolved:

  • website/yarn.lock: modify/delete. Main changed it twice this morning (8e3e24c, 5e7d6d5 hand-edited both lockfiles), this branch deletes it. The deletion stands.
  • website/package.json: kept main's November overrides values (33 pins, checked key-for-key against the resolutions block they replace, zero drift) and left packageManager and resolutions removed.
  • website/SECURITY.md: kept main's November pin table and the deepmerge residual finding, and rewrote the three sentences that still described resolutions as a live block.

Those two hand edits on main this morning are the case for this PR: every dependency change was being written into two lockfile formats by hand, and one of them was not installable (yarn install --frozen-lockfile fails on main since October, @types/node@26.6.5 in the lock against ^25.5.2 in the manifest).

One addition, since it was the last thing contradicting the change: .agents/skills/harun-review told reviewers to block "changes that switch packageManager away from Yarn", and its preferred workflow (yarn add) writes yarn.lock and never package-lock.json, which is exactly the failure this PR removes. It now describes npm as the standard, keeps the bun ban, and sends pins to overrides.

Verified on the merged tree: guard passes, npm ci exit 0, npm run build exit 0, npm audit reports 5 low and nothing high or moderate.

@Kshot3000 your commit is untouched and still authored by you. The merge commit and the skill edit are mine, so if you want either worded differently, say so.

@IanoNjuguna IanoNjuguna left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. website/ is npm from here on: one lockfile (website/package-lock.json), pins in overrides

@IanoNjuguna
IanoNjuguna merged commit 65a3cdf into IntersectMBO:main Nov 11, 2026
4 checks passed
@Kshot3000

Kshot3000 commented Nov 11, 2026 via email

Copy link
Copy Markdown
Contributor Author

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.

Standardise website/ on npm and delete the duplicate lockfile

4 participants