Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "depseek", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Seeks for dependency references in JS/TS code", | ||
@@ -50,3 +50,3 @@ "type": "module", | ||
"@antongolub/infra": "workspace:*", | ||
"@types/node": "^20.11.19", | ||
"@types/node": "^20.11.30", | ||
"benchmark": "^2.1.4", | ||
@@ -53,0 +53,0 @@ "deps-regex": "^0.2.0", |
@@ -64,3 +64,3 @@ # depseek | ||
const contents = fs.readFileSync('index.js', 'utf8') | ||
const contents = fs.readFileSync('index.js', 'utf8') // Buffer or string | ||
const deps = depseekSync(contents) | ||
@@ -67,0 +67,0 @@ ``` |
/// <reference types="node" resolution-mode="require"/> | ||
/// <reference types="node" resolution-mode="require"/> | ||
import { Readable } from 'node:stream'; | ||
@@ -20,4 +21,4 @@ export type TCodeRef = { | ||
export declare const requireResolveRe: RegExp; | ||
export declare const depseek: (stream: Readable | string, opts?: TOpts) => Promise<TCodeRef[]>; | ||
export declare const depseekSync: (input: string, opts?: TOpts) => TCodeRef[]; | ||
export declare const patchRefs: (contents: string, patcher: (ref: string) => string) => string; | ||
export declare const depseek: (stream: Readable | string | Buffer, opts?: TOpts) => Promise<TCodeRef[]>; | ||
export declare const depseekSync: (input: string | Buffer, opts?: TOpts) => TCodeRef[]; | ||
export declare const patchRefs: (contents: string | Buffer, patcher: (ref: string) => string) => string; |
@@ -1,1 +0,1 @@ | ||
export * from './depseek.ts'; | ||
export * from './depseek.js'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
16229
275