Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(nodejs): pass --directory packages/<name> to gapic-generator-typescript#6876

Draft
quirogas wants to merge 1 commit into
googleapis:maingoogleapis/librarian:mainfrom
quirogas:fix/nodejs-generator-directory-argquirogas/librarian:fix/nodejs-generator-directory-argCopy head branch name to clipboard
Draft

fix(nodejs): pass --directory packages/<name> to gapic-generator-typescript#6876
quirogas wants to merge 1 commit into
googleapis:maingoogleapis/librarian:mainfrom
quirogas:fix/nodejs-generator-directory-argquirogas/librarian:fix/nodejs-generator-directory-argCopy head branch name to clipboard

Conversation

@quirogas

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a --directory argument to the Node.js generator arguments and updates the corresponding unit tests. The review feedback correctly points out that using filepath.Join will produce platform-specific path separators (backslashes on Windows), which will cause test failures on Windows since the tests expect forward slashes. It is recommended to use fmt.Sprintf to ensure forward slashes are consistently used.

}

args = append(args, "--package-name", derivePackageName(library))
args = append(args, "--directory", filepath.Join("packages", library.Name))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using filepath.Join produces platform-specific path separators (backslashes on Windows). Since this is a path argument for a Node.js tool and the unit tests expect forward slashes, this will cause test failures on Windows. Use fmt.Sprintf to ensure forward slashes are always used.

Suggested change
args = append(args, "--directory", filepath.Join("packages", library.Name))
args = append(args, "--directory", fmt.Sprintf("packages/%s", library.Name))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.