Skip to content
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: pass NPM_CONFIG_REGISTRY env variable when bundling functions #3020

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

laktek
Copy link
Contributor

@laktek laktek commented Jan 6, 2025

What kind of change does this PR introduce?

This PR provides the option to set a custom NPM registry using the NPM_CONFIG_REGISTRY environment variable. This is used when deploying functions.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 12642366975

Details

  • 3 of 5 (60.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 59.596%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/functions/deploy/bundle.go 3 5 60.0%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 12626936018: -0.03%
Covered Lines: 7670
Relevant Lines: 12870

💛 - Coveralls

@laktek laktek enabled auto-merge January 6, 2025 23:59
Comment on lines +61 to +62
if custom_registry := os.Getenv("NPM_CONFIG_REGISTRY"); custom_registry != "" {
env = append(env, "NPM_CONFIG_REGISTRY="+custom_registry)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if custom_registry := os.Getenv("NPM_CONFIG_REGISTRY"); custom_registry != "" {
env = append(env, "NPM_CONFIG_REGISTRY="+custom_registry)
if customRegistry := os.Getenv("NPM_CONFIG_REGISTRY"); customRegistry != "" {
env = append(env, "NPM_CONFIG_REGISTRY="+customRegistry)

Just a nitpick on casing

@laktek laktek merged commit 94cf287 into develop Jan 7, 2025
9 checks passed
@laktek laktek deleted the pass-npm-config-registry-env branch January 7, 2025 03:30
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.

3 participants