-
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
compileProtos: Generating for esm/src uses default root #1529
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Comments
orgads
added
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
labels
Dec 14, 2023
orgads
added a commit
to orgads/gax-nodejs
that referenced
this issue
Dec 15, 2023
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
4 tasks
orgads
added a commit
to orgads/gax-nodejs
that referenced
this issue
Jan 20, 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
orgads
added a commit
to orgads/gax-nodejs
that referenced
this issue
Feb 4, 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
orgads
added a commit
to orgads/gax-nodejs
that referenced
this issue
Feb 4, 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
orgads
added a commit
to orgads/gax-nodejs
that referenced
this issue
Feb 5, 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
orgads
added a commit
to orgads/gax-nodejs
that referenced
this issue
Feb 19, 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
sofisl
added a commit
that referenced
this issue
Mar 23, 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 #1529. [1] https://github.com/npm/config/blob/77a48dbe22/lib/index.js#L632 Co-authored-by: sofisl <[email protected]>
4 tasks
leahecole
pushed a commit
to leahecole/gax-nodejs
that referenced
this issue
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 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
gax-nodejs
version: [email protected]Steps to reproduce
compileProtos esm/src --esm
(generated by https://github.com/googleapis/gapic-generator-typescript when passing--format esm
)The
generateRootName
function tries to locate package.json one directory above the input path, but in this case it should hop through 2 parent directories. I wonder if it makes sense to just usepackage.json
from the current directory, at least when the path is relative and doesn't start with../
.The text was updated successfully, but these errors were encountered: