-
Notifications
You must be signed in to change notification settings - Fork 87
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
fix: improve package.json lookup for root name #1530
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
orgads
commented
Dec 15, 2023
orgads
force-pushed
the
package-json-lookup
branch
from
January 20, 2024 21:04
aed4208
to
2561e4e
Compare
Rebased. |
sofisl
requested changes
Feb 1, 2024
orgads
force-pushed
the
package-json-lookup
branch
2 times, most recently
from
February 4, 2024 18:51
7173d84
to
13576ae
Compare
@sofisl Please review. |
orgads
force-pushed
the
package-json-lookup
branch
from
February 5, 2024 06:13
13576ae
to
d209b24
Compare
compileProtos seeks for package.json one directory above the one it accepts as input (typically src). Running gapic-generator-typescript with --format=esm, generates the the sources in esm/src, then compileProtos can't find package.json. When package.json is not found, the root name falls back to default and all the packages have the same root. Use walk-up-path, which is also used by npm[1]. Fixes googleapis#1529. [1] https://github.com/npm/config/blob/77a48dbe22/lib/index.js#L632
orgads
force-pushed
the
package-json-lookup
branch
from
February 19, 2024 13:18
d209b24
to
e808529
Compare
Rebased. @sofisl ping. |
orgads
force-pushed
the
package-json-lookup
branch
from
February 19, 2024 13:19
e808529
to
8eb2919
Compare
sofisl
approved these changes
Mar 23, 2024
sofisl
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Mar 23, 2024
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Mar 23, 2024
sofisl
added
automerge: exact
Summon MOG for automerging, but approvals need to be against the latest commit
owlbot:run
Add this label to trigger the Owlbot post processor.
labels
Mar 23, 2024
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Mar 23, 2024
gcf-merge-on-green
bot
removed
the
automerge: exact
Summon MOG for automerging, but approvals need to be against the latest commit
label
Mar 23, 2024
Merged
leahecole
pushed a commit
to leahecole/gax-nodejs
that referenced
this pull request
Mar 27, 2024
compileProtos seeks for package.json one directory above the one it accepts as input (typically src). Running gapic-generator-typescript with --format=esm, generates the the sources in esm/src, then compileProtos can't find package.json. When package.json is not found, the root name falls back to default and all the packages have the same root. Use walk-up-path, which is also used by npm[1]. Fixes googleapis#1529. [1] https://github.com/npm/config/blob/77a48dbe22/lib/index.js#L632 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
compileProtos seeks for package.json one directory above the one it accepts as input (typically src).
Running gapic-generator-typescript with --format=esm, generates the the sources in esm/src, then compileProtos can't find package.json.
When package.json is not found, the root name falls back to default and all the packages have the same root.
Use walk-up-path, which is also used by npm[1].
Fixes #1529.
[1] https://github.com/npm/config/blob/77a48dbe22/lib/index.js#L632
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: