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

fix: support variations of tarball URLs when .npmrc has registry settings #203

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

gregmagolan
Copy link
Member

@gregmagolan gregmagolan commented Jun 14, 2022

variations supported

  registry.npmjs.org/@types/estree/0.0.51:
    resolution: {integrity: sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==, tarball: '@types/estree/-/estree-0.0.51.tgz'}
    name: '@types/estree'
    version: 0.0.51
    dev: true

  registry.npmjs.org/@types/estree/0.0.39:
    resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==, registry: https://registry.yarnpkg.com/, tarball: '@types/estree/-/estree-0.0.39.tgz'}
    name: '@types/estree'
    version: 0.0.39
    dev: true

  registry.npmjs.org/@types/node/16.11.36:
    resolution: {integrity: sha512-FR5QJe+TaoZ2GsMHkjuwoNabr+UrJNRr2HNOo+r/7vhcuntM6Ee/pRPOnRhhL2XE9OOvX9VLEq+BcXl3VjNoWA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@types/node/-/node-16.11.36.tgz}
    name: '@types/node'
    version: 16.11.36
    dev: true

the first can be generated by pnpm 6.x; the last one is what is generated by pnpm 7.1.7 given an .npmrc

@types:registry=https://registry.yarnpkg.com

@gregmagolan gregmagolan requested a review from alexeagle June 14, 2022 16:51
@@ -0,0 +1 @@
@types:registry=https://registry.yarnpkg.com
Copy link
Member

Choose a reason for hiding this comment

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

Comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

url = tarball
else:
# pnpm will omit the registry component from the tarball value when it is configured
# via an .npmrc registry setting for the package. We prefix with the npm registry
Copy link
Member

Choose a reason for hiding this comment

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

Why don't we read .npmrc to get a correct answer? Todo for that ?

Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like in pnpm 7.x it has been improved so the URL is included so the fix would just be fox 6.x

Copy link
Member

Choose a reason for hiding this comment

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

Then print a warning and suggest upgrade?

Copy link
Member Author

Choose a reason for hiding this comment

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

@gregmagolan gregmagolan force-pushed the registry_fixes branch 4 times, most recently from 8f92fff to e8e6840 Compare June 14, 2022 17:15
@gregmagolan gregmagolan merged commit fbd0fd0 into aspect-build:main Jun 14, 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

Successfully merging this pull request may close these issues.

2 participants