Skip to content

Commit

Permalink
chore(deps): migrate to neotraverse (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayllyz authored Aug 9, 2024
1 parent 9e9efa6 commit 8341fcd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
},
"dependencies": {
"@textlint/ast-node-types": "^13.0.5",
"neotraverse": "^0.6.15",
"rehype-parse": "^8.0.4",
"structured-source": "^4.0.0",
"traverse": "^0.6.7",
"unified": "^10.1.2"
},
"devDependencies": {
Expand All @@ -62,7 +62,6 @@
"@types/glob": "^8.0.1",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.18",
"@types/traverse": "^0.6.32",
"glob": "^8.1.0",
"mocha": "^10.2.0",
"textlint": "^13.0.5",
Expand Down
3 changes: 1 addition & 2 deletions src/html-to-ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import type {
} from "@textlint/ast-node-types";
import { unified } from 'unified'
import rehypeParse from 'rehype-parse'
import traverse, { TraverseContext } from "traverse";
import traverse, { TraverseContext } from "neotraverse";
import { StructuredSource } from "structured-source";
import type { Element, RootContent } from "hast";
import { nodeTypes, tagNameToType } from "./mapping.js";
Expand Down Expand Up @@ -179,4 +179,3 @@ export function parse(html: string, options?: ParseOptions) {
});
return ast as any as TxtParentNode;
}

10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f"
integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==

"@types/traverse@^0.6.32":
version "0.6.32"
resolved "https://registry.yarnpkg.com/@types/traverse/-/traverse-0.6.32.tgz#f9fdfa40cd4898deaa975a14511aec731de8235e"
integrity sha512-RBz2uRZVCXuMg93WD//aTS5B120QlT4lR/gL+935QtGsKHLS6sCtZBaKfWjIfk7ZXv/r8mtGbwjVIee6/3XTow==

"@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2":
version "2.0.6"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
Expand Down Expand Up @@ -1240,6 +1235,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25"
integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==

neotraverse@^0.6.15:
version "0.6.15"
resolved "https://registry.yarnpkg.com/neotraverse/-/neotraverse-0.6.15.tgz#dc4abb64700c52440f13bc53635b559862420360"
integrity sha512-HZpdkco+JeXq0G+WWpMJ4NsX3pqb5O7eR9uGz3FfoFt+LYzU8iRWp49nJtud6hsDoywM8tIrDo3gjgmOqJA8LA==

normalize-package-data@^2.3.2:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
Expand Down

0 comments on commit 8341fcd

Please sign in to comment.