---\n"@trigger.dev/cli-v3": patch\n---\n\nfix: ensure .env.local and .env.development.local override .env in CLI to follow standard environment variable precedence conventions.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: replace @bugsnag/cuid with nanoid for edge compatibility (#3147) #3175
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| import { customAlphabet } from "nanoid"; | ||
| import cuid from "@bugsnag/cuid"; | ||
|
|
||
| const idGenerator = customAlphabet("123456789abcdefghijkmnopqrstuvwxyz", 21); | ||
|
|
||
|
|
@@ -8,7 +7,7 @@ export function generateFriendlyId(prefix: string, size?: number) { | |
| } | ||
|
|
||
| export function generateInternalId() { | ||
| return cuid(); | ||
| return idGenerator(); | ||
| } | ||
|
Comment on lines
9
to
11
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚩 nanoid character set is compatible with existing cuid-based database IDs The switch from Was this helpful? React with 👍 or 👎 to provide feedback. |
||
|
|
||
| /** Convert an internal ID to a friendly ID */ | ||
|
|
@@ -58,7 +57,7 @@ export function fromFriendlyId(friendlyId: string, expectedEntityName?: string): | |
| } | ||
|
|
||
| export class IdUtil { | ||
| constructor(private entityName: string) {} | ||
| constructor(private entityName: string) { } | ||
|
|
||
| generate() { | ||
| const internalId = generateInternalId(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Dead
@bugsnag/cuiddependency left in package.json after removing its only importThe
import cuid from "@bugsnag/cuid"was removed frompackages/core/src/v3/isomorphic/friendlyId.ts(the only file that used it), but"@bugsnag/cuid": "^3.1.1"was not removed frompackages/core/package.json:171. This means@bugsnag/cuidis a dead runtime dependency that will still be installed and bundled for all consumers of@trigger.dev/core, adding unnecessary bloat — which is ironic given the PR's stated goal of improving edge compatibility by removing cuid.(Refers to line 171)
Was this helpful? React with 👍 or 👎 to provide feedback.