{"name":"@cucumber/pretty-formatter","version":"3.0.0","author":{"name":"David Goss"},"license":"MIT","_id":"@cucumber/pretty-formatter@3.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":"e72f91fe348d76dc6d14a35bf9475b27a7b66c49","tarball":"http://registry-npm.ywwl.com/@cucumber/pretty-formatter/download/@cucumber/pretty-formatter-3.0.0.tgz","fileCount":78,"integrity":"sha512-Whw5ZpdSJGgmMvK1wOvhOZaomv5sFNEUvEQlqP0XOE1E4h5Hd/omXgdu/sK5DVBm/MLwO9A7wLfK86f1BvRCEA==","signatures":[{"sig":"MEUCIG/Lk8Jp56gZaMM6rgnM3hO6HjD6k4R1ApeXVX6Khi3mAiEAhVuPsok/2ujrFuBAzJQnEe6jU+vPDnpf8v81SsuKF3Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cucumber%2fpretty-formatter@3.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":161876,"size":35007,"noattachment":false,"key":"/@cucumber/pretty-formatter/-/@cucumber/pretty-formatter-3.0.0.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"93cdf6b1cbfdae9583f3f9048c08f05f9dba9911","scripts":{"fix":"eslint --ext ts --max-warnings 0 src --fix src && prettier --write src","lint":"eslint --ext ts --max-warnings 0 src && prettier --check src","test":"mocha \"src/**/*.spec.ts\"","build":"tsc --build tsconfig.build.json","clean":"rm -rf dist","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"},"_npmVersion":"11.6.2","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.13.0","dependencies":{"luxon":"^3.7.2","@cucumber/query":"15.0.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^6.0.0","mocha":"^11.0.0","eslint":"9.39.2","globby":"^16.0.0","globals":"^17.0.0","ts-node":"^10.9.1","prettier":"3.8.1","@eslint/js":"^9.30.1","typescript":"5.9.3","@types/chai":"^5.0.0","@types/node":"22.19.7","@types/luxon":"^3.7.1","@types/mocha":"^10.0.6","@eslint/compat":"^2.0.0","eslint-plugin-n":"17.23.2","@eslint/eslintrc":"^3.3.1","@cucumber/messages":"32.0.1","eslint-plugin-import":"2.32.0","@tsconfig/recommended":"^1.0.13","@cucumber/message-streams":"^4.0.1","@typescript-eslint/parser":"8.54.0","@typescript-eslint/eslint-plugin":"8.54.0","eslint-plugin-simple-import-sort":"12.1.1"},"peerDependencies":{"@cucumber/messages":"*"},"_npmOperationalInternal":{"tmp":"tmp/pretty-formatter_3.0.0_1769828064931_0.7356490678812233","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":1769828065083,"_cnpm_publish_time":1769828065083,"dist-tags":{"latest":"4.1.0"}}