中文

Changelog

Changes across the func 2.x releases and the foundation established by 1.0.0.

Updated 2 weeks ago

2.x series

  • Add more F_SYSTEM_* error codes to make errors easier to pinpoint.
  • Improve funcgo diagnostics with build-time value type validation, source locations, code frames, and links to the matching error reference.
  • Require Node.js 24 or newer and adopt NodeNext module resolution across the workspace.
  • Publish separate CommonJS and ESM bundles with conditional package exports and a shared declaration entry.
  • Update funcgo to 1.0, use Rolldown as the default build tool, and retain build-ncc as the legacy build option.
  • Add end-to-end coverage for both import and require consumers.
  • Declare Node.js 20.12 or newer as the supported runtime.
  • Streamline the build output.
  • Run the test suite as part of the package build. The published package is reduced from 161 files in 2.2.1 to 61 files.
  • Refresh the core build and test toolchain, including TypeScript 7, Vitest 4, Vite 8, and related dependencies.
  • Refresh package metadata and the README without changing the runtime API.
  • Allow missing-command classes to use method-based handlers, including async execution, field options, services, and local catches.
  • Add a stable reason field to errors raised when a value type cannot be inferred.
  • Move the workspace to pnpm 11 and switch the shared formatter package to @unix/prettier.
  • Maintenance-only release with no runtime behavior change.
  • Introduce the module-based command runtime with FuncModule, services, method handlers, local catches, field options, and constraints.
  • Add explicit application creation and run APIs, registration validation, and TypeScript 6 support.
  • Correct decorator factory declarations to return the standard ClassDecorator type.
  • Remove unnecessary constructor returns from the emitted decorator implementations.
  • Rework command validation and parsing with stricter duplicate, type, required-value, array, and unknown-option checks.
  • Add structured system, runtime, input, and deprecation errors with stable codes and details.
  • Move the core package into the pnpm workspace and migrate its test suite to Vitest.

1.x series

func 1.0.0 was released on 2019-06-13 and established the framework’s foundations: decorator-based command definitions, option parsing, command dispatch, metadata registration, and service injection.