Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for process.env.TEST not defined #60

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/odd-peaches-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@featureboard/js-sdk': patch
---

Fix for uncaught ReferenceError: process is not defined
6 changes: 3 additions & 3 deletions libs/js-sdk/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"executor": "nx:run-commands",
"options": {
"commands": [
"tsup src/index.ts -d dist --sourcemap --format esm --legacy-output --external @featureboard/contracts",
"tsup src/index.ts -d dist/legacycjs --sourcemap --format cjs --legacy-output --external @featureboard/contracts",
"tsup src/index.ts -d dist --sourcemap --format esm,cjs --external @featureboard/contracts",
"tsup src/index.ts -d dist --sourcemap --format esm --legacy-output --external @featureboard/contracts --env.TEST false",
"tsup src/index.ts -d dist/legacycjs --sourcemap --format cjs --legacy-output --external @featureboard/contracts --env.TEST false",
"tsup src/index.ts -d dist --sourcemap --format esm,cjs --external @featureboard/contracts --env.TEST false",
"tsc --emitDeclarationOnly --declaration --outDir dist"
],
"cwd": "libs/js-sdk",
Expand Down
2 changes: 1 addition & 1 deletion libs/js-sdk/src/utils/retry.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { debugLog } from '../log'

const maxRetries = 5
const initialDelayMs = process.env.TEST ? 1 : 1000
const initialDelayMs = process.env.TEST === 'true' ? 1 : 1000
const backoffFactor = 2

export async function retry<T>(
Expand Down