Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Info about node `exports` field support: version ranges, categories, etc.

License

NotificationsYou must be signed in to change notification settings

inspect-js/node-exports-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

github actionscoveragedependency statusdev dependency statusLicenseDownloads

npm badge

Info about nodeexports field support: version ranges, categories, etc.

Categories

  • pre-exports: versions before node supportedexports in any way (< 12.17)
  • broken: versions that have a brokenexports implementation. These only support the string form, and array fallbacks. (13.0 - 13.2)
  • experimental: versions whereexports support was experimental. These only support the "default" condition in the object form. (13.3 - 13.6)
  • conditions: the first versions whereexports support was unflagged. (13.7 - 13.12)
  • 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)
  • 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)
  • pattern-trailers: support for "pattern trailers" was added in these versions (^14.19 || 16.9 - 16.13)
  • pattern-trailers+json-imports:pattern-trailers, and JSON can beimported (^16.14)
  • pattern-trailers-no-dir-slash: support for directory exports (ending in./) was removed for these versions (17.0)
  • pattern-trailers-no-dir-slash+json-imports:pattern-trailers-no-dir-slash, and JSON can beimported (17.1 - 19 || 20 - 20.18 || ^21 || 22 - 22.11)
  • require-esm: ESM files can berequired (23 - 23.5 || ^22.12 || ^20.19)
  • strips-types: these versions also automatically strip types from typescript files, for bothrequire andimport (>= 23.6)

Entry points

  • node-exports-info/getCategoriesForRange: takes a node semver version range; returns an array of categories that overlap it
  • node-exports-info/getCategory: takes an optional node semver version (defaults to the current node version); returns the latest category that matches it
  • node-exports-info/getConditionsForCategory: takes a category and an optionalmoduleSystem ('require' or'import'); returns an array ofexports "conditions" that is supported, ornull ifexports itself is not supported
  • node-exports-info/getRange: takes a category; returns the node semver version range that matches it
  • node-exports-info/getRangePairs: returns an array of entries - each a tuple of "semver range" and "category"
  • node-exports-info/isCategory: takes a category; returns true if it’s a known category

Related packages

Tests

Simply clone the repo,npm install, and runnpm test

About

Info about node `exports` field support: version ranges, categories, etc.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp