Monorepo for the @infernus/* npm packages — Node.js library for scripting Open Multiplayer.
pnpm install # no --frozen-lockfile needed
pnpm lint # oxlint (not eslint)
pnpm format # oxfmt
tsx scripts/build.ts # interactive single-package build
tsx scripts/build-all.ts # build all packages in order
tsx scripts/type-check.ts # all-package type check
pnpm docs:dev # VitePress dev server- Bundler: rolldown (not rollup).
- Each package entry is
src/main.ts→ outputsdist/bundle.mjs(ESM),dist/bundle.js(CJS),dist/bundle.d.ts(types). - Building includes type-checking first (custom
tsx scripts/type-check.ts— nottsc). - Build order:
streamer→core→raknet→ rest (enforced bybuild-all.ts). @infernus/typesand@infernus/sharedhave nosrc/main.tsand are excluded from build.- Set
TARGET=<name>env to build a specific package non-interactively. @infernus/streameris"private": true(not published).- Most packages list
@infernus/coreas a peerDependency.
- lint:
pnpm lint(oxlint, withoxlint-tsgolintplugin). No eslint. - format:
pnpm format(oxfmt). - type-check:
tsx scripts/type-check.ts [packageName]. - No tests — no test framework is configured.
- Pre-commit hook runs
lint-staged(lint on*.{ts,js}, format on*.{ts,js,json,yml}).
- Conventional Commits enforced by
@commitlint/config-conventional. - Scope is required:
scope-empty: [2, "never"].
tsx scripts/release.ts → interactive select → build → bump → dry-run publish. Core release also syncs version to root package.json.
pnpm changelog:unreleased— insert/refresh a## Unreleasedsection at the top ofCHANGELOG.md(idempotent) from commits since the last tag.pnpm changelog— generate the versioned section; strips any existing## Unreleasedsection first. Runs automatically during core release (viascripts/changelog.ts).
- TypeScript 6.0,
"module": "ESNext","moduleResolution": "bundler","strict": true. - Uses
experimentalDecoratorsandemitDecoratorMetadata. - Path aliases:
core/*,raknet/*,filterscript/*,shared/*. - No per-package
tsconfig.json— single root config.
- VitePress under
docs/. Dev:pnpm docs:dev. Deployed to GitHub Pages on main branch changes todocs/orpackage.json.
No full JSDoc style is used — TypeScript types are the contract. Only two tags are allowed:
@throws— the one thing types can't express. Follow the JSDoc spec:@throws {<ExceptionType>} description, with the exception type in curly braces. Add it to public methods/functions that can throw, as close to the throwing code as possible (method/function level, not class level):- Method level: one
@throwsper throwing method, describing the condition (e.g. lifecycle guard "when called beforecreate()", range validation, native failure). - Class level: avoid — a class-level tag should only be used when virtually every method throws for a common reason and method-level tags would be pure noise.
- Method level: one
@deprecated— marks deprecated APIs; preserved intodist/bundle.d.ts.
Skip @throws on private static-class constructors, internal utils (bus.ts, hook.ts), and throws unreachable by consumers. If the exception class is not exported from the package's src/main.ts, describe it in plain text instead of @link.
- 23 packages under
packages/*, all@infernus/*scope. core/is the main library (@infernus/core).create-app/is a CLI scaffolding tool (@infernus/create-app, published asnpx infernus)..gitignoreblocks.vscode,.npmrc,node_modules,dist.