mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-24 21:15:51 +01:00
fix: Fix the prefix used to delete from s3 when unpublishing packages (#2243)
This commit is contained in:
parent
a54c18c02a
commit
6b1a28deb8
5
.changeset/calm-pants-impress.md
Normal file
5
.changeset/calm-pants-impress.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'verdaccio-aws-s3-storage': patch
|
||||
---
|
||||
|
||||
Fix the prefix used to delete from s3 when unpublishing packages
|
@ -172,7 +172,7 @@ export default class S3PackageManager implements ILocalPackageManager {
|
||||
this.s3,
|
||||
{
|
||||
Bucket: this.config.bucket,
|
||||
Prefix: `${this.packagePath}`,
|
||||
Prefix: addTrailingSlash(this.packagePath),
|
||||
},
|
||||
function (err) {
|
||||
if (err && is404Error(err as VerdaccioError)) {
|
||||
|
@ -231,7 +231,7 @@ describe('S3PackageManager with mocked s3', function () {
|
||||
expect(mockListObject).toHaveBeenCalledWith(
|
||||
{
|
||||
Bucket: 'test-bucket',
|
||||
Prefix: 'testKeyPrefix/@company/test-package',
|
||||
Prefix: 'testKeyPrefix/@company/test-package/',
|
||||
},
|
||||
expect.any(Function)
|
||||
);
|
||||
@ -270,7 +270,7 @@ describe('S3PackageManager with mocked s3', function () {
|
||||
expect(mockListObject).toHaveBeenCalledWith(
|
||||
{
|
||||
Bucket: 'test-bucket',
|
||||
Prefix: 'testKeyPrefix/customFolder/@company/test-package',
|
||||
Prefix: 'testKeyPrefix/customFolder/@company/test-package/',
|
||||
},
|
||||
expect.any(Function)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user