Comparing version 1.0.9 to 2.0.0
@@ -1,4 +0,4 @@ | ||
import { validatePart } from './validatePart'; | ||
export { DEFAULT_RESOLVERS, STRICT_RESOLVERS } from './resolvers'; | ||
export declare type Options = { | ||
import { validatePart } from './validatePart.js'; | ||
export { DEFAULT_RESOLVERS, STRICT_RESOLVERS } from './resolvers.js'; | ||
export type Options = { | ||
strict?: boolean; | ||
@@ -14,3 +14,3 @@ }; | ||
*/ | ||
declare function validate(possibleDOI?: string, opts?: Options): boolean; | ||
export declare function validate(possibleDOI?: string | null, opts?: Options): boolean; | ||
/** | ||
@@ -22,3 +22,3 @@ * Normalize an input string to the component of the DOI | ||
*/ | ||
declare function normalize(possibleDOI: string, opts?: Options): string | undefined; | ||
export declare function normalize(possibleDOI?: string | null, opts?: Options): string | undefined; | ||
/** | ||
@@ -30,4 +30,4 @@ * Builds a canonical URL pointing to https://doi.org | ||
*/ | ||
declare function buildUrl(possibleDOI: string, opts?: Options): string | undefined; | ||
declare const _default: { | ||
export declare function buildUrl(possibleDOI?: string | null, opts?: Options): string | undefined; | ||
export declare const doi: { | ||
validatePart: typeof validatePart; | ||
@@ -38,2 +38,1 @@ validate: typeof validate; | ||
}; | ||
export default _default; |
@@ -1,5 +0,4 @@ | ||
/// <reference types="node" /> | ||
interface Resolver { | ||
test: (url: URL) => boolean; | ||
parse: (url: URL) => string; | ||
parse: (url: URL) => string | undefined; | ||
} | ||
@@ -6,0 +5,0 @@ export declare const STRICT_RESOLVERS: Resolver[]; |
@@ -9,2 +9,2 @@ /** | ||
*/ | ||
export declare function validatePart(possibleDOI?: string): boolean; | ||
export declare function validatePart(possibleDOI?: string | null): boolean; |
{ | ||
"name": "doi-utils", | ||
"version": "1.0.9", | ||
"version": "2.0.0", | ||
"description": "Set of utility functions to help with handling DOI(Digital Object Identifier)", | ||
"author": "Curvenote Inc. <support@curvenote.com>", | ||
"license": "MIT", | ||
"main": "dist/cjs/index.js", | ||
"module": "dist/esm/index.js", | ||
"sideEffects": false, | ||
"types": "dist/index.d.ts", | ||
"type": "module", | ||
"exports": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"repository": { | ||
@@ -21,9 +24,9 @@ "type": "git", | ||
"prepublishOnly": "npm test && npm run build", | ||
"build_types": "tsc -b .", | ||
"build_cjs": "swc -C module.type=commonjs -d dist/cjs src/", | ||
"build_esm": "swc -C module.type=es6 -d dist/esm src/", | ||
"clean": "rm -rf dist", | ||
"build": "npm run clean && npm run build_types && npm run build_esm && npm run build_cjs", | ||
"test": "jest", | ||
"test:watch": "jest --watch" | ||
"test": "vitest run", | ||
"test:watch": "vitest watch", | ||
"lint": "eslint \"src/**/*.ts*\" -c ./.eslintrc.cjs", | ||
"lint:format": "prettier --check \"src/**/*.{ts,tsx,md}\"", | ||
"build:esm": "tsc --project ./tsconfig.json --module es2015 --outDir dist --declaration", | ||
"build": "npm-run-all -l clean -p build:esm" | ||
}, | ||
@@ -35,9 +38,9 @@ "keywords": [ | ||
"devDependencies": { | ||
"@swc/cli": "^0.1.57", | ||
"@swc/core": "^1.2.186", | ||
"@swc/jest": "^0.2.21", | ||
"@types/jest": "^27.5.1", | ||
"jest": "^27.1.0", | ||
"typescript": "^4.6.4" | ||
"eslint": "^8.42.0", | ||
"eslint-config-curvenote": "latest", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.8.8", | ||
"typescript": "^5.1.3", | ||
"vitest": "^0.32.0" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
58
Yes
10009
9
180
1