Skip to content

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

Open
Kshot3000 wants to merge 1 commit into
IntersectMBO:mainfrom
Kshot3000:chore/standardise-npm
Open

Kshot3000 wants to merge 1 commit 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

This branch has not been deployed

No deployments
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

2 participants