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

performance, bundle and standardisation changes #5999

Merged
merged 14 commits into from
Oct 15, 2023

Conversation

ovflowd
Copy link
Member

@ovflowd ovflowd commented Oct 14, 2023

Description

This PR does a few bundles, future-proofing, and performance improvements for the repository.

  • As known, remark-gfm >= 4.0 is pretty much broken for our use-cases and some dependencies (such as next-mdx-remote). It is a given that we don't use GitHub Flavoured Markdown, except for transforming link literals into a elements (aka "auto-link literals").
    • Hence I've grabbed the autolink extension (in mdast) that remark-gfm (or more specifically micromark-util-gfm) uses.
    • This reduces the chance of us accidentally breaking our repository by updating to `remark-gfm >= 4.0) and minimizes the maintainer churn we need to keep an 👀 on that package.
    • This also drastically (somewhat) reduces the amount of bundled packages.
  • This PR removes the C language and CPP language support on Shiki as it is very unlikely that we will use them and they were a big chunk of our bundle size
  • This PR updates the default GitHub Actions Node.js version to v20 (LTS) and updates package.json to support Node.js >= 18.
  • This PR removes non-used packages from our package.json and removes cssnano as right now we have no idea about its impact, but it does use quite a lot of space. (Or at least it has a lot of dependencies)
  • We also adopted a few packages into the new Next.js v13.5 barrel file splitting, which should increase the speed of cold boot/warm boot for edge functions and Next.js bootstrap.

Validation

Builds should work as usual; Deployment should work as usual; Autolinks should still work on Blog posts.

@ovflowd ovflowd requested review from a team as code owners October 14, 2023 12:44
@vercel
Copy link

vercel bot commented Oct 14, 2023

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

Name Status Preview Comments Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2023 10:09am

@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Oct 14, 2023
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Oct 14, 2023
@ovflowd ovflowd added infrastructure Issues/PRs related to the Repository Infra github_actions:pull-request Trigger Pull Request Checks labels Oct 14, 2023
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Oct 14, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 14, 2023

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 96%
95.19% (297/312) 77.77% (56/72) 93.75% (60/64)

Unit Test Report

Tests Skipped Failures Errors Time
31 0 💤 0 ❌ 0 🔥 5.81s ⏱️

@ovflowd ovflowd changed the title meta: changed to node.js v20 performance, bundle and standardisation changes Oct 14, 2023
@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Oct 14, 2023
Copy link
Collaborator

@bmuenzenmeyer bmuenzenmeyer left a comment

Choose a reason for hiding this comment

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

tiny nits - otherwise happy with the bundle improvements ⚖️

COLLABORATOR_GUIDE.md Outdated Show resolved Hide resolved
COLLABORATOR_GUIDE.md Outdated Show resolved Hide resolved
COLLABORATOR_GUIDE.md Outdated Show resolved Hide resolved
next.config.mjs Outdated Show resolved Hide resolved
Co-authored-by: Brian Muenzenmeyer <[email protected]>
Signed-off-by: Claudio W <[email protected]>
@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Oct 15, 2023
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Oct 15, 2023
@ovflowd ovflowd enabled auto-merge October 15, 2023 09:52
@ovflowd ovflowd added this pull request to the merge queue Oct 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Oct 15, 2023
@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Oct 15, 2023
@ovflowd ovflowd enabled auto-merge October 15, 2023 10:08
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Oct 15, 2023
@ovflowd ovflowd added this pull request to the merge queue Oct 15, 2023
Merged via the queue into main with commit 407145e Oct 15, 2023
10 checks passed
@ovflowd ovflowd deleted the meta/performance-bundle-improvements branch October 15, 2023 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Issues/PRs related to the Repository Infra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants