vfile-location
Advanced tools
Comparing version 5.0.1 to 5.0.2
@@ -1,2 +0,2 @@ | ||
export {location} from './lib/index.js' | ||
export type Location = import('./lib/index.js').Location | ||
export { location } from "./lib/index.js"; | ||
export type Location = import('./lib/index.js').Location; |
@@ -14,6 +14,6 @@ /** | ||
*/ | ||
export function location(file: VFile | Value): Location | ||
export type VFile = import('vfile').VFile | ||
export type Value = import('vfile').Value | ||
export type UnistPoint = import('unist').Point | ||
export function location(file: VFile | Value): Location; | ||
export type VFile = import('vfile').VFile; | ||
export type Value = import('vfile').Value; | ||
export type UnistPoint = import('unist').Point; | ||
/** | ||
@@ -23,15 +23,15 @@ * unist point, allowed as input. | ||
export type PointLike = { | ||
/** | ||
* Line. | ||
*/ | ||
line?: number | null | undefined | ||
/** | ||
* Column. | ||
*/ | ||
column?: number | null | undefined | ||
/** | ||
* Offset. | ||
*/ | ||
offset?: number | null | undefined | ||
} | ||
/** | ||
* Line. | ||
*/ | ||
line?: number | null | undefined; | ||
/** | ||
* Column. | ||
*/ | ||
column?: number | null | undefined; | ||
/** | ||
* Offset. | ||
*/ | ||
offset?: number | null | undefined; | ||
}; | ||
/** | ||
@@ -46,11 +46,7 @@ * Get the line/column based `Point` for `offset` in the bound indices. | ||
*/ | ||
export type ToPoint = ( | ||
offset?: number | null | undefined | ||
) => UnistPoint | undefined | ||
export type ToPoint = (offset?: number | null | undefined) => UnistPoint | undefined; | ||
/** | ||
* Get the `offset` from a line/column based `Point` in the bound indices. | ||
*/ | ||
export type ToOffset = ( | ||
point?: PointLike | null | undefined | ||
) => number | undefined | ||
export type ToOffset = (point?: PointLike | null | undefined) => number | undefined; | ||
/** | ||
@@ -60,10 +56,10 @@ * Accessors for index. | ||
export type Location = { | ||
/** | ||
* Get the line/column based `Point` for `offset` in the bound indices. | ||
*/ | ||
toPoint: ToPoint | ||
/** | ||
* Get the `offset` from a line/column based `Point` in the bound indices. | ||
*/ | ||
toOffset: ToOffset | ||
} | ||
/** | ||
* Get the line/column based `Point` for `offset` in the bound indices. | ||
*/ | ||
toPoint: ToPoint; | ||
/** | ||
* Get the `offset` from a line/column based `Point` in the bound indices. | ||
*/ | ||
toOffset: ToOffset; | ||
}; |
{ | ||
"name": "vfile-location", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "vfile utility to convert between positional (line and column-based) and offset (range-based) locations", | ||
@@ -41,3 +41,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@types/unist": "^2.0.0", | ||
"@types/unist": "^3.0.0", | ||
"vfile": "^6.0.0" | ||
@@ -48,3 +48,3 @@ }, | ||
"c8": "^8.0.0", | ||
"prettier": "^2.0.0", | ||
"prettier": "^3.0.0", | ||
"remark-cli": "^11.0.0", | ||
@@ -54,3 +54,3 @@ "remark-preset-wooorm": "^9.0.0", | ||
"typescript": "^5.0.0", | ||
"xo": "^0.54.0" | ||
"xo": "^0.56.0" | ||
}, | ||
@@ -60,3 +60,3 @@ "scripts": { | ||
"build": "tsc --build --clean && tsc --build && type-coverage", | ||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", | ||
"format": "remark . -qfo && prettier . -w --log-level warn && xo --fix", | ||
"test-api": "node --conditions development test.js", | ||
@@ -86,4 +86,7 @@ "test-coverage": "c8 --100 --reporter lcov npm run test-api", | ||
"xo": { | ||
"prettier": true | ||
"prettier": true, | ||
"rules": { | ||
"unicorn/prefer-at": "off" | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13242
176
- Removed@types/unist@2.0.11(transitive)
Updated@types/unist@^3.0.0