Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* deps: add ts-brand * refactor: reformat files * refactor: add ip-address type * refactor: add reverse-domain-name type Add branded type for reverse-domain-name. This showed a lot of cases where pkg-name type was used, where reverse-domain-name should have been used. Fixed these cases * refactor: reformat files * conf: compile after change * style: reformat file * fix: outdated path * conf: tsconfig for tests Extends project tsconfig, but without emits * refactor: domain-name type Rename to just domain-name since it should also work for regular domain names. Also it's a little shorter that way. The rules for what makes a valid name also changes a little bit. Now single segment names like just "com" are also valid. We don't need to do that much validation. * refactor: pkg-info builder helper Add a builder function for making pkg-info objects for tests. Includes validation logic and auto-sets derived properties, such as also setting the package _id to the name * refactor: pkg-manifest builder helper Builder does validation and allows for shorter test setups * fix: type error * fix: type errors Fix errors from passing strings to functions expecting domain names. Fix by using name fields from packages or asserting validity using "as" * fix. incorrect import syntax * fix: type from incorrect package The response object used by npm-registry-fetch is node-fetch Response, not request Response * style: reformat file * refactor: move function Function acts on domain-types and so should be in a different file * refactor: add package-url type Introduce package-url type which represents an url pointing to a package. Also add a few tests * refactor: add semantic-version type Add type-checking for semantic-version strings. Currently not much validation * refactor: add package-id type Package at specific version * misc: remove outdated eslint suppress * refactor: add package-reference type * refactor: semantic-version constructor * refactor: domain-name constructor * refactor: add registry-url type * refactor: use correct type
- Loading branch information