{"name":"@cucumber/pretty-formatter","version":"4.0.0","author":{"name":"David Goss"},"license":"MIT","_id":"@cucumber/pretty-formatter@4.0.0","maintainers":[{"name":"cukebot","email":"cukebot@cucumber.io"}],"homepage":"https://github.com/cucumber/pretty-formatter#readme","bugs":{"url":"https://github.com/cucumber/pretty-formatter/issues"},"dist":{"shasum":"7cc1ea260d5e0836bc7ff3dc8d9a686169fde941","tarball":"http://registry-npm.ywwl.com/@cucumber/pretty-formatter/download/@cucumber/pretty-formatter-4.0.0.tgz","fileCount":81,"integrity":"sha512-vWKHUfjMphtbeHHlQBZ1gQzPL3/HE/O2dNnpBqEOIDwvhp7tKvqSe8kscp2H7pArbxN6euEpR5JbstJdzo3iyg==","signatures":[{"sig":"MEYCIQDmEP/mwuTGu9MGZWYYAuCnD/3Y6galfXN793qXIlj+MQIhAIbYvQ8TntJJUhp1v2o9s5iW3jvoRE2qq1nURcYbxKNE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cucumber%2fpretty-formatter@4.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":259308,"size":64642,"noattachment":false,"key":"/@cucumber/pretty-formatter/-/@cucumber/pretty-formatter-4.0.0.tgz"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"72d5952c1cd1610dfbc6c5e553dbb42cbfa5f263","scripts":{"fix":"biome check --fix --error-on-warnings","lint":"biome check --error-on-warnings","test":"mocha \"src/**/*.spec.ts\"","build":"tsc --build tsconfig.build.json","clean":"rm -rf dist","postbuild":"node -e \"require('.')\"","prepublishOnly":"tsc --build tsconfig.build.json","update-expected-files":"UPDATE_EXPECTED_FILES=true npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8e44dd61-2577-4d08-a120-1bea05a42f3c"}},"repository":{"url":"git+https://github.com/cucumber/pretty-formatter.git","type":"git","directory":"javascript"},"_npmVersion":"11.13.0","description":"<h1 align=\"center\">   <img alt=\"\" width=\"75\" src=\"https://github.com/cucumber.png\"/>   <br>   pretty-formatter </h1> <p align=\"center\">   <b>Rich formatting of Cucumber progress and results for the terminal</b> </p>","directories":{},"_nodeVersion":"24.16.0","dependencies":{"luxon":"^3.7.2","@cucumber/query":"16.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^6.0.0","mocha":"^11.0.0","globby":"^16.0.0","ts-node":"^10.9.1","typescript":"6.0.3","@types/chai":"^5.0.0","@types/node":"22.19.21","@types/luxon":"^3.7.1","@types/mocha":"^10.0.6","@biomejs/biome":"^2.4.13","@cucumber/messages":"33.0.2","@tsconfig/recommended":"^1.0.13","@cucumber/biome-config":"github:cucumber/biome-config#v0.2.1","@cucumber/message-streams":"^5.0.0"},"peerDependencies":{"@cucumber/messages":"*"},"_npmOperationalInternal":{"tmp":"tmp/pretty-formatter_4.0.0_1781198909233_0.36167258476442865","host":"s3://npm-registry-packages-npm-production"},"readme":"<h1 align=\"center\">\n  <img alt=\"\" width=\"75\" src=\"https://github.com/cucumber.png\"/>\n  <br>\n  pretty-formatter\n</h1>\n<p align=\"center\">\n  <b>Rich formatting of Cucumber progress and results for the terminal</b>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@cucumber/pretty-formatter\" style=\"text-decoration: none\"><img src=\"https://img.shields.io/npm/v/@cucumber/pretty-formatter?style=flat&color=dark-green\" alt=\"Latest version on npm\"></a>\n  <a href=\"https://github.com/cucumber/pretty-formatter/actions\" style=\"text-decoration: none\"><img src=\"https://github.com/cucumber/pretty-formatter/actions/workflows/test-javascript.yaml/badge.svg\" alt=\"Build status\"></a>\n</p>\n\n![Example output of the pretty formatting, showing the different colors used](../screenshots/all-statuses.cucumber.pretty.png)\n\n## Usage\n\nThis package is used internally in `@cucumber/cucumber` to provide the `summary`, `progress` and `pretty` formatters; you don't need to install or manage it yourself.\nFor usage, see https://github.com/cucumber/cucumber-js/blob/main/docs/formatters.md.\n\nYou can use these low-level classes to provide formatting for a different implementation of Cucumber.\n\n### SummaryPrinter\n\nPrints a summary of test results including non-passing scenarios, statistics, and snippets.\n\n```typescript\nimport { SummaryPrinter } from '@cucumber/pretty-formatter'\n\nconst printer = new SummaryPrinter()\n\n// each time a message is emitted\nprinter.update(envelope)\n```\n\nCan also be used to summarise a test run that already happened, with a pre-populated `Query` object:\n\n```typescript\nimport { Query } from '@cucumber/query'\nimport { SummaryPrinter } from '@cucumber/pretty-formatter'\n\nconst query = new Query()\n\n// each time a message is emitted\nquery.update(envelope)\n\n// later\nSummaryPrinter.summarise(query)\n```\n\n### ProgressPrinter\n\nPrints test progress as single-character status indicators.\n\n```typescript\nimport { ProgressPrinter } from '@cucumber/pretty-formatter'\n\nconst printer = new ProgressPrinter()\n\n// each time a message is emitted\nprinter.update(envelope)\n```\n\n### PrettyPrinter\n\nPrints test progress in a prettified Gherkin-style format.\n\n```typescript\nimport { PrettyPrinter } from '@cucumber/pretty-formatter'\n\nconst printer = new PrettyPrinter()\n\n// each time a message is emitted\nprinter.update(envelope)\n```\n\n### Themes\n\nHere's the schema for a theme:\n\n```ts\ninterface Theme {\n    attachment?: Style\n    dataTable?: {\n        all?: Style\n        border?: Style\n        content?: Style\n    }\n    docString?: {\n        all?: Style\n        content?: Style\n        delimiter?: Style\n        mediaType?: Style\n    }\n    feature?: {\n        all?: Style\n        keyword?: Style\n        name?: Style\n    }\n    location?: Style\n    rule?: {\n        all?: Style\n        keyword?: Style\n        name?: Style\n    }\n    scenario?: {\n        all?: Style\n        keyword?: Style\n        name?: Style\n    }\n    status?: {\n        all?: Partial<Record<TestStepResultStatus, Style>>\n        icon?: Partial<Record<TestStepResultStatus, string>>\n        progress?: Partial<Record<TestStepResultStatus, string>>\n    }\n    step?: {\n        argument?: Style\n        keyword?: Style\n        text?: Style\n    }\n    tag?: Style\n    symbol?: {\n        bullet?: string\n    }\n}\n\nenum TestStepResultStatus {\n    UNKNOWN = \"UNKNOWN\",\n    PASSED = \"PASSED\",\n    SKIPPED = \"SKIPPED\",\n    PENDING = \"PENDING\",\n    UNDEFINED = \"UNDEFINED\",\n    AMBIGUOUS = \"AMBIGUOUS\",\n    FAILED = \"FAILED\"\n}\n```\n\n`Style` is any [Node.js supported modifier](https://nodejs.org/api/util.html#modifiers) or an array of them.\n\nSee the [default theme](./src/theme.ts) for a good example. It's exported as `CUCUMBER_THEME`, so you can clone and extend it if you'd like.","publish_time":1781198909391,"_cnpm_publish_time":1781198909391,"dist-tags":{"latest":"4.1.0"}}