{"_id":"jest-snapshot-serializer-raw","_rev":"1047542","name":"jest-snapshot-serializer-raw","description":"jest snapshot serializer for reducing escapes in the snapshot file","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"ikatyang","email":"ikatyang@gmail.com"}],"time":{"modified":"2024-09-18T07:42:05.000Z","created":"2018-06-20T08:37:08.005Z","2.0.0":"2023-07-15T07:31:50.628Z","1.2.0":"2021-04-25T12:29:23.310Z","1.1.0":"2018-07-10T16:08:30.949Z","1.0.0":"2018-06-20T08:37:08.005Z"},"users":{},"author":{"name":"Ika","email":"ikatyang@gmail.com","url":"https://github.com/ikatyang"},"repository":{"type":"git","url":"git+https://github.com/ikatyang/jest-snapshot-serializer-raw.git"},"versions":{"2.0.0":{"name":"jest-snapshot-serializer-raw","type":"module","version":"2.0.0","description":"jest snapshot serializer for reducing escapes in the snapshot file","keywords":["jest","jest-snapshot-serializer"],"exports":{".":"./lib/index.js","./always":"./lib/always.js"},"repository":{"type":"git","url":"git+https://github.com/ikatyang/jest-snapshot-serializer-raw.git"},"homepage":"https://github.com/ikatyang/jest-snapshot-serializer-raw#readme","author":{"name":"Ika","email":"ikatyang@gmail.com","url":"https://github.com/ikatyang"},"license":"MIT","dependencies":{},"devDependencies":{"@vitest/coverage-v8":"0.33.0","prettier":"3.0.0","standard-version":"9.5.0","typescript":"5.1.6","vite":"4.4.4","vitest":"0.33.0"},"engines":{"node":">=16"},"packageManager":"pnpm@8.6.6","scripts":{"lint":"prettier --check .","test":"vitest","build":"tsc -p ./tsconfig.build.json","release":"standard-version"},"bugs":{"url":"https://github.com/ikatyang/jest-snapshot-serializer-raw/issues"},"_id":"jest-snapshot-serializer-raw@2.0.0","_integrity":"sha512-E/gWFBAltOPQVAvafH/zYkob3G/TqL/DFG3fHurinwLcFRkz6kASjuihyJJ6zoizlLUNaiOdS3v5ZflTvifpBA==","_resolved":"/tmp/a0063c8b4763a66731c6a6a653e6c684/jest-snapshot-serializer-raw-2.0.0.tgz","_from":"file:jest-snapshot-serializer-raw-2.0.0.tgz","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-E/gWFBAltOPQVAvafH/zYkob3G/TqL/DFG3fHurinwLcFRkz6kASjuihyJJ6zoizlLUNaiOdS3v5ZflTvifpBA==","shasum":"c2be865a20feb2b4d9fa4bbac8c48ce1c6dbfa10","tarball":"http://registry-npm.ywwl.com/jest-snapshot-serializer-raw/download/jest-snapshot-serializer-raw-2.0.0.tgz","fileCount":9,"unpackedSize":8230,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/jest-snapshot-serializer-raw@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYWZQUU9CgpcgMAfn8BVr4AZ1SwfvzhNOuVXeZK6esPgIgCaQVU9u6Z7KOlz6ccKUnrxKpvi0334W8MQClmL94ad4="}],"size":3038,"noattachment":false,"key":"/jest-snapshot-serializer-raw/-/jest-snapshot-serializer-raw-2.0.0.tgz"},"_npmUser":{"name":"ikatyang","email":"ikatyang@gmail.com"},"directories":{},"maintainers":[{"name":"ikatyang","email":"ikatyang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-snapshot-serializer-raw_2.0.0_1689406310443_0.5837837677545972"},"_hasShrinkwrap":false,"publish_time":1689406310628,"_cnpm_publish_time":1689406310628},"1.2.0":{"name":"jest-snapshot-serializer-raw","version":"1.2.0","description":"jest snapshot serializer for reducing escapes in the snapshot file","keywords":["jest","jest-snapshot-serializer"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/ikatyang/jest-snapshot-serializer-raw.git"},"homepage":"https://github.com/ikatyang/jest-snapshot-serializer-raw#readme","author":{"name":"Ika","email":"ikatyang@gmail.com","url":"https://github.com/ikatyang"},"license":"MIT","scripts":{"prepublish":"npm run build","lint":"tslint -p ./tsconfig.json","test":"jest","prebuild":"rm -rf ./lib","build":"tsc -p ./tsconfig.build.json","release":"standard-version"},"dependencies":{},"devDependencies":{"@types/jest":"21.1.10","jest":"21.2.1","prettier":"1.18.2","prettier-config-ikatyang":"1.1.1","standard-version":"4.4.0","ts-jest":"21.2.4","tslint":"5.15.0","tslint-plugin-prettier":"2.0.1","typescript":"2.9.2"},"engines":{"node":">= 4"},"gitHead":"d94e67bde1d74940b9ac6c1e27e46229e4120345","bugs":{"url":"https://github.com/ikatyang/jest-snapshot-serializer-raw/issues"},"_id":"jest-snapshot-serializer-raw@1.2.0","_nodeVersion":"15.12.0","_npmVersion":"7.6.3","dist":{"integrity":"sha512-Cnp2u7GkaXBVOOelhU94x6Kb/10WJjQtgKDvqynnYGNGQlKBj06x8QZmRkL8XWWVLQ5DKA2fT5rY9kRd512JcA==","shasum":"cd67afb5e5cc39d88d518b45e7320dd01ce55148","tarball":"http://registry-npm.ywwl.com/jest-snapshot-serializer-raw/download/jest-snapshot-serializer-raw-1.2.0.tgz","fileCount":11,"unpackedSize":7976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghWCjCRA9TVsSAnZWagAAk74P/ArfPeCPTfJJne+lWxP9\nOweZb+qyjxOSsBCyDT92HjMqI7UDbLxIyX+hgR9Q8L6QGwC0BRWo15r752GR\nqp1wj73xKGGmQfgVIlquvLvPuS7EXLpG2JR6tJYW9ccsnS3avlhJk+QuqMWt\nVmbAgD8vAEJGdzkwtwW4ZnclEjHha1MolKWm5rcEUNGFsQbMeWiqiZvEDyuA\niwizB/sCjai2kh15+J5IRI5TPkiHT99mifCuQ/tmYG39Az4DaWoZBs2LuInh\nrihjxs/BBfJBDIbqOcV2kJR3cIRCrzC8AVNeC+3m2VXjk+4egZP4/BiG5Hay\nd/4WXRGPX480tXBFAsmidud4LVEwuq6T8dluo/RHQj+xCBo+fdQqrH9dk+t+\nqx5Wa+XwyRvUhEsSiAq7We+AbgcW7jX/R2662kSmJRMQvAapM73WDFHE3yWV\n5LXODjPVq1IAREfoaO6g1J/6o6qVG+w9Qhz+bIWTcOLA5v4SrZKy3fcGxJfu\nnn38cyI56uPZLhG33vfE5NRQjk/dQov8J4JhNKFuzL4eVOtquOkRCdOx3qH4\n1CtHFyztYTiqgFyDLuLEz+CbHubPPooPCE2AyZ4dUgEz5zuzIsHIgJPzzgGH\n3dFNTBvK6+uJfNjnfs2oULWlOT5tHfnH4hQ5N/bB1WyLK4/kYpSY628YEQju\nVTql\r\n=51/Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJhPN/y45i9fBmK5Vd0MZEX8HIqtg6f9xV1DcqJ/MyDgIgWIqLJw39z8l58TJDybqdFo4oPTBjvQCv33CWXwtIFlE="}],"size":3020,"noattachment":false,"key":"/jest-snapshot-serializer-raw/-/jest-snapshot-serializer-raw-1.2.0.tgz"},"_npmUser":{"name":"ikatyang","email":"ikatyang@gmail.com"},"directories":{},"maintainers":[{"name":"ikatyang","email":"ikatyang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-snapshot-serializer-raw_1.2.0_1619353763197_0.8380417255035602"},"_hasShrinkwrap":false,"publish_time":1619353763310,"_cnpm_publish_time":1619353763310},"1.1.0":{"name":"jest-snapshot-serializer-raw","version":"1.1.0","description":"jest snapshot serializer for reducing escapes in the snapshot file","keywords":["jest","jest-snapshot-serializer"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/ikatyang/jest-snapshot-serializer-raw.git"},"homepage":"https://github.com/ikatyang/jest-snapshot-serializer-raw#readme","author":{"name":"Ika","email":"ikatyang@gmail.com","url":"https://github.com/ikatyang"},"license":"MIT","scripts":{"prepublish":"yarn run build","lint":"tslint -p ./tsconfig.json","test":"jest","prebuild":"rm -rf ./lib","build":"tsc -p ./tsconfig.build.json","release":"standard-version"},"dependencies":{},"devDependencies":{"@types/jest":"21.1.10","jest":"21.2.1","prettier":"1.13.7","prettier-config-ikatyang":"1.1.1","standard-version":"4.4.0","ts-jest":"21.2.4","tslint":"5.10.0","tslint-plugin-prettier":"1.3.0","typescript":"2.9.2"},"engines":{"node":">= 4"},"files":["/lib/**/*","/ThirdPartyNoticeText.txt"],"gitHead":"45d2f8d3c4a9735fda4c91b9d28e2b2fa97ac2ee","bugs":{"url":"https://github.com/ikatyang/jest-snapshot-serializer-raw/issues"},"_id":"jest-snapshot-serializer-raw@1.1.0","_npmVersion":"6.1.0","_nodeVersion":"8.11.1","_npmUser":{"name":"ikatyang","email":"ikatyang@gmail.com"},"dist":{"integrity":"sha512-OL3bXRCnSn7Kur3YTGYj+A3Hwh2eyb5QL5VLQ9OSsPBOva7r3sCB0Jf1rOT/KN3ypzH42hrkDz96lpbiMo+AlQ==","shasum":"1d7f09c02f3dbbc3ae70b5b7598fb2f45e37d6c8","tarball":"http://registry-npm.ywwl.com/jest-snapshot-serializer-raw/download/jest-snapshot-serializer-raw-1.1.0.tgz","fileCount":7,"unpackedSize":6794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbRNn+CRA9TVsSAnZWagAASaUP/3XMiSuk9jVT/WroV3CN\nl76EwQtmedaS6oEMsmxBslgMTrqE7if4zVHzvuhOLOB7PInUphWYZpNWX8h3\naqdCPkVApaUsZvbYBDnkJVmWNdL+J+8kZoYljgJbOHjv2quJbqPBANLrowiP\neDPlocM4gT3Od5CJn+gdIisA4t4msB17w5lX55zh4/yYpksyzDHRUgeilR/D\nZZUflAOeBz2taFwWzSqpZQwZHmkFmDQlsZQT+mWZ2UNsQIHfk2WBx78yFoTQ\nEcuSWebsrBIqNeNJY99s3eHSPaCvBoP2FWKZTfi/OZ+GsA50uBfH/CurRtn3\n5d78w3vF2bpznvwvYi/yQjvlqCaQRdFrYg0NmS3+MSV8Hm8VuquJQWDz5PDi\nqFxUW5CM/Rd2SJRED6CMHfiRdMr0YeOogGsC0/3dB0Aubxg1Lzx/RdZzDFpr\ns+9itfw3SkQ04AYJd1FPFcdR++4fQwQ5U96H31GSI1Rnz2FnIu+R8NdiLssE\nxVD4axH/Lkf+5/qcRDqU6qVUETBqm2iOl5yz5cLlzH6jod80OfQAFVpX38vt\no5jHFnKjIK4nU2QekvUuRKk2kiuTvqylAa8AucZQdSF36elCS04PHzcq17Ru\nNNHSvYy8b9jqBha4i3i4YVBj8WLHAQcflra9SnkQlm7AClYbPvDeNUKEJa+H\nJd4n\r\n=O3J1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0xSUx0XgDgXlprPjl/N8Y6X4o9Z/NYnsVhMFoUyJQzgIgGybu5yz/RkforlcoLQQ27EX1cJX4yuHsZ5EJ4U/AIQc="}],"size":2689,"noattachment":false,"key":"/jest-snapshot-serializer-raw/-/jest-snapshot-serializer-raw-1.1.0.tgz"},"maintainers":[{"name":"ikatyang","email":"ikatyang@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-snapshot-serializer-raw_1.1.0_1531238910854_0.619481612894865"},"_hasShrinkwrap":false,"publish_time":1531238910949,"_cnpm_publish_time":1531238910949},"1.0.0":{"name":"jest-snapshot-serializer-raw","version":"1.0.0","description":"jest snapshot serializer for reducing escapes in the snapshot file","keywords":["jest","jest-snapshot-serializer"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/ikatyang/jest-snapshot-serializer-raw.git"},"homepage":"https://github.com/ikatyang/jest-snapshot-serializer-raw#readme","author":{"name":"Ika","email":"ikatyang@gmail.com","url":"https://github.com/ikatyang"},"license":"MIT","scripts":{"prepublish":"yarn run build","lint":"tslint -p ./tsconfig.json","test":"jest","prebuild":"rm -rf ./lib","build":"tsc -p ./tsconfig.build.json","release":"standard-version"},"dependencies":{},"devDependencies":{"@types/jest":"21.1.10","jest":"21.2.1","prettier":"1.13.5","prettier-config-ikatyang":"1.1.1","standard-version":"4.4.0","ts-jest":"21.2.4","tslint":"5.10.0","tslint-plugin-prettier":"1.3.0","typescript":"2.9.2"},"engines":{"node":">= 4"},"files":["/lib/**/*"],"gitHead":"87e54beec32283a12569c4283ff75c667dca5702","bugs":{"url":"https://github.com/ikatyang/jest-snapshot-serializer-raw/issues"},"_id":"jest-snapshot-serializer-raw@1.0.0","_npmVersion":"6.1.0","_nodeVersion":"8.11.1","_npmUser":{"name":"ikatyang","email":"ikatyang@gmail.com"},"dist":{"integrity":"sha512-gt0UQKyKfadczzEJg2D4ZujRBj39QfCVGeGYi/K70HPZdFhEZZ7iPbYp0+cd9NV07BFL0b+MEwM3zu+1lWWtaw==","shasum":"fd9e7ee4a1800de6df3cc04c7754344465020377","tarball":"http://registry-npm.ywwl.com/jest-snapshot-serializer-raw/download/jest-snapshot-serializer-raw-1.0.0.tgz","fileCount":6,"unpackedSize":4974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKhI0CRA9TVsSAnZWagAAnOkP/An5fAF6k6m0aWbmrcDz\nSmKvPc9wdZIIHDqQ9bvgJ61xnxljHagcHPUu9MtuRd6cwiXkjna+z3OqchuU\n+v9CGNGBke9LK7HJp1QHgdn90lKBc5hb1xGHgS/OsJNsYOV1wgPPwEWTEDFn\ntZATEKqdjY2CEUNjMZUQr8qx+9kkJr4bO2I2i9t0bFURPq9XRHqC036kgGfl\ncjcu8ijDpwsQ21ppnXj8J2xoWZqgjBpb9sws+ss0YYU2gHo16oKvviCFPs5Q\nlYtTrX+ut159cLXWmaxx79NSh/o9rT9U+vvWjMhKqGHbBrQXJkD6wB0my0kt\nMwDcYrLqU3ojGer8CIzeVLA3nsanlVlSnveDPA5iV8hAl0mwhE2b3tCnskF9\nvYBi+xuUHHq4+nmU5tXf/9oSvHaIZhNMgq9oIBFIiBK/Ew0GDbH8ROWJwM/7\n0JXNqNtHATdGbndiUmtLIcPqjckoImhwCDWga2VtpmeMkDIoAq4ompBfwQ3E\ncHxa8ZJearo5PHkNVOw9Al7z8bCjjSUagh2r1MUEhCewViMIKiqYhGb5V4ef\nMJNHIX/MjTFMehUKF82PKdY5MdXAaQd9sZc7+0VKR+RzhGqtKTRqaLITVa+d\nwhyTxiuJmscYzwf1tSs3rbmIdaKEYCEfDUq2ii+Itm4WtVsg4dRxASTFMLaC\nVitm\r\n=nzN+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFi+UAxVnBDV/cqh52545fPZ2RQFPrrRNu+HvHTAbNvwIhAL2Gus23V1FiyVfvoqZHn/20a/6Kk1+mowir4qZkLG5Z"}],"size":2354,"noattachment":false,"key":"/jest-snapshot-serializer-raw/-/jest-snapshot-serializer-raw-1.0.0.tgz"},"maintainers":[{"name":"ikatyang","email":"ikatyang@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-snapshot-serializer-raw_1.0.0_1529483827771_0.8681378021057415"},"_hasShrinkwrap":false,"publish_time":1529483828005,"_cnpm_publish_time":1529483828005}},"readme":"# jest-snapshot-serializer-raw\n\n[![npm](https://img.shields.io/npm/v/jest-snapshot-serializer-raw.svg)](https://www.npmjs.com/package/jest-snapshot-serializer-raw)\n[![build](https://img.shields.io/github/actions/workflow/status/ikatyang/jest-snapshot-serializer-raw/test.yml)](https://github.com/ikatyang/jest-snapshot-serializer-raw/actions?query=branch%3Amaster)\n\njest snapshot serializer for reducing escapes in the snapshot file\n\n(This package is modified from [prettier/prettier:tests_config/raw-serializer.js@`9ec1da1a`](https://github.com/prettier/prettier/blob/9ec1da1ad185a226280212a62a42319965a62ffc/tests_config/raw-serializer.js))\n\n[Changelog](https://github.com/ikatyang/jest-snapshot-serializer-raw/blob/master/CHANGELOG.md)\n\n## Install\n\n```sh\nnpm install jest-snapshot-serializer-raw\n```\n\nNote: This package is now pure ESM, you may want to install `jest-snapshot-serializer-raw@1` if you'd like to use it in CJS environment\n\n## Usage\n\n### Apply to specified snapshots\n\nIn setup file or test file:\n\n```js\nimport serializerRaw from 'jest-snapshot-serializer-raw'\nexpect.addSnapshotSerializer(serializerRaw)\n```\n\nIn test file:\n\n```js\nimport { wrap } from 'jest-snapshot-serializer-raw'\nconst example = `paragraph \"one\"\\n\\n'paragraph' \\\\two\\\\`\n\ntest('before', () => {\n  expect(example).toMatchSnapshot()\n})\n\ntest('after', () => {\n  expect(wrap(example)).toMatchSnapshot()\n})\n```\n\nIn snapshot file:\n\n```js\nexports[`before 1`] = `\n\"paragraph \\\\\"one\\\\\"\n\n'paragraph' \\\\\\\\two\\\\\\\\\"\n`\n\nexports[`after 1`] = `\nparagraph \"one\"\n\n'paragraph' \\\\two\\\\\n`\n```\n\n### Apply to all snapshots\n\nIn setup file or test file:\n\n```js\nimport serializerRaw from 'jest-snapshot-serializer-raw/always'\nexpect.addSnapshotSerializer(serializerRaw)\n```\n\nIn test file:\n\n```js\nconst example = `paragraph \"one\"\\n\\n'paragraph' \\\\two\\\\`\n\ntest('after', () => {\n  expect(example).toMatchSnapshot()\n})\n```\n\nIn snapshot file:\n\n```js\nexports[`after 1`] = `\nparagraph \"one\"\n\n'paragraph' \\\\two\\\\\n`\n```\n\n## Development\n\n```sh\n# lint\npnpm run lint\n\n# build\npnpm run build\n\n# test\npnpm run test\n```\n\n## License\n\nMIT © [Ika](https://github.com/ikatyang)\n","_attachments":{},"homepage":"https://github.com/ikatyang/jest-snapshot-serializer-raw#readme","bugs":{"url":"https://github.com/ikatyang/jest-snapshot-serializer-raw/issues"},"license":"MIT"}