(chore) fix TS issue, bump 10.7.1

This commit is contained in:
Josh Goebel 2021-03-21 04:19:12 -04:00
parent 7ec45af1c0
commit 421b23b0ae
8 changed files with 35 additions and 16 deletions

View File

@ -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:

View File

@ -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
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.0/highlight.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/highlight.min.js"></script>
<!-- and it's easy to individually load additional languages -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.0/languages/go.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/languages/go.min.js"></script>
```
**jsdelivr** ([link](https://www.jsdelivr.com/package/gh/highlightjs/cdn-release))
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.7.0/build/styles/default.min.css">
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.7.0/build/highlight.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.7.1/build/styles/default.min.css">
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.7.1/build/highlight.min.js"></script>
<!-- and it's easy to individually load additional languages -->
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.7.0/build/languages/go.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.7.1/build/languages/go.min.js"></script>
```
**unpkg** ([link](https://unpkg.com/browse/@highlightjs/cdn-assets/))
```html
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@10.7.0/styles/default.min.css">
<script src="https://unpkg.com/@highlightjs/cdn-assets@10.7.0/highlight.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@10.7.1/styles/default.min.css">
<script src="https://unpkg.com/@highlightjs/cdn-assets@10.7.1/highlight.min.js"></script>
<!-- and it's easy to individually load additional languages -->
<script src="https://unpkg.com/@highlightjs/cdn-assets@10.7.0/languages/go.min.js"></script>
<script src="https://unpkg.com/@highlightjs/cdn-assets@10.7.1/languages/go.min.js"></script>
```
**Note:** *The CDN-hosted `highlight.min.js` package doesn't bundle every language.* It would be

View File

@ -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: &nbsp; :closed_lock_with_key: | The 10.x series recieves regular updates, new features & bug fixes. |
| 10.7.1 | :white_check_mark: &nbsp; :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. |

View File

@ -48,7 +48,7 @@ copyright = u'20122021, 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])

17
package-lock.json generated
View File

@ -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",

View File

@ -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",

View File

@ -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. */

2
types/index.d.ts vendored
View File

@ -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