Skip to content

Commit 8b34669

Browse files
dep: update markdown-it dependency
The commit updates the `markdown-it` dependency in order to resolve a moderate security vulnerability. The change also makes `markdown-it` a shared dependency, and updates all usages to use the shared dep instead of redefining a version in individual `package.json`. Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
1 parent bc21e49 commit 8b34669

File tree

15 files changed

+35
-32
lines changed

15 files changed

+35
-32
lines changed

packages/core/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export class SomeClass {
8989
- [`inversify@^5.1.1`](https://www.npmjs.com/package/inversify)
9090
- [`lodash.debounce@^4.0.8`](https://www.npmjs.com/package/lodash.debounce)
9191
- [`lodash.throttle@^4.1.1`](https://www.npmjs.com/package/lodash.throttle)
92+
- [`markdown-it@^12.3.2`](https://www.npmjs.com/package/markdown-it)
9293
- [`nsfw@^2.1.2`](https://www.npmjs.com/package/nsfw)
9394
- [`react@^16.8.0`](https://www.npmjs.com/package/react)
9495
- [`react-dom@^16.8.0`](https://www.npmjs.com/package/react-dom)

packages/core/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@types/fs-extra": "^4.0.2",
2626
"@types/lodash.debounce": "4.0.3",
2727
"@types/lodash.throttle": "^4.1.3",
28+
"@types/markdown-it": "^12.2.3",
2829
"@types/react": "^16.8.0",
2930
"@types/react-dom": "^16.8.0",
3031
"@types/react-virtualized": "^9.18.3",
@@ -50,7 +51,7 @@
5051
"keytar": "7.2.0",
5152
"lodash.debounce": "^4.0.8",
5253
"lodash.throttle": "^4.1.1",
53-
"markdown-it": "^8.4.0",
54+
"markdown-it": "^12.3.2",
5455
"nsfw": "^2.1.2",
5556
"p-debounce": "^2.1.0",
5657
"perfect-scrollbar": "^1.3.0",
@@ -92,9 +93,9 @@
9293
"@phosphor/signaling",
9394
"@phosphor/virtualdom",
9495
"@phosphor/widgets",
95-
"@theia/application-package:@theia/application-package/index",
9696
"@theia/application-package/lib/api",
9797
"@theia/application-package/lib/environment",
98+
"@theia/application-package:@theia/application-package/index",
9899
"fs-extra",
99100
"fuzzy",
100101
"inversify",
@@ -110,6 +111,7 @@
110111
"lodash.debounce as debounce",
111112
"lodash.throttle as throttle",
112113
"nsfw",
114+
"markdown-it as markdownit",
113115
"react as React",
114116
"ws as WebSocket",
115117
"yargs"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import markdownit = require('markdown-it');
2+
export = markdownit;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('markdown-it');

packages/messages/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"description": "Theia - Messages Extension",
55
"dependencies": {
66
"@theia/core": "1.21.0",
7-
"markdown-it": "^8.4.0",
87
"react-perfect-scrollbar": "^1.5.3",
98
"ts-md5": "^1.2.2"
109
},

packages/messages/src/browser/notification-content-renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
1515
********************************************************************************/
1616

17-
import * as markdownit from 'markdown-it';
17+
import * as markdownit from '@theia/core/shared/markdown-it';
1818
import { injectable } from '@theia/core/shared/inversify';
1919

2020
@injectable()

packages/plugin-ext/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"@theia/terminal": "1.21.0",
2727
"@theia/timeline": "1.21.0",
2828
"@theia/workspace": "1.21.0",
29-
"@types/markdown-it": "*",
3029
"@types/mime": "^2.0.1",
3130
"decompress": "^4.2.1",
3231
"escape-html": "^1.0.3",
@@ -35,7 +34,6 @@
3534
"jsonc-parser": "^2.2.0",
3635
"lodash.clonedeep": "^4.5.0",
3736
"macaddress": "^0.2.9",
38-
"markdown-it": "^8.4.0",
3937
"mime": "^2.4.4",
4038
"ps-tree": "^1.2.0",
4139
"request": "^2.82.0",

packages/plugin-ext/src/main/browser/view/tree-view-widget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import { MessageService } from '@theia/core/lib/common/message-service';
4242
import { View } from '../../../common/plugin-protocol';
4343
import CoreURI from '@theia/core/lib/common/uri';
4444
import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
45-
import * as markdownit from 'markdown-it';
45+
import * as markdownit from '@theia/core/shared/markdown-it';
4646
import { isMarkdownString } from '../../../plugin/markdown-string';
4747

4848
export const TREE_NODE_HYPERLINK = 'theia-TreeNodeHyperlink';

packages/preferences/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"@theia/userstorage": "1.21.0",
1111
"@theia/workspace": "1.21.0",
1212
"async-mutex": "^0.3.1",
13-
"jsonc-parser": "^2.2.0",
14-
"markdown-it": "^8.4.0"
13+
"jsonc-parser": "^2.2.0"
1514
},
1615
"publishConfig": {
1716
"access": "public"

packages/preferences/src/browser/views/components/preference-node-renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import debounce = require('@theia/core/shared/lodash.debounce');
2828
import { PreferenceTreeModel } from '../../preference-tree-model';
2929
import { PreferencesSearchbarWidget } from '../preference-searchbar-widget';
3030
import { WindowService } from '@theia/core/lib/browser/window/window-service';
31-
import * as markdownit from 'markdown-it';
31+
import * as markdownit from '@theia/core/shared/markdown-it';
3232
import * as DOMPurify from '@theia/core/shared/dompurify';
3333
import URI from '@theia/core/lib/common/uri';
3434

0 commit comments

Comments
 (0)