{"name":"@tapjs/node-serialize","version":"4.0.6","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.0.6","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/tapjs/tapjs#readme","bugs":{"url":"https://github.com/tapjs/tapjs/issues"},"tap":{"fail-skip":true,"fail-todo":true,"typecheck":false,"coverage-map":"map.js"},"dist":{"shasum":"eb92f67a223a00a34437581e2876c8bac0477a42","tarball":"http://registry-npm.ywwl.com/@tapjs/node-serialize/download/@tapjs/node-serialize-4.0.6.tgz","fileCount":133,"integrity":"sha512-30X/vc7d2mV1t2kwU5sTt5VH04JorAO5RuSezEsrPQbxHrBT2OIi8jsvGTWI9hkpGeYUGukDUzaW73duGYZ+hQ==","signatures":[{"sig":"MEQCIGJb/BZWnfaSxPpsUf+h+NQxeZmLRnrkx/rqcLnmVBSPAiA0OhIJSGheialmEkZxuoo95wvQOzM39mcsPQQCfsGqeQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126860,"size":22870,"noattachment":false,"key":"/@tapjs/node-serialize/-/@tapjs/node-serialize-4.0.6.tgz"},"main":"./dist/commonjs/index.js","tshy":{"main":true,"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"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":"1cd81f7f18ae2e4539fade0080522bb091863890","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+https://github.com/tapjs/tapjs.git","type":"git"},"_npmVersion":"11.6.2","description":"Stream TAP test data as a serialized node:test stream","directories":{},"_nodeVersion":"24.4.1","dependencies":{"tap-parser":"18.0.2","@tapjs/stack":"4.0.2","@tapjs/error-serdes":"4.0.2"},"_hasShrinkwrap":false,"peerDependencies":{"@tapjs/core":"4.0.6"},"_npmOperationalInternal":{"tmp":"tmp/node-serialize_4.0.6_1763575931615_0.146921012616557","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":1763575931804,"_cnpm_publish_time":1763575931804,"dist-tags":{"latest":"4.3.13"}}