{"name":"@tapjs/node-serialize","version":"4.0.1","description":"Stream TAP test data as a serialized node:test stream","tshy":{"main":true,"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"type":"module","main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"scripts":{"prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","format":"prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache","typedoc":"typedoc --tsconfig .tshy/esm.json ./src/*.ts"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://blog.izs.me"},"license":"BlueOak-1.0.0","dependencies":{"@tapjs/error-serdes":"4.0.0","@tapjs/stack":"4.0.0","tap-parser":"18.0.0"},"peerDependencies":{"@tapjs/core":"4.0.1"},"tap":{"fail-skip":true,"fail-todo":true,"typecheck":false,"coverage-map":"map.js"},"keywords":["v8","error","serialization","serialize","tapjs plugin","node --test","node:test","serdes"],"funding":{"url":"https://github.com/sponsors/isaacs"},"repository":{"type":"git","url":"git+https://github.com/tapjs/tapjs.git"},"module":"./dist/esm/index.js","engines":{"node":"20 || >=22"},"_id":"@tapjs/node-serialize@4.0.1","gitHead":"532287f65d814c7cb7872bf84b3d86b17d900e43","bugs":{"url":"https://github.com/tapjs/tapjs/issues"},"homepage":"https://github.com/tapjs/tapjs#readme","_nodeVersion":"22.10.0","_npmVersion":"11.0.0","dist":{"integrity":"sha512-XsyRkCZGyugENnI67kRy50h+H7Om94VEyCSCIYLtCH7R514tkmdjw/otFewUE7y+wgndZ3yE7RfJp9zzk5ubiA==","shasum":"57e5971487c64335676838f7152c4cea8da61271","tarball":"http://registry-npm.ywwl.com/@tapjs/node-serialize/download/@tapjs/node-serialize-4.0.1.tgz","fileCount":133,"unpackedSize":126315,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEXdHTcMeLNOd8VA1X6qbmtr6goAU4V6nfadTtO1Akn9AiBfh0hWbQetsspiIaRE9zi7kEk+4Mwvtsofg6KPwrXBXw=="}],"size":22887,"noattachment":false,"key":"/@tapjs/node-serialize/-/@tapjs/node-serialize-4.0.1.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-serialize_4.0.1_1740006984803_0.08311141709033754"},"_hasShrinkwrap":false,"readme":"# @tapjs/node-serialize\n\nA default tap plugin that serializes the output of root `TAP`\ntest for consumption by the `node --test` runner.\n\nThat is, this is for running tests that you write like:\n\n```js\nimport t from 'tap'\nt.pass('this is fine')\n// etc\n```\n\nand then run with `node --test`.\n\n## USAGE\n\nThis plugin is installed with tap by default. If you had\npreviously removed it, you can `tap plugin add\n@tapjs/node-serialize` to bring it back.\n\nWhen enabled, this plugin is activated when the\n`NODE_TEST_CONTEXT` environment variable is set to `child-v8`.\nWhen so activated, the root `TAP` test outputs a stream of\n`node:test` message objects (ie, the data emitted by Node's\n[`TestStream`\nclass](https://nodejs.org/api/test.html#class-testsstream)) to\nstandard output, instead of piping TAP data to standard output.\n\nIt has no effect on other tests within the suite.\n\nTo disable this behavior, run `tap plugin rm\n@tapjs/node-serialize`.\n\n## Caveat about Timing\n\nNode-tap and node's built-in `node:test` are not quite identical\nin their approach.\n\nSpecifically, they have very different approaches to asynchronous\ntesting. When using `node:test`, all tests are placed in a queue,\nand de-queued and started by level. It is considered an error for\na test to perform any asynchronous actions outside of the scope\nof its parent suite method.\n\nIn tap, when `t.jobs` is set to some number greater than `1`,\ntests may run in any order, and their subtests may _also_ run in\nany order, at the same time as its siblings. While a subtest will\nnever start before its parent, it may start _after_ its parent's\nsibling tests, making the apparent nesting get interleaved in a\nstrictly event-stream based tracking.\n\nTo handle this, this serializer creates a tree of subtests, and\nonly emits the relevant `node:test` event messages all at once,\nin the correct order that `node --test` expects.\n\nThe downside of this is that it may appear that tests hang and\nthen emit all of their data at once. If true in-progress\nreporting is desired, then you're probably better off using tap's\nbuilt-in test runner.\n","publish_time":1740006985000,"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"isaacs","email":"i@izs.me"}],"_cnpm_publish_time":1740006985000,"dist-tags":{"latest":"4.3.13"}}