@plaudit/webpack-extensions 2.89.2 → 2.90.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
|
@@ -60,6 +60,14 @@ 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.90.1] - 2026-05-08
|
|
64
|
+
### Fixed
|
|
65
|
+
- `postcss-loader` being a dev dependency
|
|
66
|
+
|
|
67
|
+
## [2.90.0] - 2026-05-04
|
|
68
|
+
### Added
|
|
69
|
+
- PNPM 11 compatibility
|
|
70
|
+
|
|
63
71
|
## [2.89.2] - 2026-04-27
|
|
64
72
|
### Fixed
|
|
65
73
|
- An `ENOENT` error when the `srcDir` does not map to an actual directory on disk
|
|
@@ -1,41 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.ExtensionsConfigFileGeneratorPlugin = void 0;
|
|
37
4
|
const promises_1 = require("node:fs/promises");
|
|
38
|
-
const node_path_1 =
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
39
6
|
const php_writer_1 = require("@plaudit/php-writer");
|
|
40
7
|
const expressions_1 = require("@plaudit/php-writer/expressions");
|
|
41
8
|
const AbstractBiPhasicGroupAndEntryPlugin_1 = require("./AbstractBiPhasicGroupAndEntryPlugin");
|
|
@@ -66,10 +33,10 @@ class ExtensionsConfigFileGeneratorPlugin extends AbstractBiPhasicGroupAndEntryP
|
|
|
66
33
|
const emissionPromises = [];
|
|
67
34
|
for await (const { name: setupFilePath } of await (0, promises_1.opendir)(this.extensionsSrcPath, { encoding: 'utf-8' })) {
|
|
68
35
|
if (setupFilePath.endsWith("-setup.php")) {
|
|
69
|
-
const setupFileSourcePath = node_path_1.
|
|
36
|
+
const setupFileSourcePath = (0, node_path_1.join)(this.extensionsSrcPath, setupFilePath);
|
|
70
37
|
compilation.fileDependencies.add(setupFileSourcePath);
|
|
71
38
|
emissionPromises.push((0, promises_1.readFile)(setupFileSourcePath).then(contents => {
|
|
72
|
-
compilation.emitAsset(node_path_1.
|
|
39
|
+
compilation.emitAsset((0, node_path_1.join)(this.dest.destination, setupFilePath), new webpack_1.sources.RawSource(contents), { size: Buffer.byteLength(contents) });
|
|
73
40
|
const blockSlug = /^(.+?)-setup.php$/i.exec(setupFilePath)?.[1];
|
|
74
41
|
return [blockSlug, setupFilePath];
|
|
75
42
|
}));
|
|
@@ -91,10 +58,10 @@ class ExtensionsConfigFileGeneratorPlugin extends AbstractBiPhasicGroupAndEntryP
|
|
|
91
58
|
if (dirent.isFile()) {
|
|
92
59
|
if (dirent.name === "setup.php") {
|
|
93
60
|
const setupFilePath = (0, node_path_1.join)(...parents, dirent.name);
|
|
94
|
-
const setupFileSourcePath = node_path_1.
|
|
61
|
+
const setupFileSourcePath = (0, node_path_1.join)(this.extensionsSrcPath, setupFilePath);
|
|
95
62
|
compilation.fileDependencies.add(setupFileSourcePath);
|
|
96
63
|
emissionPromises.push((0, promises_1.readFile)(setupFileSourcePath).then(contents => {
|
|
97
|
-
compilation.emitAsset(node_path_1.
|
|
64
|
+
compilation.emitAsset((0, node_path_1.join)(this.dest.destination, setupFilePath), new webpack_1.sources.RawSource(contents), { size: Buffer.byteLength(contents) });
|
|
98
65
|
return [parents.join("-") /* blockSlug */, setupFilePath];
|
|
99
66
|
}));
|
|
100
67
|
}
|
|
@@ -156,7 +123,7 @@ class ExtensionsConfigFileGeneratorPlugin extends AbstractBiPhasicGroupAndEntryP
|
|
|
156
123
|
.toSorted(([a], [b]) => a.localeCompare(b)));
|
|
157
124
|
(0, shared_1.emitPHPWriterAsAsset)(new php_writer_1.PHPWriter()
|
|
158
125
|
.call("Plaudit\\Common\\Lib\\GutenbergUtils::loadExtensionsV3", [new expressions_1.EnclosedLiteral((0, shared_1.makeEmittableConfigPHP)(blockExtensionsConfig, false)), expressions_1.Op.concat(expressions_1.Constants.__DIR__, '/'),
|
|
159
|
-
expressions_1.Expr.call("plaudit_webpack_extensions__resolve_base_uri", [expressions_1.Constants.__DIR__])]), compilation, node_path_1.
|
|
126
|
+
expressions_1.Expr.call("plaudit_webpack_extensions__resolve_base_uri", [expressions_1.Constants.__DIR__])]), compilation, (0, node_path_1.join)(this.dest.destination, "extensions-loader.php"));
|
|
160
127
|
}
|
|
161
128
|
attachUniquePhase(compilation) {
|
|
162
129
|
compilation.hooks.processAssets.tapPromise({ name: this.constructor.name, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_REPORT }, async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaudit/webpack-extensions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.90.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"files": [
|
|
6
6
|
"/dist",
|
|
@@ -28,26 +28,24 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@plaudit/gutenberg-api-extensions": "^2.
|
|
31
|
+
"@plaudit/gutenberg-api-extensions": "^2.97.0",
|
|
32
32
|
"@types/browser-sync-webpack-plugin": "^2.2.5",
|
|
33
|
-
"@types/node": "^25.6.
|
|
33
|
+
"@types/node": "^25.6.2",
|
|
34
34
|
"@types/postcss-functions": "^4.0.4",
|
|
35
35
|
"@types/tapable": "^2.3.0",
|
|
36
36
|
"@types/webpack-sources": "^3.2.3",
|
|
37
|
-
"postcss-load-config": "^4.0.2",
|
|
38
|
-
"postcss-loader": "^7.3.4",
|
|
39
37
|
"typescript": "^6.0.3",
|
|
40
38
|
"webpack-bundle-analyzer": "^4.10.2"
|
|
41
39
|
},
|
|
42
40
|
"dependencies": {
|
|
43
41
|
"@plaudit/php-writer": "^1.4.1",
|
|
44
|
-
"@plaudit/postcss-color-function": "^5.
|
|
42
|
+
"@plaudit/postcss-color-function": "^5.1.0",
|
|
45
43
|
"@plaudit/postcss-legacy-shorthand": "^1.0.0",
|
|
46
44
|
"@plaudit/postcss-silent-extend": "^3.0.0",
|
|
47
45
|
"@plaudit/postcss-strip-units": "^3.0.0",
|
|
48
46
|
"@plaudit/postcss-variables": "^1.1.0",
|
|
49
|
-
"@wordpress/dependency-extraction-webpack-plugin": "^6.
|
|
50
|
-
"@wordpress/scripts": "^32.
|
|
47
|
+
"@wordpress/dependency-extraction-webpack-plugin": "^6.45.0",
|
|
48
|
+
"@wordpress/scripts": "^32.1.0",
|
|
51
49
|
"autoprefixer": "^10.5.0",
|
|
52
50
|
"browser-sync": "^3.0.4",
|
|
53
51
|
"copy-webpack-plugin": "10.2.4",
|
|
@@ -55,11 +53,13 @@
|
|
|
55
53
|
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
|
56
54
|
"http-proxy-middleware": "^3.0.5",
|
|
57
55
|
"json2php": "^0.0.12",
|
|
58
|
-
"postcss": "^8.5.
|
|
56
|
+
"postcss": "^8.5.14",
|
|
59
57
|
"postcss-calc": "^9.0.1",
|
|
60
58
|
"postcss-discard-comments": "^6.0.2",
|
|
61
59
|
"postcss-functions": "^4.0.2",
|
|
62
60
|
"postcss-import": "^16.1.1",
|
|
61
|
+
"postcss-load-config": "^4.0.2",
|
|
62
|
+
"postcss-loader": "^7.3.4",
|
|
63
63
|
"postcss-media-minmax": "^5.0.0",
|
|
64
64
|
"postcss-mixins": "6.2.3",
|
|
65
65
|
"postcss-nested": "^6.2.0",
|