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

Support configuring .npmrc and .yarnrc via service bindings #292

Closed
sophiewigmore opened this issue Jan 3, 2022 · 0 comments · Fixed by #293
Closed

Support configuring .npmrc and .yarnrc via service bindings #292

sophiewigmore opened this issue Jan 3, 2022 · 0 comments · Fixed by #293
Assignees
Labels
enhancement A new feature or request

Comments

@sophiewigmore
Copy link
Member

sophiewigmore commented Jan 3, 2022

Implement paketo-buildpacks/nodejs#396 in the Yarn Install buildpack.

Its somewhat common in Yarn v1 workflows to set configurations via an .npmrc file. It would be helpful for users to be able to pass an .npmrc or a .yarnrc via a service binding into the build context, to support use cases like #244.

Implementation Notes

Unlike the NPM Install use case, we do not need to set the NPM_CONFIG_GLOBALCONFIG environment variable. To leverage this feature, we should simply take the contents of the .npmrc or .yarnrc file passed as a service binding, and make it available in the build container at the .npmrc or .yarnrc global config location. Use yarn config --list in a buildpack-built container to see an enumeration of the locations where yarn looks for config files. The buildpack should not place a .yarnrc or .npmrc file in the app directory as it may override one that's been intentionally provided by the app developer.

This will enable buildpack-users who do not use pack as a platform to make these configuration files available without committing it to the source code repository.

@sophiewigmore sophiewigmore added the enhancement A new feature or request label Jan 3, 2022
@fg-j fg-j changed the title Support configuring .npmrc via service bindings Support configuring .npmrc and .yarnrc via service bindings Jan 3, 2022
@fg-j fg-j self-assigned this Jan 5, 2022
@fg-j fg-j mentioned this issue Jan 14, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants