Commit 90f8681f authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch...

Merge branch '243550-missing-slash-in-registry-setup-section-of-npm-module-in-gitlab-registry' into 'master'

Add Missing slash in 'Registry setup' section of npm packages

See merge request gitlab-org/gitlab!42360
parents 9c7333f7 03d9c36b
......@@ -84,10 +84,10 @@ export const npmSetupCommand = ({ packageEntity, npmPath }) => (type = NpmManage
const scope = packageEntity.name.substring(0, packageEntity.name.indexOf('/'));
if (type === NpmManager.NPM) {
return `echo ${scope}:registry=${npmPath} >> .npmrc`;
return `echo ${scope}:registry=${npmPath}/ >> .npmrc`;
}
return `echo \\"${scope}:registry\\" \\"${npmPath}\\" >> .yarnrc`;
return `echo \\"${scope}:registry\\" \\"${npmPath}/\\" >> .yarnrc`;
};
export const nugetInstallationCommand = ({ packageEntity }) =>
......
---
title: Add Missing slash in 'Registry setup' section of npm packages
merge_request: 42360
author:
type: changed
......@@ -32,7 +32,7 @@ exports[`NpmInstallation renders all the messages 1`] = `
<code-instruction-stub
copytext="Copy npm setup command"
instruction="echo @Test:registry=undefined >> .npmrc"
instruction="echo @Test:registry=undefined/ >> .npmrc"
label="npm command"
trackingaction="copy_npm_setup_command"
trackinglabel="code_instruction"
......@@ -40,7 +40,7 @@ exports[`NpmInstallation renders all the messages 1`] = `
<code-instruction-stub
copytext="Copy yarn setup command"
instruction="echo \\\\\\"@Test:registry\\\\\\" \\\\\\"undefined\\\\\\" >> .yarnrc"
instruction="echo \\\\\\"@Test:registry\\\\\\" \\\\\\"undefined/\\\\\\" >> .yarnrc"
label="yarn command"
trackingaction="copy_yarn_setup_command"
trackinglabel="code_instruction"
......
......@@ -78,7 +78,7 @@ describe('NpmInstallation', () => {
.at(2)
.props(),
).toMatchObject({
instruction: 'echo @Test:registry=undefined >> .npmrc',
instruction: 'echo @Test:registry=undefined/ >> .npmrc',
multiline: false,
trackingAction: TrackingActions.COPY_NPM_SETUP_COMMAND,
});
......@@ -90,7 +90,7 @@ describe('NpmInstallation', () => {
.at(3)
.props(),
).toMatchObject({
instruction: 'echo \\"@Test:registry\\" \\"undefined\\" >> .yarnrc',
instruction: 'echo \\"@Test:registry\\" \\"undefined/\\" >> .yarnrc',
multiline: false,
trackingAction: TrackingActions.COPY_YARN_SETUP_COMMAND,
});
......
......@@ -62,9 +62,9 @@ describe('Getters PackageDetails Store', () => {
const mavenSetupXmlBlock = generateMavenSetupXml();
const npmInstallStr = `npm i ${npmPackage.name}`;
const npmSetupStr = `echo @Test:registry=${registryUrl} >> .npmrc`;
const npmSetupStr = `echo @Test:registry=${registryUrl}/ >> .npmrc`;
const yarnInstallStr = `yarn add ${npmPackage.name}`;
const yarnSetupStr = `echo \\"@Test:registry\\" \\"${registryUrl}\\" >> .yarnrc`;
const yarnSetupStr = `echo \\"@Test:registry\\" \\"${registryUrl}/\\" >> .yarnrc`;
const nugetInstallationCommandStr = `nuget install ${nugetPackage.name} -Source "GitLab"`;
const nugetSetupCommandStr = `nuget source Add -Name "GitLab" -Source "${registryUrl}" -UserName <your_username> -Password <your_token>`;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment