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

Transform fails when using a nightly build of Node #2766

Closed
notpeelz opened this issue Dec 22, 2022 · 1 comment
Closed

Transform fails when using a nightly build of Node #2766

notpeelz opened this issue Dec 22, 2022 · 1 comment

Comments

@notpeelz
Copy link

I'm trying to use esbuild on a nightly build of Node, but I get this error:

Error: Transform failed with 1 error:
error: Invalid version: "20.0.0-nightly2022122151246139e7"

From the looks of it, the version regexp seems a bit too strict:

var versionRegex = regexp.MustCompile(`^([0-9]+)(?:\.([0-9]+))?(?:\.([0-9]+))?$`)

semver.org suggests this regexp:

^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
@evanw
Copy link
Owner

evanw commented Dec 22, 2022

Closing as a duplicate of #2760. This prerelease version of node is not in esbuild’s internal feature database, so it is meaningless to ask for esbuild to accept it. The target setting deliberately only accepts version triples.

@evanw evanw closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2022
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

No branches or pull requests

2 participants