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
refactor: isolate the googleapis-common module #1169
Conversation
.circleci/config.yml
Outdated
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^v[\d.]+$/ | ||
- publish_npm: | ||
requires: | ||
- node6 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
.circleci/config.yml
Outdated
command: cd src/shared | ||
- run: | ||
name: Install modules and dependencies. | ||
command: npm install --unsafe-perm |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/shared/package.json
Outdated
@@ -0,0 +1,38 @@ | |||
{ | |||
"name": "googleapis-common", | |||
"version": "0.0.1", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm mostly concerned about version 0.0.1. Other comments are optional.
Thanks @alexander-fenster - all fixed! |
Since we'll eventually have hundreds of npm modules published from this one repo, we'll need to rethink the current model of tagging and releasing based on the tag. I have no idea how exactly it should be done though (probably worth opening a separate issue to discuss future versioning). |
One step at a time :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea that googleapis-common
would be published as a standalone package, and that this repo is now a monorepo? If so, let's use an established pattern of shared sub-module being in packages/googleapis-common
subdirectory rather than ad-hoc src/shared
. Have you considered spinning off to a separate repo though? If monorepos are the way to go, have you considered using https://github.com/lerna/lerna?
Oh, and next time, can you please sequester autogenerated code changes into a separate commit. Reviewing changes is a lot harder when manual changes are intermixed with gobs of generated changes. |
Great questions!
YES!
I'm 100% on board with that. I am trying to make these changes incrementally. Today, the top level build/test/publish commands will continue to work, exactly as they used to. I'd like to propose landing this first, and working towards the properly named packages. Mostly, I'm worried about breaking the top level build.
Yup! This is a point in time thing. Once I get all the sub-packages working independently, we will remove the top level build and use something like lerna to orchestrate the publish and linking.
Sorry! Will do next time. |
This change entirely isolates the shared code required for all APIs from the rest of the module. It still includes these files in the overall build, but also introduces a lower build specifically for the new module. This is another step on the way to #806.