Skip to content

Commit

Permalink
Merge pull request #60 from arkahna/fix/env-test
Browse files Browse the repository at this point in the history
Fix for process.env.TEST not defined
  • Loading branch information
idadaniels authored Nov 14, 2023
2 parents 17756cf + 1601a44 commit af1dd0d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
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

0 comments on commit af1dd0d

Please sign in to comment.