-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Haroen Viaene <hello@haroen.me>
- Loading branch information
Showing
47 changed files
with
2,697 additions
and
3,859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
lib/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{ | ||
"extends": [ | ||
"algolia", | ||
"algolia/jest" | ||
"algolia/jest", | ||
"algolia/typescript" | ||
], | ||
"rules": { | ||
"valid-jsdoc": "off", | ||
"import/extensions": [ | ||
"error", | ||
"always", | ||
{ | ||
"ignorePackages": true | ||
"ignorePackages": true, | ||
"pattern": { | ||
"js": "always", | ||
"ts": "never" | ||
} | ||
} | ||
], | ||
// temp during mig | ||
"jsdoc/require-param-description": "off", | ||
"jsdoc/require-description": "off", | ||
"jsdoc/no-undefined-types": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules/ | ||
lib/ | ||
.env | ||
.env | ||
junit/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14.16.1 | ||
14.16.1 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// eslint-disable-next-line import/no-commonjs | ||
module.exports = { | ||
name: 'npm', | ||
|
||
transform: { | ||
'^.+\\.[jt]sx?$': 'ts-jest', | ||
}, | ||
testMatch: ['<rootDir>/src/**/*.test.[jt]s'], | ||
globals: { | ||
'ts-jest': { | ||
diagnostics: false, | ||
tsconfig: `tsconfig.json`, | ||
}, | ||
}, | ||
|
||
testEnvironment: 'node', | ||
modulePaths: ['src'], | ||
|
||
// reporter for circleci | ||
reporters: [ | ||
'default', | ||
[ | ||
'jest-junit', | ||
{ | ||
outputDirectory: 'junit', | ||
suiteNameTemplate: '{filepath}', | ||
ancestorSeparator: ' › ', | ||
addFileAttribute: 'true', | ||
}, | ||
], | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import type { GetPackage, GetUser, PackageRepo } from '../npm/types'; | ||
|
||
export interface NicePackageType { | ||
_hasShrinkwrap?: false; | ||
bin?: Record<string, string>; | ||
browser?: string; | ||
bundlesize?: Array<Record<string, unknown>>; | ||
created: string; | ||
dependencies?: Record<string, string>; | ||
deprecated?: boolean; | ||
description: string; | ||
devDependencies?: Record<string, string>; | ||
gitHead?: string; | ||
homepage?: string; | ||
keywords: string[]; | ||
lastPublisher?: GetUser; | ||
license?: string | { type: string }; | ||
licenseText?: string; | ||
main?: string | string[]; | ||
modified: string; | ||
module?: string; | ||
name: string; | ||
other: { | ||
_id?: string; | ||
_rev: string; | ||
'dist-tags': Record<string, string>; | ||
author?: GetUser; | ||
time?: GetPackage['time']; | ||
}; | ||
owners?: GetUser[]; | ||
readme?: string; | ||
repository?: string | Partial<PackageRepo> | Array<Partial<PackageRepo>>; | ||
scripts: Record<string, string>; | ||
schematics?: string; | ||
starsCount?: number; | ||
type?: 'module' | 'commonjs'; | ||
types?: string; | ||
typings?: string; | ||
unpkg?: string; | ||
version?: string; | ||
versions?: Array<{ | ||
date: string; | ||
number: string; | ||
}>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import type { GetUser } from '../npm/types'; | ||
|
||
export interface Owner { | ||
name: string; | ||
email?: string; | ||
avatar?: string; | ||
link?: string; | ||
} | ||
|
||
export interface Repo { | ||
url: string; | ||
host: string; | ||
user: string; | ||
project: string; | ||
path: string; | ||
head?: string; | ||
branch?: string; | ||
} | ||
export interface GithubRepo { | ||
user: string; | ||
project: string; | ||
path: string; | ||
head: string; | ||
} | ||
|
||
export type TsType = | ||
| { | ||
ts: 'included' | false | { possible: true; dtsMain: string }; | ||
} | ||
| { | ||
ts: 'definitely-typed'; | ||
definitelyTyped: string; | ||
}; | ||
|
||
export type ModuleType = 'esm' | 'cjs' | 'unknown'; | ||
|
||
export type ComputedMeta = { | ||
computedKeywords: string[]; | ||
computedMetadata: Record<string, unknown>; | ||
}; | ||
|
||
export interface RawPkg { | ||
objectID: string; | ||
name: string; | ||
downloadsLast30Days: number; | ||
downloadsRatio: number; | ||
humanDownloadsLast30Days: string; | ||
popular: boolean; | ||
version: string; | ||
versions: Record<string, string>; | ||
tags: Record<string, string>; | ||
description: string | null; | ||
dependencies: Record<string, string>; | ||
devDependencies: Record<string, string>; | ||
originalAuthor?: GetUser; | ||
repository: Repo | null; | ||
githubRepo: GithubRepo | null; | ||
gitHead: string | null; | ||
readme: string; | ||
owner: Owner | null; | ||
deprecated: boolean; | ||
homepage: string | null; | ||
license: string | null; | ||
keywords: string[]; | ||
computedKeywords: ComputedMeta['computedKeywords']; | ||
computedMetadata: ComputedMeta['computedMetadata']; | ||
created: number; | ||
modified: number; | ||
lastPublisher: Owner | null; | ||
owners: Owner[]; | ||
bin: Record<string, string>; | ||
types: TsType; | ||
moduleTypes: ModuleType[]; | ||
lastCrawl: string; | ||
_searchInternal: { | ||
alternativeNames: string[]; | ||
}; | ||
} | ||
|
||
export type FinalPkg = RawPkg & { | ||
_searchInternal: { | ||
downloadsMagnitude?: number; | ||
jsDelivrPopularity?: number; | ||
popularName?: string; | ||
}; | ||
}; |
Oops, something went wrong.