diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..af4d15d --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,24 @@ +# AGENTS.md + +Review the `README.md` and `CONTRIBUTING.md` for all relevant repository information. + +## Development Tips +- Ensure you're on at least Node.js v22 or greater when contributing +- Use `npm install` to install dependencies +- Use `npm run build` to build the project +- Do not run `npm version` or `npm publish`; these commands are for humans only. +- When updating core code, make sure to update relevant documentation. + - Public API and usage docs are in `README.md` + - Internal documentation is in `CONTRIBUTING.md` + - If you change the public API surface in `src/index.ts`, update `README.md#api`. +- Do not edit files in `dist/`; it is compiled output and gitignored. + +## Code Style +- Use ESM and TypeScript +- Use erasable syntax only (no `enum` or `namespace`) +- There is currently no linter or formatter for this project + +## Testing Tips +- Use `npm link` in this directory and `npm link @harperfast/integration-testing` in other project directories to test out changes locally +- Use `npm run check` to type-check the project without generating a build output +- There are currently no tests for this project diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..3c78fda --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing + +Contributors are encouraged to communicate with maintainers in issues or other channels (such as our community [Discord](https://harper.fast/discord)) before submitting changes. + +## Code Organization + +Source files are located in `src/`. These are built to the `dist/` directory. The published package includes `dist/`, `scripts/`, and the regular npm metadata and documentation files. + +The `src/index.ts` is the source for the main export. This is the public re-export of all the various utilities from `src/harperLifecycle.ts`, `targz.ts`, and more. The `src/run.ts` is the source for the `harper-integration-test-run` bin script. And the `scripts/setup-loopback.sh` is the source for the `harper-integration-test-setup-loopback` bin script. + +The package is `"type": "module"` — all source files are ESM by default. + +There are two `tsconfig` files: + +- `tsconfig.json` — type-checking only (`"noEmit": true`). Used by `npm run check` and editors. +- `tsconfig.build.json` — emits to `dist/` with source maps and declarations. Used by `npm run build`. + +`erasableSyntaxOnly: true` is set, meaning TypeScript-only syntax that cannot be stripped (e.g., `enum`, `namespace`) is not allowed. + +## Scripts + +```sh +npm run check # Type-check only (no output) +npm run build # Compile src/ → dist/ +``` + +There are no automated tests in this package yet. Validation is type-checking plus manual testing via dependent projects. + +## Releases + +Update the `version` field in `package.json` (recommend using `npm version `) and publish via `npm publish`. The `files` field in `package.json` controls what is included in the published package. Don't forget to push the version commit and tag.