From bca34a8cfa865f1142309898a4baa88ee898aa0b Mon Sep 17 00:00:00 2001 From: Karin Blanford Date: Tue, 17 Dec 2019 14:19:12 -0700 Subject: [PATCH] fix: updating Remarkable dependency to resolve subdependency DOS vulnerability --- index.js | 4 +--- package.json | 2 +- test/test.js | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 90cb8be..30641bf 100644 --- a/index.js +++ b/index.js @@ -26,9 +26,7 @@ module.exports = toc; */ function toc(str, options) { - return new utils.Remarkable() - .use(generate(options)) - .render(str); + return new utils.Remarkable.Remarkable().use(generate(options)).render(str) } /** diff --git a/package.json b/package.json index 2c870b4..5d9fcd6 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "minimist": "^1.2.0", "mixin-deep": "^1.1.3", "object.pick": "^1.2.0", - "remarkable": "^1.7.1", + "remarkable": "^2.0.0", "repeat-string": "^1.6.1", "strip-color": "^0.1.0" }, diff --git a/test/test.js b/test/test.js index e93e41b..a9f995e 100644 --- a/test/test.js +++ b/test/test.js @@ -18,9 +18,7 @@ function read(fp) { describe('plugin', function() { it('should work as a remarkable plugin', function() { function render(str, options) { - return new utils.Remarkable() - .use(toc.plugin(options)) - .render(str); + return new utils.Remarkable.Remarkable().use(toc.plugin(options)).render(str) } var actual = render(read('test/fixtures/strip-words.md'), {