Skip to content

Pull out all Deno APIs from lib, making it fully browser compatible#207

Merged
rgbkrk merged 8 commits intomainfrom
refactor-deno-deps-from-lib
Sep 3, 2025
Merged

Pull out all Deno APIs from lib, making it fully browser compatible#207
rgbkrk merged 8 commits intomainfrom
refactor-deno-deps-from-lib

Conversation

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Sep 3, 2025

No description provided.

- Move auth.ts from lib to pyodide-runtime-agent
- Extract CLI parsing functions from lib/config.ts to pyodide-runtime-agent/config-cli.ts
- Keep RuntimeConfig class and DEFAULT_CONFIG in lib as pure data structures
- Update lib exports to remove CLI/auth functions
- Move config tests to pyodide package
- Add --allow-sys flag to lib tests for hostname access
- Update pyodide package to import auth and CLI functions locally

This makes lib platform-agnostic while keeping all CLI/Deno-specific logic
in the pyodide runtime agent.
- Remove unused parameter in test helper
- Remove unused import from pyodide config
- Fix python runtime agent to use dummy config and not exit in tests
- Update python runtime agent to show clear not-implemented message
- Move signal handling from RuntimeAgent to PyodideRuntimeAgent
- Make RuntimeAgent setupShutdownHandlers/cleanupShutdownHandlers extensible
- Add triple-slash directive to logging test instead of global compiler option
- Keep lib package truly platform-agnostic with only DOM and ESNext libs
- Fix test expectation to match localhost URL from .env override

The lib package is now completely platform-agnostic - all Deno-specific
code has been moved to the pyodide-runtime-agent package.
The test now works in both local dev (with .env localhost override)
and CI (with default rgbkrk URL) environments by checking for either
localhost or a valid WebSocket URL pattern.
Tests should run in clean environments for proper isolation.
The --env-file=.env flag was causing tests to inherit local
development configuration, making them environment-dependent.

Now tests get the true default values and run consistently
in both local and CI environments.
@rgbkrk rgbkrk marked this pull request as ready for review September 3, 2025 04:06
@rgbkrk
Copy link
Member Author

rgbkrk commented Sep 3, 2025

Last bit after this is removing the node adapter as the default adapter.

@rgbkrk rgbkrk merged commit d9936b7 into main Sep 3, 2025
7 checks passed
@rgbkrk rgbkrk deleted the refactor-deno-deps-from-lib branch September 3, 2025 04:11
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.

1 participant