Skip to content

Commit 44f5bdf

Browse files
committed
Release 4.9.7
1 parent cc1be75 commit 44f5bdf

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cogs",
3-
"version": "4.9.6",
3+
"version": "4.9.7",
44
"type": "module",
55
"author": "Casey Foster <c@sey.me>",
66
"description": "The fast file transform pipeline.",

src/get-target-path.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ export default ({
1717
const oldExt = npath.extname(path);
1818
return setExt(
1919
npath.join(dir, npath.relative(base, path).replace(/\.\./g, '__')),
20-
(fingerprint ? `~${getHash(buffer)}` : '') + (ext[oldExt] || oldExt)
20+
(fingerprint ? `~${getHash(buffer)}` : '') + (ext[oldExt] ?? oldExt)
2121
);
2222
};

src/set-ext.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import npath from 'path';
22

33
export default (path, newExt) => {
4-
if (!newExt) return path;
5-
64
const oldExt = npath.extname(path);
75
if (oldExt) path = path.slice(0, -oldExt.length);
86
return path + newExt;

0 commit comments

Comments
 (0)