包详细信息

@npmcli/name-from-folder

npm14.4mISC3.0.0

Get the package name from a folder path

自述文件

@npmcli/name-from-folder

Get the package name from a folder path, including the scope if the basename of the dirname starts with @.

For a path like /x/y/z/@scope/pkg it'll return @scope/pkg. If the path name is something like /x/y/z/pkg, then it'll return pkg.

USAGE

const nameFromFolder = require('@npmcli/name-from-folder')
const name = nameFromFolder('/some/folder/path')

更新日志

Changelog

3.0.0 (2024-09-24)

⚠️ BREAKING CHANGES

  • @npmcli/name-from-folder now supports node ^18.17.0 || >=20.5.0

    Bug Fixes

  • 4865201 #56 align to npm 10 node engine range (@hashtagchris)

    Chores

  • c6232a0 #58 enable auto publish (#58) (@reggi)
  • bad5ce6 #56 run template-oss-apply (@hashtagchris)
  • 6901265 #54 Bump @npmcli/eslint-config from 4.0.5 to 5.0.0 (@dependabot[bot])
  • 4b07860 #55 Bump @npmcli/template-oss from 4.23.1 to 4.23.3 (@dependabot[bot])
  • be16c20 #52 Bump @npmcli/template-oss from 4.22.0 to 4.23.1 (@dependabot[bot])
  • f77cefb #43 bump @npmcli/template-oss to 4.22.0 (@lukekarrys)
  • 47a905e #42 Bump @npmcli/template-oss from 4.21.3 to 4.21.4 (@dependabot[bot])
  • bbae674 #38 Bump @npmcli/template-oss from 4.21.1 to 4.21.3 (@dependabot[bot])
  • a444cf5 #35 Bump @npmcli/template-oss from 4.19.0 to 4.21.1 (@dependabot[bot])
  • 833849b #15 Bump @npmcli/template-oss from 4.13.0 to 4.19.0 (@dependabot[bot])
  • f6eb29a #13 Bump @npmcli/template-oss from 4.11.4 to 4.13.0 (#13) (@dependabot[bot], @npm-cli-bot, @nlf)
  • b382ed4 #12 Bump @npmcli/template-oss from 4.11.3 to 4.11.4 (#12) (@dependabot[bot], @npm-cli-bot, @nlf)
  • 36e8841 #11 Bump @npmcli/template-oss from 4.11.0 to 4.11.3 (@dependabot[bot])
  • 961243e #55 postinstall for dependabot template-oss PR (@hashtagchris)

2.0.0 (2022-12-12)

⚠️ BREAKING CHANGES

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

Features