Thank you for your interest in contributing! Here is how to get involved.
Open a new issue on GitHub. Before filing, please search existing issues to avoid duplicates. Include a minimal reproduction — a URL that fails to embed, an error message, or a code snippet — so the problem can be confirmed quickly.
Open an issue describing what you would like to see and why. If you are not sure whether an idea fits the project, open a discussion first before writing any code.
This project uses pnpm workspaces. Node.js 18 or later is required.
# Install dependencies
pnpm install
# Run tests
pnpm test
# Start the docs dev server
pnpm --filter docs dev
# Start the demo dev server
pnpm --filter demo dev- Fork the repository and create a branch from
main. - Make your changes inside
packages/astro-oembed/src/. - Add or update tests in
packages/astro-oembed/src/*.test.tsas appropriate. - Run
pnpm testandpnpm lintand ensure both pass. - Run
pnpm formatto apply consistent formatting.
The bundled providers.json is a snapshot of the oEmbed provider list. To refresh it before a release:
pnpm --filter astro-oembed update-providersThis regenerates packages/astro-oembed/src/data/providers.json. Commit the result as part of your PR if providers changed.
This project uses Changesets to manage versioning and changelogs. Before opening a PR, create a changeset describing what changed and the semver impact:
pnpm changesetCommit the generated file in .changeset/ along with your code changes, then open a pull request against main. The PR description should explain the motivation, any trade-offs considered, and how to verify the change manually (using the demo site or a reproduction URL).
- Language: follow the terminology in CONTEXT.md — e.g. use Provider, Endpoint, Scheme, oEmbed Response, Placeholder, Poster, and LiteOembed consistently.
- No comments explaining what the code does — well-named identifiers carry that weight. Add a comment only when the why would surprise a future reader.
- No mocks in tests — tests exercise real logic. Integration tests that need network access are skipped in CI; unit tests must be self-contained.
- Formatting is enforced by Prettier with
prettier-plugin-astro. Runpnpm formatbefore committing.