Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add auth support #21
Add auth support #21
Conversation
|
@arcanis could you review this and make sure this will work for pulling and pushing packages to private registries with YARN? |
|
This should be good to go, I verified it works for both GPR and npmjs for Yarn and npm. Note that there are a lot of file changes because I added the github package and lots of node_modules changed as a result. That's not super important though. Files you should be looking at for this review are
|
|
Can we remove the need to specify |
|
@jclem, as mentioned elsewhere that would cause auth to get configured by default. With that said, I think it would be nice to somehow configure this by default for npm users - are you ok pushing this off til past 8/8 though? Can at the very least include an example of authenticating against npm and GPR in the README for this pr though. EDIT: Added some examples to the readme of publishing to npmjs and GPR |
| } | ||
|
|
||
| function writeRegistryToFile(registryUrl: string, fileLocation: string) { | ||
| let scope = core.getInput('scope'); |
stephenmichaelf
Aug 6, 2019
Const + type
Const + type
damccorm
Aug 6, 2019
Author
Contributor
It gets modified so it needs to be let. Added types
It gets modified so it needs to be let. Added types
|
@jclem I'm going to merge. If we decide we need something different for npm users we can add a follow up PR |
| const curContents = fs.readFileSync(fileLocation, 'utf8'); | ||
| curContents.split(os.EOL).forEach((line) => { | ||
| // Add current contents unless they are setting the registry | ||
| if (!line.toLowerCase().startsWith('registry')) { |
joebowbeer
Feb 27, 2020
•
This doesn't seem right. Only the line(s) that is being redefined should be removed.
registry defines the default registry for unscoped dependencies, whereas if scope is provided this function is (re)defining a scoped registry.
This doesn't seem right. Only the line(s) that is being redefined should be removed.
registry defines the default registry for unscoped dependencies, whereas if scope is provided this function is (re)defining a scoped registry.
No description provided.