{"id":41272,"library":"hydro-formatter","title":"hydro-formatter","description":"Base formatter for the Hydro test framework (v2.2.8). Provides a plugin interface for custom output formatting in Hydro test runners. Last updated in 2014, the package is in maintenance mode with no active development. It is specific to Hydro and offers a simple base class for formatters.","status":"maintenance","version":"2.2.8","language":"javascript","source_language":"en","source_url":"https://github.com/hydrojs/hydro-formatter","tags":["javascript"],"install":[{"cmd":"npm install hydro-formatter","lang":"bash","label":"npm"},{"cmd":"yarn add hydro-formatter","lang":"bash","label":"yarn"},{"cmd":"pnpm add hydro-formatter","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: needs Hydro test framework to attach formatter","package":"hydro","optional":false}],"imports":[{"note":"This package is CJS-only; ESM import will fail","wrong":"import Formatter from 'hydro-formatter';","symbol":"Formatter","correct":"const Formatter = require('hydro-formatter');"},{"note":"Default export, not named","wrong":"const { Formatter } = require('hydro-formatter');","symbol":"Formatter","correct":"var Formatter = require('hydro-formatter');"},{"note":"No subpath exports; only main entry","wrong":"require('hydro-formatter/Formatter')","symbol":"hydro-formatter","correct":"require('hydro-formatter').Formatter"}],"quickstart":{"code":"var Formatter = require('hydro-formatter');\nvar util = require('util');\n\nfunction MyFormatter() {\n  Formatter.call(this);\n}\n\nutil.inherits(MyFormatter, Formatter);\n\nMyFormatter.prototype.format = function() {\n  return 'custom output';\n};\n\nmodule.exports = MyFormatter;","lang":"javascript","description":"Shows how to create a custom formatter by inheriting from the base Formatter class and overriding the format method."},"warnings":[{"fix":"Migrate to a modern test framework like Mocha, Jest, or Ava","message":"The whole Hydro ecosystem is unmaintained","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"This formatter is not a standalone formatter; it must be used with the Hydro framework","message":"Only works with Hydro test runner","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use require() instead of import","message":"CJS-only; no ESM support","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider using a maintained alternative","message":"Package last updated in 2014","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'2014':27 'activ':36 'base':4,47 'class':48 'custom':17 'develop':37 'format':19 'formatt':3,5,50 'framework':10 'hydro':2,8,21,42 'hydro-formatt':1 'interfac':15 'javascript':51 'last':24 'mainten':32 'mode':33 'offer':44 'output':18 'packag':29 'plugin':14 'provid':12 'runner':23 'simpl':46 'specif':40 'test':9,22 'updat':25 'v2.2.8':11","created_at":"2026-06-04T18:51:36.410340+00:00","updated_at":"2026-06-04T18:51:36.410340+00:00","problems":[{"fix":"npm install hydro-formatter","cause":"hydro-formatter is not installed","error":"Cannot find module 'hydro-formatter'"},{"fix":"Use function constructor and util.inherits as shown in quickstart","cause":"Using ES6 class syntax instead of function constructor","error":"TypeError: Class constructor Formatter cannot be invoked without 'new'"},{"fix":"npm install hydro","cause":"Missing peer dependency hydro","error":"hydro-formatter requires a peer of hydro but none was installed"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/hydrojs/hydro-formatter","github":"https://github.com/hydrojs/hydro-formatter","docs":null,"changelog":null,"pypi":null,"npm":"hydro-formatter","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}