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

github npm registry does not allow custom fields on npm view, breaking migrations #10223

Closed
gioragutt opened this issue May 9, 2022 · 5 comments
Labels

Comments

@gioragutt
Copy link
Contributor

Current Behavior

Discussion on slack.

nx migrate relies on npm view to get information about migrations to run from updated packages, specifically by getting the ng-update or nx-migration fields.

However, in the case of packages that reside in the github package registry, its implementation of npm view does not return custom fields.

In that case, getting the package with npm view will not fail since npm view does not throw, so it does not fall back to getting the package with package-manager install.

This results in migrations not being picked up.

Expected Behavior

All packages, including those under the github package registry, should allow migrations.

I've been in contact with the github support team, and it's been communicated that exposing arbitrary package.json fields is not prioritized and will not be implemented any time soon.

Given that, my suggestion is to special-case the npm github package registry to opt out of the npm view behavior.

Steps to Reproduce

Failure Logs

There are no failures, as npm view, in this case, acts as if the package has no migrations.

Environment

This is not an NX issue, so it will happen on all versions with the npm view behavior.

@tremppu
Copy link

tremppu commented Jul 28, 2022

Any updates? Just started using GitHub Packages for our organization and this bug makes life difficult atm...

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Jan 25, 2023
@EkatZaytseva
Copy link

Hey; any update on this? This is definitely not stale as issue is still there.

@github-actions github-actions bot removed the stale label Feb 4, 2023
CNManning added a commit to CNManning/nx that referenced this issue Apr 20, 2023
…ig via 'npm view'

Registries other than npmjs.org may not support obtaining non standard package metadata via 'npm
view'.
In the event that migration config is not returned when using other registries, migration will
fallback to determining config using install.

closed nrwl#16387, nrwl#10223
@AgentEnder
Copy link
Member

This was fixed by #16423

@github-actions
Copy link

github-actions bot commented Jun 4, 2023

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants