Skip to content

Conversation

@simonw
Copy link
Owner

@simonw simonw commented Dec 25, 2025

Rename the main context class from JSContext to Context for a cleaner
API. The JSContext name is preserved as an undocumented alias for
backwards compatibility with existing code.

  • Rename class JSContext to Context in context.py
  • Add JSContext = Context alias with explanatory comment
  • Update init.py to export Context (primary) and JSContext (alias)
  • Update all test files to use Context
  • Update documentation (README.md, AGENTS.md, spec.md)
  • Add test to protect the backwards-compatible alias from removal

Rename JSContext to just Context in the code and test and docs

Leave an undocumented JSContext alias with a comment explaining why it is there to avoid breaking any existing code (with one test to protect it against future removal)

https://gistpreview.github.io/?57e04088a065e59cd24efb0a15734eff/index.html

Rename the main context class from JSContext to Context for a cleaner
API. The JSContext name is preserved as an undocumented alias for
backwards compatibility with existing code.

- Rename class JSContext to Context in context.py
- Add JSContext = Context alias with explanatory comment
- Update __init__.py to export Context (primary) and JSContext (alias)
- Update all test files to use Context
- Update documentation (README.md, AGENTS.md, spec.md)
- Add test to protect the backwards-compatible alias from removal
@simonw simonw merged commit 0c2d534 into main Dec 25, 2025
10 checks passed
@simonw simonw deleted the claude/rename-jscontext-to-context-yiF0h branch December 25, 2025 05:47
simonw added a commit that referenced this pull request Dec 25, 2025
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.

3 participants