Skip to content

Commit 672c0e0

Browse files
committed
Update dependency from 'global-directory' to 'global-dirs' version 4.0.0, and adjust related imports in the codebase for improved compatibility.
1 parent 819aa45 commit 672c0e0

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

bun.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"filesize-parser": "^1.5.1",
3737
"form-data": "^4.0.2",
3838
"fs-extra": "8",
39-
"global-directory": "^4.0.1",
39+
"global-dirs": "^4.0.0",
4040
"gradle-to-js": "^2.0.1",
4141
"i18next": "^24.2.3",
4242
"isomorphic-git": "^1.30.1",

src/diff.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'path';
22
import * as fs from 'fs-extra';
3-
import globalDirectory from 'global-directory';
3+
import { npm, yarn } from 'global-dirs';
44
import { ZipFile as YazlZipFile } from 'yazl';
55
import { translateOptions } from './utils';
66
import { isPPKBundleFileName, scriptName, tempDir } from './utils/constants';
@@ -9,7 +9,6 @@ import { enumZipEntries, readEntry } from './utils/zip-entries';
99

1010
type Diff = (oldSource?: Buffer, newSource?: Buffer) => Buffer;
1111

12-
const { npm, yarn } = globalDirectory;
1312
export { enumZipEntries, readEntry };
1413

1514
const loadDiffModule = (pkgName: string): Diff | undefined => {

src/utils/latest-version/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import type { RequestOptions as HttpsRequestOptions } from 'https';
88
import { homedir } from 'os';
99
import { dirname, join, parse, resolve as pathResolve } from 'path';
1010
import { URL } from 'url';
11-
import globalDirectory from 'global-directory';
12-
const { npm, yarn } = globalDirectory;
11+
import { npm, yarn } from 'global-dirs';
1312

1413
import registryAuthToken from 'registry-auth-token';
1514
import getRegistryUrl from 'registry-auth-token/registry-url';

0 commit comments

Comments
 (0)