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

refactor: migrate the requirePage patch to ast-grep #287

Merged
merged 5 commits into from
Jan 28, 2025
Merged

refactor: migrate the requirePage patch to ast-grep #287

merged 5 commits into from
Jan 28, 2025

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Jan 27, 2025

@james-elicx I'd like to land that but there is one issue with og: it uses relative paths and that messes with the external in bundle-server.

Could you add one more rule to convert relative path to absolute (in import function expressions)?

Thanks!

Copy link

changeset-bot bot commented Jan 27, 2025

⚠️ No Changeset found

Latest commit: 89fa855

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vicb vicb marked this pull request as draft January 27, 2025 19:45
Copy link

pkg-pr-new bot commented Jan 27, 2025

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/cloudflare@287

commit: 89fa855

@vicb
Copy link
Contributor Author

vicb commented Jan 28, 2025

@james-elicx maybe actually this should rather be an ESBuild plugin as it would solve the issue for .bin and .wasm?module across module, this is not really OG specific - hopefully you have not started on this. I'll try and report.

@vicb vicb marked this pull request as ready for review January 28, 2025 06:20
@vicb
Copy link
Contributor Author

vicb commented Jan 28, 2025

Added a commit to resolve external paths to absolute, ready for review!

@vicb
Copy link
Contributor Author

vicb commented Jan 28, 2025

Thanks for the very helpful review @dario-piotrowicz

I added comments to clarify, PTAL!

@vicb vicb requested a review from dario-piotrowicz January 28, 2025 19:43
Copy link
Contributor

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

Thanks for the updates @vicb

Looks good to me 😄

@vicb vicb merged commit 3b20bc6 into main Jan 28, 2025
7 checks passed
@vicb vicb deleted the ast-grep-2 branch January 28, 2025 21:16
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