Repository navigation
Release 4.2.1 hardens editor/type support and adds a dev-only typecheck gate. Runtime behavior and the JavaScript API are unchanged.
Added
- A conditional
exportsmap so Node 16+/node16/nodenext resolution findsindex.d.tsfor the root import while preservinglib/*, including extensionless deep imports, andpackage.jsonsubpaths. - A dev-only, pinned TypeScript typecheck gate that validates static type contracts across annotated sources, repository scripts, live tests, and strict consumer fixtures under
node16andnodenext. This is contract coverage, not line coverage; the line-coverage report remains diagnostic only. It is required in CI and runs fromprepublishOnly; runtime dependencies are unchanged.
Changed
- Tightened public declarations: command responses are strings,
HostConfigcarriesThisType<SSH2Shell>,stop()returnsthis, andaddListenerhas EventEmitter-compatible overloads. - Cleared actionable editor warnings in sources, scripts, tests, and declarations while preserving 4.2.0 runtime behavior, the ASCII filter pattern, and the
compilePromptRegexdeep-import export. - Documented session modes and review-cycle commit policy, and ignored the local editor-only
jsconfig.json.
Full notes: https://github.com/cmp-202/ssh2shell/blob/v4.2.1/CHANGELOG.md