diff2html
Advanced tools
Comparing version 3.4.16 to 3.4.17
@@ -23,3 +23,3 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
var FilenameRegExp = linePrefix | ||
? new RegExp("^" + escapeForRegExp(linePrefix) + " \"?(.+?)\"?$") | ||
? new RegExp("^".concat(escapeForRegExp(linePrefix), " \"?(.+?)\"?$")) | ||
: new RegExp('^"?(.+?)"?$'); | ||
@@ -26,0 +26,0 @@ var _a = FilenameRegExp.exec(line) || [], _b = _a[1], filename = _b === void 0 ? '' : _b; |
@@ -35,3 +35,3 @@ var __assign = (this && this.__assign) || function () { | ||
catch (e) { | ||
throw new Error("Could not find template to render '" + templateKey + "'"); | ||
throw new Error("Could not find template to render '".concat(templateKey, "'")); | ||
} | ||
@@ -43,3 +43,3 @@ }; | ||
HoganJsUtils.prototype.templateKey = function (namespace, view) { | ||
return namespace + "-" + view; | ||
return "".concat(namespace, "-").concat(view); | ||
}; | ||
@@ -46,0 +46,0 @@ return HoganJsUtils; |
@@ -128,3 +128,3 @@ var __assign = (this && this.__assign) || function () { | ||
export function getHtmlId(file) { | ||
return "d2h-" + hashCode(filenameDiff(file)).toString().slice(-6); | ||
return "d2h-".concat(hashCode(filenameDiff(file)).toString().slice(-6)); | ||
} | ||
@@ -190,4 +190,4 @@ export function getFileIcon(file) { | ||
return elemType !== null | ||
? highlightedLine + "<" + elemType + addClass + ">" + escapedValue + "</" + elemType + ">" | ||
: "" + highlightedLine + escapedValue; | ||
? "".concat(highlightedLine, "<").concat(elemType).concat(addClass, ">").concat(escapedValue, "</").concat(elemType, ">") | ||
: "".concat(highlightedLine).concat(escapedValue); | ||
}, ''); | ||
@@ -194,0 +194,0 @@ return { |
@@ -214,5 +214,5 @@ var __assign = (this && this.__assign) || function () { | ||
return this.hoganUtils.render(genericTemplatesPath, 'line', { | ||
type: (line === null || line === void 0 ? void 0 : line.type) || renderUtils.CSSLineClass.CONTEXT + " d2h-emptyplaceholder", | ||
lineClass: line !== undefined ? lineClass : lineClass + " d2h-code-side-emptyplaceholder", | ||
contentClass: line !== undefined ? contentClass : contentClass + " d2h-code-side-emptyplaceholder", | ||
type: (line === null || line === void 0 ? void 0 : line.type) || "".concat(renderUtils.CSSLineClass.CONTEXT, " d2h-emptyplaceholder"), | ||
lineClass: line !== undefined ? lineClass : "".concat(lineClass, " d2h-code-side-emptyplaceholder"), | ||
contentClass: line !== undefined ? contentClass : "".concat(contentClass, " d2h-code-side-emptyplaceholder"), | ||
prefix: (line === null || line === void 0 ? void 0 : line.prefix) === ' ' ? ' ' : line === null || line === void 0 ? void 0 : line.prefix, | ||
@@ -219,0 +219,0 @@ content: line === null || line === void 0 ? void 0 : line.content, |
@@ -157,4 +157,3 @@ var __assign = (this && this.__assign) || function () { | ||
Diff2HtmlUI.prototype.isElement = function (arg) { | ||
var _a; | ||
return arg !== null && ((_a = arg) === null || _a === void 0 ? void 0 : _a.classList) !== undefined; | ||
return arg !== null && (arg === null || arg === void 0 ? void 0 : arg.classList) !== undefined; | ||
}; | ||
@@ -161,0 +160,0 @@ return Diff2HtmlUI; |
@@ -40,4 +40,3 @@ function escapeHTML(value) { | ||
function isElement(arg) { | ||
var _a; | ||
return arg !== null && ((_a = arg) === null || _a === void 0 ? void 0 : _a.attributes) !== undefined; | ||
return arg !== null && (arg === null || arg === void 0 ? void 0 : arg.attributes) !== undefined; | ||
} | ||
@@ -57,5 +56,5 @@ function selectStream() { | ||
} | ||
result += "<" + tag(node) + " " + Array() | ||
.map.call(node.attributes, function (attr) { return attr.nodeName + "=\"" + escapeHTML(attr.value).replace(/"/g, '"') + "\""; }) | ||
.join(' ') + ">"; | ||
result += "<".concat(tag(node), " ").concat(Array() | ||
.map.call(node.attributes, function (attr) { return "".concat(attr.nodeName, "=\"").concat(escapeHTML(attr.value).replace(/"/g, '"'), "\""); }) | ||
.join(' '), ">"); | ||
} | ||
@@ -97,3 +96,3 @@ function close(node) { | ||
.map(function (line) { | ||
var prepend = tokenStack.map(function (token) { return "<span class=\"" + token + "\">"; }).join(''); | ||
var prepend = tokenStack.map(function (token) { return "<span class=\"".concat(token, "\">"); }).join(''); | ||
var matches = line.matchAll(/(<span class="(.*?)">|<\/span>)/g); | ||
@@ -100,0 +99,0 @@ Array.from(matches).forEach(function (match) { |
@@ -26,3 +26,3 @@ "use strict"; | ||
var FilenameRegExp = linePrefix | ||
? new RegExp("^" + (0, utils_1.escapeForRegExp)(linePrefix) + " \"?(.+?)\"?$") | ||
? new RegExp("^".concat((0, utils_1.escapeForRegExp)(linePrefix), " \"?(.+?)\"?$")) | ||
: new RegExp('^"?(.+?)"?$'); | ||
@@ -29,0 +29,0 @@ var _a = FilenameRegExp.exec(line) || [], _b = _a[1], filename = _b === void 0 ? '' : _b; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
@@ -15,3 +15,7 @@ "use strict"; | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -18,0 +22,0 @@ if (k2 === undefined) k2 = k; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
@@ -15,3 +15,7 @@ "use strict"; | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -57,3 +61,3 @@ if (k2 === undefined) k2 = k; | ||
catch (e) { | ||
throw new Error("Could not find template to render '" + templateKey + "'"); | ||
throw new Error("Could not find template to render '".concat(templateKey, "'")); | ||
} | ||
@@ -65,3 +69,3 @@ }; | ||
HoganJsUtils.prototype.templateKey = function (namespace, view) { | ||
return namespace + "-" + view; | ||
return "".concat(namespace, "-").concat(view); | ||
}; | ||
@@ -68,0 +72,0 @@ return HoganJsUtils; |
@@ -15,3 +15,7 @@ "use strict"; | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -18,0 +22,0 @@ if (k2 === undefined) k2 = k; |
@@ -15,3 +15,7 @@ "use strict"; | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -155,3 +159,3 @@ if (k2 === undefined) k2 = k; | ||
function getHtmlId(file) { | ||
return "d2h-" + (0, utils_1.hashCode)(filenameDiff(file)).toString().slice(-6); | ||
return "d2h-".concat((0, utils_1.hashCode)(filenameDiff(file)).toString().slice(-6)); | ||
} | ||
@@ -219,4 +223,4 @@ exports.getHtmlId = getHtmlId; | ||
return elemType !== null | ||
? highlightedLine + "<" + elemType + addClass + ">" + escapedValue + "</" + elemType + ">" | ||
: "" + highlightedLine + escapedValue; | ||
? "".concat(highlightedLine, "<").concat(elemType).concat(addClass, ">").concat(escapedValue, "</").concat(elemType, ">") | ||
: "".concat(highlightedLine).concat(escapedValue); | ||
}, ''); | ||
@@ -223,0 +227,0 @@ return { |
@@ -15,3 +15,7 @@ "use strict"; | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -237,5 +241,5 @@ if (k2 === undefined) k2 = k; | ||
return this.hoganUtils.render(genericTemplatesPath, 'line', { | ||
type: (line === null || line === void 0 ? void 0 : line.type) || renderUtils.CSSLineClass.CONTEXT + " d2h-emptyplaceholder", | ||
lineClass: line !== undefined ? lineClass : lineClass + " d2h-code-side-emptyplaceholder", | ||
contentClass: line !== undefined ? contentClass : contentClass + " d2h-code-side-emptyplaceholder", | ||
type: (line === null || line === void 0 ? void 0 : line.type) || "".concat(renderUtils.CSSLineClass.CONTEXT, " d2h-emptyplaceholder"), | ||
lineClass: line !== undefined ? lineClass : "".concat(lineClass, " d2h-code-side-emptyplaceholder"), | ||
contentClass: line !== undefined ? contentClass : "".concat(contentClass, " d2h-code-side-emptyplaceholder"), | ||
prefix: (line === null || line === void 0 ? void 0 : line.prefix) === ' ' ? ' ' : line === null || line === void 0 ? void 0 : line.prefix, | ||
@@ -242,0 +246,0 @@ content: line === null || line === void 0 ? void 0 : line.content, |
@@ -160,4 +160,3 @@ "use strict"; | ||
Diff2HtmlUI.prototype.isElement = function (arg) { | ||
var _a; | ||
return arg !== null && ((_a = arg) === null || _a === void 0 ? void 0 : _a.classList) !== undefined; | ||
return arg !== null && (arg === null || arg === void 0 ? void 0 : arg.classList) !== undefined; | ||
}; | ||
@@ -164,0 +163,0 @@ return Diff2HtmlUI; |
@@ -44,4 +44,3 @@ "use strict"; | ||
function isElement(arg) { | ||
var _a; | ||
return arg !== null && ((_a = arg) === null || _a === void 0 ? void 0 : _a.attributes) !== undefined; | ||
return arg !== null && (arg === null || arg === void 0 ? void 0 : arg.attributes) !== undefined; | ||
} | ||
@@ -61,5 +60,5 @@ function selectStream() { | ||
} | ||
result += "<" + tag(node) + " " + Array() | ||
.map.call(node.attributes, function (attr) { return attr.nodeName + "=\"" + escapeHTML(attr.value).replace(/"/g, '"') + "\""; }) | ||
.join(' ') + ">"; | ||
result += "<".concat(tag(node), " ").concat(Array() | ||
.map.call(node.attributes, function (attr) { return "".concat(attr.nodeName, "=\"").concat(escapeHTML(attr.value).replace(/"/g, '"'), "\""); }) | ||
.join(' '), ">"); | ||
} | ||
@@ -102,3 +101,3 @@ function close(node) { | ||
.map(function (line) { | ||
var prepend = tokenStack.map(function (token) { return "<span class=\"" + token + "\">"; }).join(''); | ||
var prepend = tokenStack.map(function (token) { return "<span class=\"".concat(token, "\">"); }).join(''); | ||
var matches = line.matchAll(/(<span class="(.*?)">|<\/span>)/g); | ||
@@ -105,0 +104,0 @@ Array.from(matches).forEach(function (match) { |
{ | ||
"name": "diff2html", | ||
"version": "3.4.16", | ||
"version": "3.4.17", | ||
"homepage": "https://diff2html.xyz", | ||
@@ -88,57 +88,55 @@ "description": "Fast Diff to colorized HTML", | ||
"optionalDependencies": { | ||
"highlight.js": "11.2.0" | ||
"highlight.js": "11.5.1" | ||
}, | ||
"devDependencies": { | ||
"@types/copy-webpack-plugin": "8.0.1", | ||
"@types/diff": "5.0.1", | ||
"@types/diff": "5.0.2", | ||
"@types/hogan.js": "3.0.1", | ||
"@types/jest": "27.0.2", | ||
"@types/mini-css-extract-plugin": "^2.3.0", | ||
"@types/jest": "27.4.1", | ||
"@types/mkdirp": "1.0.2", | ||
"@types/node": "16.11.0", | ||
"@types/node": "17.0.24", | ||
"@types/nopt": "3.0.29", | ||
"@typescript-eslint/eslint-plugin": "5.0.0", | ||
"@typescript-eslint/parser": "5.0.0", | ||
"@typescript-eslint/eslint-plugin": "5.19.0", | ||
"@typescript-eslint/parser": "5.19.0", | ||
"all-contributors-cli": "^6.20.0", | ||
"autoprefixer": "10.3.7", | ||
"autoprefixer": "10.4.4", | ||
"bulma": "^0.9.2", | ||
"clipboard": "2.0.8", | ||
"copy-webpack-plugin": "9.0.1", | ||
"css-loader": "6.4.0", | ||
"cssnano": "5.0.8", | ||
"eslint": "8.0.1", | ||
"eslint-config-prettier": "8.3.0", | ||
"eslint-plugin-import": "2.25.2", | ||
"eslint-plugin-jest": "25.2.1", | ||
"clipboard": "2.0.10", | ||
"copy-webpack-plugin": "10.2.4", | ||
"css-loader": "6.7.1", | ||
"cssnano": "5.1.7", | ||
"eslint": "8.13.0", | ||
"eslint-config-prettier": "8.5.0", | ||
"eslint-plugin-import": "2.26.0", | ||
"eslint-plugin-jest": "26.1.4", | ||
"eslint-plugin-json": "3.1.0", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-optimize-regex": "1.2.1", | ||
"eslint-plugin-promise": "5.1.0", | ||
"eslint-plugin-sonarjs": "0.10.0", | ||
"eslint-plugin-promise": "6.0.0", | ||
"eslint-plugin-sonarjs": "0.13.0", | ||
"file-loader": "6.2.0", | ||
"handlebars": "4.7.7", | ||
"handlebars-loader": "1.7.1", | ||
"html-webpack-plugin": "5.4.0", | ||
"html-webpack-plugin": "5.5.0", | ||
"husky": "^7.0.2", | ||
"image-webpack-loader": "8.0.1", | ||
"image-webpack-loader": "8.1.0", | ||
"is-ci-cli": "2.2.0", | ||
"jest": "27.2.5", | ||
"lint-staged": "11.2.3", | ||
"jest": "27.5.1", | ||
"lint-staged": "12.3.8", | ||
"markdown-toc": "^1.2.0", | ||
"mini-css-extract-plugin": "2.4.2", | ||
"mini-css-extract-plugin": "2.6.0", | ||
"mkdirp": "1.0.4", | ||
"nopt": "5.0.0", | ||
"postcss": "8.3.9", | ||
"postcss-cli": "9.0.1", | ||
"postcss-import": "14.0.2", | ||
"postcss-loader": "6.2.0", | ||
"postcss-preset-env": "6.7.0", | ||
"prettier": "2.4.1", | ||
"ts-jest": "27.0.6", | ||
"ts-loader": "9.2.6", | ||
"ts-node": "10.3.0", | ||
"typescript": "4.4.4", | ||
"postcss": "8.4.12", | ||
"postcss-cli": "9.1.0", | ||
"postcss-import": "14.1.0", | ||
"postcss-loader": "6.2.1", | ||
"postcss-preset-env": "7.4.3", | ||
"prettier": "2.6.2", | ||
"ts-jest": "27.1.4", | ||
"ts-loader": "9.2.8", | ||
"ts-node": "10.7.0", | ||
"typescript": "4.6.3", | ||
"url-loader": "4.1.1", | ||
"webpack": "5.58.2", | ||
"webpack-cli": "4.9.0", | ||
"webpack": "5.72.0", | ||
"webpack-cli": "4.9.2", | ||
"whatwg-fetch": "3.6.2" | ||
@@ -153,3 +151,6 @@ }, | ||
"decompress": ">=4.2.1", | ||
"node-forge": ">=0.10.0" | ||
"node-forge": ">=0.10.0", | ||
"trim-newlines": ">=3.0.1", | ||
"semver-regex": ">=3.1.3", | ||
"async": ">=2.6.4" | ||
}, | ||
@@ -156,0 +157,0 @@ "license": "MIT", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1910167
51
5299