|
| 1 | +# Contributing to n8n-nodes-fedex |
| 2 | + |
| 3 | +Thanks for your interest! This is an [n8n community node](https://docs.n8n.io/integrations/community-nodes/) |
| 4 | +that talks directly to the FedEx REST API. Contributions — bug reports, fixes, new operations — are |
| 5 | +welcome. |
| 6 | + |
| 7 | +By participating you agree to abide by the [Code of Conduct](./CODE_OF_CONDUCT.md). |
| 8 | + |
| 9 | +## Getting set up |
| 10 | + |
| 11 | +**Use [pnpm](https://pnpm.io/).** npm installs are blocked (the toolchain enforces it with an |
| 12 | +`only-allow` postinstall). Node.js **22.22+** is required. |
| 13 | + |
| 14 | +```bash |
| 15 | +pnpm install |
| 16 | +pnpm build # n8n-node build — compile + copy assets |
| 17 | +pnpm lint # n8n-node lint |
| 18 | +pnpm test # vitest (unit tests for the pure assembly cores) |
| 19 | +pnpm dev # n8n-node dev — runs n8n locally with the node loaded + live rebuild |
| 20 | +``` |
| 21 | + |
| 22 | +## Testing your change |
| 23 | + |
| 24 | +There are unit tests (`vitest`) for the pure helper "cores", but most behavior is verified |
| 25 | +**manually against the FedEx sandbox**: |
| 26 | + |
| 27 | +1. `pnpm dev` to launch n8n with the node loaded. |
| 28 | +2. Add a FedEx credential, select the **Sandbox** environment, and use FedEx's sandbox test |
| 29 | + tracking numbers / test account. |
| 30 | +3. Exercise the operation you changed end to end. |
| 31 | + |
| 32 | +Please confirm `pnpm build`, `pnpm lint`, and `pnpm test` all pass before opening a PR. |
| 33 | + |
| 34 | +## How the node is organized |
| 35 | + |
| 36 | +- One node, `nodes/Fedex/Fedex.node.ts`, with **two resources that mirror the two FedEx |
| 37 | + developer-portal projects** (and their separate credentials): |
| 38 | + - **Tracking** → Track (uses the Track API credential) |
| 39 | + - **Shipping** → Get Rates, Create, Validate (uses the shipping-project credential: Rate + Ship + |
| 40 | + Address Validation) |
| 41 | +- Per-resource descriptions live in `nodes/Fedex/resources/<resource>/`; reusable, context-free |
| 42 | + logic lives in `nodes/Fedex/cores/` (these are what the unit tests cover). |
| 43 | +- Architecture decisions are documented in [`docs/adr/`](./docs/adr/). Skim them before larger |
| 44 | + changes. |
| 45 | + |
| 46 | +> Some reference material (FedEx's captured API specs and the commercial brief) lives in a private |
| 47 | +> companion repo and isn't needed to contribute code. The public ADRs and `documentation.yaml` |
| 48 | +> cover the API shapes you'll need. |
| 49 | +
|
| 50 | +## Commits & releases |
| 51 | + |
| 52 | +- Follow [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `fix:`, `docs:`, |
| 53 | + `chore:`, `refactor:`, `test:`, `ci:`, and `feat!:` / `BREAKING CHANGE:` for breaking changes. |
| 54 | +- Releases are automated by **release-please** from those commit messages, then published to npm |
| 55 | + with provenance — no manual version bumps. Don't edit `package.json` `version` or `CHANGELOG.md`. |
| 56 | +- **Don't modify the ESLint config** — CI verifies it is unchanged from the n8n default. |
| 57 | + |
| 58 | +## Pull requests |
| 59 | + |
| 60 | +1. Branch from `main`, make focused commits. |
| 61 | +2. Ensure build, lint, and tests pass and you've sandbox-tested the change. |
| 62 | +3. Fill out the PR template, including confirming **no credentials/secrets** are included. |
| 63 | +4. Link any related issue. |
| 64 | + |
| 65 | +## Security & credentials |
| 66 | + |
| 67 | +Never commit or paste FedEx API keys, secret keys, or account numbers anywhere in the repo, issues, |
| 68 | +or PRs. See [SECURITY.md](./SECURITY.md). Keep secrets in n8n's credential store or a local |
| 69 | +`.env.local` (gitignored). |
0 commit comments