Skip to content

Commit

Permalink
fix: use latest tag for @snyk/protect
Browse files Browse the repository at this point in the history
  • Loading branch information
maxjeffos committed Jun 24, 2021
1 parent c3c5006 commit 11536d6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function updateSnykProtectDependency(pkg, protecting, version) {
if (!pkg.dependencies) {
pkg.dependencies = {};
}
pkg.dependencies['@snyk/protect'] = `^${version}`;
pkg.dependencies['@snyk/protect'] = `latest`;
} else {
removeDependency(pkg, dependencies, '@snyk/protect');
removeDependency(pkg, devDependencies, '@snyk/protect');
Expand Down
16 changes: 8 additions & 8 deletions test/acceptance/npm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('add(protect)', () => {
'snyk-protect': 'snyk-protect',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
},
snyk: true,
});
Expand All @@ -61,7 +61,7 @@ describe('add(protect)', () => {
'snyk-protect': 'snyk-protect',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
...fixtureDependencies
},
snyk: true,
Expand All @@ -80,7 +80,7 @@ describe('add(protect)', () => {
'prepublish': 'npm run snyk-protect',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
...fixtureDependencies,
},
snyk: true,
Expand All @@ -99,7 +99,7 @@ describe('add(protect)', () => {
'prepublish': 'npm run snyk-protect && npm run build',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
...fixtureDependencies,
},
snyk: true,
Expand All @@ -119,7 +119,7 @@ describe('add(protect)', () => {
'prepare': 'npm run snyk-protect && npm run test',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
...fixtureDependencies,
},
snyk: true,
Expand All @@ -136,7 +136,7 @@ describe('add(protect)', () => {
'prepare': 'npm run snyk-protect',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
},
snyk: true,
});
Expand All @@ -162,7 +162,7 @@ describe('add(protect)', () => {
test: ' && snyk test',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
},
devDependencies: {
snyk: `^${v}`,
Expand Down Expand Up @@ -192,7 +192,7 @@ describe('add(test) and add(protect)', () => {
snyk: `^${v}`,
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
},
snyk: true,
});
Expand Down
18 changes: 9 additions & 9 deletions test/acceptance/yarn.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('add(protect)', () => {
'snyk-protect': 'snyk-protect',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
},
snyk: true,
});
Expand All @@ -61,7 +61,7 @@ describe('add(protect)', () => {
'snyk-protect': 'snyk-protect',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
...fixtureDependencies
},
snyk: true,
Expand All @@ -80,7 +80,7 @@ describe('add(protect)', () => {
'prepublish': 'yarn run snyk-protect',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
...fixtureDependencies,
},
snyk: true,
Expand All @@ -99,7 +99,7 @@ describe('add(protect)', () => {
'prepublish': 'yarn run snyk-protect && yarn run build',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
...fixtureDependencies,
},
snyk: true,
Expand All @@ -119,7 +119,7 @@ describe('add(protect)', () => {
'prepare': 'yarn run snyk-protect && yarn run test',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
...fixtureDependencies,
},
snyk: true,
Expand All @@ -146,7 +146,7 @@ describe('add(protect)', () => {
test: ' && snyk test',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
},
devDependencies: {
snyk: `^${v}`,
Expand All @@ -168,7 +168,7 @@ describe('add(protect)', () => {
prepublish: 'yarn run snyk-protect',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
...fixtureDependencies
},
snyk: true,
Expand All @@ -187,7 +187,7 @@ describe('add(protect)', () => {
prepublish: 'yarn run snyk-protect && yarn run build',
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
...fixtureDependencies
},
snyk: true,
Expand All @@ -214,7 +214,7 @@ describe('add(test) and add(protect)', () => {
snyk: `^${v}`,
},
dependencies: {
'@snyk/protect': `^${v}`,
'@snyk/protect': `latest`,
},
snyk: true,
});
Expand Down
4 changes: 2 additions & 2 deletions test/unit/lib/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe("updateSnykProtectDependency", () => {
lib.updateSnykProtectDependency(pkg, true, "1.650.0");
expect(pkg).toEqual({
dependencies: {
"@snyk/protect": "^1.650.0",
"@snyk/protect": "latest",
},
});
});
Expand All @@ -86,7 +86,7 @@ describe("updateSnykProtectDependency", () => {
lib.updateSnykProtectDependency(pkg, true, "1.650.0");
expect(pkg).toEqual({
dependencies: {
"@snyk/protect": "^1.650.0",
"@snyk/protect": "latest",
},
});
});
Expand Down

0 comments on commit 11536d6

Please sign in to comment.