Skip to content

Commit

Permalink
format, exclude e2e/packaging from workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
csjh committed Nov 29, 2024
1 parent 480c316 commit 4ef7eec
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 946 deletions.
16 changes: 8 additions & 8 deletions e2e/packaging/build-deps-to-tgz.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { glob, copyFile, readdir, rm } from "node:fs/promises";
import path from "node:path";
import { exec } from "node:child_process";
import { promisify } from "node:util";
import { glob, copyFile, readdir, rm } from 'node:fs/promises';
import path from 'node:path';
import { exec } from 'node:child_process';
import { promisify } from 'node:util';

const aexec = promisify(exec);
const __dirname = path.dirname(new URL(import.meta.url).pathname);

for await (const pkg of glob("../../packages/**/package.json", {
exclude: (path) => path.includes("node_modules"),
for await (const pkg of glob('../../packages/**/package.json', {
exclude: (path) => path.includes('node_modules')
})) {
const package_dir = path.dirname(pkg);
const package_name = path.basename(package_dir);
Expand All @@ -16,10 +16,10 @@ for await (const pkg of glob("../../packages/**/package.json", {
// and move the tarball to the root of the project
// with the name `evidence-dev-<package_name>.tgz`

await aexec("pnpm pack", { cwd: package_dir });
await aexec('pnpm pack', { cwd: package_dir });

const files = await readdir(package_dir);
const tarball = files.filter((file) => file.endsWith(".tgz"))[0];
const tarball = files.filter((file) => file.endsWith('.tgz'))[0];
if (tarball === undefined) {
throw new Error(`Could not find tarball for ${package_name}`);
}
Expand Down
Loading

0 comments on commit 4ef7eec

Please sign in to comment.