File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ SPDX-License-Identifier: Apache-2.0
1717Copyright (c) OWASP Foundation. All Rights Reserved.
1818*/
1919
20- import { parse } from 'node:path'
20+ import { parse as parsePath } from 'node:path'
2121
2222type MimeType = string
2323
@@ -48,7 +48,7 @@ const LICENSE_FILENAME_EXT = new Set([
4848] )
4949
5050export 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 ]
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
2020import type NATIVE_FS from 'node:fs'
2121import 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
2828interface FsUtils {
You can’t perform that action at this time.
0 commit comments