Skip to content

feat: rename API package to @netlify/api #6247

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

Merged
merged 4 commits into from
May 9, 2025
Merged

Conversation

eduardoboucas
Copy link
Member

Summary

Starts publishing the API client as @netlify/api so that we can repurpose the netlify package for the CLI.

@eduardoboucas eduardoboucas requested a review from a team as a code owner May 7, 2025 09:20
Copy link
Contributor

github-actions bot commented May 7, 2025

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

Copy link
Contributor

github-actions bot commented May 7, 2025

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

@eduardoboucas eduardoboucas requested a review from serhalp May 7, 2025 16:46
Copy link
Contributor

github-actions bot commented May 7, 2025

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

@pieh
Copy link
Contributor

pieh commented May 8, 2025

Starts publishing the API client as @netlify/api so that we can repurpose the netlify package for the CLI.

Is there a plan for how the package name swap will be done? If we want to use netlify package for CLI which up until this change was for API client I can see this causing confusion.

Do we know how to instruct various dependency bumper (dependabot, renovate, etc) to swap package names appropriately so those could automatically do package name swap? For packages we control doing this manually I think is fine even if a bit busy work, but for external consumers this whole thing might cause confusion and potentially problems for them to deal with?

For example for renovate https://docs.renovatebot.com/configuration-options/#replacementname and there is example for when Vercel rebranded from Now ( https://github.com/renovatebot/renovate/blob/866cdb391b78f368ea7c6c9baf62e36343fce2e6/lib/data/replacements.json#L767-L778 ), but I'm not very familiar if there is something potentially more automatic that could just apply to all dependency managers like that

---edit
We might decide to not do anything about it - and that's fine I guess, I just want to make sure this was thought through and not have oopsie later

@eduardoboucas
Copy link
Member Author

@pieh My plan is to keep exporting the same API interface from the new netlify package, so technically it will continue to work in the same way. The main consequence going forward is that the package will get much larger, because it will now contain the whole CLI.

We'll cut a new major and in the change log explain that they should change to @netlify/api.

Copy link
Member

@serhalp serhalp left a comment

Choose a reason for hiding this comment

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

LGTM

@eduardoboucas eduardoboucas enabled auto-merge (squash) May 9, 2025 09:43
Copy link
Contributor

github-actions bot commented May 9, 2025

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

@eduardoboucas eduardoboucas merged commit 27ddc1b into main May 9, 2025
33 checks passed
@eduardoboucas eduardoboucas deleted the feat/rename-api branch May 9, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants