8000 trace node packages by vicb · Pull Request #835 · opennextjs/opennextjs-aws · GitHub
[go: up one dir, main page]

Skip to content

trace node packages #835

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

Merged
merged 2 commits into from
Apr 18, 2025
Merged

trace node packages #835

merged 2 commits into from
Apr 18, 2025

Conversation

vicb
Copy link
Contributor
@vicb vicb commented Apr 18, 2025

In the cloudflare adapter, we want to copy files used via the "workerd" build conditions.

To be able to do this this PR updates copyTracedFiles to return a map of traced node packages.
It maps the original path of the package to the path in .open-next.

As a follow up, we might integrate that better with the patch system.
Today, applyCodePatches assumes that a patch will update file content.
We could modify applyCodePatches to take a list of Patch.
The Patch class would be instantiated with options, tracedFiles, manifests, nodePackages, nextVersion and have a public apply method.
We could then have derived PatchFileContent, PatchCopyFile, ... classes.

Copy link
changeset-bot bot commented Apr 18, 2025

🦋 Changeset detected

Latest commit: b218400

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch
app-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
pkg-pr-new bot commented Apr 18, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/@opennextjs/aws@835

commit: b218400

Copy link
Contributor
github-actions bot commented Apr 18, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 26.54% 2465 / 9287
🔵 Statements 26.54% 2465 / 9287
🔵 Functions 52.86% 129 / 244
🔵 Branches 73.4% 599 / 816
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/open-next/src/build/copyTracedFiles.ts 0% 0% 0% 0% 1-370
Generated in workflow #1162 for commit b218400 by the Vitest Coverage Report Action

@vicb vicb requested a review from conico974 April 18, 2025 09:20
@conico974
Copy link
Contributor

As a follow up, we might integrate that better with the patch system.
Today, applyCodePatches assumes that a patch will update file content.
We could modify applyCodePatches to take a list of Patch.
The Patch class would be instantiated with options, tracedFiles, manifests, nodePackages, nextVersion and have a public apply method.
We could then have derived PatchFileContent, PatchCopyFile, ... classes.

That's a good idea yeah.
One other improvements that would be great to have would be for ast-grep to avoid parsing the same files multiple times, (but i think it involves changes in ast-grep itself)

@vicb vicb requested a review from conico974 April 18, 2025 10:34
Copy link
Contributor
@conico974 conico974 left a comment

Choose a reason for hiding this comment

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

LGTM Thanks

@vicb
Copy link
Contributor Author
vicb commented Apr 18, 2025

Thanks for the review Nico!
When do you plan the next release?

@vicb vicb merged commit 4761bf5 into main Apr 18, 2025
3 checks passed
@vicb vicb deleted the vicb/tracePkg branch April 18, 2025 11:13
@github-actions github-actions bot mentioned this pull request Apr 15, 2025
@conico974
Copy link
Contributor

@vicb Later today, just let me know if you want to add something in it

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.

2 participants
0