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

enhance: improve the esm-shim matching #601

Merged
merged 1 commit into from
Nov 23, 2024
Merged

enhance: improve the esm-shim matching #601

merged 1 commit into from
Nov 23, 2024

Conversation

huozhi
Copy link
Owner

@huozhi huozhi commented Nov 23, 2024

Closes #592

@huozhi huozhi merged commit 1a570f7 into main Nov 23, 2024
4 checks passed
@huozhi huozhi deleted the enhance/esm-shim branch November 23, 2024 22:25
@prisis
Copy link

prisis commented Nov 24, 2024

Hey @huozhi

The regex will not work for cases like

let impl = "overwrite";

if (true) {
	impl = "test";
}

require.resolve(impl)

would change it into

(?:^|[^.\w'"`])require(\.resolve)?\(\s*(?:\S.*)?\)

@huozhi
Copy link
Owner Author

huozhi commented Nov 24, 2024

@prisis thanks for reporting, handling the case in #607

@huozhi huozhi mentioned this pull request Nov 24, 2024
huozhi added a commit that referenced this pull request Nov 28, 2024
@huozhi
Copy link
Owner Author

huozhi commented Nov 29, 2024

@prisis This fix is shipped in 5.6.2

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.

[FRQ] - Prevent generating client files
3 participants