Skip to content

Commit 1e03883

Browse files
committed
Use __proto__ again
1 parent 9eb7fc4 commit 1e03883

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/commands/optimize.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ type GetOverridesResult = {
7474
overrides: Overrides
7575
}
7676

77-
const getOverridesDataByAgent: Record<Agent, GetOverrides> = {
77+
const getOverridesDataByAgent = <Record<Agent, GetOverrides>>{
78+
__proto__: null,
7879
[BUN](pkgJson: PackageJson) {
7980
const overrides = (pkgJson as any)?.[RESOLUTIONS] ?? {}
8081
return { type: YARN_BERRY, overrides }
@@ -136,6 +137,7 @@ const lockIncludesByAgent: Record<Agent, AgentLockIncludesFn> = (() => {
136137
}
137138

138139
return {
140+
__proto__: null,
139141
[BUN](lockSrc: string, name: string, lockBasename?: string) {
140142
// This is a bit counterintuitive. When lockBasename ends with a .lockb
141143
// we treat it as a yarn.lock. When lockBasename ends with a .lock we
@@ -319,6 +321,7 @@ const updateManifestByAgent: Record<Agent, AgentModifyManifestFn> = (() => {
319321
}
320322

321323
return {
324+
__proto__: null,
322325
[BUN]: updateResolutions,
323326
[NPM]: updateOverrides,
324327
[PNPM](editablePkgJson: EditablePackageJson, overrides: Overrides) {
@@ -388,6 +391,7 @@ const lsByAgent = (() => {
388391
}
389392

390393
return <Record<Agent, AgentListDepsFn>>{
394+
__proto__: null,
391395
async [BUN](agentExecPath: string, cwd: string) {
392396
try {
393397
// Bun does not support filtering by production packages yet.
@@ -479,6 +483,7 @@ const depsIncludesByAgent: Record<Agent, AgentDepsIncludesFn> = (() => {
479483
}
480484

481485
return {
486+
__proto__: null,
482487
[BUN]: matchHumanStdout,
483488
[NPM]: matchQueryStdout,
484489
[PNPM]: matchQueryStdout,

0 commit comments

Comments
 (0)