Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

This PR migrates the entire project infrastructure from Node.js (v24) to Deno (v2.5+). Key changes include:

  • Configuration: package.json and package-lock.json are removed. deno.json is introduced to manage tasks, imports, and configuration. mise.toml is updated to include deno.
  • Build System: The tools/build.bash script is replaced by tools/build.ts, a TypeScript script running directly in Deno that invokes esbuild with the @luca/esbuild-deno-loader plugin to bundle the application for the browser.
  • Source Code: All imports in src/, lib/, and tools/ are updated to use explicit .ts extensions. Node.js globals like process and Buffer are imported from node: specifiers where necessary, or replaced with standard Web APIs (globalThis).
  • Testing: jest is removed. Tests in src/test/ are rewritten to use Deno's Deno.test and the @std/expect, @std/testing/mock, and @std/testing/time libraries. Logic in tests like cache-holder.test.ts and throttled-invoker.test.ts is adjusted to work correctly with Deno's FakeTime.
  • Linting/Formatting: Switched to deno lint and deno fmt.

Verification:

  • deno task build:ts passes and generates bundles in public/.
  • deno test passes all tests in src/test/.
  • deno lint reports no errors (after fixes).
  • build:json:* tasks fail as expected due to missing local.json (user instruction to ignore).

PR created automatically by Jules for task 4852866305107402981 started by @kui

- Replaced package.json with deno.json
- Migrated build scripts from bash/tsx to Deno + esbuild (tools/build.ts)
- Updated source code imports to include .ts extensions and use npm: specifiers
- Migrated tests from Jest to Deno native test runner (@std/testing)
- Replaced Node.js globals (process, Buffer) with node: imports or Deno equivalents
- Fixed linting issues and updated types
- Configured esbuild with @luca/esbuild-deno-loader for resolving npm dependencies
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

Defines rules for:
- No unauthorized PR submissions.
- Atomic commits.
- Replaces `actions/setup-node` with `denoland/setup-deno@v2`
- Updates node-based commands (npm) to deno task commands
- Fixes `push-ci.yml` and `pages.yml` to use Deno environment
- Replaces `actions/setup-node` with `denoland/setup-deno@v2`
- Updates node-based commands (npm) to deno task commands
- Fixes `push-ci.yml` and `pages.yml` to use Deno environment
Adds "ci": "deno task lint && deno task test" to deno.json to support CI workflows.
- Exclude `public/` from lint/fmt in `deno.json` to fix CI timeout/failures.
- Format all code with `deno fmt`.
- Update `README.md` with Deno instructions.
- Update `AGENTS.md` with strict CI passing rule.
- Migrate `Deno.*` usage to `node:process` equivalents.
- Replace `glob` package with `jsr:@std/fs/expand-glob`.
- Reformat code to default Deno style (removing custom formatting rules).
- Exclude `public/` from lint/fmt in `deno.json`.
- Remove `glob` dependency.
- Refactor: Use Node.js globals and expandGlob (includes formatting changes to pass lint).
- Update AGENTS.md with stricter Atomic Commit rules.
- Migrate Deno.* to process.*
- Replace glob with expandGlob
- Update deno.json
- Apply deno fmt (all files)
- Update README.md and AGENTS.md
Atomic commits included in this push:
1. Refactor: Use Node.js globals and expandGlob (includes formatting)
2. Update README for Deno migration
3. Update AGENTS.md with stricter rules
@kui kui closed this Dec 17, 2025
@kui kui deleted the deno-migration-4852866305107402981 branch December 17, 2025 11:15
@kui kui restored the deno-migration-4852866305107402981 branch December 17, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants