Skip to content

Commit 51d297a

Browse files
committed
Rename isSymbolicLinkSync to isSymLinkSync
1 parent 07f769a commit 51d297a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

registry/lib/fs.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ declare const Fs: {
5959
dirname: string,
6060
options?: IsDirEmptyOptions | undefined
6161
) => boolean
62-
isSymbolicLinkSync(filepath: PathLike): boolean
62+
isSymLinkSync(filepath: PathLike): boolean
6363
readDirNames(
6464
dirname: PathLike,
6565
options?: ReadDirOptions | undefined

registry/lib/fs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function isDirEmptySync(dirname, options) {
119119
}
120120

121121
/*@__NO_SIDE_EFFECTS__*/
122-
function isSymbolicLinkSync(filepath) {
122+
function isSymLinkSync(filepath) {
123123
const fs = getFs()
124124
try {
125125
return fs.lstatSync(filepath).isSymbolicLink()
@@ -296,7 +296,7 @@ function writeJsonSync(filepath, json, options) {
296296

297297
module.exports = {
298298
isDirEmptySync,
299-
isSymbolicLinkSync,
299+
isSymLinkSync,
300300
readJson,
301301
readJsonSync,
302302
readDirNames,

scripts/update-test-npm-package-json.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const { glob } = require('fast-glob')
1212
const constants = require('@socketregistry/scripts/constants')
1313
const { joinAnd } = require('@socketsecurity/registry/lib/arrays')
1414
const {
15-
isSymbolicLinkSync,
15+
isSymLinkSync,
1616
remove,
1717
uniqueSync
1818
} = require('@socketsecurity/registry/lib/fs')
@@ -341,7 +341,7 @@ async function linkPackages(packageNames, options) {
341341
}
342342
const origPkgName = resolveOriginalPackageName(sockRegPkgName)
343343
const nmPkgPath = path.join(testNpmNodeModulesPath, origPkgName)
344-
if (isSymbolicLinkSync(nmPkgPath)) {
344+
if (isSymLinkSync(nmPkgPath)) {
345345
if (
346346
realpathSync(nmPkgPath) ===
347347
path.join(testNpmNodeWorkspacesPath, sockRegPkgName)
@@ -533,7 +533,7 @@ async function linkPackages(packageNames, options) {
533533
for (let i = 0, { length } = dirs; i < length; i += 1) {
534534
const crumbs = dirs.slice(0, i + 1)
535535
const destPathDir = path.join(nmPkgPath, ...crumbs)
536-
if (!existsSync(destPathDir) || isSymbolicLinkSync(destPathDir)) {
536+
if (!existsSync(destPathDir) || isSymLinkSync(destPathDir)) {
537537
targetPath = path.join(pkgPath, ...crumbs)
538538
destPath = destPathDir
539539
break

0 commit comments

Comments
 (0)