File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ import relativeTime from "dayjs/plugin/relativeTime.js";
44import customParseFormat from "dayjs/plugin/customParseFormat.js" ;
55import * as cp from "child_process" ;
66import type { GitHubRepoInfo } from "./types.js" ;
7- import path from "node:path" ;
8- import { fileURLToPath } from "node:url" ;
97
108dayjs . extend ( relativeTime ) ;
119dayjs . extend ( customParseFormat ) ;
@@ -280,21 +278,3 @@ export const CommonUtils = {
280278 return isNaN ( parsed ) ? 0 : parsed ;
281279 } ,
282280} ;
283-
284- export function getFilename ( ) : string {
285- if ( typeof __filename !== "undefined" ) return __filename ;
286- try {
287- const metaUrl = ( 0 , eval ) ( "import.meta.url" ) ;
288- if ( metaUrl ) return fileURLToPath ( metaUrl ) ;
289- } catch { }
290- return path . join ( process . cwd ( ) , "index.js" ) ;
291- }
292-
293- export function getDirname ( ) : string {
294- if ( typeof __dirname !== "undefined" ) return __dirname ;
295- try {
296- const metaUrl = ( 0 , eval ) ( "import.meta.url" ) ;
297- if ( metaUrl ) return path . dirname ( fileURLToPath ( metaUrl ) ) ;
298- } catch { }
299- return process . cwd ( ) ;
300- }
You can’t perform that action at this time.
0 commit comments