{"name":"junit-report-builder","version":"4.0.1","keywords":["junit","xunit","report","builder"],"author":{"name":"David Pärsson","email":"david@parsson.se"},"license":"MIT","_id":"junit-report-builder@4.0.1","homepage":"https://github.com/davidparsson/junit-report-builder","bugs":{"url":"https://github.com/davidparsson/junit-report-builder/issues"},"dist":{"shasum":"fe52bc7ee96cbd8f09760c7932f1c7a02207c82d","tarball":"http://registry-npm.ywwl.com/junit-report-builder/download/junit-report-builder-4.0.1.tgz","fileCount":13,"integrity":"sha512-Fd6IXHjaN0nt3mQDw93Xj6zvU96qyWdfW4z9o3JHgspC1qbb2KKiOsG3yMebP7cMj8n7zkI5URNLbxpjbRBpfA==","signatures":[{"sig":"MEUCIQChE1+gwugMLScjpbtzemwBU4E4Ae9NOFaMyNWrrLkExAIgBA2CUrGki90P/thac6HW1Wy4F9pJCJaF9zDr4T5SfGk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":811273,"size":140976,"noattachment":false,"key":"/junit-report-builder/-/junit-report-builder-4.0.1.tgz"},"main":"./dist/index.js","module":"./dist/index.es.js","engines":{"node":">=16"},"gitHead":"c2922fc4cdccbd2221c635db9022d7d76dbbc656","scripts":{"lint":"tslint -c tslint.json src/**/*.ts","test":"jest","build":"rollup --configPlugin @rollup/plugin-typescript -c rollup.config.ts","check":"prettier --check .","format":"prettier --write .","release":"release-it","prepublish":"npm run build"},"typings":"./dist/index.d.ts","_npmUser":{"name":"david.parsson","email":"david@parsson.se"},"release-it":{"hooks":{"before:init":["npm run build","npm test","npm run check"]},"github":{"release":false}},"repository":{"url":"git://github.com/davidparsson/junit-report-builder.git","type":"git"},"_npmVersion":"9.8.1","description":"Aimed at making it easier to build Jenkins compatible JUnit XML reports in plugins for testing frameworks","directories":{},"_nodeVersion":"18.18.0","dependencies":{"lodash":"^4.17.21","make-dir":"^3.1.0","xmlbuilder":"^15.1.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"^2.7.1","rollup":"^4.19.1","tslint":"^6.1.3","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.0.3","release-it":"^16.2.1","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7","@types/lodash":"^4.17.0","@types/rimraf":"^4.0.5","@rollup/plugin-commonjs":"^26.0.1","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/junit-report-builder_4.0.1_1722415375777_0.0021376426506865","host":"s3://npm-registry-packages"},"deprecated":"The CommonJS API was accidentally changed in 4.0.1.","readme":"# junit-report-builder\n\n[![Build Status](https://github.com/davidparsson/junit-report-builder/workflows/CI/badge.svg)](https://github.com/davidparsson/junit-report-builder/actions?query=workflow%3ACI)\n[![Weekly Downloads](https://img.shields.io/npm/dw/junit-report-builder.svg)](https://www.npmjs.com/package/junit-report-builder)\n\nA project aimed at making it easier to build [Jenkins](http://jenkins-ci.org/) compatible XML based JUnit reports.\n\n## Installation\n\nTo install the latest version, run:\n\n    npm install junit-report-builder --save\n\n## Usage\n\n```JavaScript\nimport builder from 'junit-report-builder';\n\n// Create a test suite\nlet suite = builder.testSuite().name('My suite');\n\n// Create a test case\nlet firstTestCase = suite.testCase()\n  .className('my.test.Class')\n  .name('My first test');\n\n// Create another test case which is marked as failed\nlet secondTestCase = suite.testCase()\n  .className('my.test.Class')\n  .name('My second test')\n  .failure();\n\nbuilder.writeTo('test-report.xml');\n```\n\nThis will create `test-report.xml` containing the following:\n\n```XML\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<testsuites tests=\"2\" failures=\"1\" errors=\"0\" skipped=\"0\">\n  <testsuite name=\"My suite\" tests=\"2\" failures=\"1\" errors=\"0\" skipped=\"0\">\n    <testcase classname=\"my.test.Class\" name=\"My first test\"/>\n    <testcase classname=\"my.test.Class\" name=\"My second test\">\n      <failure/>\n    </testcase>\n  </testsuite>\n</testsuites>\n```\n\nIf you want to create another report file, start by getting a new\nbuilder instance like this:\n\n```JavaScript\n// Each builder produces a single report file\nlet anotherBuilder = builder.newBuilder();\n```\n\nCommonJS is also supported:\n\n```JavaScript\nlet builder = require('junit-report-builder');\n```\n\nPlease refer to the [e2e.spec.ts](spec/e2e.spec.ts) for more details on the usage.\n\n## License\n\n[MIT](LICENSE)\n\n## Changelog\n\n### 5.0.0\n\n-   A re-release of 4.0.1 since that version broke the CommonJS API.\n-   Remove an internal type from the public API.\n\n### 4.0.1\n\n-   _Accidentally broke CommonJS API in 4.0.1. Re-released as 5.0.0._\n-   Re-introduce CommonJS support, while keeping the ES module support. Thanks to [Harel Mazor](https://github.com/HarelM) and [Simeon Cheeseman](https://github.com/SimeonC).\n-   Export all public types from `index.d.ts`. Thanks to [Harel Mazor](https://github.com/HarelM) and [Simeon Cheeseman](https://github.com/SimeonC).\n-   Full typing support for TypeScript. Thanks to [Harel Mazor](https://github.com/HarelM).\n\n### 4.0.0\n\n-   _Accidentally dropped CommonJS support. This is fixed again in 4.0.1._\n-   Dropped support for node.js 14, 12, 10 and 8.\n-   Full typing support for TypeScript. Thanks to [Harel Mazor](https://github.com/HarelM).\n\n### 3.2.1\n\n-   Update documentation.\n\n### 3.2.0\n\n-   Support name and test count attributes for the root test suites element. Thanks to [Simeon Cheeseman](https://github.com/SimeonC).\n-   Describe parameter types and return types with JSDoc. Thanks to [Simeon Cheeseman](https://github.com/SimeonC).\n\n### 3.1.0\n\n-   Add support for generic properties for test cases. Thanks to [Pietro Ferrulli](https://github.com/Pi-fe).\n-   Bump dependencies\n\n### 3.0.1\n\n-   Bump dependencies: lodash, make-dir, date-format, minimist\n\n### 3.0.0\n\n-   Properly prevent invalid characters from being included in the XML files.\n-   Dropped support for node.js 4 and 6\n\n### 2.1.0\n\n-   Added support for adding a `file` attribute to a test case. Thanks to [Ben Holland](https://github.com/hollandben).\n\n### 2.0.0\n\n-   Replace mkdirp by make-dir to resolve [npm advisory 1179](https://www.npmjs.com/advisories/1179).\n-   Dropped support for node.js 0.10.x and 0.12.x\n\n### 1.3.3\n\n-   Updated lodash to a version without known vulnerabilities.\n\n### 1.3.2\n\n-   Added support for emitting the type attribute for error and failure elements of test cases\n-   Added support for emitting cdata/content for the error element of a test case\n\nThanks to [Robert Turner](https://github.com/rturner-edjuster).\n\n### 1.3.1\n\n-   Update dependencies to versions without known vulnerabilities.\n\n### 1.3.0\n\n-   Support [attaching files to tests](http://kohsuke.org/2012/03/13/attaching-files-to-junit-tests/). Thanks to [anto-wahanda](https://github.com/anto-wahanda).\n\n### 1.2.0\n\n-   Support creating XML with emojis. Thanks to [ischwarz](https://github.com/ischwarz).\n\n### 1.1.1\n\n-   Changed `date-format` to be a dependency. Previously it was incorrectly set to be a devDependency. Thanks to [georgecrawford](https://github.com/georgecrawford).\n\n### 1.1.0\n\n-   Added attributes for test count, failure count, error count and skipped test count to testsuite elements\n-   Added ability to attach standard output and standard error logs to test cases\n-   Added ability set execution time for test suites\n-   Added ability set timestamp for test suites\n\n### 1.0.0\n\n-   Simplified API by making the index module export a builder instance\n\n### 0.0.2\n\n-   Corrected example in readme\n\n### 0.0.1\n\n-   Initial release\n","publish_time":1722415375952,"maintainers":[{"name":"david.parsson","email":"david@parsson.se"}],"_cnpm_publish_time":1722415375952,"dist-tags":{"latest":"5.1.2","rc":"4.0.1-rc.0"}}