[data-reveal]{opacity:1!important;transform:none!important}
DocumentationFramework development

Framework development

Set up the AntelopeJS core repository, test and check your changes, and follow the design and release rules of the core framework.

Contributing to the core framework

The AntelopeJS core framework is open source and accepts contributions from everyone. This page covers what is specific to the core repository, AntelopeJS/antelopejs, which publishes @antelopejs/core.

Setting up your environment

Prerequisites

  • Node.js, in a version that the engines field of package.json accepts. CI uses the version in .nvmrc.
  • pnpm, in the version that the packageManager field of package.json declares
  • Git
  • A code editor, such as Visual Studio Code

Development environment setup

terminal
# 1. Fork the repository
# Visit https://github.com/AntelopeJS/antelopejs and click "Fork"

# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/antelopejs.git
cd antelopejs

# 3. Install dependencies
pnpm install --frozen-lockfile

# 4. Create a branch
git checkout -b feat/my-improvement

Development workflow

Testing changes

Write the tests before the code when you add a feature or fix a bug:

  1. Write the tests that define the expected behavior.
  2. Change the code until the tests pass.
  3. Run the test suite.
terminal
# Run the unit tests under coverage, then the end-to-end suites
pnpm test

# Run the unit tests whose names match a pattern
pnpm test:unit --grep "feature name"

pnpm test runs the unit suites in test/ under coverage, which must stay at 90% or more. It then builds dist and runs the embedded runtime, package consumer and playground suites against it.

Using the playground

The repository includes a playground for manual testing. From the repository root, build the core, install the playground dependencies and start its development command:

terminal
pnpm build
pnpm --dir playground install
pnpm --dir playground dev

pnpm --dir playground dev runs ajs project run -w from the local build. Check your changes in the playground, then run pnpm test:playground for its automated checks. The playground uses the local core build, so rebuild after you change the core source.

Code quality

Run the lint and format checks while you work:

terminal
# Run oxlint and the dependency rules
pnpm lint

# Fix the lint findings that oxlint can fix
pnpm lint:fix

# Check formatting without changing files
pnpm format:check

Before you open a pull request, run pnpm run checks. It runs the type check, lint, format, knip, tests, size, ratchet, suppressions and sync checks, and prints only what failed.

Core design principles

Follow these principles when you change the framework:

PrincipleDescription
ModularityA feature is self-contained, with clear boundaries
CompatibilityA change keeps backward compatibility unless there is a strong reason
PerformanceA new feature adds no significant overhead
SimplicityA simple solution wins over a complex one
TestabilityTests cover all code

Documentation requirements

Update the documentation in the same pull request as the code:

  • Code comments. Give every public API a TSDoc comment.
  • Documentation files. Update the relevant Markdown files in docs/.
  • Examples. Include practical usage examples.
  • Type definitions. Keep the TypeScript types accurate and complete.

Release cycle

AntelopeJS follows this release process:

  1. Development. Contributors build features on branches.
  2. Review. Maintainers review each pull request.
  3. Integration. Maintainers merge approved changes into the default branch.
  4. Testing. CI tests the integrated changes.
  5. Release. Maintainers publish to npm from GitHub Actions with semantic versioning. Stable releases (latest) come from the default branch and prereleases (next) from the next branch.
  6. Documentation. The release commit writes CHANGELOG.md, and the docs are updated with it.

Getting support

If you need help with framework development:

  • Ask questions in #support on the AntelopeJS Discord server
  • Search the existing pull requests and issues for similar work