{"name":"node-exports-info","version":"1.2.0","keywords":["node","exports","support","info","ranges","categories","conditions","patterns","pattern trailers","experimental","esm","cjs","require","import"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"node-exports-info@1.2.0","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/inspect-js/node-exports-info#readme","bugs":{"url":"https://github.com/inspect-js/node-exports-info/issues"},"dist":{"shasum":"3bc0e0ad3c42860fcf88c344a233df75d30ebd3f","tarball":"http://registry-npm.ywwl.com/node-exports-info/download/node-exports-info-1.2.0.tgz","fileCount":19,"integrity":"sha512-dG6hOwRxOSMVVpp2oz1W1EMYheTbIx/94PPegIe0YVyKfHcgX3vUn7igDWlDui0j+vngB7WYJ4vnrnTB5/qu3g==","signatures":[{"sig":"MEQCID7RxJ7N3yUSdpU7jWIW6HsXbVjd+eDiVdQkYKbibMS1AiA4WrgqpyBXFvMsLAkyt5uqQWTcUI6lFXd4XQ8s57kPWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUSZ3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpEsg/5ASUHacIk8TQcL03TmKvCgzbHIfZcZvBK99LgJE/5z2jhYhHI\r\nmwjyn/ba7BlT/qOoAwAm4iaOeArAwETVOAGBvNtOCz+UTWPWfM9Wd6MUhZwR\r\nMWbNvQjkhupcfoE7jDr8oEBp2tF4O3tVY5tYkr2Gl2WAyKIdT6Wp65NT/3dT\r\naPXLM64Pk9b4egeORskYdNWweuWy9zjoFLtFGmzDMTQVInfdQLVU4Dv7IUD7\r\nublCDuai4N3fGTkiHOF+h04PaT8C4CoWrdXzEdreyJnPj7CYvFJy7pjq90WL\r\nkXs2/xg5UQMiVAn1f7Eno0v8cr5HCFqrz+OiE7VOu2pfDbglRmw3Nbl6wyq3\r\nLu1IjgUNaU8EJYnKATfKERhJHTO/cILk90QTzkRkWSs/3Lz0uPE8cK3hLYKB\r\nIQkUQh0gmQJ2g97IdyGD3QsSYw3kedLMYi8gd54PcbvO6K/pYZ6hBuJGpBCb\r\nNxJRt5U8h2iRTSuwgQ6rsFkR+58Ochv0icV7qvXiRhmRLpEcCW1nbpaAsWCN\r\nx9UiWUt+AfAwISbwm+P23pBg1zVweFNB+FusnQrgCWjo8/lb85r5vJmRyaQd\r\nDpkZ/YZTLZzH/GiXIN92Q9njJqOU1MbAH1hTTOjm0W0FWb36RH5PwBEuqV0L\r\nLWTd2o8Lz3ofZR1fYR7a+F3T6LinAEmI6iQ=\r\n=qgS3\r\n-----END PGP SIGNATURE-----\r\n","size":6601,"noattachment":false,"key":"/node-exports-info/-/node-exports-info-1.2.0.tgz"},"main":false,"engines":{"node":">= 0.4"},"exports":{"./getRange":"./getRange.js","./getCategory":"./getCategory.js","./package.json":"./package.json","./getRangePairs":"./getRangePairs.js","./getCategoriesForRange":"./getCategoriesForRange.js","./getConditionsForCategory":"./getConditionsForCategory.js"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"4da8514b0a869f53b64e1386be5f2e032c1189fe","scripts":{"lint":"eslint --ext=js,mjs .","test":"npm run tests-only","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","posttest":"aud --production","tests-only":"nyc tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"repository":{"url":"git+https://github.com/inspect-js/node-exports-info.git","type":"git"},"_npmVersion":"8.3.1","description":"Info about node `exports` field support: version ranges, categories, etc.","directories":{},"sideEffects":false,"_nodeVersion":"17.9.0","dependencies":{"semver":"^6.3.0","object.entries":"^1.1.5","array.prototype.find":"^2.1.2","array.prototype.flatmap":"^1.2.5"},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"aud":"^2.0.0","nyc":"^10.3.2","tape":"^5.5.3","eslint":"=8.8.0","for-each":"^0.3.3","auto-changelog":"^2.4.0","@ljharb/eslint-config":"^20.2.3"},"_npmOperationalInternal":{"tmp":"tmp/node-exports-info_1.2.0_1649485431768_0.8680280238456606","host":"s3://npm-registry-packages"},"readme":"# node-exports-info <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nInfo about node `exports` field support: version ranges, categories, etc.\n\n## Categories\n - `pre-exports`: versions before node supported `exports` in any way (`< 12.17`)\n - `broken`: versions that have a broken `exports` implementation. These only support the string form, and array fallbacks. (`13.0 - 13.2`)\n - `experimental`: versions where `exports` support was experimental. These only support the “default” condition in the object form. (`13.3 - 13.6`)\n - `conditions`: the first versions where `exports` support was unflagged. (`13.7 - 13.12`)\n - `broken-dir-slash-conditions`: `conditions`, but directory exports (ending in `./`) are broken in these versions (`12.17 - 12.19 || ^13.13 || 14.0 - 14.12`)\n - `patterns`: support for “patterns” was added in these versions, and directory exports (ending in `./`) are broken (`^12.20 || 14.13 - 14.18 || 15.x || 16.0 - 16.8`)\n - `pattern-trailers`: support for “pattern trailers” was added in these versions (`^14.19 || 16.9 - 16.13`)\n - `pattern-trailers+json-imports`: `pattern-trailers`, and JSON can be `import`ed (`^16.14`)\n - `pattern-trailers-no-dir-slash`: support for directory exports (ending in `./`) was removed for these versions (`17.0`)\n - `pattern-trailers-no-dir-slash+json-imports`: `pattern-trailers-no-dir-slash`, and JSON can be `import`ed (`17.1 - 19 || 20 - 20.18 || ^21 || 22 - 22.11`)\n - `require-esm`: ESM files can be `require`d (`23 - 23.5 || 22.12 - 22.17 || ^20.19`)\n - `strips-types`: these versions also automatically strip types from typescript files, for both `require` and `import` (`23.6 - 25.3 || ^22.18`)\n - `subpath-imports-slash`: these versions support `#/` subpath imports patterns in the `imports` field, e.g. `\"#/*\": \"./src/*.js\"` (`>= 25.4`)\n\n## Entry points\n - `node-exports-info/getCategoriesForRange`: takes a node semver version range; returns an array of categories that overlap it\n - `node-exports-info/getCategory`: takes an optional node semver version (defaults to the current node version); returns the latest category that matches it\n - `node-exports-info/getCategoryFlags`: takes a category; returns an object with boolean flags `{ patterns, patternTrailers, dirSlash }` indicating which `exports` features are supported\n - `node-exports-info/getCategoryInfo`: takes a category and an optional `moduleSystem` (`'require'` or `'import'`); returns an object with `conditions` (array or null) and `flags` (from `getCategoryFlags`)\n - `node-exports-info/getConditionsForCategory`: takes a category and an optional `moduleSystem` (`'require'` or `'import'`); returns an array of `exports` \"conditions\" that is supported, or `null` if `exports` itself is not supported\n - `node-exports-info/getRange`: takes a category; returns the node semver version range that matches it\n - `node-exports-info/getRangePairs`: returns an array of entries - each a tuple of “semver range” and “category”\n - `node-exports-info/isCategory`: takes a category; returns true if it’s a known category\n\n## Related packages\n - [`has-package-exports`](https://www.npmjs.com/package/has-package-exports): feature-detect your node version’s `exports` support\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/node-exports-info\n[npm-version-svg]: https://versionbadg.es/inspect-js/node-exports-info.svg\n[deps-svg]: https://david-dm.org/inspect-js/node-exports-info.svg\n[deps-url]: https://david-dm.org/inspect-js/node-exports-info\n[dev-deps-svg]: https://david-dm.org/inspect-js/node-exports-info/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/node-exports-info#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/node-exports-info.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/node-exports-info.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/node-exports-info.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=node-exports-info\n[codecov-image]: https://codecov.io/gh/inspect-js/node-exports-info/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/node-exports-info/\n[actions-image]: https://img.shields.io/github/check-runs/inspect-js/node-exports-info/main\n[actions-url]: https://github.com/inspect-js/node-exports-info/actions\n","publish_time":1649485431924,"_cnpm_publish_time":1649485431924,"dist-tags":{"latest":"2.0.0"}}