Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove dead code #7587

Merged
merged 2 commits into from
Apr 1, 2025
Merged

chore: remove dead code #7587

merged 2 commits into from
Apr 1, 2025

Conversation

avivkeller
Copy link
Member

This PR removes some unused code / dependencies in the apps/site folder.

(I used knip to find a large list, and went through to see what was actually unused).

@Copilot Copilot bot review requested due to automatic review settings March 30, 2025 17:29
@avivkeller avivkeller requested review from a team as code owners March 30, 2025 17:29
Copy link

vercel bot commented Mar 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Mar 30, 2025 5:34pm

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes unused code and dependencies from the apps/site folder to clean up the codebase.

  • Removal of dead type definitions in og.ts and frontmatter.ts
  • Removal of unused helper functions and constants in next.helpers.mjs and next.constants.mjs
  • Removal of dead components and mocks, including withRouterSelect.tsx, ActiveLink.tsx, and mocks files
  • Update to dependency configuration in .github/dependabot.yml

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/site/types/og.ts Removed unused SVG type definition
apps/site/types/frontmatter.ts Removed legacy frontmatter interfaces
apps/site/next.helpers.mjs Removed unused helper functions
apps/site/next.constants.mjs Removed unused regex constant
apps/site/components/withRouterSelect.tsx Removed dead component code
apps/site/components/mocks/next-image.mjs Removed unused mock for next-image
apps/site/components/mocks/client-context.mjs Removed unused client context mock
apps/site/components/Common/ActiveLink.tsx Removed unused component code
.github/dependabot.yml Updated dependency patterns by removing one
Files not reviewed (1)
  • apps/site/package.json: Language not supported

Copy link
Contributor

github-actions bot commented Mar 30, 2025

Unit Test Coverage Report

Title Lines Statements Branches Functions
@node-core/ui-components Coverage: 95%
95.83% (161/168) 77.86% (102/131) 88.57% (31/35)
@nodejs/website Coverage: 87%
84.73% (494/583) 76.03% (165/217) 86.99% (107/123)
Title Tests Skipped Failures Errors Time
@node-core/ui-components 24 0 💤 0 ❌ 0 🔥 4.86s ⏱️
@nodejs/website 156 0 💤 0 ❌ 0 🔥 6.393s ⏱️

Copy link
Member

@araujogui araujogui left a comment

Choose a reason for hiding this comment

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

LGTM. It would be nice if you commit your knip config.

@avivkeller
Copy link
Member Author

It would be nice if you commit your knip config.

npx knip was all I did :-)

@araujogui
Copy link
Member

It would be nice if you commit your knip config.

npx knip was all I did :-)

Oh ok, lgtm then

Copy link
Contributor

github-actions bot commented Apr 1, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 99 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 91 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 92 🔗

@bmuenzenmeyer bmuenzenmeyer added this pull request to the merge queue Apr 1, 2025
Merged via the queue into main with commit 57b6819 Apr 1, 2025
15 checks passed
@bmuenzenmeyer bmuenzenmeyer deleted the chore/remove-dead-code branch April 1, 2025 12:26
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.

4 participants