{"name":"node-exports-info","version":"1.6.1","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.6.1","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":"db31485d4c74a41297ea0d7bcf141dd53a7cd05f","tarball":"http://registry-npm.ywwl.com/node-exports-info/download/node-exports-info-1.6.1.tgz","fileCount":36,"integrity":"sha512-e3D7zrrZ1xIiCjEmwmwn7lJb/zVifC83jZc3Fi70p8+5lkf6vVrSx31bBl876FeSJEQb2vtIyZ/GX7l8gYkmew==","signatures":[{"sig":"MEQCICbQS4GZz275JryQKFqDMA6HHvrXAyffo28Sni87MGrDAiARUmCcweogWgeUSSkbiBkbPva6REQgbez7M2Z/FYxY2A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44528,"size":12237,"noattachment":false,"key":"/node-exports-info/-/node-exports-info-1.6.1.tgz"},"main":false,"engines":{"node":">= 0.4"},"exports":{"./getRange":"./getRange.js","./isCategory":"./isCategory.js","./getCategory":"./getCategory.js","./package.json":"./package.json","./getRangePairs":"./getRangePairs.js","./getCategoryInfo":"./getCategoryInfo.js","./getCategoryFlags":"./getCategoryFlags.js","./getCategoriesForRange":"./getCategoriesForRange.js","./getConditionsForCategory":"./getConditionsForCategory.js"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"b7ef0f40e084120114c0fe0cfe0d1d392eff997a","scripts":{"lint":"eslint .","test":"npm run tests-only","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"tsc && attw -P","posttest":"npx npm@'>=10.2' audit --production","prepublish":"not-in-publish || npm run prepublishOnly","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)\")\"","prepublishOnly":"safe-publish-latest"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com","approver":{"name":"ljharb","email":"ljharb@gmail.com"}},"repository":{"url":"git+https://github.com/inspect-js/node-exports-info.git","type":"git"},"_npmVersion":"11.16.0","description":"Info about node `exports` field support: version ranges, categories, etc.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"semver":"^6.3.1","es-errors":"^1.3.0","object.entries":"^1.1.9","array.prototype.flatmap":"^1.3.3"},"publishConfig":{"ignore":[".github/workflows"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"nyc":"^10.3.2","jiti":"^0.0.0","tape":"^5.10.2","eslint":"^10.5.0","for-each":"^0.3.5","npmignore":"^0.3.5","in-publish":"^2.0.1","typescript":"next","@types/node":"^16.18.126","@types/semver":"^6.2.7","auto-changelog":"^2.6.0","object-inspect":"^1.13.4","@ljharb/tsconfig":"^0.3.2","es-value-fixtures":"^1.7.1","safe-publish-latest":"^2.0.0","@arethetypeswrong/cli":"^0.18.4","@ljharb/eslint-config":"^22.2.3","@types/object-inspect":"^1.13.0","@types/object.entries":"^1.1.1","@types/array.prototype.flatmap":"^1.2.6"},"_npmOperationalInternal":{"tmp":"tmp/node-exports-info_1.6.1_1782155977964_0.031842599587176945","host":"s3://npm-registry-packages-npm-production"},"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-no-node-addons`: support for “pattern trailers” was added here, but the `node-addons` condition arrived one minor later (`16.9`)\n - `pattern-trailers`: `pattern-trailers-no-node-addons`, plus the `node-addons` condition (`^14.19 || 16.10 - 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 || ^22.18`)\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 - [`node-imports-info`](https://www.npmjs.com/package/node-imports-info): the same, for the `imports` field\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":1782155978079,"_cnpm_publish_time":1782155978079,"dist-tags":{"latest":"2.0.0"}}