get changelog from npm #24778
Replies: 8 comments 2 replies
-
I think this has enough positives that it's worth doing. Some downsides to note:
In my experience CHANGELOG entries often are updated post-release. Given these points, I wouldn't replace any of our existing logic with this, but instead supplement it just specifically for the npm case. I think we could use it as a fallback for fetching the changelog file if we can't fetch it through our usual means (e.g. it's on a supported platform, and we are able to locate the file). What do you think? |
Beta Was this translation helpful? Give feedback.
-
Sounds great @rarkins! As you said, I think it would be valuable to have npm as a fallback source if the better options (GitHub/GitLab) fail.
That's definitely a drawback, but if this is the last resort then I think showing something is better than nothing. And if the package has a CI process to generate a changelog alongside the release then this won't be an issue. |
Beta Was this translation helpful? Give feedback.
-
Yes, I agree. There are still a few unknowns to explore here - for example we usually try to avoid datasource-specific logic in lib/workers/* files - but I think this is acceptable to move ahead to development with, if you or someone else is willing. |
Beta Was this translation helpful? Give feedback.
-
This will also fix changelog generation for packages in public npm, published from a private repo. I'd be willing to help out. Are you suggesting @rarkins that we just add fetch changelog last attempt in the global changelog fetching logic? Which I think is in: lib/workers/pr/changelog/index.ts ? |
Beta Was this translation helpful? Give feedback.
-
Yes, i think here something like: if (!res) {
res = await sourceUnpkg.getChangeLogJSON({ ...args, releases });
} |
Beta Was this translation helpful? Give feedback.
-
Hi there, Help us by making a minimal reproduction repository. Before we can start work on your issue we first need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. To get started, please read our guide on creating a minimal reproduction to understand what is needed. We may close the issue if you (or someone else) have not provided a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment. Good luck, The Renovate team |
Beta Was this translation helpful? Give feedback.
-
A reproduction is still needed which demonstrates an update where the changelog is not found by Renovate today but is available via npm/unpkg |
Beta Was this translation helpful? Give feedback.
-
I have the same need but not for the same reason. In a closed environment where Renovate only has access to an internal npm registry that is a proxy to npmjs.org (no access to internet, so no access to Github or Gitlab), this could be the solution for retrieving changelogs. Maybe we could have something like "if no github.com token has been configured, then retrieve changelogs from npm" ? |
Beta Was this translation helpful? Give feedback.
-
What would you like Renovate to be able to do?
To be able to fetch the changelog from the npm package itself, if renovate can't find it on GitHub or GitLab.
If npm sees a
CHANGELOG
file, it will always publish it. This makes it potentially a more reliable than searching through the repo for tags, releases or changelog-like files.This had advantages over the current approach because:
repository.directory
in package.json (like@aws-amplify/auth
)typedoc-plugin-markdown
and@aws-amplify/auth
are some examples where the current approach fails, but fetching from NPM would work.Did you already have any implementation ideas?
If getting the changelog from GitHub or GitLab fails, use
Beta Was this translation helpful? Give feedback.
All reactions