@plaudit/webpack-extensions 2.96.2 → 2.96.3

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/CHANGELOG.md CHANGED
@@ -60,6 +60,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
60
60
  - Legacy PostCSS features that have been integrated into modern CSS
61
61
  - `@extends` support
62
62
 
63
+ ## [2.96.3] - 2026-08-11
64
+ ### Added
65
+ - A few more validation checks
66
+
63
67
  ## [2.96.2] - 2026-08-11
64
68
  ### Removed
65
69
  - `processTranslationConfigs` because it should not be used and didn't actually do anything
package/dist/shared.d.ts CHANGED
@@ -124,13 +124,13 @@ export type AdvancedOutputConfig = {
124
124
  bundleAnalyzer?: boolean | 'no-auto-open';
125
125
  locations?: UsageLocations | UsageLocations['handle'];
126
126
  lazyLoader?: string;
127
- pathQueryParameters?: PathQueryParameters;
128
127
  enqueuingFlags?: NormalizedEnqueuingControlFlags;
129
128
  };
130
- type OptionalCfgFields = 'directoryLayout' | 'externalize' | 'lazyLoader' | 'pathQueryParameters';
129
+ type OptionalCfgFields = 'directoryLayout' | 'externalize' | 'lazyLoader';
131
130
  export type VerifiedAdvancedOutputConfig = Required<Omit<AdvancedOutputConfig, 'locations' | 'enqueuingFlags' | OptionalCfgFields>> & Pick<AdvancedOutputConfig, OptionalCfgFields> & {
132
131
  enqueuingFlags: NormalizedEnqueuingControlFlags | undefined;
133
132
  locations: NormalizedUsageLocations;
133
+ pathQueryParameters?: PathQueryParameters;
134
134
  };
135
135
  export type SourcesObject = Record<string, string | AdvancedOutputConfig | boolean>;
136
136
  export type PlauditWordpressWebpackConfig = {
@@ -1,10 +1,13 @@
1
- import { type AdvancedOutputConfig, type PlauditWordpressWebpackConfig } from "../shared";
1
+ import { type AdvancedOutputConfig, type PathQueryParameters, type PlauditWordpressWebpackConfig } from "../shared";
2
2
  export declare const enum SourceType {
3
3
  blocks = "blocks",
4
4
  extensions = "extensions",
5
5
  plain = "plain"
6
6
  }
7
7
  export declare function isSourceType(str: string): str is SourceType;
8
- type Entrypoints = [string, AdvancedOutputConfig][];
8
+ type ResolvedSourceConfig = AdvancedOutputConfig & {
9
+ pathQueryParameters?: PathQueryParameters;
10
+ };
11
+ type Entrypoints = [string, ResolvedSourceConfig][];
9
12
  export declare function resolveAllConfigLevelEntrypoints(config: PlauditWordpressWebpackConfig, projectRoot?: string): Record<'staticEntrypoints' | 'dynamicEntrypoints', Entrypoints>;
10
13
  export {};
@@ -192,6 +192,10 @@ function buildVerifiedConfig(config) {
192
192
  const allocatedDestinations = {};
193
193
  const partiallyVerifiedSources = rawSources.map(([src, config]) => {
194
194
  const { destination, additionalDependencies = [], assumeGlobalizedPlauditLibraries = cfg.assumeGlobalizedPlauditLibraries, bundleAnalyzer = false, directoryLayout, externalize, withLegacyBlocksIn = false, lazyLoader, pathQueryParameters: rawPathQueryParameters, enqueuingFlags: rawEnqueuingFlags, locations: rawSourceLocations, } = config;
195
+ // This guards against a crash later on down the line due to trying to run a spread on a boolean
196
+ if (externalize && typeof externalize !== 'string' && typeof externalize !== 'object') {
197
+ throw new TypeError(`externalize must be a string, an array or an object, but "${src}" set externalize to a ${typeof externalize}`);
198
+ }
195
199
  const { flags: queryEnqueuingFlags, remainder: pathQueryParameters, handle: pathQueryHandle } = (0, path_query_and_related_helpers_1.unpackEnqueuingControlFlagsFromPathQueryParameters)(rawPathQueryParameters, src, 'path query parameters');
196
200
  const enqueuingFlags = (0, path_query_and_related_helpers_1.mergeTwoEnqueuingControlFlagSets)(src, rawEnqueuingFlags, queryEnqueuingFlags);
197
201
  const normalizedParts = { additionalDependencies, assumeGlobalizedPlauditLibraries, bundleAnalyzer, directoryLayout, externalize, withLegacyBlocksIn, lazyLoader };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaudit/webpack-extensions",
3
- "version": "2.96.2",
3
+ "version": "2.96.3",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "repository": {
6
6
  "type": "git",