webpack
Advanced tools
Comparing version 5.71.0 to 5.72.0
@@ -11,2 +11,3 @@ /* | ||
const { RawSource } = require("webpack-sources"); | ||
const ConcatenationScope = require("../ConcatenationScope"); | ||
const Generator = require("../Generator"); | ||
@@ -27,2 +28,3 @@ const RuntimeGlobals = require("../RuntimeGlobals"); | ||
/** @typedef {import("../Module")} Module */ | ||
/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ | ||
/** @typedef {import("../NormalModule")} NormalModule */ | ||
@@ -151,2 +153,11 @@ /** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ | ||
/** | ||
* @param {NormalModule} module module for which the bailout reason should be determined | ||
* @param {ConcatenationBailoutReasonContext} context context | ||
* @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated | ||
*/ | ||
getConcatenationBailoutReason(module, context) { | ||
return undefined; | ||
} | ||
/** | ||
* @param {NormalModule} module module | ||
@@ -204,3 +215,11 @@ * @returns {string} mime type | ||
module, | ||
{ runtime, chunkGraph, runtimeTemplate, runtimeRequirements, type, getData } | ||
{ | ||
runtime, | ||
concatenationScope, | ||
chunkGraph, | ||
runtimeTemplate, | ||
runtimeRequirements, | ||
type, | ||
getData | ||
} | ||
) { | ||
@@ -211,4 +230,3 @@ switch (type) { | ||
default: { | ||
runtimeRequirements.add(RuntimeGlobals.module); | ||
let content; | ||
const originalSource = module.originalSource(); | ||
@@ -263,7 +281,3 @@ if (module.buildInfo.dataUrl) { | ||
data.set("url", Buffer.from(encodedSource)); | ||
return new RawSource( | ||
`${RuntimeGlobals.module}.exports = ${JSON.stringify( | ||
encodedSource | ||
)};` | ||
); | ||
content = JSON.stringify(encodedSource); | ||
} else { | ||
@@ -352,6 +366,19 @@ const assetModuleFilename = | ||
} | ||
content = assetPath; | ||
} | ||
if (concatenationScope) { | ||
concatenationScope.registerNamespaceExport( | ||
ConcatenationScope.NAMESPACE_OBJECT_EXPORT | ||
); | ||
return new RawSource( | ||
`${RuntimeGlobals.module}.exports = ${assetPath};` | ||
`${runtimeTemplate.supportsConst() ? "const" : "var"} ${ | ||
ConcatenationScope.NAMESPACE_OBJECT_EXPORT | ||
} = ${content};` | ||
); | ||
} else { | ||
runtimeRequirements.add(RuntimeGlobals.module); | ||
return new RawSource( | ||
`${RuntimeGlobals.module}.exports = ${content};` | ||
); | ||
} | ||
@@ -358,0 +385,0 @@ } |
@@ -34,2 +34,3 @@ /* | ||
state.module.buildMeta.exportsType = "default"; | ||
state.module.buildMeta.defaultObject = false; | ||
@@ -36,0 +37,0 @@ if (typeof this.dataUrlCondition === "function") { |
@@ -9,2 +9,3 @@ /* | ||
const { RawSource } = require("webpack-sources"); | ||
const ConcatenationScope = require("../ConcatenationScope"); | ||
const Generator = require("../Generator"); | ||
@@ -15,2 +16,3 @@ const RuntimeGlobals = require("../RuntimeGlobals"); | ||
/** @typedef {import("../Generator").GenerateContext} GenerateContext */ | ||
/** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ | ||
/** @typedef {import("../NormalModule")} NormalModule */ | ||
@@ -26,5 +28,6 @@ | ||
*/ | ||
generate(module, { chunkGraph, runtimeTemplate, runtimeRequirements }) { | ||
runtimeRequirements.add(RuntimeGlobals.module); | ||
generate( | ||
module, | ||
{ concatenationScope, chunkGraph, runtimeTemplate, runtimeRequirements } | ||
) { | ||
const originalSource = module.originalSource(); | ||
@@ -44,8 +47,30 @@ | ||
} | ||
return new RawSource( | ||
`${RuntimeGlobals.module}.exports = ${JSON.stringify(encodedSource)};` | ||
); | ||
let sourceContent; | ||
if (concatenationScope) { | ||
concatenationScope.registerNamespaceExport( | ||
ConcatenationScope.NAMESPACE_OBJECT_EXPORT | ||
); | ||
sourceContent = `${runtimeTemplate.supportsConst() ? "const" : "var"} ${ | ||
ConcatenationScope.NAMESPACE_OBJECT_EXPORT | ||
} = ${JSON.stringify(encodedSource)};`; | ||
} else { | ||
runtimeRequirements.add(RuntimeGlobals.module); | ||
sourceContent = `${RuntimeGlobals.module}.exports = ${JSON.stringify( | ||
encodedSource | ||
)};`; | ||
} | ||
return new RawSource(sourceContent); | ||
} | ||
/** | ||
* @param {NormalModule} module module for which the bailout reason should be determined | ||
* @param {ConcatenationBailoutReasonContext} context context | ||
* @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated | ||
*/ | ||
getConcatenationBailoutReason(module, context) { | ||
return undefined; | ||
} | ||
/** | ||
* @param {NormalModule} module fresh module | ||
@@ -52,0 +77,0 @@ * @returns {Set<string>} available types (do not mutate) |
@@ -26,2 +26,3 @@ /* | ||
module.buildMeta.exportsType = "default"; | ||
state.module.buildMeta.defaultObject = false; | ||
@@ -28,0 +29,0 @@ return state; |
@@ -109,3 +109,5 @@ /* | ||
if (!cached || cached.comment !== comment) { | ||
const source = new ConcatSource(comment, "\n", old); | ||
const source = options.footer | ||
? new ConcatSource(old, "\n", comment) | ||
: new ConcatSource(comment, "\n", old); | ||
cache.set(old, { source, comment }); | ||
@@ -112,0 +114,0 @@ return source; |
@@ -642,6 +642,10 @@ /* | ||
if (e === NOT_SERIALIZABLE) continue; | ||
logger.warn( | ||
`Skipped not serializable cache item '${key}': ${e.message}` | ||
); | ||
logger.debug(e.stack); | ||
const msg = "Skipped not serializable cache item"; | ||
if (e.message.includes("ModuleBuildError")) { | ||
logger.log(`${msg} (in build error): ${e.message}`); | ||
logger.debug(`${msg} '${key}' (in build error): ${e.stack}`); | ||
} else { | ||
logger.warn(`${msg}: ${e.message}`); | ||
logger.debug(`${msg} '${key}': ${e.stack}`); | ||
} | ||
} | ||
@@ -648,0 +652,0 @@ } |
@@ -88,10 +88,13 @@ /* | ||
/** | ||
* @param {SortableSet<Module>} set the set | ||
* @returns {Map<string, SortableSet<Module>>} modules by source type | ||
* @param {WeakMap<Module, Set<string>> | undefined} sourceTypesByModule sourceTypesByModule | ||
* @returns {function (SortableSet<Module>): Map<string, SortableSet<Module>>} modules by source type | ||
*/ | ||
const modulesBySourceType = set => { | ||
const modulesBySourceType = sourceTypesByModule => set => { | ||
/** @type {Map<string, SortableSet<Module>>} */ | ||
const map = new Map(); | ||
for (const module of set) { | ||
for (const sourceType of module.getSourceTypes()) { | ||
const sourceTypes = | ||
(sourceTypesByModule && sourceTypesByModule.get(module)) || | ||
module.getSourceTypes(); | ||
for (const sourceType of sourceTypes) { | ||
let innerSet = map.get(sourceType); | ||
@@ -114,2 +117,3 @@ if (innerSet === undefined) { | ||
}; | ||
const defaultModulesBySourceType = modulesBySourceType(undefined); | ||
@@ -206,2 +210,4 @@ /** @type {WeakMap<Function, any>} */ | ||
this.modules = new SortableSet(); | ||
/** @type {WeakMap<Module, Set<string>> | undefined} */ | ||
this.sourceTypesByModule = undefined; | ||
/** @type {Map<Module, Entrypoint>} */ | ||
@@ -219,2 +225,4 @@ this.entryModules = new Map(); | ||
this.runtimeRequirementsInTree = new Set(); | ||
this._modulesBySourceType = defaultModulesBySourceType; | ||
} | ||
@@ -322,2 +330,4 @@ } | ||
cgc.modules.delete(module); | ||
// No need to invalidate cgc._modulesBySourceType because we modified cgc.modules anyway | ||
if (cgc.sourceTypesByModule) cgc.sourceTypesByModule.delete(module); | ||
cgm.chunks.delete(chunk); | ||
@@ -576,3 +586,3 @@ } | ||
const modulesWithSourceType = cgc.modules | ||
.getFromUnorderedCache(modulesBySourceType) | ||
.getFromUnorderedCache(cgc._modulesBySourceType) | ||
.get(sourceType); | ||
@@ -583,2 +593,75 @@ return modulesWithSourceType; | ||
/** | ||
* @param {Chunk} chunk chunk | ||
* @param {Module} module chunk module | ||
* @param {Set<string>} sourceTypes source types | ||
*/ | ||
setChunkModuleSourceTypes(chunk, module, sourceTypes) { | ||
const cgc = this._getChunkGraphChunk(chunk); | ||
if (cgc.sourceTypesByModule === undefined) { | ||
cgc.sourceTypesByModule = new WeakMap(); | ||
} | ||
cgc.sourceTypesByModule.set(module, sourceTypes); | ||
// Update cgc._modulesBySourceType to invalidate the cache | ||
cgc._modulesBySourceType = modulesBySourceType(cgc.sourceTypesByModule); | ||
} | ||
/** | ||
* @param {Chunk} chunk chunk | ||
* @param {Module} module chunk module | ||
* @returns {Set<string>} source types | ||
*/ | ||
getChunkModuleSourceTypes(chunk, module) { | ||
const cgc = this._getChunkGraphChunk(chunk); | ||
if (cgc.sourceTypesByModule === undefined) { | ||
return module.getSourceTypes(); | ||
} | ||
return cgc.sourceTypesByModule.get(module) || module.getSourceTypes(); | ||
} | ||
/** | ||
* @param {Module} module module | ||
* @returns {Set<string>} source types | ||
*/ | ||
getModuleSourceTypes(module) { | ||
return ( | ||
this._getOverwrittenModuleSourceTypes(module) || module.getSourceTypes() | ||
); | ||
} | ||
/** | ||
* @param {Module} module module | ||
* @returns {Set<string> | undefined} source types | ||
*/ | ||
_getOverwrittenModuleSourceTypes(module) { | ||
let newSet = false; | ||
let sourceTypes; | ||
for (const chunk of this.getModuleChunksIterable(module)) { | ||
const cgc = this._getChunkGraphChunk(chunk); | ||
if (cgc.sourceTypesByModule === undefined) return; | ||
const st = cgc.sourceTypesByModule.get(module); | ||
if (st === undefined) return; | ||
if (!sourceTypes) { | ||
sourceTypes = st; | ||
continue; | ||
} else if (!newSet) { | ||
for (const type of st) { | ||
if (!newSet) { | ||
if (!sourceTypes.has(type)) { | ||
newSet = true; | ||
sourceTypes = new Set(sourceTypes); | ||
sourceTypes.add(type); | ||
} | ||
} else { | ||
sourceTypes.add(type); | ||
} | ||
} | ||
} else { | ||
for (const type of st) sourceTypes.add(type); | ||
} | ||
} | ||
return sourceTypes; | ||
} | ||
/** | ||
* @param {Chunk} chunk the chunk | ||
@@ -603,3 +686,3 @@ * @param {function(Module, Module): -1|0|1} comparator comparator function | ||
const modulesWithSourceType = cgc.modules | ||
.getFromUnorderedCache(modulesBySourceType) | ||
.getFromUnorderedCache(cgc._modulesBySourceType) | ||
.get(sourceType); | ||
@@ -1484,2 +1567,6 @@ if (modulesWithSourceType === undefined) return undefined; | ||
hash.update(`${cgm.id}${this.moduleGraph.isAsync(module)}`); | ||
const sourceTypes = this._getOverwrittenModuleSourceTypes(module); | ||
if (sourceTypes !== undefined) { | ||
for (const type of sourceTypes) hash.update(type); | ||
} | ||
this.moduleGraph.getExportsInfo(module).updateHash(hash, runtime); | ||
@@ -1486,0 +1573,0 @@ return BigInt(`0x${/** @type {string} */ (hash.digest("hex"))}`); |
@@ -76,5 +76,5 @@ /* | ||
), | ||
`__webpack_modules__[id] = ${runtimeTemplate.basicFunction("", [ | ||
"throw error;" | ||
])}`, | ||
`${ | ||
RuntimeGlobals.moduleFactories | ||
}[id] = ${runtimeTemplate.basicFunction("", ["throw error;"])}`, | ||
"data.p = 0;" | ||
@@ -115,6 +115,7 @@ ])};`, | ||
"data.p = 1;", | ||
`__webpack_modules__[id] = ${runtimeTemplate.basicFunction( | ||
"module", | ||
["module.exports = factory();"] | ||
)}` | ||
`${ | ||
RuntimeGlobals.moduleFactories | ||
}[id] = ${runtimeTemplate.basicFunction("module", [ | ||
"module.exports = factory();" | ||
])}` | ||
])};`, | ||
@@ -121,0 +122,0 @@ "handleFunction(__webpack_require__, data[2], 0, 0, onExternal, 1);" |
@@ -587,3 +587,3 @@ /* | ||
} | ||
return info.provided; | ||
return info.provided ? name.length === 1 || undefined : info.provided; | ||
} | ||
@@ -590,0 +590,0 @@ const info = this.getReadOnlyExportInfo(name); |
@@ -63,2 +63,3 @@ /* | ||
* @property {Compilation=} compilation the compilation | ||
* @property {ReadonlySet<string>=} sourceTypes source types | ||
*/ | ||
@@ -65,0 +66,0 @@ |
@@ -1179,3 +1179,4 @@ /* | ||
concatenationScope, | ||
codeGenerationResults | ||
codeGenerationResults, | ||
sourceTypes | ||
}) { | ||
@@ -1199,3 +1200,3 @@ /** @type {Set<string>} */ | ||
const sources = new Map(); | ||
for (const type of this.generator.getTypes(this)) { | ||
for (const type of sourceTypes || chunkGraph.getModuleSourceTypes(this)) { | ||
const source = this.error | ||
@@ -1202,0 +1203,0 @@ ? new RawSource( |
@@ -1672,3 +1672,4 @@ /* | ||
concatenationScope, | ||
codeGenerationResults | ||
codeGenerationResults, | ||
sourceTypes: TYPES | ||
}); | ||
@@ -1675,0 +1676,0 @@ const source = codeGenResult.sources.get("javascript"); |
@@ -61,2 +61,7 @@ /* | ||
compiler.hooks.compilation.tap("ModuleConcatenationPlugin", compilation => { | ||
if (compilation.moduleMemCaches) { | ||
throw new Error( | ||
"optimization.concatenateModules can't be used with cacheUnaffected as module concatenation is a global effect" | ||
); | ||
} | ||
const moduleGraph = compilation.moduleGraph; | ||
@@ -429,3 +434,17 @@ const bailoutReasonMap = new Map(); | ||
)) { | ||
chunkGraph.disconnectChunkAndModule(chunk, m); | ||
const sourceTypes = chunkGraph.getChunkModuleSourceTypes( | ||
chunk, | ||
m | ||
); | ||
if (sourceTypes.size === 1) { | ||
chunkGraph.disconnectChunkAndModule(chunk, m); | ||
} else { | ||
const newSourceTypes = new Set(sourceTypes); | ||
newSourceTypes.delete("javascript"); | ||
chunkGraph.setChunkModuleSourceTypes( | ||
chunk, | ||
m, | ||
newSourceTypes | ||
); | ||
} | ||
} | ||
@@ -432,0 +451,0 @@ } |
{ | ||
"name": "webpack", | ||
"version": "5.71.0", | ||
"version": "5.72.0", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", |
@@ -6,2 +6,2 @@ /* | ||
*/ | ||
"use strict";function n(t,{instancePath:l="",parentData:s,parentDataProperty:e,rootData:a=t}={}){let r=null,o=0;const u=o;let i=!1;const p=o;if(o===p)if(Array.isArray(t)){const n=t.length;for(let l=0;l<n;l++){let n=t[l];const s=o,e=o;let a=!1,u=null;const i=o,p=o;let f=!1;const h=o;if(!(n instanceof RegExp)){const n={params:{}};null===r?r=[n]:r.push(n),o++}var c=h===o;if(f=f||c,!f){const t=o;if(o===t)if("string"==typeof n){if(n.length<1){const n={params:{}};null===r?r=[n]:r.push(n),o++}}else{const n={params:{type:"string"}};null===r?r=[n]:r.push(n),o++}c=t===o,f=f||c}if(f)o=p,null!==r&&(p?r.length=p:r=null);else{const n={params:{}};null===r?r=[n]:r.push(n),o++}if(i===o&&(a=!0,u=0),a)o=e,null!==r&&(e?r.length=e:r=null);else{const n={params:{passingSchemas:u}};null===r?r=[n]:r.push(n),o++}if(s!==o)break}}else{const n={params:{type:"array"}};null===r?r=[n]:r.push(n),o++}var f=p===o;if(i=i||f,!i){const n=o,l=o;let s=!1;const e=o;if(!(t instanceof RegExp)){const n={params:{}};null===r?r=[n]:r.push(n),o++}var h=e===o;if(s=s||h,!s){const n=o;if(o===n)if("string"==typeof t){if(t.length<1){const n={params:{}};null===r?r=[n]:r.push(n),o++}}else{const n={params:{type:"string"}};null===r?r=[n]:r.push(n),o++}h=n===o,s=s||h}if(s)o=l,null!==r&&(l?r.length=l:r=null);else{const n={params:{}};null===r?r=[n]:r.push(n),o++}f=n===o,i=i||f}if(!i){const t={params:{}};return null===r?r=[t]:r.push(t),o++,n.errors=r,!1}return o=u,null!==r&&(u?r.length=u:r=null),n.errors=r,0===o}function t(l,{instancePath:s="",parentData:e,parentDataProperty:a,rootData:r=l}={}){let o=null,u=0;const i=u;let p=!1;const c=u;if(u===c)if("string"==typeof l){if(l.length<1){const n={params:{}};null===o?o=[n]:o.push(n),u++}}else{const n={params:{type:"string"}};null===o?o=[n]:o.push(n),u++}var f=c===u;if(p=p||f,!p){const t=u;if(u===t)if(l&&"object"==typeof l&&!Array.isArray(l)){let t;if(void 0===l.banner&&(t="banner")){const n={params:{missingProperty:t}};null===o?o=[n]:o.push(n),u++}else{const t=u;for(const n in l)if("banner"!==n&&"entryOnly"!==n&&"exclude"!==n&&"include"!==n&&"raw"!==n&&"test"!==n){const t={params:{additionalProperty:n}};null===o?o=[t]:o.push(t),u++;break}if(t===u){if(void 0!==l.banner){let n=l.banner;const t=u,s=u;let e=!1;const a=u;if("string"!=typeof n){const n={params:{type:"string"}};null===o?o=[n]:o.push(n),u++}var h=a===u;if(e=e||h,!e){const t=u;if(!(n instanceof Function)){const n={params:{}};null===o?o=[n]:o.push(n),u++}h=t===u,e=e||h}if(e)u=s,null!==o&&(s?o.length=s:o=null);else{const n={params:{}};null===o?o=[n]:o.push(n),u++}var m=t===u}else m=!0;if(m){if(void 0!==l.entryOnly){const n=u;if("boolean"!=typeof l.entryOnly){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}m=n===u}else m=!0;if(m){if(void 0!==l.exclude){const t=u,e=u;let a=!1,i=null;const p=u;if(n(l.exclude,{instancePath:s+"/exclude",parentData:l,parentDataProperty:"exclude",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=e,null!==o&&(e?o.length=e:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}m=t===u}else m=!0;if(m){if(void 0!==l.include){const t=u,e=u;let a=!1,i=null;const p=u;if(n(l.include,{instancePath:s+"/include",parentData:l,parentDataProperty:"include",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=e,null!==o&&(e?o.length=e:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}m=t===u}else m=!0;if(m){if(void 0!==l.raw){const n=u;if("boolean"!=typeof l.raw){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}m=n===u}else m=!0;if(m)if(void 0!==l.test){const t=u,e=u;let a=!1,i=null;const p=u;if(n(l.test,{instancePath:s+"/test",parentData:l,parentDataProperty:"test",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=e,null!==o&&(e?o.length=e:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}m=t===u}else m=!0}}}}}}}else{const n={params:{type:"object"}};null===o?o=[n]:o.push(n),u++}if(f=t===u,p=p||f,!p){const n=u;if(!(l instanceof Function)){const n={params:{}};null===o?o=[n]:o.push(n),u++}f=n===u,p=p||f}}if(!p){const n={params:{}};return null===o?o=[n]:o.push(n),u++,t.errors=o,!1}return u=i,null!==o&&(i?o.length=i:o=null),t.errors=o,0===u}module.exports=t,module.exports.default=t; | ||
"use strict";function n(t,{instancePath:l="",parentData:e,parentDataProperty:s,rootData:a=t}={}){let r=null,o=0;const u=o;let i=!1;const p=o;if(o===p)if(Array.isArray(t)){const n=t.length;for(let l=0;l<n;l++){let n=t[l];const e=o,s=o;let a=!1,u=null;const i=o,p=o;let f=!1;const h=o;if(!(n instanceof RegExp)){const n={params:{}};null===r?r=[n]:r.push(n),o++}var c=h===o;if(f=f||c,!f){const t=o;if(o===t)if("string"==typeof n){if(n.length<1){const n={params:{}};null===r?r=[n]:r.push(n),o++}}else{const n={params:{type:"string"}};null===r?r=[n]:r.push(n),o++}c=t===o,f=f||c}if(f)o=p,null!==r&&(p?r.length=p:r=null);else{const n={params:{}};null===r?r=[n]:r.push(n),o++}if(i===o&&(a=!0,u=0),a)o=s,null!==r&&(s?r.length=s:r=null);else{const n={params:{passingSchemas:u}};null===r?r=[n]:r.push(n),o++}if(e!==o)break}}else{const n={params:{type:"array"}};null===r?r=[n]:r.push(n),o++}var f=p===o;if(i=i||f,!i){const n=o,l=o;let e=!1;const s=o;if(!(t instanceof RegExp)){const n={params:{}};null===r?r=[n]:r.push(n),o++}var h=s===o;if(e=e||h,!e){const n=o;if(o===n)if("string"==typeof t){if(t.length<1){const n={params:{}};null===r?r=[n]:r.push(n),o++}}else{const n={params:{type:"string"}};null===r?r=[n]:r.push(n),o++}h=n===o,e=e||h}if(e)o=l,null!==r&&(l?r.length=l:r=null);else{const n={params:{}};null===r?r=[n]:r.push(n),o++}f=n===o,i=i||f}if(!i){const t={params:{}};return null===r?r=[t]:r.push(t),o++,n.errors=r,!1}return o=u,null!==r&&(u?r.length=u:r=null),n.errors=r,0===o}function t(l,{instancePath:e="",parentData:s,parentDataProperty:a,rootData:r=l}={}){let o=null,u=0;const i=u;let p=!1;const c=u;if(u===c)if("string"==typeof l){if(l.length<1){const n={params:{}};null===o?o=[n]:o.push(n),u++}}else{const n={params:{type:"string"}};null===o?o=[n]:o.push(n),u++}var f=c===u;if(p=p||f,!p){const t=u;if(u===t)if(l&&"object"==typeof l&&!Array.isArray(l)){let t;if(void 0===l.banner&&(t="banner")){const n={params:{missingProperty:t}};null===o?o=[n]:o.push(n),u++}else{const t=u;for(const n in l)if("banner"!==n&&"entryOnly"!==n&&"exclude"!==n&&"footer"!==n&&"include"!==n&&"raw"!==n&&"test"!==n){const t={params:{additionalProperty:n}};null===o?o=[t]:o.push(t),u++;break}if(t===u){if(void 0!==l.banner){let n=l.banner;const t=u,e=u;let s=!1;const a=u;if("string"!=typeof n){const n={params:{type:"string"}};null===o?o=[n]:o.push(n),u++}var h=a===u;if(s=s||h,!s){const t=u;if(!(n instanceof Function)){const n={params:{}};null===o?o=[n]:o.push(n),u++}h=t===u,s=s||h}if(s)u=e,null!==o&&(e?o.length=e:o=null);else{const n={params:{}};null===o?o=[n]:o.push(n),u++}var y=t===u}else y=!0;if(y){if(void 0!==l.entryOnly){const n=u;if("boolean"!=typeof l.entryOnly){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}y=n===u}else y=!0;if(y){if(void 0!==l.exclude){const t=u,s=u;let a=!1,i=null;const p=u;if(n(l.exclude,{instancePath:e+"/exclude",parentData:l,parentDataProperty:"exclude",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=s,null!==o&&(s?o.length=s:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}y=t===u}else y=!0;if(y){if(void 0!==l.footer){const n=u;if("boolean"!=typeof l.footer){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}y=n===u}else y=!0;if(y){if(void 0!==l.include){const t=u,s=u;let a=!1,i=null;const p=u;if(n(l.include,{instancePath:e+"/include",parentData:l,parentDataProperty:"include",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=s,null!==o&&(s?o.length=s:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}y=t===u}else y=!0;if(y){if(void 0!==l.raw){const n=u;if("boolean"!=typeof l.raw){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}y=n===u}else y=!0;if(y)if(void 0!==l.test){const t=u,s=u;let a=!1,i=null;const p=u;if(n(l.test,{instancePath:e+"/test",parentData:l,parentDataProperty:"test",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=s,null!==o&&(s?o.length=s:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}y=t===u}else y=!0}}}}}}}}else{const n={params:{type:"object"}};null===o?o=[n]:o.push(n),u++}if(f=t===u,p=p||f,!p){const n=u;if(!(l instanceof Function)){const n={params:{}};null===o?o=[n]:o.push(n),u++}f=n===u,p=p||f}}if(!p){const n={params:{}};return null===o?o=[n]:o.push(n),u++,t.errors=o,!1}return u=i,null!==o&&(i?o.length=i:o=null),t.errors=o,0===u}module.exports=t,module.exports.default=t; |
@@ -76,2 +76,6 @@ { | ||
}, | ||
"footer": { | ||
"description": "If true, banner will be placed at the end of the output.", | ||
"type": "boolean" | ||
}, | ||
"include": { | ||
@@ -78,0 +82,0 @@ "description": "Include all modules matching any of these conditions.", |
Sorry, the diff of this file is too big to display
4379501
127184