UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

20 lines • 995 B
export declare function isCommonJsFile(path: string): boolean; /** * True when the nearest `package.json` declares `"type": "module"`, which makes a * `.js` file ESM regardless of the syntax it happens to use. The walk stops at a * `node_modules` boundary or the filesystem root, so one package scope cannot leak * into a dependency that has no manifest. A missing manifest keeps walking; a * malformed one is a real error, as in Node. */ export declare function isEsmByPackageType(path: string): boolean; export interface ImportClause { readonly defaultBinding?: string; readonly namespaceBinding?: string; readonly named: readonly { readonly imported: string; readonly local: string; }[]; } export declare function parseImportClause(clause: string): ImportClause | undefined; export declare function rewriteCommonJsImport(clause: string, resolvedId: string, alias: string, attributes?: string): string; //# sourceMappingURL=bun-extension-commonjs.d.ts.map