Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ranking): add popularAlternativeNames, detect security packages (#941) #965

Closed
wants to merge 11 commits into from
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ For every single NPM package, we create a record in the Algolia index. The resul
deprecated: 'Deprecated', // This field will be removed, please use `isDeprecated` instead
isDeprecated: true,
deprecatedReason: 'Deprecated',
isSecurityHeld: false, // See https://github.com/npm/security-holder
badPackage: false,
homepage: 'https://babeljs.io/',
license: 'MIT',
Expand Down
7 changes: 7 additions & 0 deletions src/@types/pkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface Repo {
head?: string;
branch?: string;
}

export interface GithubRepo {
user: string;
project: string;
Expand Down Expand Up @@ -48,6 +49,7 @@ export interface RawPkg {
downloadsLast30Days: number;
downloadsRatio: number;
humanDownloadsLast30Days: string;
jsDelivrHits: number;
MartinKolarik marked this conversation as resolved.
Show resolved Hide resolved
popular: boolean;
version: string;
versions: Record<string, string>;
Expand All @@ -64,6 +66,7 @@ export interface RawPkg {
deprecated: boolean | string;
isDeprecated: boolean;
deprecatedReason: string | null;
isSecurityHeld: boolean;
homepage: string | null;
license: string | null;
keywords: string[];
Expand All @@ -74,13 +77,17 @@ export interface RawPkg {
lastPublisher: Owner | null;
owners: Owner[];
bin: Record<string, string>;
dependents: number;
types: TsType;
moduleTypes: ModuleType[];
styleTypes: StyleType[];
humanDependents: string;
changelogFilename: string | null;
lastCrawl: string;
_searchInternal: {
expiresAt: number;
alternativeNames: string[];
popularAlternativeNames: string[];
};
}

Expand Down
Loading