@plaudit/webpack-extensions 3.2.0 → 3.2.1

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
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.2.1] - 2026-03-16
9
+ ### Added
10
+ - A function to expose standard flag sets to tools that reference this package
11
+
8
12
  ## [3.2.0] - 2026-03-16
9
13
  ### Added
10
14
  - Support for `Location-Encoding Filenames`
package/build/shared.d.ts CHANGED
@@ -146,6 +146,15 @@ export type PlauditWordpressWebpackConfig = {
146
146
  omitDistDev?: boolean;
147
147
  onlyRunPostCSSOnPCSS?: boolean;
148
148
  };
149
+ export declare function resolveStandard(standard: PlauditWordpressWebpackConfig['standard']): {
150
+ readonly useWebpackResourceFiltering: true;
151
+ readonly extensionsVersion: 3;
152
+ readonly plainEntrypointsVersion: 2;
153
+ readonly srcDir: "src";
154
+ readonly outputDir: "dist";
155
+ readonly useUnifiedLoader: true;
156
+ readonly onlyRunPostCSSOnPCSS: true;
157
+ } | undefined;
149
158
  export type FileSegmentBlockEntrypointInfo = {
150
159
  blockJsonOrigin: string;
151
160
  entrypointField: EntrypointFields[number];
package/build/shared.js CHANGED
@@ -12,6 +12,7 @@ exports.constantKeys = constantKeys;
12
12
  exports.constantEntries = constantEntries;
13
13
  exports.isSourceType = isSourceType;
14
14
  exports.determineCurrentSourceType = determineCurrentSourceType;
15
+ exports.resolveStandard = resolveStandard;
15
16
  exports.convertUsageLocationsHandleToEmittableHandle = convertUsageLocationsHandleToEmittableHandle;
16
17
  exports.makeEmittableConfigPHP = makeEmittableConfigPHP;
17
18
  exports.convertEntrypointFieldForAssetType = convertEntrypointFieldForAssetType;
@@ -96,6 +97,22 @@ function determineCurrentSourceType(dest, srcIsDirectory) {
96
97
  return dest.directoryLayout;
97
98
  }
98
99
  }
100
+ function resolveStandard(standard) {
101
+ switch (standard) {
102
+ case "2026-03-13":
103
+ return {
104
+ useWebpackResourceFiltering: true,
105
+ extensionsVersion: 3,
106
+ plainEntrypointsVersion: 2,
107
+ srcDir: "src",
108
+ outputDir: "dist",
109
+ useUnifiedLoader: true,
110
+ onlyRunPostCSSOnPCSS: true,
111
+ };
112
+ default:
113
+ return undefined;
114
+ }
115
+ }
99
116
  function convertUsageLocationsHandleToEmittableHandle(handle, generatedHandle) {
100
117
  const emittableHandle = typeof handle === 'string' ? handle : handle?.(generatedHandle) ?? generatedHandle;
101
118
  return emittableHandle.replaceAll("{basename}", generatedHandle);
@@ -306,13 +306,7 @@ function applyStandards(config) {
306
306
  switch (config.standard) {
307
307
  case '2026-03-13':
308
308
  return {
309
- useWebpackResourceFiltering: true,
310
- extensionsVersion: 3,
311
- plainEntrypointsVersion: 2,
312
- srcDir: "src",
313
- outputDir: "dist",
314
- useUnifiedLoader: true,
315
- onlyRunPostCSSOnPCSS: true,
309
+ ...(0, shared_1.resolveStandard)('2026-03-13'),
316
310
  ...config
317
311
  };
318
312
  case undefined:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaudit/webpack-extensions",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "files": [
6
6
  "/build",