Skip to content

Commit

Permalink
fix: cjs check
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Feb 12, 2025
1 parent f6fce8e commit 75d0050
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion e2e/node/smoke.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import assert from "node:assert";
import { execSync } from "node:child_process";
import { mkdir, rm, writeFile } from "node:fs/promises";
import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
import { createRequire } from "node:module";
import { resolve } from "node:path";
import { test } from "node:test";
import { testRootDir } from "./utils.js";
Expand Down Expand Up @@ -84,3 +86,13 @@ main().catch(console.error)`;
});
}
});

test('no extra deps in "@llamaindex/env" cjs module', async () => {
const modules = ["@aws-crypto/sha256-js"];
const require = createRequire(import.meta.url);
const envPackage = require.resolve("@llamaindex/env");
const file = await readFile(envPackage, "utf-8");
for (const module of modules) {
assert.ok(!file.includes(module));
}
});

0 comments on commit 75d0050

Please sign in to comment.