New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

google-artifactregistry-auth

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-artifactregistry-auth - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

package.json
{
"name": "google-artifactregistry-auth",
"version": "3.0.1",
"version": "3.0.2",
"description": "google-artifactregistry-auth is an npm module that allows you to configure npm to interact with npm repositories stored in Artifact Registry.",

@@ -5,0 +5,0 @@ "main": "./src/main.js",

@@ -16,3 +16,3 @@ // Copyright 2019 Google LLC

const registryRegex = /(@[a-zA-Z0-9-]+:)?registry=https:(\/\/[a-zA-Z0-9-]+[-]npm[.]pkg[.]dev\/.*\/)/;
const registryRegex = /(@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*:)?registry=https:(\/\/[a-zA-Z0-9-]+[-]npm[.]pkg[.]dev\/.*\/)/;
const authTokenRegex = /(\/\/[a-zA-Z0-9-]+[-]npm[.]pkg[.]dev\/.*\/):_authToken=(.*)/;

@@ -19,0 +19,0 @@ const passwordRegex = /(\/\/[a-zA-Z0-9-]+[-]npm[.]pkg[.]dev\/.*\/):_password=(.*)/;

@@ -228,2 +228,29 @@ /**

it('add new scoped with dot', async function(){
fromConfigPath = getConfigPath(`${this.test.title}-from`);
toConfigPath = getConfigPath(`${this.test.title}-to`)
fs.writeFileSync(fromConfigPath, `@my.scope:registry=https://us-west1-npm.pkg.dev/my-project/my-repo/`);
fs.writeFileSync(toConfigPath, ``);
await update.updateConfigFiles(fromConfigPath, toConfigPath, creds);
const gotFrom = fs.readFileSync(fromConfigPath, 'utf8');
const gotTo = fs.readFileSync(toConfigPath, 'utf8');
assert.equal(gotFrom, `@my.scope:registry=https://us-west1-npm.pkg.dev/my-project/my-repo/`);
assert.equal(gotTo, `//us-west1-npm.pkg.dev/my-project/my-repo/:_authToken=abcd`);
});
it('add new scoped starting with tilda', async function(){
fromConfigPath = getConfigPath(`${this.test.title}-from`);
toConfigPath = getConfigPath(`${this.test.title}-to`)
fs.writeFileSync(fromConfigPath, `@~myscope:registry=https://us-west1-npm.pkg.dev/my-project/my-repo/`);
fs.writeFileSync(toConfigPath, ``);
await update.updateConfigFiles(fromConfigPath, toConfigPath, creds);
const gotFrom = fs.readFileSync(fromConfigPath, 'utf8');
const gotTo = fs.readFileSync(toConfigPath, 'utf8');
assert.equal(gotFrom, `@~myscope:registry=https://us-west1-npm.pkg.dev/my-project/my-repo/`);
assert.equal(gotTo, `//us-west1-npm.pkg.dev/my-project/my-repo/:_authToken=abcd`);
});
it('add new to config file does not exist', async function(){

@@ -230,0 +257,0 @@ fromConfigPath = getConfigPath(`${this.test.title}-from`);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc