@llamaindex/env
Advanced tools
Comparing version 0.1.1 to 0.1.2
# @llamaindex/env | ||
## 0.1.2 | ||
### Patch Changes | ||
- efa326a: chore: update package.json | ||
- efa326a: refactor: remove usage of lodash | ||
## 0.1.1 | ||
@@ -4,0 +11,0 @@ |
@@ -1,2 +0,8 @@ | ||
"use strict"; | ||
/** | ||
* Polyfill implementation some node.js APIs. | ||
* | ||
* The code should be compatible with any JS runtime. | ||
* | ||
* @module | ||
*/ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -3,0 +9,0 @@ value: true |
@@ -1,2 +0,6 @@ | ||
"use strict"; | ||
/** | ||
* A filesystem interface that is meant to be compatible with | ||
* the 'fs' module from Node.js. | ||
* Allows for the use of similar interface implementation on different JS runtimes. | ||
*/ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -11,12 +15,6 @@ value: true | ||
}); | ||
const _lodash = /*#__PURE__*/ _interop_require_default(require("lodash")); | ||
function _interop_require_default(obj) { | ||
return obj && obj.__esModule ? obj : { | ||
default: obj | ||
}; | ||
} | ||
class InMemoryFileSystem { | ||
files = {}; | ||
async writeFile(path, content, options) { | ||
this.files[path] = _lodash.default.cloneDeep(content); | ||
this.files[path] = structuredClone(content); | ||
} | ||
@@ -27,3 +25,3 @@ async readFile(path) { | ||
} | ||
return _lodash.default.cloneDeep(this.files[path]); | ||
return structuredClone(this.files[path]); | ||
} | ||
@@ -36,3 +34,3 @@ async access(path) { | ||
async mkdir(path) { | ||
this.files[path] = _lodash.default.get(this.files, path, null); | ||
this.files[path] = this.files[path] ?? null; | ||
} | ||
@@ -39,0 +37,0 @@ async readdir(path) { |
@@ -1,2 +0,8 @@ | ||
import { Sha256 } from "@aws-crypto/sha256-js"; | ||
/** | ||
* Polyfill implementation some node.js APIs. | ||
* | ||
* The code should be compatible with any JS runtime. | ||
* | ||
* @module | ||
*/ import { Sha256 } from "@aws-crypto/sha256-js"; | ||
import pathe from "pathe"; | ||
@@ -3,0 +9,0 @@ import { InMemoryFileSystem } from "./type.js"; |
@@ -1,3 +0,6 @@ | ||
import _ from "lodash"; | ||
/** | ||
* A filesystem interface that is meant to be compatible with | ||
* the 'fs' module from Node.js. | ||
* Allows for the use of similar interface implementation on different JS runtimes. | ||
*/ /** | ||
* A filesystem implementation that stores files in memory. | ||
@@ -7,3 +10,3 @@ */ export class InMemoryFileSystem { | ||
async writeFile(path, content, options) { | ||
this.files[path] = _.cloneDeep(content); | ||
this.files[path] = structuredClone(content); | ||
} | ||
@@ -14,3 +17,3 @@ async readFile(path) { | ||
} | ||
return _.cloneDeep(this.files[path]); | ||
return structuredClone(this.files[path]); | ||
} | ||
@@ -23,3 +26,3 @@ async access(path) { | ||
async mkdir(path) { | ||
this.files[path] = _.get(this.files, path, null); | ||
this.files[path] = this.files[path] ?? null; | ||
} | ||
@@ -26,0 +29,0 @@ async readdir(path) { |
{ | ||
"name": "@llamaindex/env", | ||
"description": "environment wrapper, supports all JS environment including node, deno, bun, edge runtime, and cloudflare worker", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"type": "module", | ||
"types": "dist/type/index.d.ts", | ||
"main": "dist/cjs/index.js", | ||
"keywords": [ | ||
"llm", | ||
"llama", | ||
"openai", | ||
"gpt", | ||
"data science", | ||
"prompt", | ||
"prompt engineering", | ||
"chatgpt", | ||
"machine learning", | ||
"ml", | ||
"embedding", | ||
"vectorstore", | ||
"data framework", | ||
"llamaindex" | ||
], | ||
"exports": { | ||
@@ -62,4 +78,3 @@ ".": { | ||
"@types/lodash": "^4.14.202", | ||
"@types/node": "^20.12.7", | ||
"lodash": "^4.17.21" | ||
"@types/node": "^20.12.7" | ||
}, | ||
@@ -66,0 +81,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
5
21
707
0
8
83986
- Removedlodash@^4.17.21
- Removedlodash@4.17.21(transitive)