Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jul 24, 2024
1 parent 11614da commit 8488d5b
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions libs/langchain-scripts/src/build_v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,11 +639,17 @@ export async function buildWithTSup() {
// Clean & generate build files
if (pre && shouldGenMaps) {
await Promise.all([
rimraf("dist").catch((e) => {
rimraf("dist", {
retryDelay: 1000,
maxRetries: 5,
}).catch((e) => {
console.error("Error removing dist (pre && shouldGenMaps)");
throw e;
}),
rimraf(".turbo").catch((e) => {
rimraf(".turbo", {
retryDelay: 1000,
maxRetries: 5,
}).catch((e) => {
console.error("Error removing .turbo (pre && shouldGenMaps)");
throw e;
}),
Expand All @@ -654,11 +660,17 @@ export async function buildWithTSup() {
]);
} else if (pre && !shouldGenMaps) {
await Promise.all([
rimraf("dist").catch((e) => {
rimraf("dist", {
retryDelay: 1000,
maxRetries: 5,
}).catch((e) => {
console.error("Error removing dist (pre && !shouldGenMaps)");
throw e;
}),
rimraf(".turbo").catch((e) => {
rimraf(".turbo", {
retryDelay: 1000,
maxRetries: 5,
}).catch((e) => {
console.error("Error removing .turbo (pre && !shouldGenMaps)");
throw e;
}),
Expand All @@ -679,15 +691,24 @@ export async function buildWithTSup() {
// move CJS to dist
await Promise.all([
updatePackageJson(config),
rimraf("dist-cjs").catch((e) => {
rimraf("dist-cjs", {
retryDelay: 1000,
maxRetries: 5,
}).catch((e) => {
console.error("Error removing dist-cjs");
throw e;
}),
rimraf("dist/tests").catch((e) => {
rimraf("dist/tests", {
retryDelay: 1000,
maxRetries: 5,
}).catch((e) => {
console.error("Error removing dist/tests");
throw e;
}),
rimraf("dist/**/tests").catch((e) => {
rimraf("dist/**/tests", {
retryDelay: 1000,
maxRetries: 5,
}).catch((e) => {
console.error("Error removing dist/**/tests");
throw e;
}),
Expand Down

0 comments on commit 8488d5b

Please sign in to comment.