diff --git a/CHANGES.md b/CHANGES.md
index b86b9defe..4740a0920 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,4 +1,8 @@
-## Version 10.7.0
+## Version 10.7.1
+
+- fix(parser) Resolves issues with TypeScript types [Josh Goebel][]
+
+### Version 10.7.0
Parser:
diff --git a/README.md b/README.md
index 9fd4a13fe..4fe918856 100644
--- a/README.md
+++ b/README.md
@@ -271,28 +271,28 @@ see [DIGESTS.md](https://github.com/highlightjs/cdn-release/blob/main/DIGESTS.md
**cdnjs** ([link](https://cdnjs.com/libraries/highlight.js))
```html
-
-
+
+
-
+
```
**jsdelivr** ([link](https://www.jsdelivr.com/package/gh/highlightjs/cdn-release))
```html
-
-
+
+
-
+
```
**unpkg** ([link](https://unpkg.com/browse/@highlightjs/cdn-assets/))
```html
-
-
+
+
-
+
```
**Note:** *The CDN-hosted `highlight.min.js` package doesn't bundle every language.* It would be
diff --git a/SECURITY.md b/SECURITY.md
index 090b5d23c..e7670c878 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -6,7 +6,7 @@ Due to both time and resource constrains the Highlight.js core team only fully s
| Version | Supported | Status |
| :-----: | :-: | :------ |
-| 10.7.0 | :white_check_mark: :closed_lock_with_key: | The 10.x series recieves regular updates, new features & bug fixes. |
+| 10.7.1 | :white_check_mark: :closed_lock_with_key: | The 10.x series recieves regular updates, new features & bug fixes. |
| <= 10.4.0 | :x: | Known vulnerabities. *Please upgrade to a more recent 10.x release.* |
| 9.18.5 | :x: | [EOL](https://github.com/highlightjs/highlight.js/issues/2877). No longer supported. See [VERSION_10_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/main/VERSION_10_UPGRADE.md). |
| <= 9.18.3 | :x: | No longer supported. Known vulnerabities. |
diff --git a/docs/conf.py b/docs/conf.py
index ece7259d7..017f00bf8 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -48,7 +48,7 @@ copyright = u'2012–2021, Ivan Sagalaev'
# built documents.
# The full version, including alpha/beta/rc tags.
-release = '10.7.0'
+release = '10.7.1'
# The short X.Y version.
version = ".".join(release.split(".")[:2])
diff --git a/package-lock.json b/package-lock.json
index 66ee846fd..41b61c044 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,16 +1,17 @@
{
"name": "highlight.js",
- "version": "10.7.0",
+ "version": "10.7.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
- "version": "10.7.0",
+ "version": "10.7.1",
"license": "BSD-3-Clause",
"devDependencies": {
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.1.0",
+ "@types/mocha": "^8.2.2",
"@typescript-eslint/eslint-plugin": "^4.6.1",
"@typescript-eslint/parser": "^4.6.1",
"clean-css": "^5.0.1",
@@ -293,6 +294,12 @@
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
"dev": true
},
+ "node_modules/@types/mocha": {
+ "version": "8.2.2",
+ "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz",
+ "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==",
+ "dev": true
+ },
"node_modules/@types/node": {
"version": "12.7.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.2.tgz",
@@ -5125,6 +5132,12 @@
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
"dev": true
},
+ "@types/mocha": {
+ "version": "8.2.2",
+ "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz",
+ "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==",
+ "dev": true
+ },
"@types/node": {
"version": "12.7.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.2.tgz",
diff --git a/package.json b/package.json
index e34a4fac5..0850c5fe7 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
"syntax"
],
"homepage": "https://highlightjs.org/",
- "version": "10.7.0",
+ "version": "10.7.1",
"author": {
"name": "Ivan Sagalaev",
"email": "maniac@softwaremaniacs.org"
@@ -55,6 +55,7 @@
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.1.0",
+ "@types/mocha": "^8.2.2",
"@typescript-eslint/eslint-plugin": "^4.6.1",
"@typescript-eslint/parser": "^4.6.1",
"clean-css": "^5.0.1",
diff --git a/tsconfig.json b/tsconfig.json
index 10bdf3ba1..0e20167ca 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -42,6 +42,7 @@
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": ["./"], /* List of folders to include type definitions from. */
"types": [
+ "mocha",
"./types/index"
], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
diff --git a/types/index.d.ts b/types/index.d.ts
index 89208c013..6df778124 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -15,7 +15,7 @@ interface VuePlugin {
}
interface PublicApi {
- highlight: (languageName: string, code: string, ignoreIllegals?: boolean, continuation?: Mode) => HighlightResult
+ highlight: (codeOrlanguageName: string, optionsOrCode: string | HighlightOptions, ignoreIllegals?: boolean, continuation?: Mode) => HighlightResult
highlightAuto: (code: string, languageSubset?: string[]) => AutoHighlightResult
fixMarkup: (html: string) => string
highlightBlock: (element: HTMLElement) => void