@plaudit/webpack-extensions 3.12.4 → 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,14 @@ 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
|
+
|
|
12
|
+
## [3.12.5] - 2026-07-07
|
|
13
|
+
### Fixed
|
|
14
|
+
- `PlainEntrypointsConfigFileGeneratorPlugin` not handling niceName-based handles correctly
|
|
15
|
+
|
|
8
16
|
## [3.12.4] - 2026-07-07
|
|
9
17
|
### Fixed
|
|
10
18
|
- The output missing a blank line after the global hooks
|
|
@@ -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())
|
|
@@ -30,14 +30,7 @@ class PlainEntrypointsConfigFileGeneratorPlugin extends AbstractBiPhasicGroupAnd
|
|
|
30
30
|
inline: [],
|
|
31
31
|
...Object.fromEntries((0, shared_1.constantKeys)(shared_1.standardLocationNamesMeta).map(sln => [sln, []]))
|
|
32
32
|
};
|
|
33
|
-
const
|
|
34
|
-
.flatMap(({ handles }) => handles)
|
|
35
|
-
.filter((handle) => !!handle.handleName)
|
|
36
|
-
.sort((a, b) => a.src.localeCompare(b.src));
|
|
37
|
-
const usedHandleNames = Object.fromEntries(['script', 'script_module', 'style']
|
|
38
|
-
.map(type => [type, Object.fromEntries(allNamedHandles
|
|
39
|
-
.filter(handle => handle.type === 'script')
|
|
40
|
-
.map(handle => [handle.handleName, handle.src]))]));
|
|
33
|
+
const usedHandleNames = { script: {}, script_module: {}, style: {} };
|
|
41
34
|
const plainEntrypointsConfig = { scriptHandles: {}, script_moduleHandles: {}, styleHandles: {} };
|
|
42
35
|
for (const { handles, handlePrefix } of assets) {
|
|
43
36
|
for (const { src, rest, locations, type, handleName, lazyLoader, ...otherProps } of handles) {
|
|
@@ -51,9 +44,7 @@ class PlainEntrypointsConfigFileGeneratorPlugin extends AbstractBiPhasicGroupAnd
|
|
|
51
44
|
if (typeof handleName === 'string' || typeof handleName === 'function' || (handleName && 'niceName' in handleName)) {
|
|
52
45
|
finalHandleName = (0, shared_1.convertUsageLocationsHandleToEmittableHandle)(handleName, handlePrefix, finalHandleName.substring(handlePrefix.length + 1));
|
|
53
46
|
}
|
|
54
|
-
|
|
55
|
-
handleNameMap[finalHandleName] = src;
|
|
56
|
-
}
|
|
47
|
+
handleNameMap[finalHandleName] = src;
|
|
57
48
|
plainEntrypointsConfig[`${type}Handles`][finalHandleName] = { src, rest, locations, type, lazyLoader, ...otherProps };
|
|
58
49
|
}
|
|
59
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaudit/webpack-extensions",
|
|
3
|
-
"version": "3.
|
|
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.
|
|
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.
|
|
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.
|
|
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",
|