Skip to content

Commit 7968658

Browse files
committed
chore(format): apply oxfmt + regenerate api-index drift on main
Caught by `pnpm run fix --all` while landing the CI fix. Pure auto-fixes, no behavioural changes: - CLAUDE.md: prefer `_italic_` over `*italic*` (oxfmt's markdown convention). - src/dlx/manifest.ts: collapse a logger.warn() call back to a single line (now fits within line-width). - tsconfig.json + tsconfig.dts.json: break `exclude` arrays onto multiple lines (oxfmt threshold). - docs/api-index.md: add the @socketsecurity/lib/primordials row that should have been generated by `feat(primordials): add @socketsecurity/lib/primordials export and migrate internals` (36f35cb). The index is generated by scripts/fix/generate-api-index.mts during `pnpm run fix`.
1 parent 2116b0c commit 7968658

5 files changed

Lines changed: 19 additions & 6 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Sort lists alphanumerically (literal byte order, ASCII before letters). Apply th
225225

226226
- **Config lists**`permissions.allow` / `permissions.deny` in `.claude/settings.json`, `external-tools.json` checksum keys, allowlists in workflow YAML.
227227
- **Object key entries** — sort keys in plain JSON config + return-shape literals + internal-state objects. (Exception: `__proto__: null` always comes first, ahead of any data keys.)
228-
- **Import specifiers** — sort named imports inside a single statement: `import { encrypt, randomDataKey, wrapKey } from './crypto.mts'`. Imports that say `import type` follow the same rule. Statement *order* is the project's existing convention (`node:` → external → local → types) — that's separate from specifier order *within* a statement.
228+
- **Import specifiers** — sort named imports inside a single statement: `import { encrypt, randomDataKey, wrapKey } from './crypto.mts'`. Imports that say `import type` follow the same rule. Statement _order_ is the project's existing convention (`node:` → external → local → types) — that's separate from specifier order _within_ a statement.
229229
- **Method / function source placement** — within a module, sort top-level functions alphabetically. Convention: private functions (lowercase / un-exported) sort first, exported functions second. The first-line `export` keyword is the divider.
230230
- **Array literals** — when the array is a config list, allowlist, or set-like collection. Position-bearing arrays (e.g. argv, anything where index matters semantically) keep their meaningful order.
231231

docs/api-index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Each entry links to the source module and shows the first sentence of its `@file
3737
| [`@socketsecurity/lib/package-extensions`](../src/package-extensions.ts) | Package extensions for compatibility adjustments. |
3838
| [`@socketsecurity/lib/packages`](../src/packages.ts) | Package registry management with Socket.dev specific utilities. |
3939
| [`@socketsecurity/lib/performance`](../src/performance.ts) | Performance monitoring utilities for profiling and optimization. |
40+
| [`@socketsecurity/lib/primordials`](../src/primordials.ts) | Safe references to built-in functions and constructors. |
4041
| [`@socketsecurity/lib/process-lock`](../src/process-lock.ts) | Process locking utilities with stale detection and exit cleanup. |
4142
| [`@socketsecurity/lib/promise-queue`](../src/promise-queue.ts) | Bounded concurrency promise queue. |
4243
| [`@socketsecurity/lib/promises`](../src/promises.ts) | Promise utilities including chunked iteration and timers. |

src/dlx/manifest.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,7 @@ export class DlxManifest {
392392
try {
393393
safeMkdirSync(manifestDir, { recursive: true })
394394
} catch (e) {
395-
logger.warn(
396-
`Failed to create manifest directory: ${errorMessage(e)}`,
397-
)
395+
logger.warn(`Failed to create manifest directory: ${errorMessage(e)}`)
398396
}
399397

400398
// Write atomically.

tsconfig.dts.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,12 @@
88
"sourceMap": false
99
},
1010
"include": ["src/**/*.ts"],
11-
"exclude": [".cache", "dist/**/*", "lib", "node_modules", "src/**/*.js", "test"]
11+
"exclude": [
12+
".cache",
13+
"dist/**/*",
14+
"lib",
15+
"node_modules",
16+
"src/**/*.js",
17+
"test"
18+
]
1219
}

tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,12 @@
2323
"verbatimModuleSyntax": false
2424
},
2525
"include": ["src/**/*.ts", "src/**/*.d.ts"],
26-
"exclude": [".cache", "dist/**/*", "lib", "node_modules", "src/**/*.js", "test"]
26+
"exclude": [
27+
".cache",
28+
"dist/**/*",
29+
"lib",
30+
"node_modules",
31+
"src/**/*.js",
32+
"test"
33+
]
2734
}

0 commit comments

Comments
 (0)