Skip to content

Conversation

@bnimit
Copy link
Contributor

@bnimit bnimit commented Nov 19, 2025

Summary

Upgrade quickjs-emscripten to 0.25.0 and add ES module support + memory management features.

Key Changes

Dependencies

  • quickjs-emscripten: 0.21.0 → 0.25.0
  • TypeScript: 4.8.2 → 5.7.2, Vite: 4.1.2 → 6.0.3, Vitest: 0.28.5 → 2.1.8
  • ESLint/Prettier: kept at compatible versions (v8/v2)

New Features

  • evalModule() - Execute ES module code with import/export syntax
  • setMemoryLimit() / setMaxStackSize() - Resource limits for sandbox security
  • getMemoryUsage() / dumpMemoryUsage() - Memory monitoring and debugging

CI/CD

  • Updated GitHub Actions to v4
  • Added release workflow for automated version management

Testing

✅ 131 tests passing (13 new)
✅ Build & lint successful
✅ No breaking changes

Security

New memory management features enable:

  • Prevention of memory exhaustion attacks
  • Stack overflow protection
  • Resource usage monitoring

…pdated:

  Updated Dependencies:

  - TypeScript: 4.8.2 → 5.7.2 (major version jump, but backward compatible)
  - Vite: 4.1.2 → 6.0.3 (major updates with improved performance)
  - Vitest: 0.28.5 → 2.1.8 (major update)
  - @vitest/coverage-v8: Replaced coverage-c8 with coverage-v8 (new package name)
  - vite-plugin-dts: 2.0.0-beta.1 → 4.3.0 (stable release)
  - ESLint: 8.22.0 → 8.57.1 (latest v8, not v9 to avoid breaking changes)
  - Prettier: 2.7.1 → 2.8.8 (latest v2, not v3 to stay compatible with eslint-config-reearth)
  - Upgrade quickjs-emscripten 0.21→0.25 and dev dependencies
  - Add Arena.evalModule() for ES module code execution with side effects
  - Add 5 test cases for module functionality (123 tests total)
@bnimit bnimit requested a review from rot1024 as a code owner November 19, 2025 08:44
@bnimit bnimit changed the title [wip]chore: update quicks-emscripten package version and dependencies chore: update quicks-emscripten package version and dependencies Nov 19, 2025
- Update actions/checkout v3 -> v4
- Update actions/setup-node v3 -> v4
- Update codecov/codecov-action v2 -> v4
- Update actions/upload-artifact v3 -> v4
- Update amannn/action-semantic-pull-request v4 -> v5

Fixes CI failures due to deprecated action versions
  Add setMemoryLimit(), setMaxStackSize(), getMemoryUsage(), and
  dumpMemoryUsage() methods for controlling and monitoring QuickJS
  runtime resource usage.

  - Prevents runaway memory allocation in sandboxed code
  - Protects against stack overflow from deep recursion
  - Provides detailed memory statistics for debugging
  - 8 new tests covering memory limits and monitoring
@bnimit bnimit self-assigned this Nov 19, 2025
@bnimit bnimit changed the title chore: update quicks-emscripten package version and dependencies chore: update quickjs-emscripten package version and dependencies Nov 19, 2025
pyshx
pyshx previously approved these changes Nov 24, 2025
@bnimit bnimit force-pushed the chore/update-dependencies branch from 934fd29 to 764f5fd Compare November 25, 2025 10:17
@bnimit bnimit merged commit aea2fbe into main Nov 26, 2025
2 checks passed
@bnimit bnimit deleted the chore/update-dependencies branch November 26, 2025 05:51
@github-actions github-actions bot mentioned this pull request Nov 26, 2025
4 tasks
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.

4 participants