webpack 5.97.1 → 5.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +345 -392
- package/lib/AsyncDependenciesBlock.js +3 -1
- package/lib/BannerPlugin.js +1 -1
- package/lib/Cache.js +9 -7
- package/lib/CacheFacade.js +5 -5
- package/lib/Chunk.js +2 -2
- package/lib/ChunkGraph.js +21 -16
- package/lib/ChunkTemplate.js +6 -6
- package/lib/CleanPlugin.js +10 -10
- package/lib/CodeGenerationResults.js +4 -3
- package/lib/CompatibilityPlugin.js +4 -1
- package/lib/Compilation.js +343 -167
- package/lib/Compiler.js +13 -18
- package/lib/ConditionalInitFragment.js +1 -1
- package/lib/ConstPlugin.js +5 -3
- package/lib/ContextModule.js +4 -2
- package/lib/ContextModuleFactory.js +3 -3
- package/lib/ContextReplacementPlugin.js +43 -16
- package/lib/DefinePlugin.js +25 -24
- package/lib/DelegatedModule.js +4 -2
- package/lib/DelegatedModuleFactoryPlugin.js +2 -1
- package/lib/Dependency.js +19 -13
- package/lib/DependencyTemplates.js +4 -3
- package/lib/DllModule.js +4 -2
- package/lib/DllModuleFactory.js +2 -2
- package/lib/DllReferencePlugin.js +2 -1
- package/lib/DynamicEntryPlugin.js +1 -1
- package/lib/EnvironmentPlugin.js +4 -2
- package/lib/ExportsInfo.js +72 -40
- package/lib/ExternalModule.js +14 -5
- package/lib/ExternalModuleFactoryPlugin.js +24 -12
- package/lib/FileSystemInfo.js +129 -94
- package/lib/FlagDependencyExportsPlugin.js +6 -4
- package/lib/FlagDependencyUsagePlugin.js +1 -1
- package/lib/Generator.js +29 -1
- package/lib/HookWebpackError.js +2 -2
- package/lib/HotModuleReplacementPlugin.js +3 -9
- package/lib/IgnoreErrorModuleFactory.js +2 -2
- package/lib/IgnorePlugin.js +0 -5
- package/lib/InitFragment.js +1 -1
- package/lib/LoaderOptionsPlugin.js +8 -5
- package/lib/MainTemplate.js +7 -7
- package/lib/Module.js +44 -21
- package/lib/ModuleBuildError.js +3 -1
- package/lib/ModuleDependencyError.js +4 -3
- package/lib/ModuleDependencyWarning.js +4 -3
- package/lib/ModuleFactory.js +9 -3
- package/lib/ModuleFilenameHelpers.js +21 -39
- package/lib/ModuleGraph.js +20 -14
- package/lib/ModuleGraphConnection.js +7 -13
- package/lib/ModuleNotFoundError.js +1 -1
- package/lib/ModuleParseError.js +2 -1
- package/lib/ModuleSourceTypesConstants.js +11 -0
- package/lib/ModuleTemplate.js +5 -5
- package/lib/ModuleTypeConstants.js +15 -0
- package/lib/MultiCompiler.js +4 -4
- package/lib/MultiStats.js +1 -1
- package/lib/NormalModule.js +101 -54
- package/lib/NormalModuleFactory.js +38 -33
- package/lib/NormalModuleReplacementPlugin.js +3 -2
- package/lib/NullFactory.js +2 -2
- package/lib/Parser.js +4 -3
- package/lib/ProgressPlugin.js +1 -2
- package/lib/RawModule.js +4 -2
- package/lib/RecordIdsPlugin.js +6 -2
- package/lib/RequestShortener.js +3 -1
- package/lib/ResolverFactory.js +12 -9
- package/lib/RuntimeModule.js +4 -2
- package/lib/RuntimeTemplate.js +2 -1
- package/lib/SelfModuleFactory.js +2 -2
- package/lib/SourceMapDevToolPlugin.js +0 -8
- package/lib/Template.js +6 -5
- package/lib/TemplatedPathPlugin.js +15 -12
- package/lib/WebpackOptionsApply.js +1 -1
- package/lib/asset/AssetGenerator.js +237 -170
- package/lib/asset/AssetModulesPlugin.js +52 -10
- package/lib/asset/AssetSourceGenerator.js +18 -0
- package/lib/asset/RawDataUrlModule.js +4 -2
- package/lib/buildChunkGraph.js +14 -4
- package/lib/cache/MemoryWithGcCachePlugin.js +6 -2
- package/lib/cache/PackFileCacheStrategy.js +137 -121
- package/lib/cache/ResolverCachePlugin.js +15 -7
- package/lib/cache/getLazyHashedEtag.js +4 -3
- package/lib/cli.js +23 -15
- package/lib/config/defaults.js +104 -28
- package/lib/config/normalization.js +14 -13
- package/lib/config/target.js +8 -8
- package/lib/container/ContainerEntryModule.js +4 -2
- package/lib/container/ContainerEntryModuleFactory.js +2 -2
- package/lib/container/FallbackModule.js +4 -2
- package/lib/container/FallbackModuleFactory.js +2 -2
- package/lib/container/RemoteModule.js +4 -2
- package/lib/container/options.js +5 -5
- package/lib/css/CssGenerator.js +71 -9
- package/lib/css/CssLoadingRuntimeModule.js +5 -2
- package/lib/css/CssModulesPlugin.js +41 -9
- package/lib/css/CssParser.js +37 -17
- package/lib/css/walkCssTokens.js +17 -17
- package/lib/debug/ProfilingPlugin.js +98 -38
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +10 -4
- package/lib/dependencies/AMDPlugin.js +5 -2
- package/lib/dependencies/AMDRequireArrayDependency.js +4 -3
- package/lib/dependencies/AMDRequireContextDependency.js +2 -1
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +15 -7
- package/lib/dependencies/AMDRuntimeModules.js +3 -1
- package/lib/dependencies/CommonJsExportRequireDependency.js +4 -5
- package/lib/dependencies/CommonJsExportsParserPlugin.js +3 -3
- package/lib/dependencies/CommonJsImportsParserPlugin.js +38 -7
- package/lib/dependencies/CommonJsRequireContextDependency.js +2 -1
- package/lib/dependencies/ContextDependencyHelpers.js +13 -6
- package/lib/dependencies/CssIcssExportDependency.js +15 -12
- package/lib/dependencies/CssIcssImportDependency.js +4 -1
- package/lib/dependencies/CssLocalIdentifierDependency.js +18 -15
- package/lib/dependencies/ExportsInfoDependency.js +6 -1
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +5 -5
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +22 -15
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +23 -8
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +2 -2
- package/lib/dependencies/HarmonyImportDependency.js +8 -6
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +19 -14
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +5 -5
- package/lib/dependencies/ImportContextDependency.js +2 -1
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +8 -4
- package/lib/dependencies/JsonExportsDependency.js +49 -27
- package/lib/dependencies/LoaderPlugin.js +4 -14
- package/lib/dependencies/RequireContextDependency.js +2 -1
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +6 -3
- package/lib/dependencies/RequireEnsureDependenciesBlock.js +3 -2
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +11 -5
- package/lib/dependencies/RequireResolveContextDependency.js +1 -1
- package/lib/dependencies/WebAssemblyExportImportedDependency.js +1 -1
- package/lib/dependencies/WorkerDependency.js +6 -3
- package/lib/dependencies/WorkerPlugin.js +100 -41
- package/lib/esm/ModuleChunkFormatPlugin.js +5 -0
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +3 -2
- package/lib/hmr/HotModuleReplacement.runtime.js +1 -0
- package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +1 -0
- package/lib/hmr/LazyCompilationPlugin.js +32 -24
- package/lib/hmr/lazyCompilationBackend.js +1 -1
- package/lib/ids/DeterministicModuleIdsPlugin.js +1 -1
- package/lib/ids/HashedModuleIdsPlugin.js +2 -1
- package/lib/ids/IdHelpers.js +15 -14
- package/lib/ids/SyncModuleIdsPlugin.js +9 -5
- package/lib/index.js +5 -5
- package/lib/javascript/BasicEvaluatedExpression.js +6 -6
- package/lib/javascript/JavascriptGenerator.js +11 -1
- package/lib/javascript/JavascriptModulesPlugin.js +54 -34
- package/lib/javascript/JavascriptParser.js +272 -188
- package/lib/javascript/JavascriptParserHelpers.js +10 -9
- package/lib/javascript/StartupHelpers.js +4 -1
- package/lib/json/JsonData.js +4 -4
- package/lib/json/JsonGenerator.js +54 -22
- package/lib/json/JsonModulesPlugin.js +16 -3
- package/lib/json/JsonParser.js +10 -4
- package/lib/library/AbstractLibraryPlugin.js +7 -3
- package/lib/library/AssignLibraryPlugin.js +29 -1
- package/lib/library/EnableLibraryPlugin.js +7 -10
- package/lib/library/ExportPropertyLibraryPlugin.js +4 -1
- package/lib/library/ModuleLibraryPlugin.js +121 -15
- package/lib/logging/Logger.js +2 -2
- package/lib/logging/createConsoleLogger.js +4 -4
- package/lib/node/NodeEnvironmentPlugin.js +6 -2
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +1 -2
- package/lib/node/ReadFileCompileWasmPlugin.js +1 -2
- package/lib/node/nodeConsole.js +3 -1
- package/lib/optimize/AggressiveSplittingPlugin.js +1 -1
- package/lib/optimize/ConcatenatedModule.js +19 -12
- package/lib/optimize/InnerGraph.js +3 -2
- package/lib/optimize/InnerGraphPlugin.js +13 -7
- package/lib/optimize/LimitChunkCountPlugin.js +20 -0
- package/lib/optimize/ModuleConcatenationPlugin.js +10 -7
- package/lib/optimize/RealContentHashPlugin.js +8 -4
- package/lib/optimize/SideEffectsFlagPlugin.js +4 -2
- package/lib/optimize/SplitChunksPlugin.js +90 -65
- package/lib/rules/BasicEffectRulePlugin.js +9 -1
- package/lib/rules/BasicMatcherRulePlugin.js +15 -4
- package/lib/rules/ObjectMatcherRulePlugin.js +12 -3
- package/lib/rules/RuleSetCompiler.js +25 -14
- package/lib/rules/UseEffectRulePlugin.js +47 -17
- package/lib/runtime/AutoPublicPathRuntimeModule.js +1 -1
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +6 -6
- package/lib/schemes/HttpUriPlugin.js +38 -17
- package/lib/serialization/BinaryMiddleware.js +52 -19
- package/lib/serialization/FileMiddleware.js +78 -48
- package/lib/serialization/ObjectMiddleware.js +78 -29
- package/lib/serialization/PlainObjectSerializer.js +1 -1
- package/lib/serialization/Serializer.js +15 -10
- package/lib/serialization/SerializerMiddleware.js +80 -41
- package/lib/serialization/SingleItemMiddleware.js +10 -7
- package/lib/serialization/types.js +1 -1
- package/lib/sharing/ConsumeSharedModule.js +4 -2
- package/lib/sharing/ProvideSharedModule.js +4 -2
- package/lib/sharing/ProvideSharedModuleFactory.js +5 -3
- package/lib/sharing/utils.js +2 -2
- package/lib/stats/DefaultStatsFactoryPlugin.js +81 -79
- package/lib/stats/DefaultStatsPresetPlugin.js +43 -23
- package/lib/stats/DefaultStatsPrinterPlugin.js +85 -43
- package/lib/stats/StatsFactory.js +11 -11
- package/lib/stats/StatsPrinter.js +7 -7
- package/lib/util/ArrayHelpers.js +2 -4
- package/lib/util/ArrayQueue.js +1 -1
- package/lib/util/AsyncQueue.js +4 -4
- package/lib/util/IterableHelpers.js +1 -1
- package/lib/util/LazyBucketSortedSet.js +41 -23
- package/lib/util/LazySet.js +3 -2
- package/lib/util/MapHelpers.js +1 -1
- package/lib/util/ParallelismFactorCalculator.js +1 -1
- package/lib/util/Semaphore.js +3 -3
- package/lib/util/SetHelpers.js +1 -1
- package/lib/util/SortableSet.js +9 -7
- package/lib/util/TupleQueue.js +9 -8
- package/lib/util/TupleSet.js +2 -2
- package/lib/util/WeakTupleMap.js +12 -11
- package/lib/util/binarySearchBounds.js +2 -1
- package/lib/util/cleverMerge.js +84 -54
- package/lib/util/comparators.js +22 -21
- package/lib/util/compileBooleanMatcher.js +3 -3
- package/lib/util/concatenate.js +6 -4
- package/lib/util/create-schema-validation.js +4 -4
- package/lib/util/createHash.js +2 -2
- package/lib/util/deprecation.js +35 -33
- package/lib/util/deterministicGrouping.js +6 -6
- package/lib/util/findGraphRoots.js +1 -1
- package/lib/util/fs.js +39 -39
- package/lib/util/hash/wasm-hash.js +2 -2
- package/lib/util/identifier.js +15 -18
- package/lib/util/makeSerializable.js +1 -1
- package/lib/util/memoize.js +4 -1
- package/lib/util/objectToMap.js +3 -2
- package/lib/util/processAsyncTree.js +2 -2
- package/lib/util/propertyName.js +0 -1
- package/lib/util/registerExternalSerializer.js +15 -18
- package/lib/util/removeBOM.js +25 -0
- package/lib/util/runtime.js +34 -27
- package/lib/util/semver.js +18 -8
- package/lib/util/serialization.js +5 -16
- package/lib/util/smartGrouping.js +3 -3
- package/lib/validateSchema.js +4 -7
- package/lib/wasm/EnableWasmLoadingPlugin.js +2 -2
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +3 -3
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +11 -0
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +10 -0
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +2 -2
- package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +4 -0
- package/lib/wasm-sync/WebAssemblyGenerator.js +28 -12
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +10 -0
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +2 -2
- package/lib/wasm-sync/WebAssemblyParser.js +9 -4
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +4 -2
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +3 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +30 -25
- package/package.json +27 -26
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +48 -13
- package/schemas/plugins/JsonModulesPluginGenerator.check.d.ts +7 -0
- package/schemas/plugins/JsonModulesPluginGenerator.check.js +6 -0
- package/schemas/plugins/JsonModulesPluginGenerator.json +11 -0
- package/schemas/plugins/JsonModulesPluginParser.check.js +1 -1
- package/schemas/plugins/JsonModulesPluginParser.json +4 -0
- package/schemas/plugins/SourceMapDevToolPlugin.json +2 -2
- package/types.d.ts +888 -583
- package/lib/library/ModernModuleLibraryPlugin.js +0 -144
@@ -604,7 +604,7 @@
|
|
604
604
|
},
|
605
605
|
{
|
606
606
|
"instanceof": "Function",
|
607
|
-
"tsType": "
|
607
|
+
"tsType": "((context: TODO) => string)"
|
608
608
|
}
|
609
609
|
]
|
610
610
|
},
|
@@ -616,7 +616,7 @@
|
|
616
616
|
},
|
617
617
|
{
|
618
618
|
"instanceof": "Function",
|
619
|
-
"tsType": "
|
619
|
+
"tsType": "((context: TODO) => string)"
|
620
620
|
}
|
621
621
|
]
|
622
622
|
},
|
@@ -1206,7 +1206,7 @@
|
|
1206
1206
|
"getResolve": {
|
1207
1207
|
"description": "Get a resolve function with the current resolver options.",
|
1208
1208
|
"instanceof": "Function",
|
1209
|
-
"tsType": "((options?: ResolveOptions) => ((context: string, request: string, callback: (err?: Error, result?: string) => void) => void) | ((context: string, request: string) => Promise<string>))"
|
1209
|
+
"tsType": "((options?: ResolveOptions) => ((context: string, request: string, callback: (err?: Error | null, result?: string | false, resolveRequest?: import('enhanced-resolve').ResolveRequest) => void) => void) | ((context: string, request: string) => Promise<string>))"
|
1210
1210
|
},
|
1211
1211
|
"request": {
|
1212
1212
|
"description": "The request as written by the user in the require/import expression/statement.",
|
@@ -1571,6 +1571,9 @@
|
|
1571
1571
|
},
|
1572
1572
|
"javascript/esm": {
|
1573
1573
|
"$ref": "#/definitions/EmptyGeneratorOptions"
|
1574
|
+
},
|
1575
|
+
"json": {
|
1576
|
+
"$ref": "#/definitions/JsonGeneratorOptions"
|
1574
1577
|
}
|
1575
1578
|
}
|
1576
1579
|
},
|
@@ -2009,6 +2012,17 @@
|
|
2009
2012
|
}
|
2010
2013
|
}
|
2011
2014
|
},
|
2015
|
+
"JsonGeneratorOptions": {
|
2016
|
+
"description": "Generator options for json modules.",
|
2017
|
+
"type": "object",
|
2018
|
+
"additionalProperties": false,
|
2019
|
+
"properties": {
|
2020
|
+
"JSONParse": {
|
2021
|
+
"description": "Use `JSON.parse` when the JSON string is longer than 20 characters.",
|
2022
|
+
"type": "boolean"
|
2023
|
+
}
|
2024
|
+
}
|
2025
|
+
},
|
2012
2026
|
"Layer": {
|
2013
2027
|
"description": "Specifies the layer in which modules of this entrypoint are placed.",
|
2014
2028
|
"anyOf": [
|
@@ -2072,12 +2086,12 @@
|
|
2072
2086
|
"type": "object",
|
2073
2087
|
"additionalProperties": true,
|
2074
2088
|
"properties": {},
|
2075
|
-
"tsType": "(import(\"
|
2089
|
+
"tsType": "(import(\"../lib/hmr/lazyCompilationBackend\").HttpsServerOptions | import(\"../lib/hmr/lazyCompilationBackend\").HttpServerOptions)"
|
2076
2090
|
},
|
2077
2091
|
{
|
2078
2092
|
"description": "A custom create server function.",
|
2079
2093
|
"instanceof": "Function",
|
2080
|
-
"tsType": "(() => import(\"
|
2094
|
+
"tsType": "(() => import(\"../lib/hmr/lazyCompilationBackend\").Server)"
|
2081
2095
|
}
|
2082
2096
|
]
|
2083
2097
|
}
|
@@ -2886,7 +2900,7 @@
|
|
2886
2900
|
},
|
2887
2901
|
{
|
2888
2902
|
"instanceof": "Function",
|
2889
|
-
"tsType": "
|
2903
|
+
"tsType": "((layer: string | null) => boolean)"
|
2890
2904
|
}
|
2891
2905
|
]
|
2892
2906
|
},
|
@@ -2964,7 +2978,7 @@
|
|
2964
2978
|
},
|
2965
2979
|
{
|
2966
2980
|
"instanceof": "Function",
|
2967
|
-
"tsType": "
|
2981
|
+
"tsType": "((module: import('../lib/Module'), chunks: import('../lib/Chunk')[], key: string) => string | undefined)"
|
2968
2982
|
}
|
2969
2983
|
]
|
2970
2984
|
},
|
@@ -2988,7 +3002,7 @@
|
|
2988
3002
|
},
|
2989
3003
|
{
|
2990
3004
|
"instanceof": "Function",
|
2991
|
-
"tsType": "
|
3005
|
+
"tsType": "((module: import('../lib/Module'), context: import('../lib/optimize/SplitChunksPlugin').CacheGroupsContext) => boolean)"
|
2992
3006
|
}
|
2993
3007
|
]
|
2994
3008
|
},
|
@@ -3004,7 +3018,7 @@
|
|
3004
3018
|
},
|
3005
3019
|
{
|
3006
3020
|
"instanceof": "Function",
|
3007
|
-
"tsType": "
|
3021
|
+
"tsType": "((type: string) => boolean)"
|
3008
3022
|
}
|
3009
3023
|
]
|
3010
3024
|
},
|
@@ -3272,7 +3286,7 @@
|
|
3272
3286
|
},
|
3273
3287
|
{
|
3274
3288
|
"instanceof": "Function",
|
3275
|
-
"tsType": "
|
3289
|
+
"tsType": "((module: import('../lib/Module'), chunks: import('../lib/Chunk')[], key: string) => string | undefined)"
|
3276
3290
|
}
|
3277
3291
|
]
|
3278
3292
|
},
|
@@ -4887,7 +4901,14 @@
|
|
4887
4901
|
},
|
4888
4902
|
"assetsSort": {
|
4889
4903
|
"description": "Sort the assets by that field.",
|
4890
|
-
"
|
4904
|
+
"anyOf": [
|
4905
|
+
{
|
4906
|
+
"enum": [false]
|
4907
|
+
},
|
4908
|
+
{
|
4909
|
+
"type": "string"
|
4910
|
+
}
|
4911
|
+
]
|
4891
4912
|
},
|
4892
4913
|
"assetsSpace": {
|
4893
4914
|
"description": "Space to display assets (groups will be collapsed to fit this space).",
|
@@ -4951,7 +4972,14 @@
|
|
4951
4972
|
},
|
4952
4973
|
"chunksSort": {
|
4953
4974
|
"description": "Sort the chunks by that field.",
|
4954
|
-
"
|
4975
|
+
"anyOf": [
|
4976
|
+
{
|
4977
|
+
"enum": [false]
|
4978
|
+
},
|
4979
|
+
{
|
4980
|
+
"type": "string"
|
4981
|
+
}
|
4982
|
+
]
|
4955
4983
|
},
|
4956
4984
|
"colors": {
|
4957
4985
|
"description": "Enables/Disables colorful output.",
|
@@ -5179,7 +5207,14 @@
|
|
5179
5207
|
},
|
5180
5208
|
"modulesSort": {
|
5181
5209
|
"description": "Sort the modules by that field.",
|
5182
|
-
"
|
5210
|
+
"anyOf": [
|
5211
|
+
{
|
5212
|
+
"enum": [false]
|
5213
|
+
},
|
5214
|
+
{
|
5215
|
+
"type": "string"
|
5216
|
+
}
|
5217
|
+
]
|
5183
5218
|
},
|
5184
5219
|
"modulesSpace": {
|
5185
5220
|
"description": "Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).",
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* This file was automatically generated.
|
3
|
+
* DO NOT MODIFY BY HAND.
|
4
|
+
* Run `yarn special-lint-fix` to update
|
5
|
+
*/
|
6
|
+
declare const check: (options: import("../../declarations/plugins/JsonModulesPluginGenerator").JsonModulesPluginGeneratorOptions) => boolean;
|
7
|
+
export = check;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*
|
2
|
+
* This file was automatically generated.
|
3
|
+
* DO NOT MODIFY BY HAND.
|
4
|
+
* Run `yarn special-lint-fix` to update
|
5
|
+
*/
|
6
|
+
"use strict";function r(e,{instancePath:t="",parentData:a,parentDataProperty:o,rootData:s=e}={}){if(!e||"object"!=typeof e||Array.isArray(e))return r.errors=[{params:{type:"object"}}],!1;{const t=0;for(const t in e)if("JSONParse"!==t)return r.errors=[{params:{additionalProperty:t}}],!1;if(0===t&&void 0!==e.JSONParse&&"boolean"!=typeof e.JSONParse)return r.errors=[{params:{type:"boolean"}}],!1}return r.errors=null,!0}module.exports=r,module.exports.default=r;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"title": "JsonModulesPluginGeneratorOptions",
|
3
|
+
"type": "object",
|
4
|
+
"additionalProperties": false,
|
5
|
+
"properties": {
|
6
|
+
"JSONParse": {
|
7
|
+
"description": "Use `JSON.parse` when the JSON string is longer than 20 characters.",
|
8
|
+
"type": "boolean"
|
9
|
+
}
|
10
|
+
}
|
11
|
+
}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* DO NOT MODIFY BY HAND.
|
4
4
|
* Run `yarn special-lint-fix` to update
|
5
5
|
*/
|
6
|
-
"use strict";function r(
|
6
|
+
"use strict";function r(e,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:s=e}={}){if(!e||"object"!=typeof e||Array.isArray(e))return r.errors=[{params:{type:"object"}}],!1;{const t=0;for(const t in e)if("exportsDepth"!==t&&"parse"!==t)return r.errors=[{params:{additionalProperty:t}}],!1;if(0===t){if(void 0!==e.exportsDepth){const t=0;if("number"!=typeof e.exportsDepth)return r.errors=[{params:{type:"number"}}],!1;var n=0===t}else n=!0;if(n)if(void 0!==e.parse){const t=0;if(!(e.parse instanceof Function))return r.errors=[{params:{}}],!1;n=0===t}else n=!0}}return r.errors=null,!0}module.exports=r,module.exports.default=r;
|
@@ -3,6 +3,10 @@
|
|
3
3
|
"type": "object",
|
4
4
|
"additionalProperties": false,
|
5
5
|
"properties": {
|
6
|
+
"exportsDepth": {
|
7
|
+
"description": "The depth of json dependency flagged as `exportInfo`.",
|
8
|
+
"type": "number"
|
9
|
+
},
|
6
10
|
"parse": {
|
7
11
|
"description": "Function that executes for a module source string and should return json-compatible data.",
|
8
12
|
"instanceof": "Function",
|
@@ -80,7 +80,7 @@
|
|
80
80
|
{
|
81
81
|
"description": "Custom function generating the identifier.",
|
82
82
|
"instanceof": "Function",
|
83
|
-
"tsType": "
|
83
|
+
"tsType": "((context: any) => string)"
|
84
84
|
}
|
85
85
|
]
|
86
86
|
},
|
@@ -124,7 +124,7 @@
|
|
124
124
|
{
|
125
125
|
"description": "Custom function generating the identifier.",
|
126
126
|
"instanceof": "Function",
|
127
|
-
"tsType": "
|
127
|
+
"tsType": "((context: any) => string)"
|
128
128
|
}
|
129
129
|
]
|
130
130
|
},
|