Skip to content

Commit 9aac853

Browse files
committed
Apply Prettier formatting to prune plugin files
1 parent 9449dd1 commit 9aac853

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

lib/plugins/aws/prune.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ class AwsPrune {
100100
}
101101

102102
if (prunedCount > 0) {
103-
log.notice.success(
104-
`Pruned ${prunedCount} layer version${prunedCount === 1 ? '' : 's'}`
105-
);
103+
log.notice.success(`Pruned ${prunedCount} layer version${prunedCount === 1 ? '' : 's'}`);
106104
}
107105
}
108106

@@ -124,9 +122,7 @@ class AwsPrune {
124122
}
125123

126124
if (prunedCount > 0) {
127-
log.notice.success(
128-
`Pruned ${prunedCount} function version${prunedCount === 1 ? '' : 's'}`
129-
);
125+
log.notice.success(`Pruned ${prunedCount} function version${prunedCount === 1 ? '' : 's'}`);
130126
}
131127
}
132128

@@ -236,9 +232,7 @@ class AwsPrune {
236232
}
237233

238234
selectPruneVersionsForFunction(versions, aliases) {
239-
const aliasedVersions = new Set(
240-
aliases.map((alias) => String(alias.FunctionVersion))
241-
);
235+
const aliasedVersions = new Set(aliases.map((alias) => String(alias.FunctionVersion)));
242236

243237
return versions
244238
.map((versionEntry) => versionEntry.Version)

test/unit/lib/plugins/aws/prune.test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ describe('AwsPrune', () => {
105105
{ Version: '4' },
106106
{ Version: '5' },
107107
];
108-
const aliases = [{ FunctionVersion: '1' }, { FunctionVersion: '3' }, { FunctionVersion: '4' }];
108+
const aliases = [
109+
{ FunctionVersion: '1' },
110+
{ FunctionVersion: '3' },
111+
{ FunctionVersion: '4' },
112+
];
109113
const result = awsPrune.selectPruneVersionsForFunction(versions, aliases);
110114
expect(result).to.not.include('$LATEST');
111115
expect(result).to.not.include('1');
@@ -216,6 +220,5 @@ describe('AwsPrune', () => {
216220
pruneFunctionsStub.restore();
217221
pruneLayersStub.restore();
218222
});
219-
220223
});
221224
});

0 commit comments

Comments
 (0)