Socket
Socket
Sign inDemoInstall

compatible-path-parse

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    compatible-path-parse

path.parse() from Node.js without unnecessary semver bumps


Version published
Weekly downloads
4
increased by100%
Maintainers
1
Install size
27.0 kB
Created
Weekly downloads
 

Readme

Source

path.parse() from Node.js without unnecessary semver bumps

npm

See packaged-path-parse for documentation, this module just is a re-export of that without unnecessary major- and minor- version bumps.

Why?

packaged-path-parse and compatible-path-parse were designed to come in pair.

packaged-path-parse packages path.parse() from a recent Node.js version under the same version as Node.js that the code originated from — to provide clear understanding of the Node.js version used as the source, to ease updating this module, and to give predictable behavior.

Because of that while packaged-path-parse conforms to semver requirements, it bumps versions more often than it should be done (but no needed bumps are missed).

So, this package provides additional semver goodness on top of that, making sure that minor- and major- versions of this package is not bumped when that is not needed by path.parse() implementation.

I.e. minor- versions of packaged-path-parse that do not actually bring any any additions (where a Node.js version bump was caused was caused by something other than path.parse()) will be included in a patch- release of this package. The same for major- versions of packaged-path-parse that do not bring any incompatibilities (and were just inherited from Node.js) — those will be either a minor- or a patch- versions of this package.

That said, this package conforms to semver and any imcompatible changes in packaged-path-parse will bump the major- version, and new additions will bump the minor- version.

That way you, and your users will get important updates faster, and that will better de-duplicate the code in case of several packages using this one.

Ponyfill

This module fits all definitions of being a ponyfill.

Usage

See path.parse() documentation.

const pathParse = require('compatible-path-parse')
pathParse(path) // platform-dependant, default — posix
pathParse.posix(path) // posix
pathParse.win32(path) // win32

License

MIT. See LICENSE file.

Keywords

FAQs

Last updated on 12 Apr 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc