Skip to content

Commit 2081bc9

Browse files
committed
Use @socketsecurity/registry
1 parent 36bd54f commit 2081bc9

File tree

4 files changed

+43
-198
lines changed

4 files changed

+43
-198
lines changed

.dep-stats.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"@inquirer/prompts": "^7.0.0",
66
"@npmcli/promise-spawn": "^8.0.1",
77
"@socketsecurity/config": "^2.1.3",
8+
"@socketsecurity/registry": "^1.0.2",
89
"@socketsecurity/sdk": "^1.3.0",
910
"blessed": "^0.1.81",
1011
"blessed-contrib": "^4.11.0",
@@ -82,6 +83,7 @@
8283
"@npmcli/promise-spawn": "^8.0.1",
8384
"@socketregistry/hyrious__bun.lockb": "1.0.0",
8485
"@socketsecurity/config": "^2.1.3",
86+
"@socketsecurity/registry": "^1.0.2",
8587
"@socketsecurity/sdk": "^1.3.0",
8688
"ansi-align": "^3.0.1",
8789
"blessed": "^0.1.81",

package-lock.json

Lines changed: 38 additions & 75 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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@npmcli/promise-spawn": "^8.0.1",
4343
"@socketregistry/hyrious__bun.lockb": "1.0.0",
4444
"@socketsecurity/config": "^2.1.3",
45+
"@socketsecurity/registry": "^1.0.2",
4546
"@socketsecurity/sdk": "^1.3.0",
4647
"ansi-align": "^3.0.1",
4748
"blessed": "^0.1.81",

src/commands/optimize.ts

Lines changed: 2 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// import chalk from 'chalk'
22
// import chalkTable from 'chalk-table'
33
import meow from 'meow'
4+
import { getManifestData } from '@socketsecurity/registry'
45

56
//import ora from 'ora'
67
import { printFlagList } from '../utils/formatting'
@@ -27,129 +28,7 @@ const SOCKET_REGISTRY_NAME = '@socketregistry'
2728

2829
const SOCKET_REGISTRY_MAJOR_VERSION = '^1'
2930

30-
const allPackages = [
31-
'abab',
32-
'array-buffer-byte-length',
33-
'array-flatten',
34-
'array-includes',
35-
'array.from',
36-
'array.of',
37-
'array.prototype.at',
38-
'array.prototype.every',
39-
'array.prototype.filter',
40-
'array.prototype.find',
41-
'array.prototype.findlast',
42-
'array.prototype.findlastindex',
43-
'array.prototype.flat',
44-
'array.prototype.flatmap',
45-
'array.prototype.foreach',
46-
'array.prototype.map',
47-
'array.prototype.reduce',
48-
'array.prototype.toreversed',
49-
'array.prototype.tosorted',
50-
'arraybuffer.prototype.slice',
51-
'assert',
52-
'asynciterator.prototype',
53-
'available-typed-arrays',
54-
'date',
55-
'deep-equal',
56-
'define-properties',
57-
'es-aggregate-error',
58-
'es-define-property',
59-
'es-get-iterator',
60-
'es-iterator-helpers',
61-
'es-set-tostringtag',
62-
'es6-object-assign',
63-
'es6-symbol',
64-
'function-bind',
65-
'function.prototype.name',
66-
'get-symbol-description',
67-
'globalthis',
68-
'gopd',
69-
'harmony-reflect',
70-
'has',
71-
'has-property-descriptors',
72-
'has-proto',
73-
'has-symbols',
74-
'has-tostringtag',
75-
'hasown',
76-
'internal-slot',
77-
'is-arguments',
78-
'is-array-buffer',
79-
'is-bigint',
80-
'is-boolean-object',
81-
'is-core-module',
82-
'is-date-object',
83-
'is-generator-function',
84-
'is-map',
85-
'is-nan',
86-
'is-negative-zero',
87-
'is-number-object',
88-
'is-regex',
89-
'is-set',
90-
'is-shared-array-buffer',
91-
'is-string',
92-
'is-symbol',
93-
'is-typed-array',
94-
'is-weakmap',
95-
'is-weakref',
96-
'is-weakset',
97-
'isarray',
98-
'iterator.prototype',
99-
'json-stable-stringify',
100-
'jsonify',
101-
'number-is-nan',
102-
'object-is',
103-
'object-keys',
104-
'object.assign',
105-
'object.entries',
106-
'object.fromentries',
107-
'object.getownpropertydescriptors',
108-
'object.getprototypeof',
109-
'object.groupby',
110-
'object.hasown',
111-
'object.values',
112-
'promise.allsettled',
113-
'promise.any',
114-
'querystringify',
115-
'reflect.getprototypeof',
116-
'reflect.ownkeys',
117-
'regexp.prototype.flags',
118-
'safe-array-concat',
119-
'safe-buffer',
120-
'safe-regex-test',
121-
'safer-buffer',
122-
'set-function-length',
123-
'side-channel',
124-
'string.fromcodepoint',
125-
'string.prototype.at',
126-
'string.prototype.codepointat',
127-
'string.prototype.endswith',
128-
'string.prototype.includes',
129-
'string.prototype.matchall',
130-
'string.prototype.padend',
131-
'string.prototype.padstart',
132-
'string.prototype.repeat',
133-
'string.prototype.replaceall',
134-
'string.prototype.split',
135-
'string.prototype.startswith',
136-
'string.prototype.trim',
137-
'string.prototype.trimend',
138-
'string.prototype.trimleft',
139-
'string.prototype.trimright',
140-
'string.prototype.trimstart',
141-
'typed-array-buffer',
142-
'typed-array-byte-length',
143-
'typed-array-byte-offset',
144-
'typed-array-length',
145-
'typedarray',
146-
'typedarray.prototype.slice',
147-
'unbox-primitive',
148-
'util.promisify',
149-
'which-boxed-primitive',
150-
'which-collection',
151-
'which-typed-array'
152-
] as const
31+
const allPackages = getManifestData('npm')!.map(({ 1: d }) => d.package)
15332

15433
type Overrides = { [key: string]: string | StringKeyValueObject }
15534

0 commit comments

Comments
 (0)