Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] upgrades html-minifier-terser@5.0.0 -> 6.0.2 #1688

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/custom-template/dist/webpack-5/bundle.js
Expand Up @@ -19,9 +19,8 @@ __webpack_require__.r(__webpack_exports__);
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
5 changes: 2 additions & 3 deletions examples/default/dist/webpack-5/bundle.js
Expand Up @@ -405,9 +405,8 @@ module.exports = function (list, options) {
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
5 changes: 2 additions & 3 deletions examples/favicon/dist/webpack-5/bundle.js
Expand Up @@ -19,9 +19,8 @@ __webpack_require__.r(__webpack_exports__);
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
5 changes: 2 additions & 3 deletions examples/html-loader/dist/webpack-5/bundle.js
Expand Up @@ -19,9 +19,8 @@ __webpack_require__.r(__webpack_exports__);
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
5 changes: 2 additions & 3 deletions examples/inline/dist/webpack-5/bundle.js
Expand Up @@ -19,9 +19,8 @@ __webpack_require__.r(__webpack_exports__);
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
5 changes: 2 additions & 3 deletions examples/inline/dist/webpack-5/index.html
Expand Up @@ -21,9 +21,8 @@
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
5 changes: 2 additions & 3 deletions examples/javascript-advanced/dist/webpack-5/bundle.js
Expand Up @@ -40,9 +40,8 @@ eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extr
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
5 changes: 2 additions & 3 deletions examples/javascript/dist/webpack-5/bundle.js
Expand Up @@ -37,9 +37,8 @@ __webpack_require__.r(__webpack_exports__);
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
5 changes: 2 additions & 3 deletions examples/multi-page/dist/webpack-5/first.js
Expand Up @@ -405,9 +405,8 @@ module.exports = function (list, options) {
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
5 changes: 2 additions & 3 deletions examples/multi-page/dist/webpack-5/second.js
Expand Up @@ -405,9 +405,8 @@ module.exports = function (list, options) {
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
9 changes: 4 additions & 5 deletions examples/pug-loader/dist/webpack-5/bundle.js
Expand Up @@ -284,7 +284,7 @@ function pug_rethrow(err, filename, lineno, str) {
}
var context, lines, start, end;
try {
str = str || __webpack_require__(672).readFileSync(filename, {encoding: 'utf8'});
str = str || __webpack_require__(993).readFileSync(filename, {encoding: 'utf8'});
context = 3;
lines = str.split('\n');
start = Math.max(lineno - context, 0);
Expand Down Expand Up @@ -323,7 +323,7 @@ function pug_rethrow(err, filename, lineno, str) {

/***/ }),

/***/ 672:
/***/ 993:
/***/ (() => {

/* (ignored) */
Expand All @@ -338,9 +338,8 @@ function pug_rethrow(err, filename, lineno, str) {
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
5 changes: 2 additions & 3 deletions examples/sort-manually/dist/webpack-5/a.js
Expand Up @@ -19,9 +19,8 @@ __webpack_require__.r(__webpack_exports__);
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
Expand Down
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -1041,12 +1041,12 @@ function hookIntoCompiler (compiler, options, plugin) {
*
* @param {string} html
*/
function minifyHtml (html) {
async function minifyHtml (html) {
gabrielcsapo marked this conversation as resolved.
Show resolved Hide resolved
if (typeof options.minify !== 'object') {
return html;
}
try {
return require('html-minifier-terser').minify(html, options.minify);
return await require('html-minifier-terser').minify(html, options.minify);
gabrielcsapo marked this conversation as resolved.
Show resolved Hide resolved
} catch (e) {
const isParseError = String(e.message).indexOf('Parse Error') === 0;
if (isParseError) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -49,8 +49,8 @@
"webpack-recompilation-simulator": "3.2.0"
},
"dependencies": {
"@types/html-minifier-terser": "^5.0.0",
"html-minifier-terser": "^5.0.1",
"@types/html-minifier-terser": "^6.0.0",
"html-minifier-terser": "^6.0.2",
"lodash": "^4.17.21",
"pretty-error": "^3.0.4",
"tapable": "^2.0.0"
Expand Down