Skip to content

Commit 4aa4857

Browse files
committed
Format script files for readability
1 parent 421c843 commit 4aa4857

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

scripts/claude.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ import { existsSync, promises as fs } from 'node:fs'
1010
import os from 'node:os'
1111
import path from 'node:path'
1212
import { fileURLToPath } from 'node:url'
13-
13+
import { parseArgs } from '@socketsecurity/lib/argv/parse'
1414
import { deleteAsync as del } from 'del'
1515
import colors from 'yoctocolors-cjs'
1616

17-
import { parseArgs } from '@socketsecurity/lib/argv/parse'
18-
1917
const __dirname = path.dirname(fileURLToPath(import.meta.url))
2018
const rootPath = path.join(__dirname, '..')
2119
const parentPath = path.join(rootPath, '..')

scripts/fix-commonjs-exports.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ async function processDirectory(dir) {
5151
// Fix relative paths ONLY for files in the root dist directory.
5252
// Files in subdirectories (e.g., dist/effects/) need to keep ../ to reference parent modules.
5353
const isRootFile = path.dirname(fullPath) === distDir
54-
if (isRootFile && (content.includes('require("../') || content.includes("require('../"))) {
54+
if (
55+
isRootFile &&
56+
(content.includes('require("../') || content.includes("require('../"))
57+
) {
5558
// After compilation, external/ and constants/ subdirectories are in dist/,
5659
// so root-level files should use ./ instead of ../.
5760
if (content.includes('require("../')) {

0 commit comments

Comments
 (0)