{"name":"@tapjs/node-serialize","version":"4.3.10","keywords":["v8","error","serialization","serialize","tapjs plugin","node --test","node:test","serdes"],"author":{"url":"https://blog.izs.me","name":"Isaac Z. Schlueter","email":"i@izs.me"},"license":"BlueOak-1.0.0","_id":"@tapjs/node-serialize@4.3.10","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/tapjs/tapjs/tree/main/src/node-serialize#readme","bugs":{"url":"https://github.com/tapjs/tapjs/issues"},"tap":{"fail-skip":true,"fail-todo":true,"typecheck":false,"coverage-map":"map.js"},"dist":{"shasum":"37450f0122faadcbe9a59cbb4f15821a44230a59","tarball":"http://registry-npm.ywwl.com/@tapjs/node-serialize/download/@tapjs/node-serialize-4.3.10.tgz","fileCount":133,"integrity":"sha512-obAwYrhwqMR1szqctPFF3bpkw/1jBXU2A7F2a8MLirII3+/VcyR4cEb8nSCUSCjNvzPHX1vhmQ8lUADB0+1Xxg==","signatures":[{"sig":"MEQCIEfJjN1WXWwlbbcR7pU9b+LLBdqvbyXN6sPP97Qn6zrGAiAd1yUpa3jncKDg62zSv5u8AWU6zgVV/2jxufUZMWMQXA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126504,"size":22821,"noattachment":false,"key":"/@tapjs/node-serialize/-/@tapjs/node-serialize-4.3.10.tgz"},"main":"./dist/commonjs/index.js","tshy":{"main":true,"exports":{".":"./src/index.ts","./package.json":"./package.json"},"selfLink":false},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","engines":{"node":"20 || >=22"},"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"},"funding":{"url":"https://github.com/sponsors/isaacs"},"gitHead":"9b0010e9d33f4aec5d00cdfb6c3dd5cad0649eef","scripts":{"snap":"tap","test":"tap","format":"prettier --write . --log-level warn --ignore-path ../../.prettierignore --cache","prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","typedoc":"typedoc --tsconfig .tshy/esm.json ./src/*.ts"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"repository":{"url":"git+ssh://git@github.com/tapjs/tapjs.git","path":"src/node-serialize","type":"git"},"_npmVersion":"11.12.1","description":"Stream TAP test data as a serialized node:test stream","directories":{},"_nodeVersion":"26.0.0","dependencies":{"tap-parser":"18.3.4","@tapjs/stack":"4.3.3","@tapjs/error-serdes":"4.3.2"},"_hasShrinkwrap":false,"peerDependencies":{"@tapjs/core":"4.5.8"},"_npmOperationalInternal":{"tmp":"tmp/node-serialize_4.3.10_1778873758042_0.33974760056533104","host":"s3://npm-registry-packages-npm-production"},"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":1778873758207,"_cnpm_publish_time":1778873758207,"dist-tags":{"latest":"4.3.13"}}