{"_id":"awesome-code-frame","_rev":"2-ac6dc31c7bd41c703cc5245ce5e896ad","name":"awesome-code-frame","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"awesome-code-frame","version":"1.0.0","description":"Fork of @babel/code-frame with modern dependencies and exports","author":{"name":"Gustaf Räntilä"},"license":"MIT","bugs":{"url":"https://github.com/grantila/awesome-code-frame/issues"},"homepage":"https://github.com/grantila/awesome-code-frame#readme","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","type":"module","sideEffects":false,"engines":{"node":"^14.13.1 || >=16.0.0"},"scripts":{"build":"rimraf dist && tsc -p tsconfig.prod.json","test":"FORCE_COLOR=1 NODE_OPTIONS=--experimental-vm-modules jest","cz":"git-cz"},"repository":{"type":"git","url":"git+https://github.com/grantila/awesome-code-frame.git"},"keywords":["code","frame","babel","awesome"],"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-typescript":"^7.16.7","@types/babel__helper-validator-identifier":"^7.15.0","@types/charcodes":"^0.2.0","@types/jest":"^27.4.1","cz-conventional-changelog":"^3.3.0","jest":"^28.0.3","rimraf":"^3.0.2","strip-ansi":"^7.0.1","ts-jest-resolver":"^2.0.0","ts-node":"^10.7.0","typescript":"^4.6.3"},"dependencies":{"@babel/helper-validator-identifier":"^7.16.7","chalk":"^5.0.1","charcodes":"^0.2.0","js-tokens":"^7.0.0"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"c5f364d04a0c34b53e91112b45371068ed4a510e","_id":"awesome-code-frame@1.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-CMBEN29WXYw2zmWeYT+h74QHLiB6ArXqIl8ri9Tpbl6iGbhNeBO3YzbZTp2gwZcb4T7umqbXPX+6bORbSlaKcQ==","shasum":"38459c8bdaa304f143df03837673913580e82665","tarball":"https://registry.npmjs.org/awesome-code-frame/-/awesome-code-frame-1.0.0.tgz","fileCount":10,"unpackedSize":17556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDBDSUi32UtqATZIo33e92jv+wddh6jYmKpnyzLFwpuzAiBWG3C0aGf9I+RAOLgEuXDbpaQ5mk/Wgr/PPypJfteajg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicEVPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAiQ/7BbmBlzV8fUgIl/Th4CqzPqMJ6l5Mrj1DU65dbXCEboHs2X5h\r\n+1Uuk4jMUTozjNvx/adfzvaMciCpEYOY3l5rcaEeQu/D6kf40fYKOyNi+y2o\r\neW044ukduYJIwUmgqCV2W4EOEQ7H5Rxw9WR0Meo/Q/ZiXF6VnnkqMgHo7V2W\r\nnhh3P01vkp9rDsDtxdLbsdxssZpf+POfHwVA5DLe3jOPeC3nN46ZGgva/0pS\r\nfZzIcNG4CkmkdCV7hvHrbj8YEU7+kfouNhkxYvp2Bppb8uNLFcTtXj3elMk/\r\nrG8SVViTd2gtYndnOjzLhI7b8ptm5fzEvg7INSuhJmhNDxQYNeXxFpL8KE7c\r\nBg81aBJDABn9CwylbJ6AQm2DhDMH36YoKX4CM3T8hQsVEBQgu003Aurd0F8r\r\ngpz/kIDYz+py6SpvTX844P6BKvlm0GP8mlKWzWNXQ8GQqC9LAdfyjC/SY9Fk\r\nKeuezHXSJ0IapWkmlkZQZcdq8iKnOX9ooaiMs9NvvkR6Xrw3a53N0Tjn+q3Y\r\nt3t/xhrsAZPU7pZ9l57hbacbCIIpG1In1lzcR6epsIHFv+9vAA2dJQgLOiVv\r\np73fI9N5XGHWw0SB4AZCqFl+SEWHueZDKstdXXtVsrWrdzNyIvDvgtSjojQ0\r\nLa3fCweQFAWw9UueaZOhKOpadep8WhRptwg=\r\n=AMKB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"grantila","email":"g.rantila@gmail.com"},"directories":{},"maintainers":[{"name":"grantila","email":"g.rantila@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awesome-code-frame_1.0.0_1651524942864_0.18112321807880494"},"_hasShrinkwrap":false},"1.0.1":{"name":"awesome-code-frame","version":"1.0.1","description":"Fork of @babel/code-frame with modern dependencies and exports","author":{"name":"Gustaf Räntilä"},"license":"MIT","bugs":{"url":"https://github.com/grantila/awesome-code-frame/issues"},"homepage":"https://github.com/grantila/awesome-code-frame#readme","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","type":"module","sideEffects":false,"engines":{"node":"^14.13.1 || >=16.0.0"},"scripts":{"build":"rimraf dist && tsc -p tsconfig.prod.json","test":"FORCE_COLOR=1 NODE_OPTIONS=--experimental-vm-modules jest","cz":"git-cz"},"repository":{"type":"git","url":"git+https://github.com/grantila/awesome-code-frame.git"},"keywords":["code","frame","babel","awesome"],"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-typescript":"^7.16.7","@types/babel__helper-validator-identifier":"^7.15.0","@types/charcodes":"^0.2.0","@types/jest":"^27.4.1","cz-conventional-changelog":"^3.3.0","jest":"^28.0.3","rimraf":"^3.0.2","strip-ansi":"^7.0.1","ts-jest-resolver":"^2.0.0","ts-node":"^10.7.0","typescript":"^4.6.3"},"dependencies":{"@babel/helper-validator-identifier":"^7.16.7","chalk":"^5.0.1","charcodes":"^0.2.0","js-tokens":"^7.0.0"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"ec4044b6b8bf39299c9134323e73d1083e5a2475","_id":"awesome-code-frame@1.0.1","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-twKEOT7DBL+kyiVQk+a8BNDx3dHGSQE+/GVbePYBxSATXuMh5O1EKoXrH62D79e3VLHfGuXwVlqEXb2XkA1uUQ==","shasum":"1ba36f56e9eec709e78ce134e2608a6bbf98ee30","tarball":"https://registry.npmjs.org/awesome-code-frame/-/awesome-code-frame-1.0.1.tgz","fileCount":10,"unpackedSize":17746,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHKqoCZK39NNb41+A//2BnzgsJOV8xD4Hxng2YvBhjVwAiBMHGTZqXMF3e1sqhsJXnheIbhBpa9AWpOpiWIdz+Ixww=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJics97ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZkQ/6ApjqoCj2QttRWCf9lw34GDE6ljq14hZoWhm67VihPxND4Rqj\r\nXfEALjQG3Qsk9om0LZv7zzIihkGi/2jFAEfyy+kHoZtI39lYMm7tJs2vv5uj\r\n3AaZCTf1mEV6SYJ+PwStkvdGQDVKmappBQdb2LTbPFNTAHjsMNBootwK6Z83\r\nygbvAZd+aZQ/+0xx2sAMBTg8rwUkBjPOjc7ZZz2jEMP/5hIB/feW6hVojCbc\r\nSHvTbti/gi1HSg2Gq6ItOdFJkYJJnkVQ4hE9gdzwXPMqeuUceXaibs3f4d4A\r\ntYeZeEBOG7eIUtunh+LONYEb1fMStzykHtJiFQfXdQUjvv5xDcS8JiyKI6aA\r\n9Plnw7H4HpF9wZ27pLMYTvNeZq4ucN4r6t/2GcSLkGVa0HFVEXbIkePRlh9A\r\nRu2EjHsbAl4hHO8X4yGVc3enKvZ/U8wdjfGJJQWDpxRFFaVhSDxuIwce3eCg\r\n6AKQCO0V5AJIRAynLLDbaqAbUQuVG9b2DfJSN7kI5zoFDFt/CSrSlDUm1bqy\r\n1Bx7hDjnmglKANaub4T/7th7Xfy543Fo3/vHBwSVv2F1vlRboruaU4LckKuW\r\n15uhJd12iLZAFYRgxyrjb2BuiG++UhIMqUkBZo/7YFZOezbxHIu1qoRX6H+v\r\nxM8MetiBYqpdTRLQ3eQuL1F2j5/8Ftmg4aU=\r\n=2cQZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"grantila","email":"g.rantila@gmail.com"},"directories":{},"maintainers":[{"name":"grantila","email":"g.rantila@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awesome-code-frame_1.0.1_1651691387387_0.4492749051567977"},"_hasShrinkwrap":false},"1.1.0":{"name":"awesome-code-frame","version":"1.1.0","description":"Fork of @babel/code-frame with modern dependencies and exports","author":{"name":"Gustaf Räntilä"},"license":"MIT","bugs":{"url":"https://github.com/grantila/awesome-code-frame/issues"},"homepage":"https://github.com/grantila/awesome-code-frame#readme","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","type":"module","sideEffects":false,"engines":{"node":"^14.13.1 || >=16.0.0"},"scripts":{"build":"rimraf dist && tsc -p tsconfig.prod.json","test":"FORCE_COLOR=1 NODE_OPTIONS=--experimental-vm-modules jest","cz":"git-cz"},"repository":{"type":"git","url":"git+https://github.com/grantila/awesome-code-frame.git"},"keywords":["code","frame","babel","awesome"],"devDependencies":{"@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/babel__helper-validator-identifier":"^7.15.0","@types/charcodes":"^0.2.0","@types/jest":"^27.5.2","cz-conventional-changelog":"^3.3.0","jest":"^29.4.1","rimraf":"^4.1.2","strip-ansi":"^7.0.1","ts-jest-resolver":"^2.0.0","ts-node":"^10.9.1","typescript":"^4.9.5"},"dependencies":{"@babel/helper-validator-identifier":"^7.19.1","chalk":"^5.2.0","charcodes":"^0.2.0","js-tokens":"^8.0.1"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"packageManager":"yarn@3.2.4","gitHead":"702874dd0da60190959f55176b87dd582cd51bc1","_id":"awesome-code-frame@1.1.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-FJH2rUCFpCMIm1YU1n5Oit59Sy9Okc+K5z77MbbKDcLoNuFbskq55qZO7ePoVuImoMEQ+G5FgLneUWUlJ89FEQ==","shasum":"9deb6bb4204f72d179a5c544c716b80957e38a5a","tarball":"https://registry.npmjs.org/awesome-code-frame/-/awesome-code-frame-1.1.0.tgz","fileCount":10,"unpackedSize":17504,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGogIhRaY3YsDlJzG1+umitxX3xCF662rbqCJ33L1DTQAiBfCpA5eNg6Yc1edvQVRTo/82ikbEZhh9jDWHmdg1ZRzw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3iLFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWXhAAg4+tZCGthpni4czCcX9WvKj3ADHbTh3LpRK+/XbWdWbYkF/L\r\n593dx9UFswsBDD0B0fT3pR4uQRBZTfmv6CxFoSpakZvrgCn57nmFIeDVyswm\r\nYiXxSgqjTXDnqScUZn6wtWHfb+3wGPOVIKHlmHVOpB5dB3c/Rbmqx/fiXyFc\r\noFo6gFHygIefCPh0CautVKkpl+KTGK4vvZYTUXlqk64VLpcjMtL0JHqIwjXa\r\n9U5v9BvYQp44ThalFAIKWlGT2Wf+ZTISZSzRDVwuKKMLZVWEBK+uztznzTY6\r\ndEmciv/cbLzzviKI/+v6APBdzTkmQeTA/2BBfnIptgQq69PgSOLgyrJTyxCd\r\noqRON79N1L1vvJSJeYygo95MJJD7Jw8bIZkuzHNgYdj6R7TJmWYte5s7VDGg\r\nia4HMuDO+LHye0hb8Z2HsKubKO6rWny04cbcdqCr+eFP8XgcR3MI3miD1sux\r\noGVLkDVaL3Xrdak6H9mldnWR2x8/zfgF0yyxMuU/JDcB3xEnseyto26jIk1r\r\n3CHCGBjdQhxwTR+oDTr3biWdO5kjeTQHH1BGmlhkfdQw+BIKbz9FqWrr4qgA\r\n5Zp8fFZzR1rocVeHYEUoCX0Wp6ode11zMpkWHlyKiz3wkPsfJS5A8dFsiZxd\r\nOSYFEfiCoAcvz5R89wRMsC1X7Lp1+lUmCHU=\r\n=T3MC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"grantila","email":"g.rantila@gmail.com"},"directories":{},"maintainers":[{"name":"grantila","email":"g.rantila@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awesome-code-frame_1.1.0_1675502276874_0.5379189369474506"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-02T20:55:42.864Z","1.0.0":"2022-05-02T20:55:43.002Z","modified":"2023-02-04T09:17:57.130Z","1.0.1":"2022-05-04T19:09:47.861Z","1.1.0":"2023-02-04T09:17:57.050Z"},"maintainers":[{"name":"grantila","email":"g.rantila@gmail.com"}],"description":"Fork of @babel/code-frame with modern dependencies and exports","homepage":"https://github.com/grantila/awesome-code-frame#readme","keywords":["code","frame","babel","awesome"],"repository":{"type":"git","url":"git+https://github.com/grantila/awesome-code-frame.git"},"author":{"name":"Gustaf Räntilä"},"bugs":{"url":"https://github.com/grantila/awesome-code-frame/issues"},"license":"MIT","readme":"[![npm version][npm-image]][npm-url]\n[![downloads][downloads-image]][npm-url]\n[![build status][build-image]][build-url]\n[![coverage status][coverage-image]][coverage-url]\n\n\n# awesome-code-frame\n\n## What is this?\n\nThis is a fork of [@babel/code-frame](https://www.npmjs.com/package/@babel/code-frame) with the latest dependencies (e.g of [chalk](https://www.npmjs.com/package/chalk)) and exported as a [pure ESM][pure-esm] package. It uses the latest chalk, which means it requires support for package imports. If this causes problems in Jest for you, see [this issue](https://github.com/chalk/chalk/issues/532) for help.\n\n\n# Usage\n\nThe package exports a function `codeFrameColumns()` which works just like `@babel/code-frame` although all dependent types are exported too.\n\n```ts\ncodeFrameColumns( rawLines: string, loc: NodeLocation, opts?: Options ): string;\n```\n\nwhere `NodeLocation` is defined as:\n\n```ts\ninterface NodeLocation {\n    start: Location;\n    end?: Location;\n}\n```\n\n`Location` as:\n\n```ts\ninterface Location {\n    column: number;\n    line: number;\n};\n```\n\nand `Options` as:\n\n```ts\nexport interface Options {\n  /**\n   * Syntax highlight the code as JavaScript for terminals. default: false\n   * */\n  highlightCode?: boolean;\n  /**\n   * The number of lines to show above the error. default: 2\n   * */\n  linesAbove?: number;\n  /**\n   * The number of lines to show below the error. default: 3\n   * */\n  linesBelow?: number;\n  /**\n   * Forcibly syntax highlight the code as JavaScript (for non-terminals);\n   * overrides highlightCode.\n   * default: false\n   */\n  forceColor?: boolean;\n  /**\n   * Pass in a string to be displayed inline (if possible) next to the\n   * highlighted location in the code. If it can't be positioned inline,\n   * it will be placed above the code frame.\n   * default: nothing\n   */\n  message?: string;\n}\n```\n\n\n\n[npm-image]: https://img.shields.io/npm/v/awesome-code-frame.svg\n[npm-url]: https://npmjs.org/package/awesome-code-frame\n[downloads-image]: https://img.shields.io/npm/dm/awesome-code-frame.svg\n[build-image]: https://img.shields.io/github/actions/workflow/status/grantila/awesome-code-frame/master.yml?branch=master\n[build-url]: https://github.com/grantila/awesome-code-frame/actions?query=workflow%3AMaster\n[coverage-image]: https://coveralls.io/repos/github/grantila/awesome-code-frame/badge.svg?branch=master\n[coverage-url]: https://coveralls.io/github/grantila/awesome-code-frame?branch=master\n[pure-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n","readmeFilename":"README.md"}