From 1a69f1b2108c8b85e66263736c0a475f13ca7114 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 | 3 ++- package.json | 2 +- test/test.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 90cb8be..51a462b 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,8 @@ module.exports = toc; */ function toc(str, options) { - return new utils.Remarkable() + var Remarkable = utils.Remarkable.Remarkable; + return new 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..29ce496 100644 --- a/test/test.js +++ b/test/test.js @@ -18,7 +18,8 @@ function read(fp) { describe('plugin', function() { it('should work as a remarkable plugin', function() { function render(str, options) { - return new utils.Remarkable() + var Remarkable = utils.Remarkable.Remarkable; + return new Remarkable() .use(toc.plugin(options)) .render(str); }