@gatsbyjs/webpack-hot-middleware
Advanced tools
Comparing version 2.25.3 to 2.25.4-alpha-lazy-comp.0
@@ -16,5 +16,11 @@ /*eslint-env browser*/ | ||
ansiColors: {}, | ||
beforeUpdateApplyThenable() { | ||
return { | ||
then(cb) { | ||
cb() | ||
} | ||
} | ||
} | ||
}; | ||
if (__resourceQuery) { | ||
var { URLSearchParams } = require('url'); | ||
var overrides = new URLSearchParams(__resourceQuery.slice(1)); | ||
@@ -74,2 +80,5 @@ setOverrides(Object.fromEntries(overrides)); | ||
} | ||
if (overrides.beforeUpdateApplyThenable) { | ||
options.beforeUpdateApplyThenable = overrides.beforeUpdateApplyThenable | ||
} | ||
} | ||
@@ -76,0 +85,0 @@ |
{ | ||
"name": "@gatsbyjs/webpack-hot-middleware", | ||
"version": "2.25.3", | ||
"version": "2.25.4-alpha-lazy-comp.0", | ||
"description": "Webpack hot reloading you can attach to your own server", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -76,11 +76,13 @@ /** | ||
var applyResult = module.hot.apply(applyOptions, applyCallback); | ||
// webpack 2 promise | ||
if (applyResult && applyResult.then) { | ||
// HotModuleReplacement.runtime.js refers to the result as `outdatedModules` | ||
applyResult.then(function (outdatedModules) { | ||
applyCallback(null, outdatedModules); | ||
}); | ||
applyResult.catch(applyCallback); | ||
} | ||
options.beforeUpdateApplyThenable().then(() => { | ||
var applyResult = module.hot.apply(applyOptions, applyCallback); | ||
// webpack 2 promise | ||
if (applyResult && applyResult.then) { | ||
// HotModuleReplacement.runtime.js refers to the result as `outdatedModules` | ||
applyResult.then(function (outdatedModules) { | ||
applyCallback(null, outdatedModules); | ||
}); | ||
applyResult.catch(applyCallback); | ||
} | ||
}); | ||
}; | ||
@@ -87,0 +89,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
31826
689
2
1