Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@llamaindex/env

Package Overview
Dependencies
Maintainers
5
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@llamaindex/env - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

README.md

7

CHANGELOG.md
# @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 @@

8

dist/cjs/index.polyfill.js

@@ -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

18

dist/cjs/type.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc