@plaudit/webpack-extensions 3.12.5 → 3.13.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/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.13.0] - 2026-07-14
9
+ ### Added
10
+ - Support for using some "experimental" properties early (primarily `border`)
11
+
8
12
  ## [3.12.5] - 2026-07-07
9
13
  ### Fixed
10
14
  - `PlainEntrypointsConfigFileGeneratorPlugin` not handling niceName-based handles correctly
@@ -34,6 +34,8 @@ export declare class EnhancedBlockJSONPlugin extends AbstractBiPhasicGroupAndEnt
34
34
  static findRelativeRouteBetween(path1: string, path2: string): string;
35
35
  private static remapReferencedPHPFilesOnKey;
36
36
  private static normalizeRenderTemplate;
37
+ private static readonly knownExperimentalProperties;
38
+ private static handleExperimentalBlockSupportsFlags;
37
39
  protected attachUniquePhase(compilation: Compilation): void;
38
40
  protected attachStandardPhase(compilation: Compilation): void;
39
41
  protected deduplicateEntrypointHandles(workableBlockInfo: CollatedWorkableBlockInfo): CollatedWorkableBlockInfo;
@@ -228,6 +228,7 @@ class EnhancedBlockJSONPlugin extends AbstractBiPhasicGroupAndEntryPlugin_1.Abst
228
228
  const pathsNeedRemapping = !this.config.standaloneBlocks && blockJson["plaudit"] !== "simple";
229
229
  EnhancedBlockJSONPlugin.remapReferencedPHPFilesOnKey(blockJson, "setup", pathsNeedRemapping, sourceDir, outputDir, compilation, true);
230
230
  EnhancedBlockJSONPlugin.remapReferencedPHPFilesOnKey(blockJson, "variations", pathsNeedRemapping, sourceDir, outputDir, compilation, false);
231
+ EnhancedBlockJSONPlugin.handleExperimentalBlockSupportsFlags(blockJson);
231
232
  const hashForVersion = EnhancedBlockJSONPlugin
232
233
  .hashThingForAsset([blockJsonText, ...workableBlockEntrypointsInfo.map(bi => bi.hash)].join("~"));
233
234
  if (blockJson["version"]) {
@@ -474,6 +475,28 @@ class EnhancedBlockJSONPlugin extends AbstractBiPhasicGroupAndEntryPlugin_1.Abst
474
475
  }
475
476
  }
476
477
  }
478
+ static knownExperimentalProperties = ['border', 'defaultControls', 'fontFamily', 'fontWeight', 'fontStyle', 'letterSpacing', 'textTransform', 'textDecoration']
479
+ .map(prop => [prop, "__experimental" + prop.substring(0, 1).toUpperCase() + prop.substring(1)]);
480
+ static handleExperimentalBlockSupportsFlags(blockSupports) {
481
+ for (const [key, value] of Object.entries(blockSupports)) {
482
+ if (typeof value === 'object' && !!value && !Array.isArray(value)) {
483
+ EnhancedBlockJSONPlugin.handleExperimentalBlockSupportsFlags(value);
484
+ }
485
+ if (!key.startsWith("__experimental")) {
486
+ continue;
487
+ }
488
+ const realKey = key.substring(14, 15).toLowerCase() + key.substring(15);
489
+ if (!(realKey in blockSupports)) {
490
+ blockSupports[realKey] = value;
491
+ }
492
+ }
493
+ // This handles known currently-experimental properties
494
+ for (const [eventualKey, experimentalKey] of EnhancedBlockJSONPlugin.knownExperimentalProperties) {
495
+ if (eventualKey in blockSupports && !(experimentalKey in blockSupports)) {
496
+ blockSupports[experimentalKey] = blockSupports[eventualKey];
497
+ }
498
+ }
499
+ }
477
500
  attachUniquePhase(compilation) {
478
501
  compilation.hooks.processAssets.tapPromise({ name: `${this.constructor.name}_CompileLoader`, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_REPORT }, async () => {
479
502
  const allSemaphoreData = (await EnhancedBlockJSONPlugin.semaphore.wait())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaudit/webpack-extensions",
3
- "version": "3.12.5",
3
+ "version": "3.13.0",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "files": [
6
6
  "/dist",
@@ -31,7 +31,7 @@
31
31
  "@plaudit/gutenberg-api-extensions": "^2.97.1",
32
32
  "@types/browser-sync-webpack-plugin": "^2.2.5",
33
33
  "@types/jsdom": "^28.0.3",
34
- "@types/node": "^25.9.4",
34
+ "@types/node": "^25.9.5",
35
35
  "@types/postcss-functions": "^4.0.4",
36
36
  "@types/postcss-import": "^14.0.3",
37
37
  "@types/tapable": "^2.3.0",
@@ -39,7 +39,7 @@
39
39
  "react": "^18.3.1",
40
40
  "react-dom": "^18.3.1",
41
41
  "typescript": "^6.0.3",
42
- "webpack-bundle-analyzer": "^5.3.0"
42
+ "webpack-bundle-analyzer": "^5.3.1"
43
43
  },
44
44
  "dependencies": {
45
45
  "@plaudit/php-writer": "^1.5.2",
@@ -57,7 +57,7 @@
57
57
  "http-proxy-middleware": "^3.0.7",
58
58
  "jsdom": "^29.1.1",
59
59
  "json2php": "^0.0.12",
60
- "postcss": "^8.5.16",
60
+ "postcss": "^8.5.19",
61
61
  "postcss-calc": "^10.1.1",
62
62
  "postcss-functions": "^4.0.2",
63
63
  "postcss-import": "^16.1.1",