Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check npm package name availability after new package moniker rules?

Tags:

node.js

npm

Situation: now npm have New Package Moniker rules so we can't publish package with name, that is 'too similar' to existing packages. For example, we can't publish package with name 're.quest', cause package 'request' already exists. npm publish . will fail with error.

Unfortunately, we also can't check availability of package name until we try to publish it.

npm search re.quest will not tell us about 'request' package or any other reason to treat name 're.quest' as unavailable.

Tool npm-name-cli will say '✔ re.quest is available'.

But it is not.

Question: is there any way to check real availability of npm package name without trying to publish it? Any npm command, CLI tool, npm site API or anything else?

like image 237
kozlov.am Avatar asked May 24 '18 11:05

kozlov.am


1 Answers

use npm search

for example:

PS C:\Users\ashkan nasirzadeh> npm search bable
NAME                      | DESCRIPTION          | AUTHOR          | DATE       | VERSION  | KEYWORDS
bable                     |                      | =sebmck         | 2015-02-16 | 1.0.1    |
bable-import-style-suffix | Modify the suffix…   | =mi_huan        | 2020-08-21 | 1.0.0    | change import path suffix
@kuddai/logonce           | Sometimes you wish…  | =kuddai         | 2020-06-27 | 1.0.0    | logging bable-plugin
jsmp-infra-nik-package    | my HW6 for Module2   | =nik_shaposhni… | 2020-04-01 | 1.0.4    | node scripts bable
bable-plugin-runmap       | show your code…      | =horve          | 2020-08-04 | 0.0.1    |
miaow-babel-parse         | Miaow的Babel编译工…  | =anhulife       | 2017-04-01 | 2.1.0    | miaow bable es2015 es2016 jsx
@58fe/bable-plugin-p5-imp | 针对p5组件库的按需…  | =liuhanbing…    | 2019-08-01 | 1.1.0    | 58 p5 vue 按需加载 vue-components ui
ort                       |                      |                 |            |          |
@oneisland/babler         | The perfectly…       | =larkin-nz      | 2019-11-08 | 0.0.9    | babler babel module-resolver oneisland
vinus4                    | Vinus is an…         | =usamaxyz       | 2020-05-28 | 1.0.3    | bable typescript gulp browserify watchify less sass rtl minify concat es6
bs-node-hello-world       | A Hello World…       | =albsugy        | 2017-07-02 | 0.0.1    |
vinus                     | Vinus is an…         | =usamaxyz       | 2018-11-06 | 1.3.8    | bable typescript gulp browserify watchify less sass rtl minify concat es6
rupert-plugin-babel       | Rupert…              | =davidsouther   | 2015-06-05 | 0.0.1    | rupert config esnext babel
@jarzzzi/nidavel          | ## 特性: - 支持…    | =jarzzzi        | 2020-04-07 | 1.0.6    |
@owo/owo                  | 1.…                  | =puge           | 2020-08-02 | 1.2.62   |
bable-loader-ymh          |                      | =jerryfishymh   | 2019-10-25 | 3.0.0    |
bable-plugin-transform-co | Babel preset to…     | =gyweqq         | 2018-12-25 | 1.0.0    |
py                        |                      |                 |            |          |
node-bb                   | Simple node bable…   | =crashbell      | 2017-01-21 | 2.0.11   | node babel boilerplate
@nolwenture/enumify       | This simply removes… | =zanitius…      | 2018-06-17 | 1.0.3    |
bable_es6                 |                      | =lapido         | 2017-08-10 | 1.0.15   |
babel-plugin-project-rela | A Bable plugin for…  | =gavriguy       | 2015-11-07 | 2.0.3    | babel babel-plugin
tive-require

if your package name hasn't been used yet you will encounter sth like:

PS C:\Users\ashkan nasirzadeh> npm search phpAPI                                                                                                                     
No matches found for "phpAPI"

more information about this command is available here

like image 191
kia nasirzadeh Avatar answered Oct 18 '22 20:10

kia nasirzadeh