Skip to content

Add esbuild to bundle the source code#2

Merged
copybara-service[bot] merged 1 commit into
mainfrom
esbuild-support
Aug 29, 2025
Merged

Add esbuild to bundle the source code#2
copybara-service[bot] merged 1 commit into
mainfrom
esbuild-support

Conversation

@kalenkevich
Copy link
Copy Markdown
Collaborator

@kalenkevich kalenkevich commented Aug 29, 2025

Add esbuild to bundle the source code for different targets

Supported targets:

  • node esm
  • node cjs
  • web esm

Tested on:

  • Web webpack
  • Node esm mode (imports)
  • Node cjs mode (require)

crypto.randomUUID

I found it messy to create shims (node + browser) just for randomUUID function. I would like to keep our own implementation for now. I can add shims support in follow up change.

@kalenkevich kalenkevich self-assigned this Aug 29, 2025
Comment thread core/package.json
"@google/genai": "^1.6.0",
"openapi-types": "^12.1.3",
"@opentelemetry/api": "^1.9.0"
"@opentelemetry/api": "^1.9.0",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undo change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it just being sorted asc, I think it does that after each npm install your-dep. So maybe let's keep that

* Generates a random UUID.
*/
const UUID_MASK = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
export function randomUUID() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this, recreating UUID is not a light weight task. fine to start with this, but we need better env based solutions.

Copy link
Copy Markdown
Collaborator

@cornellgit cornellgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test and ci fails, would be good to fix.

we need a more robust UUID solutions if we don't use lib. I still think shim is a good way to approach this.

@kalenkevich kalenkevich force-pushed the esbuild-support branch 4 times, most recently from c8ae34e to 8cdc2f3 Compare August 29, 2025 00:42
@kalenkevich kalenkevich requested a review from cornellgit August 29, 2025 00:43
Copy link
Copy Markdown
Collaborator

@cornellgit cornellgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good for barndon also to double check this.

@cornellgit cornellgit added the ready to pull Ready to pull for final review. label Aug 29, 2025
Supported targets:

node esm
node cjs
web esm
Tested on:

Web webpack
Node esm mode (imports)
Node cjs mode (require)

Fix tests for CI

crypto.randomUUID

I found it messy to create shims (node + browser) just for randomUUID function. I would like to keep our own implementation for now. I can add shims support in follow up change.
@copybara-service copybara-service Bot merged commit c745869 into main Aug 29, 2025
7 checks passed
@kalenkevich kalenkevich deleted the esbuild-support branch October 16, 2025 18:21
@bgauryy bgauryy mentioned this pull request Feb 22, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to pull Ready to pull for final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants