包详细信息

npm-normalize-package-bin

npm64.1mISC4.0.0

Turn any flavor of allowable package.json bin into a normalized object

自述文件

npm-normalize-package-bin

Turn any flavor of allowable package.json bin into a normalized object.

API

const normalize = require('npm-normalize-package-bin')
const pkg = {name: 'foo', bin: 'bar'}
console.log(normalize(pkg)) // {name:'foo', bin:{foo: 'bar'}}

Also strips out weird dots and slashes to prevent accidental and/or malicious bad behavior when the package is installed.

更新日志

Changelog

4.0.0 (2024-09-03)

⚠️ BREAKING CHANGES

  • npm-normalize-package-bin now supports node ^18.17.0 || >=20.5.0

    Bug Fixes

  • a1c7cb8 #89 align to npm 10 node engine range (@hashtagchris)

    Chores

  • cf43a5d #89 run template-oss-apply (@hashtagchris)
  • a2e246b #87 bump @npmcli/eslint-config from 4.0.5 to 5.0.0 (@dependabot[bot])
  • 1799d4b #77 bump @npmcli/template-oss to 4.22.0 (@lukekarrys)
  • 65d9e5f #88 postinstall for dependabot template-oss PR (@hashtagchris)
  • 34b5912 #88 bump @npmcli/template-oss from 4.23.1 to 4.23.3 (@dependabot[bot])

3.0.1 (2023-05-02)

Bug Fixes

  • 1ebb83b #41 apply slash normalizer before bin path join (#41) (@antongolub)

3.0.0 (2022-10-10)

⚠️ BREAKING CHANGES

  • npm-normalize-package-bin is now compatible with the following semver range for node: ^14.17.0 || ^16.13.0 || >=18.0.0

Features

  • 06ee481 #23 postinstall for dependabot template-oss PR (@lukekarrys)

2.0.0 (2022-08-22)

⚠ BREAKING CHANGES

  • make node engines ^12.13.0 || ^14.15.0 || >=16.0.0

Bug Fixes

  • replace deprecated String.prototype.substr() (f7f3bc4)

Dependencies