Skip to content

Commit

Permalink
chore(deps): update dependency tsbb to v4 #3
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 5, 2023
1 parent 2f1f8ab commit 8f7376a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 14 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"scripts": {
"prepack": "npm run build",
"start": "node lib/index.js",
"watch": "tsbb watch --disable-babel",
"build": "tsbb build --disable-babel",
"watch": "tsbb watch",
"build": "tsbb build",
"type-check": "tsc --noEmit",
"test": "tsbb test",
"coverage": "tsbb test --coverage"
Expand Down Expand Up @@ -42,19 +42,19 @@
]
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.13.1 || >=16.0.0"
},
"dependencies": {
"unified": "~10.1.2",
"unist-util-visit": "~4.1.0",
"hast-util-select": "~5.0.1"
"unified": "^10.1.2",
"unist-util-visit": "^4.1.2",
"hast-util-select": "^5.0.5"
},
"devDependencies": {
"rehype": "~12.0.1",
"rehype-stringify": "~9.0.3",
"rehype-raw": "~6.1.1",
"remark-parse": "~10.0.1",
"remark-rehype": "~10.1.0",
"tsbb": "~3.7.2"
"rehype": "^12.0.1",
"rehype-stringify": "^9.0.3",
"rehype-raw": "^6.1.1",
"remark-parse": "^10.0.1",
"remark-rehype": "^10.1.0",
"tsbb": "^4.1.3"
}
}
31 changes: 29 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
import { Plugin } from 'unified';
import { Root, RootContent } from 'hast';
import type { Plugin } from 'unified';
import type { Root, RootContent, Literal } from 'hast';
import { visit } from 'unist-util-visit';

/**
* Raw string of HTML embedded into HTML AST.
*/
export interface Raw extends Literal {
/**
* Node type.
*/
type: 'raw'
}

// Register nodes in content.
declare module 'hast' {
interface RootContentMap {
/**
* Raw string of HTML embedded into HTML AST.
*/
raw: Raw
}
interface ElementContentMap {
/**
* Raw string of HTML embedded into HTML AST.
*/
raw: Raw
}
}


export type RehypeIgnoreOptions = {
/**
* Character to use for opening delimiter, by default `rehype:ignore:start`
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"declaration": true,
"noFallthroughCasesInSwitch": true,
"noImplicitThis": true,
"skipLibCheck": true,
"strictBindCallApply": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
Expand Down

0 comments on commit 8f7376a

Please sign in to comment.