{"id":16811414,"url":"https://github.com/noomorph/vfile-reporter-ci","last_synced_at":"2025-10-17T07:07:50.879Z","repository":{"id":185269287,"uuid":"670903090","full_name":"noomorph/vfile-reporter-ci","owner":"noomorph","description":"VFile reporter for CI (Github Actions, TeamCity, etc)","archived":false,"fork":false,"pushed_at":"2023-08-01T07:46:51.000Z","size":198,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T20:27:47.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noomorph.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-26T05:21:44.000Z","updated_at":"2023-08-01T07:48:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6f0b5d4-30c8-448f-9404-9debf05cfed4","html_url":"https://github.com/noomorph/vfile-reporter-ci","commit_stats":null,"previous_names":["noomorph/vfile-reporter-ci"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noomorph%2Fvfile-reporter-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noomorph%2Fvfile-reporter-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noomorph%2Fvfile-reporter-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noomorph%2Fvfile-reporter-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noomorph","download_url":"https://codeload.github.com/noomorph/vfile-reporter-ci/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244021334,"owners_count":20385122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T10:18:41.119Z","updated_at":"2025-10-17T07:07:45.825Z","avatar_url":"https://github.com/noomorph.png","language":"JavaScript","funding_links":["https://opencollective.com/unified"],"categories":[],"sub_categories":[],"readme":"# vfile-reporter-ci\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n[vfile][] utility to create a report inside a CI environment.\n\n![Example screenshot of vfile-reporter-ci][screenshot]\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`reporter(files[, options])`](#reporterfiles-options)\n    *   [`Options`](#options)\n*   [Example](#example)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package create a textual report from files showing the warnings that\noccurred while processing.\nMany CLIs of tools that process files, whether linters (such as ESLint) or\nbundlers (such as esbuild), have similar functionality.\n\n## When should I use this?\n\nYou can use this package when you want to display a report about what occurred\nwhile processing to a human.\n\nThere are [other reporters][reporters] that display information differently\nlisted in vfile.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install vfile-reporter-ci\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {reporter} from 'https://esm.sh/vfile-reporter-ci@1'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {reporter} from 'https://esm.sh/vfile-reporter-ci@1?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\nSay our module `example.js` looks as follows:\n\n```js\nimport {VFile} from 'vfile'\nimport {reporter} from 'vfile-reporter-ci'\n\nconst one = new VFile({path: 'test/fixture/1.js'})\nconst two = new VFile({path: 'test/fixture/2.js'})\n\none.message('Warning!', {line: 2, column: 4})\n\nreporter([one, two])\n```\n\n…now running `node example.js` yields:\n\n```txt\ntest/fixture/1.js\n2:4 warning Warning!\n\ntest/fixture/2.js: no issues found\n\n⚠ 1 warning\n```\n\n## API\n\nThis package exports the identifier [`reporter`][api-reporter].\nThat value is also the `default` export.\n\n### `reporter(files[, options])`\n\nCreate a report from one or more files.\n\n###### Parameters\n\n*   `files` ([`Array\u003cVFile\u003e`][vfile] or `VFile`)\n    — files to report\n*   `options` ([`Options`][api-options], optional)\n    — configuration\n\n###### Returns\n\nReport (`string`).\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Fields\n\n*   `defaultName` (`string`, default: `'\u003cstdin\u003e'`)\n    — Label to use for files without file path; if one file and no `defaultName`\n    is given, no name will show up in the report\n*   `silent` (`boolean`, default: `false`)\n    — show errors only; this hides info and warning messages\n*   `stats` (`boolean`, default: `true`)\n    — show summary statistics\n\n## Example\n\nHere’s a small example that looks through a markdown AST for emphasis and\nstrong nodes, and checks whether they use `*`.\nThe message has detailed information which will be shown in verbose mode.\n\n`example.js`:\n\n```js\nimport {fromMarkdown} from 'mdast-util-from-markdown'\nimport {visitParents} from 'unist-util-visit-parents'\nimport {VFile} from 'vfile'\nimport {reporter} from 'vfile-reporter-ci'\n\nconst file = new VFile({\n  path: new URL('example.md', import.meta.url),\n  value: '# *hi*, _world_!'\n})\nconst value = String(file)\nconst tree = fromMarkdown(value)\nvisitParents(tree, (node, parents) =\u003e {\n  if (node.type === 'emphasis' || node.type === 'strong') {\n    const start = node.position?.start.offset\n\n    if (start !== undefined \u0026\u0026 value.charAt(start) === '_') {\n      const m = file.message('Expected `*` (asterisk), not `_` (underscore)', {\n        ancestors: [...parents, node],\n        place: node.position,\n        ruleId: 'attention-marker',\n        source: 'some-lint-example'\n      })\n      m.note = `It is recommended to use asterisks for emphasis/strong attention when\nwriting markdown.\n\nThere are some small differences in whether sequences can open and/or close…`\n      m.url = 'https://example.com/whatever'\n    }\n  }\n})\n\nreporter([file], {verbose: false})\n```\n\n…running `node example.js` yields, e.g. on Github Actions:\n\n```txt\n::warning file=example.md,line=1,col=9::Expected `*` (asterisk), not `_` (underscore)\n```\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type [`Options`][api-options].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `vfile-reporter-ci@^1`,\ncompatible with Node.js 16.\n\n## Security\n\nUse of `vfile-reporter-ci` is safe.\n\n## Related\n\n*   [`vfile-reporter`](https://github.com/vfile/vfile-reporter)\n    — create a line:col report\n*   [`vfile-reporter-json`](https://github.com/vfile/vfile-reporter-json)\n    — create a JSON report\n*   [`vfile-reporter-pretty`](https://github.com/vfile/vfile-reporter-pretty)\n    — create a pretty report\n*   [`vfile-reporter-junit`](https://github.com/kellyselden/vfile-reporter-junit)\n    — create a jUnit report\n*   [`vfile-reporter-position`](https://github.com/Hocdoc/vfile-reporter-position)\n    — create a report with content excerpts\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`vfile/.github`][health] for ways to\nget started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organisation, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/vfile/vfile-reporter-ci/workflows/main/badge.svg\n\n[build]: https://github.com/vfile/vfile-reporter-ci/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/vfile/vfile-reporter-ci.svg\n\n[coverage]: https://codecov.io/github/vfile/vfile-reporter-ci\n\n[downloads-badge]: https://img.shields.io/npm/dm/vfile-reporter-ci.svg\n\n[downloads]: https://www.npmjs.com/package/vfile-reporter-ci\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size\u0026query=$.size.compressedSize\u0026url=https://deno.bundlejs.com/?q=vfile-reporter-ci\n\n[size]: https://bundlejs.com/?q=vfile-reporter-ci\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/vfile/vfile/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[contributing]: https://github.com/vfile/.github/blob/main/contributing.md\n\n[support]: https://github.com/vfile/.github/blob/main/support.md\n\n[health]: https://github.com/vfile/.github\n\n[coc]: https://github.com/vfile/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[vfile]: https://github.com/vfile/vfile\n\n[reporters]: https://github.com/vfile/vfile#reporters\n\n[screenshot]: screenshot.png\n\n[api-reporter]: #reporterfiles-options\n\n[api-options]: #options\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoomorph%2Fvfile-reporter-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoomorph%2Fvfile-reporter-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoomorph%2Fvfile-reporter-ci/lists"}