Publish packages for each individual API.
See original GitHub issueThis is going to be done in several steps:
- Re-organize the directory structure to map to individual modules (#1167)
- Setup and publish a
googleapis-common
npm module that just contains shared bits that will be used by all packages - Generate a package.json for all of the individual APIs
- Script the
npm publish
process so that each individual package is published along with the larger meta-package
These steps are of course subject to change as we discover things through the process 😃
— UPDATE — We’re down to the last step of actually publishing the individual modules. @alexander-fenster, @jkwlui, and @JustinBeckwith last got together to chat about this, and came to a few conclusions:
State of the world today
- We decide when to run the generator in a somewhat ad-hoc fashion. As someone asks for a release, we cut it.
- We run the generator by having a developer clone the repo, run
npm run generate
, and then submitting a PR with like 1344247584 changes. - After checking in that PR, someone has to submit a new release with releasetool. This will create a new tag. It is almost always semver major (see the fact that we’re on v38).
- The generator is somewhat monolithic. It works by blasting away the
src/apis
directory, and re-creating every API from scratch every time. This makes it easy to detect new APIs, and easy to detect removed APIs.
Where we need to be
- We want a bot that runs the generator(s) nightly. We should use
synthtool
for this. - The bot should submit many PRs - one for each API removed, deleted, or modified.
- The individual commits could use the conventional commit scope as a way to signal which API/package this change applies to
- Some combination of
releasetool
andsemantic-release
could be used to cut individual releases. A scoped tag would be used for each package release from the mono-repo. - The risk of this approach is that the number of tags could get out of control, fast.
- Alternatively, we could approach this similar to the way the gRPC generated libraries work. We create a new GitHub repository for each API, and break the output out of this repo and into the individual package repos.
There’s still a lot to figure out, but I suspect @bcoe is gonna love this problem.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:33
- Comments:19 (10 by maintainers)
Top Results From Across the Web
How to publish NuGet packages | Microsoft Learn
See detailed instructions about how to publish a NuGet package and manage package ownership on nuget.org.
Read more >Publish your backend API typings as an NPM package
In this post I suggest a way to publish your backend API types as an NPM package. The frontend can then depend on...
Read more >Publishing a Package - Software AG Documentation
The APIs associated with the package is published to the destination. * To publish a package. 1. Click Packages in the title ...
Read more >Publish a single package from a project as maven artifact
This class should be "shared", so let's put it in module ProjectA-API. You define API packaging as jar, and you add it in...
Read more >Packages API - GitLab Docs
Get a list of project packages. All package types are included in results. When accessed without authentication, only packages of public projects are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
👋 an update on this long standing issue. There’s work that’s been happening this quarter that will facilitate publishing submodules, using the same release automation we use elsewhere – this project has been bigger than expected, due to some of the constraints:
In terms of time lines, I’m hopeful we’ll be able to start testing individual package publishes within ~2 weeks.
ok @JustinBeckwith - I’ve deleted my comments. I reject censorship and prefer not to participate in a censored forum.