Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Report a bug in any @openpcb/* package
labels: bug
---

**Package**

[ kicad-parsers / rendering-core / kicad-import / step-to-glb / r3f-eda-canvas / opclib-pack / command-pattern / contracts ]

**Version (tag)**

`<package>-v<X.Y.Z>`

**What happened**

**Reproduction**

Minimal code or input file:

```ts
// repro
```

**Expected behavior**

**Environment**

- Node / Bun version:
- Consumer (OpenPCB, custom, …):
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an addition to a shared package
labels: enhancement
---

**Package**

Which `@openpcb/*` package this affects.

**Problem**

**Proposed API change**

```ts
// pseudocode
```

**Compat**

- Is this a breaking change? Yes / No
- Affects which downstream consumers?
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Summary

<!-- What's changed in which package(s). -->

## Affected packages

- [ ] kicad-parsers
- [ ] rendering-core
- [ ] kicad-import
- [ ] step-to-glb
- [ ] r3f-eda-canvas
- [ ] opclib-pack
- [ ] command-pattern
- [ ] contracts

## Checklist

- [ ] `npm run typecheck`
- [ ] `npm run test`
- [ ] `npm run build` (all dist/ rebuild cleanly)
- [ ] Bumped affected package(s) version in their `package.json` (if shipping)
- [ ] Updated OpenPCB consumer pin (if breaking)

## Breaking change?

- [ ] No
- [ ] Yes (describe migration path below)
5 changes: 5 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Code of Conduct

The OpenPCB shared/ community follows the [Contributor Covenant 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).

Report violations to **conduct@openpcb.app**.
69 changes: 69 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Contributing to OpenPCB shared/

`shared/` hosts the `@openpcb/*` npm packages consumed by OpenPCB (and any other downstream): KiCad parsers, rendering primitives, `.opclib` pack/unpack, STEP→GLB, command pattern, contracts.

## Quick start

```bash
git clone https://github.com/OpenPCB-app/shared.git
cd shared
npm install
npm run build # build every package's dist/
npm run test # bun test across packages
npm run typecheck
```

Requirements: Node 22+, Bun ≥1.3 (for tests), npm 10+.

## Layout

```
shared/
└── packages/
├── kicad-parsers/
├── rendering-core/
├── kicad-import/
├── step-to-glb/
├── r3f-eda-canvas/
├── opclib-pack/
├── command-pattern/
└── contracts/
```

Each package is independent: own `package.json`, own version, own GitHub tag. Cross-package deps inside `shared/` go through the workspace.

## Local development against OpenPCB

```bash
cd ../OpenPCB
npm run shared:link # symlinks node_modules/@openpcb/* to ../shared/packages/*
npm run shared:status # show current link state
npm run shared:unlink # restore github-tag installs
```

`shared/packages/*` build on install (`prepare` scripts). If `dist/` is missing after `npm install`, run `npm run build` in `shared/`.

## Before opening a PR

```bash
npm run typecheck
npm run test
npm run build # verify all dist/ rebuild cleanly
```

## Release ritual

Per-package semver tags drive subtree-split publishing:

```
git tag <package>-vX.Y.Z # e.g. opclib-pack-v0.2.1
git push origin <package>-vX.Y.Z
```

The release workflow subtree-splits the package into a temporary branch and retags it at the split commit. Downstream consumers install via `github:OpenPCB-app/shared#<package>-v<X.Y.Z>`.

When bumping a package that OpenPCB depends on, also update the matching `package.json` entry in `OpenPCB/package.json`.

## License

All `@openpcb/*` packages are licensed under **AGPL-3.0-or-later**. By contributing, you agree your contributions are licensed under AGPL-3.0-or-later.
Loading
Loading