Skip to content

Commit 880de8a

Browse files
committed
docs: Update search
1 parent 229349b commit 880de8a

File tree

6 files changed

+7
-25
lines changed

6 files changed

+7
-25
lines changed

content/packages-and-modules/getting-packages-from-the-registry/searching-for-and-choosing-packages-to-download.mdx

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,21 @@ redirect_from:
44
- /getting-started/searching-for-packages
55
---
66

7-
You can use the npm search bar to find packages to use in your projects. npm search uses npms and the npms analyzer; for more information on both, see https://npms.io/about.
7+
You can use the npm search bar to find packages to use in your projects. The search is performed using content from the package's title, description, readme, and keywords and is powered by [opensearch](https://opensearch.org/). Search results are displayed based on keyword matching from the package's title, description, readme, and keywords. No subjective ranking criteria are applied, aiming to provide a neutral stance towards all (non-malicious, non-spam) packages.
88

99
## Searching for a package
1010

1111
1. In the search bar, type a search term and press **Enter**. As you type, possible choices will appear.
1212

13-
<Screenshot src="/packages-and-modules/getting-packages-from-the-registry/search-qr.png" alt="Screenshot of a search text box" />
13+
<Screenshot src="/packages-and-modules/getting-packages-from-the-registry/search-suggestions.png" alt="Screenshot of a search text box with automatic suggestions" />
1414

15-
<Screenshot src="/packages-and-modules/getting-packages-from-the-registry/search-qr-results.png" alt="Screenshot of the search text box and search results" />
15+
<Screenshot src="/packages-and-modules/getting-packages-from-the-registry/search-results.png" alt="Screenshot of the search text box and search results" />
1616

17-
2. To list packages ranked according to [package search rank criteria](#package-search-rank-criteria), in the left sidebar, under "Sort packages", click the criterion. For example, to sort packages by popularity, click "Popularity".
17+
2. The results are headed by an approximate count of packages found and a dropdown control for different sorting options. The dropdown offers sorting options like by keyword matching (Default), download counts, most dependents, and last published date to help users refine their search.
1818

19-
3. In the package search results list, click the name of the package.
20-
21-
## Package search rank criteria
22-
23-
Often, there are dozens or even hundreds of packages with similar names and/or similar purposes. To help you decide the best ones to explore, each package has been ranked according to four criteria using the npms analyzer:
24-
25-
### Popularity
26-
27-
Popularity indicates how many times the package has been downloaded. This is a strong indicator of packages that others have found to be useful.
28-
29-
### Quality
19+
<Screenshot src="/packages-and-modules/getting-packages-from-the-registry/search-sort-options.png" alt="Screenshot of the search Sort by dropdown featuring sorting options" />
3020

31-
Quality includes considerations such as the presence of a README file, stability, tests, up-to-date dependencies, custom website, and code complexity.
32-
33-
### Maintenance
34-
35-
Maintenance ranks packages according to the attention they are given by developers. More frequently maintained packages are more likely to work well with the current or upcoming versions of the npm CLI, for example.
36-
37-
### Optimal
38-
39-
Optimal combines the other three criteria (popularity, quality, maintenance) into one score in a meaningful way.
21+
3. In the package search results list, click the name of the package.
4022

4123
## Package provenance
4224

@@ -69,7 +51,7 @@ To view provenance information for a package in the npm registry:
6951

7052
<Note>
7153

72-
**Note:** Whenever you access a package's provenance information on npmjs.com, the linked source commit and repository are checked by npm. If the linked source commit or repository cannot be found, an error message will appear at the top of the page and alongside the provenance information. This is to inform you that the provenance for this package can no longer be established, which may occur when a repository is deleted or made private.
54+
**Note:** Whenever you access a package's provenance information on [npmjs.com](https://npmjs.com), the linked source commit and repository are checked by npm. If the linked source commit or repository cannot be found, an error message will appear at the top of the page and alongside the provenance information. This is to inform you that the provenance for this package can no longer be established, which may occur when a repository is deleted or made private.
7355

7456
<Screenshot src="/packages-and-modules/getting-packages-from-the-registry/[email protected]" alt="Screenshot showing a warning when the provenance source commit or repository cannot be found." />
7557

Binary file not shown.
Binary file not shown.
103 KB
Loading
15.1 KB
Loading
204 KB
Loading

0 commit comments

Comments
 (0)