mdast-util-to-nlcst
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -20,3 +20,3 @@ /** | ||
export type VFile = import('vfile').VFile | ||
export type LocationInterface = import('vfile-location').Location | ||
export type Location = ReturnType<typeof location> | ||
export type ParserInstance = { | ||
@@ -35,3 +35,3 @@ parse(nodes: Node[]): Node | ||
doc: string | ||
location: LocationInterface | ||
place: Location | ||
parser: ParserInstance | ||
@@ -41,1 +41,2 @@ ignore: Array<string> | ||
} | ||
import {location} from 'vfile-location' |
12
index.js
@@ -7,3 +7,3 @@ /** | ||
* @typedef {import('vfile').VFile} VFile | ||
* @typedef {import('vfile-location').Location} LocationInterface | ||
* @typedef {ReturnType<import('vfile-location').location>} Location | ||
* @typedef {{ | ||
@@ -23,3 +23,3 @@ * parse(nodes: Node[]): Node | ||
* @property {string} doc | ||
* @property {LocationInterface} location | ||
* @property {Location} place | ||
* @property {ParserInstance} parser | ||
@@ -33,3 +33,3 @@ * @property {Array.<string>} ignore | ||
import {pointStart, pointEnd} from 'unist-util-position' | ||
import vfileLocation from 'vfile-location' | ||
import {location} from 'vfile-location' | ||
@@ -79,3 +79,3 @@ /** | ||
doc: String(file), | ||
location: vfileLocation(file), | ||
place: location(file), | ||
parser, | ||
@@ -217,4 +217,4 @@ ignore: [].concat( | ||
node.position = { | ||
start: config.location.toPoint(start), | ||
end: config.location.toPoint(end) | ||
start: config.place.toPoint(start), | ||
end: config.place.toPoint(end) | ||
} | ||
@@ -221,0 +221,0 @@ |
{ | ||
"name": "mdast-util-to-nlcst", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "mdast utility to transform to nlcst", | ||
@@ -43,3 +43,3 @@ "license": "MIT", | ||
"unist-util-position": "^4.0.0", | ||
"vfile-location": "^3.1.0" | ||
"vfile-location": "^4.0.0" | ||
}, | ||
@@ -61,3 +61,3 @@ "devDependencies": { | ||
"tape": "^5.0.0", | ||
"to-vfile": "^6.0.0", | ||
"to-vfile": "^7.0.0", | ||
"type-coverage": "^2.0.0", | ||
@@ -64,0 +64,0 @@ "typescript": "^4.0.0", |
@@ -29,3 +29,3 @@ # mdast-util-to-nlcst | ||
```js | ||
import vfile from 'vfile' | ||
import {VFile} from 'vfile' | ||
import {ParseEnglish} from 'parse-english' | ||
@@ -36,3 +36,3 @@ import {inspect} from 'unist-util-inspect' | ||
var file = vfile('Some *foo*sball.') | ||
var file = new VFile('Some *foo*sball.') | ||
var mdast = fromMarkdown(file) | ||
@@ -39,0 +39,0 @@ var nlcst = toNlcst(mdast, file, ParseEnglish) |
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
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
231
0
16902
+ Addedis-buffer@2.0.5(transitive)
+ Addedunist-util-stringify-position@3.0.3(transitive)
+ Addedvfile@5.3.7(transitive)
+ Addedvfile-location@4.1.0(transitive)
+ Addedvfile-message@3.1.4(transitive)
- Removedvfile-location@3.2.0(transitive)
Updatedvfile-location@^4.0.0