|
1 | 1 | # Contributing to SuperDoc |
2 | 2 |
|
3 | | -Thanks for helping out. Bug reports, docs, examples, tests, and code are all |
4 | | -welcome. |
| 3 | +Community contributions start with an issue. Pull requests are limited to |
| 4 | +repository collaborators. |
| 5 | + |
| 6 | +We’ve found that reviewing and integrating external PRs often takes more time |
| 7 | +than implementing a fix from a clear report. Even a small change can affect |
| 8 | +other editor behavior that requires broader context to verify. We want to |
| 9 | +explain this upfront so you don’t spend time on a PR we can’t accept. |
5 | 10 |
|
6 | 11 | ## Ways to contribute |
7 | 12 |
|
8 | | -**Report a rendering bug.** Open a `.docx` in SuperDoc, compare it with |
9 | | -Microsoft Word, and if they differ, |
10 | | -[file an issue](https://github.com/superdoc/docx-editor/issues/new?template=bug-report.yml) |
11 | | -with the file attached. A reproduction document is the single most useful thing |
12 | | -you can send. |
| 13 | +Report suspected security vulnerabilities privately through |
| 14 | +[GitHub Security Advisories](https://github.com/superdoc/docx-editor/security/advisories/new), |
| 15 | +as described in our [security policy](SECURITY.md). Do not include vulnerability |
| 16 | +details in public issues. |
13 | 17 |
|
14 | | -**Improve the docs.** They live in `apps/docs/` and ship to |
15 | | -[docs.superdoc.dev](https://docs.superdoc.dev). Run `pnpm run dev:docs` to |
16 | | -preview your changes. |
| 18 | +Bug reports, feature requests, documentation feedback, and technical |
| 19 | +investigations are welcome. Search [open issues](https://github.com/superdoc/docx-editor/issues) |
| 20 | +first, then [open an issue](https://github.com/superdoc/docx-editor/issues/new/choose) |
| 21 | +with what you’re trying to do, what happened, and what you expected. |
| 22 | + |
| 23 | +For bugs, include your SuperDoc version and a small reproduction if possible. |
| 24 | +For rendering differences, include a sample `.docx` and screenshots showing |
| 25 | +SuperDoc and Microsoft Word. Use synthetic or redacted documents without |
| 26 | +confidential information. |
17 | 27 |
|
18 | | -**Add an example.** Keep it runnable and focused on one documented outcome. All examples live in `examples/`. |
| 28 | +Already investigated or written a fix? Include your findings, test results, or |
| 29 | +a link to the patch in the issue. That context helps us understand the problem |
| 30 | +and develop a solution. You don’t need to write code to contribute. |
19 | 31 |
|
20 | | -**Fix a bug or add a feature.** Start with |
21 | | -[good first issues](https://github.com/superdoc/docx-editor/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) |
22 | | -or [help wanted](https://github.com/superdoc/docx-editor/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). |
23 | | -For anything large, open an issue first so we can agree on the approach before |
24 | | -you write code. |
| 32 | +## Working on the code |
| 33 | + |
| 34 | +The instructions below cover local development and PRs for repository |
| 35 | +collaborators. You can also use them to reproduce a problem locally. |
| 36 | + |
| 37 | +Documentation lives in `apps/docs/` and ships to |
| 38 | +[docs.superdoc.dev](https://docs.superdoc.dev). Run `pnpm run dev:docs` to |
| 39 | +preview it. Runnable examples live in `examples/`. |
25 | 40 |
|
26 | 41 | ## Choose a branch |
27 | 42 |
|
@@ -129,6 +144,16 @@ message, since the release version is derived from it: |
129 | 144 |
|
130 | 145 | A local Git hook checks the message format before the commit lands. |
131 | 146 |
|
| 147 | +### Peer dependency changes |
| 148 | + |
| 149 | +Peer dependencies are a compatibility contract with applications that install a published SuperDoc package. Any authored change to that contract requires manual review. CI compares the effective packed ranges, including `catalog:` and `workspace:` resolutions, with the pull request base and leaves a review comment when they differ. |
| 150 | + |
| 151 | +Use a `feat:` title for a backward-compatible expansion such as widening a tested range, adding an optional peer, or making a required peer optional. Use a breaking `!` title for a change that removes accepted versions, adds a required peer, makes an optional peer required, or removes or replaces a peer contract. The protected check fails when the configured release planner would produce less than the required release impact; a breaking peer change cannot merge until the release path can produce the required major release. |
| 152 | + |
| 153 | +The existing exact `superdoc` dependency and peer in `@superdoc/react` are a release-managed exception: the version stamper moves both pins only as part of the coordinated React and SuperDoc release train after protected PR checks. Changing the pin form, optionality, or compatibility policy is still an authored contract change and follows the rules above. |
| 154 | + |
| 155 | +Read the [package compatibility policy](https://docs.superdoc.dev/resources/package-compatibility) before changing `peerDependencies`, `peerDependenciesMeta`, or a catalog entry used by a peer. |
| 156 | + |
132 | 157 | Before you open the PR: |
133 | 158 |
|
134 | 159 | - [ ] `pnpm test` passes |
|
0 commit comments