Forráskód Böngészése

Fix: Use node: prefix for built-in modules

Update the import statements for the fs and path modules to use the node: prefix. This is the recommended modern way to import Node.js core modules and improves code clarity, prevents potential naming conflicts, and enhances future compatibility. It also can sometimes help with tree-shaking in bundlers.
Koushik Roy 3 hónapja
szülő
commit
be880778c7
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/index.ts

+ 2 - 2
src/index.ts

@@ -1,7 +1,7 @@
 import { AbortableAsyncIterator } from './utils.js'
 
-import fs, { promises } from 'fs'
-import { resolve } from 'path'
+import fs, { promises } from 'node:fs'
+import { resolve } from 'node:path'
 import { Ollama as OllamaBrowser } from './browser.js'
 
 import type { CreateRequest, ProgressResponse } from './interfaces.js'