Skip to content

Commit 8bbbdfe

Browse files
committed
wip
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent dffd67c commit 8bbbdfe

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/_helpers/mime.ts renamed to src/_helpers/mime.node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ SPDX-License-Identifier: Apache-2.0
1717
Copyright (c) OWASP Foundation. All Rights Reserved.
1818
*/
1919

20-
import {parse} from 'node:path'
20+
import { parse as parsePath } from 'node:path'
2121

2222
type MimeType = string
2323

@@ -48,7 +48,7 @@ const LICENSE_FILENAME_EXT = new Set([
4848
])
4949

5050
export function getMimeForLicenseFile(filename: string): MimeType | undefined {
51-
const {name, ext} = parse(filename.toLowerCase())
51+
const {name, ext} = parsePath(filename.toLowerCase())
5252
return LICENSE_FILENAME_BASE.has(name) && LICENSE_FILENAME_EXT.has(ext)
5353
? MIME_TEXT_PLAIN
5454
: MAP_TEXT_EXTENSION_MIME[ext]

src/utils/licenseUtility.node.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
2020
import type NATIVE_FS from 'node:fs'
2121
import type NATIVE_PATH from "node:path";
2222

23-
import {getMimeForLicenseFile} from '../_helpers/mime'
24-
import {AttachmentEncoding} from '../enums/attachmentEncoding'
25-
import {Attachment} from '../models/attachment'
23+
import { getMimeForLicenseFile } from '../_helpers/mime.node'
24+
import { AttachmentEncoding } from '../enums/attachmentEncoding'
25+
import { Attachment } from '../models/attachment'
2626

2727

2828
interface FsUtils {

0 commit comments

Comments
 (0)