serverless-esbuild icon indicating copy to clipboard operation
serverless-esbuild copied to clipboard

feat: support non-semver versions in the yarn packager, for example 'github:' references

Open flipscholtz opened this issue 2 years ago • 2 comments

feat: support non-semver versions in the yarn packager, for example 'github:' references, when their parent package is marked 'external'.

Issue here

  • Don't assume the format <name>@<semver> . Use a regex that also returns the correct package name for this format:
@org/package@git+ssh://[email protected]/org/package#tag

(The last @ in this case is part of the URL and does not denote the boundary between package name and version).

  • If the version is not valid semver, optimistically include the package in the yarn packager results, as it may be a github reference for e.g. where semver doesn't always apply.

I verified this fixes the problem in my minimal test repo here, but I'm not sure if this will have unintended side effects. Needs further testing.

flipscholtz avatar Jul 26 '23 13:07 flipscholtz

Hi @flipscholtz . I run the tests for the feature, and they failed, could have a look and is it applyed only for yarn? should it also be implemented for npm and pnpm?

floydspace avatar Jul 26 '23 15:07 floydspace

Hi @flipscholtz . I run the tests for the feature, and they failed, could have a look and is it applyed only for yarn? should it also be implemented for npm and pnpm?

Hi @floydspace I pushed a fix for the tests, they are passing for me now. I am looking at npm and pnpm, will update asap.

flipscholtz avatar Jul 26 '23 15:07 flipscholtz