@@ -4,23 +4,26 @@ import path from 'node:path'
4
4
import spawn from '@npmcli/promise-spawn'
5
5
import EditablePackageJson from '@npmcli/package-json'
6
6
import { getManifestData } from '@socketsecurity/registry'
7
- //import cacache from 'cacache'
7
+ import {
8
+ hasOwn ,
9
+ objectFromEntries ,
10
+ toSortedObject
11
+ } from '@socketsecurity/registry/lib/objects'
12
+ import { fetchPackageManifest } from '@socketsecurity/registry/lib/packages'
13
+ import { pEach } from '@socketsecurity/registry/lib/promises'
14
+ import { escapeRegExp } from '@socketsecurity/registry/lib/regexps'
15
+ import { isNonEmptyString } from '@socketsecurity/registry/lib/strings'
8
16
import meow from 'meow'
9
17
import npa from 'npm-package-arg'
10
18
import ora from 'ora'
11
19
import semver from 'semver'
12
20
import { glob as tinyGlob } from 'tinyglobby'
13
21
import { parse as yamlParse } from 'yaml'
14
22
15
- import { fetchPackageManifest } from '@socketsecurity/registry/lib/packages'
16
23
import { commonFlags } from '../flags'
17
24
import { printFlagList } from '../utils/formatting'
18
25
import { existsSync } from '../utils/fs'
19
- import { hasOwn , toSortedObject } from '@socketsecurity/registry/lib/objects'
20
26
import { detect } from '../utils/package-manager-detector'
21
- import { pEach } from '@socketsecurity/registry/lib/promises'
22
- import { escapeRegExp } from '@socketsecurity/registry/lib/regexps'
23
- import { isNonEmptyString } from '@socketsecurity/registry/lib/strings'
24
27
25
28
import type { Content as NPMCliPackageJson } from '@npmcli/package-json'
26
29
import type { ManifestEntry } from '@socketsecurity/registry'
@@ -618,7 +621,7 @@ async function addOverrides(
618
621
} )
619
622
}
620
623
if ( state . added . size > 0 || state . updated . size > 0 ) {
621
- editablePkgJson . update ( < NPMCliPackageJson > Object . fromEntries ( depEntries ) )
624
+ editablePkgJson . update ( < NPMCliPackageJson > objectFromEntries ( depEntries ) )
622
625
for ( const { overrides, type } of overridesDataObjects ) {
623
626
updateManifestByAgent [ type ] ( editablePkgJson , toSortedObject ( overrides ) )
624
627
}
0 commit comments