fix dev dependencies vulnerabilities

This commit is contained in:
Estevão Soares dos Santos 2022-05-07 18:43:27 +01:00
parent fb31f631e9
commit d99a0d9b03
4 changed files with 2268 additions and 2104 deletions

4279
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -50,6 +50,7 @@
"chai": "*",
"chai-match": "*",
"commonmark-spec": "^0.30.0",
"diffable-html": "^5.0.0",
"grunt": "^1.4.1",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-concat": "^2.0.0",
@ -60,7 +61,6 @@
"grunt-endline": "^0.7.0",
"grunt-eslint": "^24.0.0",
"grunt-mocha-test": "^0.13.3",
"html-prettify": "^1.0.6",
"karma": "^6.3.17",
"karma-browserstack-launcher": "^1.6.0",
"karma-chai": "^0.1.0",
@ -81,6 +81,18 @@
"jsdom": "^19.0.0"
},
"overrides": {
"minimist": "^1.2.6"
"minimist": "^1.2.6",
"grunt-conventional-changelog": {
"conventional-changelog": "^3.1.25"
},
"grunt-conventional-github-releaser": {
"conventional-github-releaser": {
"conventional-changelog": "^3.1.25",
"dateformat": "^5.0.3",
"git-semver-tags": "^4.1.1",
"meow": "^8.1.2",
"semver-regex": "^4.0.2"
}
}
}
}

View File

@ -1,54 +0,0 @@
////
// makehtml/detab.js
// Copyright (c) 2018 ShowdownJS
//
// Convert all tabs to spaces
//
// ***Author:***
// - Estêvão Soares dos Santos (Tivie) <https://github.com/tivie>
////
showdown.subParser('makehtml.detab', function (text, options, globals) {
'use strict';
return text;
let startEvent = new showdown.Event('makehtml.detab.onStart', text);
startEvent
.setOutput(text)
._setGlobals(globals)
._setOptions(options);
startEvent = globals.converter.dispatch(startEvent);
text = startEvent.output;
// expand first n-1 tabs
text = text.replace(/\t(?=\t)/g, ' '); // g_tab_width
// replace the nth with two sentinels
text = text.replace(/\t/g, '¨A¨B');
// use the sentinel to anchor our regex so it doesn't explode
text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) {
var leadingText = m1,
numSpaces = 4 - leadingText.length % 4; // g_tab_width
// there *must* be a better way to do this:
for (var i = 0; i < numSpaces; i++) {
leadingText += ' ';
}
return leadingText;
});
// clean up sentinels
text = text.replace(/¨A/g, ' '); // g_tab_width
text = text.replace(/¨B/g, '');
let afterEvent = new showdown.Event('makehtml.detab.onEnd', text);
afterEvent
.setOutput(text)
._setGlobals(globals)
._setOptions(options);
afterEvent = globals.converter.dispatch(afterEvent);
return afterEvent.output;
});

View File

@ -8,7 +8,9 @@
require('source-map-support').install();
require('chai').should();
const htmlPrettify = require('html-prettify');
//const htmlPrettify = require('html-prettify');
const htmlPrettify = require('diffable-html');
let fs = require('fs');
function getTestSuite (dir) {
@ -18,7 +20,7 @@
}
function getJsonTestSuite (file) {
let json = JSON.parse(fs.readFileSync(file, 'utf8'));
let json = JSON.parse(fs.readFileSync(file, 'utf8').toString());
return mapJson(json, file);
}
@ -126,7 +128,6 @@
getTestSuite: getTestSuite,
getJsonTestSuite: getJsonTestSuite,
assertion: assertion,
normalize: normalize,
showdown: require('../../../.build/showdown.js')
};
})();