Test fixtures used 'sam', 'samcharles93', and 'sam/<repo>' as owner names. These are personal and machine-specific — the repo should use generic placeholders like 'acme' (matching the existing convention in worktree_test.go). config.example.toml: samcharles93 -> your-github-username Test owner: sam -> acme Repo refs: sam/archie-core -> acme/archie-core, etc. Example skills: sam -> acme
2.4 KiB
2.4 KiB
name, description, version, metadata
| name | description | version | metadata | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ecosystem-node | Node.js/TypeScript project conventions for archie-core: npm/pnpm, eslint, prettier, tsc, vitest. Use when working on Node repositories with archie-core. | 1.0.0 |
|
Node.js / TypeScript Ecosystem Conventions
Preflight
When archie-core's [[repos]] entry sets ecosystem = "node", the daemon runs
node --version as the preflight check before any agent stage.
Recommended gate configuration
[[repos]]
owner = "acme"
name = "my-node-project"
ecosystem = "node"
[[repos.gate]] = ["pnpm", "run", "lint"]
[[repos.gate]] = ["pnpm", "run", "typecheck"]
[[repos.gate]] = ["pnpm", "run", "test"]
Or for npm projects:
[[repos.gate]] = ["npm", "run", "lint"]
[[repos.gate]] = ["npm", "run", "build", "--", "--noEmit"]
[[repos.gate]] = ["npm", "test"]
Test glob
The default test glob for Node is *.test.ts. The TDD workflow's repro-tests
stage write-protects files matching this glob during the fix stage.
Override with test_glob = "**/*.spec.ts" for projects using that convention,
or test_glob = "__tests__/**/*.ts" for Jest-style test directories.
Package management
arcie-core detects the lockfile:
pnpm-lock.yaml→ usepnpmpackage-lock.json→ usenpmyarn.lock→ useyarn
Install before gate:
pnpm install --frozen-lockfile
Common tools
| Tool | Purpose | Config file |
|---|---|---|
eslint |
Linting | eslint.config.mjs |
prettier |
Formatting | .prettierrc |
tsc --noEmit |
Type checking | tsconfig.json |
vitest |
Testing | vitest.config.ts |
jest |
Testing (legacy) | jest.config.ts |
Common gate failures
eslint
no-unused-vars: remove unused import/variable@typescript-eslint/no-explicit-any: add proper type- Import order: let eslint fix it with
--fix
tsc / typecheck
TS2345: type mismatch -- fix the argument or the signatureTS2339: property doesn't exist -- check the type definitionCannot find module: check the import path or install the package
vitest / jest
- Test timeout: the test is hanging -- check async/await, mocks, or network calls
- Snapshot mismatch: the output changed -- update the snapshot if the change is intentional
- Assertion failure: fix the code, not the test