Skip to content

Commit 603ee55

Browse files
chore: lazy-load node:os in builder, delete dogfooding guide
Move the sole `os.tmpdir()` call behind a dynamic import so the entire post-build registry block uses only lazy-loaded deps. Remove docs/dogfooding-guide.md — all 7 action items are resolved. Impact: 1 functions changed, 1 affected
1 parent d3dcad5 commit 603ee55

2 files changed

Lines changed: 2 additions & 104 deletions

File tree

docs/dogfooding-guide.md

Lines changed: 0 additions & 102 deletions
This file was deleted.

src/builder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { createHash } from 'node:crypto';
22
import fs from 'node:fs';
3-
import os from 'node:os';
43
import path from 'node:path';
54
import { loadConfig } from './config.js';
65
import { EXTENSIONS, IGNORE_DIRS, normalizePath } from './constants.js';
@@ -830,7 +829,8 @@ export async function buildGraph(rootDir, opts = {}) {
830829
writeJournalHeader(rootDir, Date.now());
831830

832831
if (!opts.skipRegistry) {
833-
const tmpDir = path.resolve(os.tmpdir());
832+
const { tmpdir } = await import('node:os');
833+
const tmpDir = path.resolve(tmpdir());
834834
const resolvedRoot = path.resolve(rootDir);
835835
if (resolvedRoot.startsWith(tmpDir)) {
836836
debug(`Skipping auto-registration for temp directory: ${resolvedRoot}`);

0 commit comments

Comments
 (0)