Skip to content

Repository files navigation

eliware.org

@eliware/test npm version license CI

Table of Contents

Features · Requirements · Setup · Usage · Development · Testing · Troubleshooting · Security · Configuration · Operations · Commands · Exit codes · Support · License · Links

Features

The CLI validates repository structure, documentation, conventions, tests, coverage, packaging, and supported operational checks.

Package description: Shared deterministic repository validation for Eliware projects. Author: Eliware eliware@eliware.org. License: MIT.

Requirements

Node.js 26 is required.

Setup

For development in this repository, install the locked dependencies:

npm ci

In a consuming repository, install the public CLI as a development dependency:

npm install --save-dev @eliware/test

Usage

After installing the package in a consuming repository, run validation with eliware-test. The package-level scripts below are for this repository.

package.json is the source of truth for the version in this checkout. The repository's current version is 8.0.0. The npm badge links to the package's latest version on the public registry.

npm test
npm run lint
npm run format:check
npm run audit
npm run pack
node bin/eliware-test.mjs --help
node bin/eliware-test.mjs --version
node bin/eliware-test.mjs --debug-timing
node bin/eliware-test.mjs --lint
node bin/eliware-test.mjs --format
node bin/eliware-test.mjs --format-check
node bin/eliware-test.mjs tests/example.test.mjs
eliware-test

--format mutates files; --format-check only validates formatting. --pack validates the package contents without publishing it.

Each of --lint, --format, --format-check, --audit, and --pack accepts only arguments allowed for that mode. Audit accepts only --no-fund and --no-progress; lint accepts only --threads=<positive-count>; pack has its own allowlist. Arguments that override wrapper-owned settings, file coverage, or required checks are rejected. Wrapper arguments are emitted before arguments supplied after --, preserving their relative order within each group. Prettier arguments that override the selected mode, canonical formatting configuration, or required file coverage are rejected.

The five public tool modes are --lint, --format, --format-check, --audit, and --pack. The npm script forms are supported package-level shortcuts; arbitrary npm script names are not CLI arguments.

Legacy --ignore-* flags are unsupported. Coverage and monolith enforcement remain enabled for all validation modes.

--debug-timing writes timing diagnostics through the selected CLI output writer. Programmatic callers that omit a writer do not receive an implicit process-global timing stream.

Development

Use native ESM .mjs modules, keep src/ and tests/ mirrored, and add focused regression tests for behavior changes.

Testing

In this repository, npm test runs aggregate Jest, lint, format-check, audit, and pack validation under its declared npm-published profile. Pack validation is profile-dependent in other repositories. One focused test path under tests/ can be supplied to eliware-test. .test.* and .spec.* files may use .js, .jsx, .ts, .tsx, .mjs, .cjs, .mts, or .cts extensions.

Troubleshooting

When validation fails, rerun the reported focused path first, then inspect the stage-specific diagnostic and relevant repository contract.

The v8 orchestration and convention-check registry are implemented as focused native ESM modules under src/.

Application and library architecture guidance is selected only when the corresponding profile is declared in package.json.eliware.apply. Some profile requirements remain advisory or specification-only when they do not have a deterministic check; their canonical wording remains in the local profile specifications.

Security

Never commit secrets, credentials, private runtime state, or generated output.

Configuration

eliware-test has no runtime configuration: no runtime settings, environment variables, or consumer configuration files are supported; runtime defaults are none. Convention applicability is repository metadata in package.json.eliware.apply; CLI options are documented under Commands and are not runtime configuration.

Operations

Startup is a local CLI invocation through eliware-test or bin/eliware-test.mjs. Shutdown and child-process termination are handled by the validation runner. The validation workflow is local or CI validation only; its boundaries exclude release, publication, deployment, and other operational changes, which are controlled by the applicable Eliware runbooks.

Commands

The CLI command entrypoint is bin/eliware-test.mjs; the installed executable is eliware-test. --help prints usage; --version reports the package version. Other public modes are --debug-timing, --lint, --format, --format-check, --audit, and --pack. Each tool mode has mode-specific accepted arguments. Audit accepts only --no-fund and --no-progress, lint accepts only --threads=<positive-count>, and pack uses its own allowlist. Wrapper-owned settings and options that weaken required checks are rejected. Wrapper arguments precede arguments after --.

Examples and package-level shortcuts are shown under Usage. --format mutates files; --format-check is read-only. --pack is read-only package validation and does not publish. The commands do not authorize release, deployment, or other destructive external actions. Legacy --ignore-* flags are unsupported. Platform support is intended for Windows, macOS, and Linux with Node.js 26 and npm available; CI currently validates on Ubuntu.

Exit codes

Exit code 0 is success, 8 is Jest failure, 10 is coverage failure, 12 is lint failure, 14 is an internal tool failure, 17 is a package-check failure, and 18 is a convention, configuration, argument, format, or format-check failure. Rejected wrapper arguments, unsupported mode combinations, and rejected forwarded tool arguments return exit code 18. Every failed convention check includes the check ID, the observed failure, and the complete matching directive, including all dos, donts, and examples when present. The canonical profile specifications live in specs/conventions/ and are read directly by the harness. Output also redacts recognized secret patterns. The CLI performs no deploy, publish, release, or destructive repository operation.

Support

Discord

eliware.org on Discord

Use the Eliware Discord community, GitHub issues, or eliware@eliware.org. Include the command, Node.js version, and redacted diagnostics when requesting help.

License

license

Links

About

Shared Jest testing, coverage enforcement, Oxlint, and consumer validation for Eliware Node.js projects

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages