Skip to content

Commit a75956b

Browse files
committed
Rename PACKAGE_LOCK to PACKAGE_LOCK_JSON
1 parent 0077525 commit a75956b

File tree

6 files changed

+32
-32
lines changed

6 files changed

+32
-32
lines changed

.dep-stats.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@socketregistry/is-unicode-supported": "1.0.2",
1010
"@socketregistry/packageurl-js": "1.0.3",
1111
"@socketsecurity/config": "2.1.3",
12-
"@socketsecurity/registry": "1.0.126",
12+
"@socketsecurity/registry": "1.0.127",
1313
"@socketsecurity/sdk": "1.4.5",
1414
"blessed": "0.1.81",
1515
"blessed-contrib": "4.11.0",
@@ -36,7 +36,7 @@
3636
"yoctocolors-cjs": "2.1.2"
3737
},
3838
"devDependencies": {
39-
"@pnpm/lockfile.detect-dep-types": "^1001.0.4"
39+
"@pnpm/lockfile.detect-dep-types": "^1001.0.5"
4040
},
4141
"esm": {
4242
"@octokit/auth-token": "^5.0.0",
@@ -73,7 +73,7 @@
7373
"@socketregistry/is-interactive": "1.0.2",
7474
"@socketregistry/packageurl-js": "1.0.3",
7575
"@socketsecurity/config": "2.1.3",
76-
"@socketsecurity/registry": "1.0.126",
76+
"@socketsecurity/registry": "1.0.127",
7777
"@socketsecurity/sdk": "1.4.5",
7878
"blessed": "0.1.81",
7979
"blessed-contrib": "4.11.0",

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"@socketregistry/is-unicode-supported": "1.0.2",
8080
"@socketregistry/packageurl-js": "1.0.3",
8181
"@socketsecurity/config": "2.1.3",
82-
"@socketsecurity/registry": "1.0.126",
82+
"@socketsecurity/registry": "1.0.127",
8383
"@socketsecurity/sdk": "1.4.5",
8484
"blessed": "0.1.81",
8585
"blessed-contrib": "4.11.0",
@@ -120,7 +120,7 @@
120120
"@cyclonedx/cdxgen": "^11.2.1",
121121
"@eslint/compat": "^1.2.7",
122122
"@eslint/js": "^9.22.0",
123-
"@pnpm/lockfile.detect-dep-types": "^1001.0.4",
123+
"@pnpm/lockfile.detect-dep-types": "^1001.0.5",
124124
"@rollup/plugin-commonjs": "^28.0.3",
125125
"@rollup/plugin-json": "^6.1.0",
126126
"@rollup/plugin-node-resolve": "^16.0.0",

scripts/constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {
99
NPM,
1010
NPX,
1111
PACKAGE_JSON,
12-
PACKAGE_LOCK,
12+
PACKAGE_LOCK_JSON,
1313
SOCKET_SECURITY_SCOPE,
1414
kInternalsSymbol,
1515
[kInternalsSymbol]: { createConstantsObject }
@@ -93,7 +93,7 @@ const lazyRootPackageJsonPath = () =>
9393

9494
const lazyRootPackageLockPath = () =>
9595
// Lazily access constants.rootPath.
96-
path.join(constants.rootPath, PACKAGE_LOCK)
96+
path.join(constants.rootPath, PACKAGE_LOCK_JSON)
9797

9898
const lazyRootPath = () => path.resolve(__dirname, '..')
9999

src/commands/cdxgen/run-cyclonedx.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { logger } from '@socketsecurity/registry/lib/logger'
1010
import constants from '../../constants'
1111
import shadowBin from '../../shadow/npm/bin'
1212

13-
const { NPM, NPX, PACKAGE_LOCK, PNPM, YARN, YARN_LOCK } = constants
13+
const { NPM, NPX, PACKAGE_LOCK_JSON, PNPM, YARN, YARN_LOCK } = constants
1414

1515
const nodejsPlatformTypes = new Set([
1616
'javascript',
@@ -31,7 +31,7 @@ export async function runCycloneDX(yargv: any) {
3131
nodejsPlatformTypes.has(yargv.type) &&
3232
existsSync(`./${YARN_LOCK}`)
3333
) {
34-
if (existsSync(`./${PACKAGE_LOCK}`)) {
34+
if (existsSync(`./${PACKAGE_LOCK_JSON}`)) {
3535
yargv.type = NPM
3636
} else {
3737
// Use synp to create a package-lock.json from the yarn.lock,
@@ -57,7 +57,7 @@ export async function runCycloneDX(yargv: any) {
5757
])
5858
if (cleanupPackageLock) {
5959
try {
60-
await fs.rm(`./${PACKAGE_LOCK}`)
60+
await fs.rm(`./${PACKAGE_LOCK_JSON}`)
6161
} catch {}
6262
}
6363
const fullOutputPath = path.join(process.cwd(), yargv.output)

src/utils/package-environment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import type { SemVer } from 'semver'
2525
const {
2626
BINARY_LOCK_EXT,
2727
BUN,
28-
HIDDEN_PACKAGE_LOCK,
28+
HIDDEN_PACKAGE_LOCK_JSON,
2929
LOCK_EXT,
3030
NPM,
3131
NPM_BUGGY_OVERRIDES_PATCHED_VERSION,
@@ -197,7 +197,7 @@ export async function detectPackageEnvironment({
197197
}: DetectOptions = {}): Promise<EnvDetails | PartialEnvDetails> {
198198
let lockPath = await findUp(Object.keys(LOCKS), { cwd })
199199
let lockName = lockPath ? path.basename(lockPath) : undefined
200-
const isHiddenLockFile = lockName === HIDDEN_PACKAGE_LOCK
200+
const isHiddenLockFile = lockName === HIDDEN_PACKAGE_LOCK_JSON
201201
const pkgJsonPath = lockPath
202202
? path.resolve(
203203
lockPath,

0 commit comments

Comments
 (0)