@plaudit/webpack-extensions 3.18.0 → 3.20.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 +28 -0
- package/dist/plugins/AbstractBiPhasicGroupAndEntryPlugin.d.ts +3 -3
- package/dist/plugins/AbstractBiPhasicGroupAndEntryPlugin.js +2 -2
- package/dist/plugins/AbstractBiPhasicGroupPlugin.d.ts +2 -4
- package/dist/plugins/AbstractBiPhasicGroupPlugin.js +1 -3
- package/dist/plugins/AdditionalDependencyInjectorPlugin.d.ts +1 -2
- package/dist/plugins/AdditionalDependencyInjectorPlugin.js +2 -2
- package/dist/plugins/EnhancedBlockJSONPlugin.d.ts +2 -2
- package/dist/plugins/EnhancedBlockJSONPlugin.js +5 -3
- package/dist/plugins/EnhancedDynamicEntryPlugin.d.ts +2 -3
- package/dist/plugins/EnhancedDynamicEntryPlugin.js +2 -2
- package/dist/plugins/ExtensionsConfigFileGeneratorPlugin.d.ts +2 -2
- package/dist/plugins/ExtensionsConfigFileGeneratorPlugin.js +5 -3
- package/dist/plugins/ExtensionsConfigFileGeneratorPluginV1.d.ts +1 -2
- package/dist/plugins/ExtensionsConfigFileGeneratorPluginV1.js +2 -2
- package/dist/plugins/MixableBiPhasicGroupAndEntryPlugin.d.ts +6 -0
- package/dist/plugins/MixableBiPhasicGroupAndEntryPlugin.js +13 -0
- package/dist/plugins/MixableBiPhasicGroupPlugin.d.ts +6 -0
- package/dist/plugins/MixableBiPhasicGroupPlugin.js +13 -0
- package/dist/plugins/PlainEntrypointsConfigFileGeneratorPlugin.d.ts +2 -2
- package/dist/plugins/PlainEntrypointsConfigFileGeneratorPlugin.js +5 -3
- package/dist/plugins/SpecialAssetHandlingPlugin.d.ts +2 -1
- package/dist/plugins/SpecialAssetHandlingPlugin.js +5 -3
- package/dist/plugins/UnifiedLoaderGenerator.d.ts +3 -2
- package/dist/plugins/UnifiedLoaderGenerator.js +5 -3
- package/dist/plugins/VariablesJSMonitorPlugin.d.ts +1 -1
- package/dist/plugins/index.d.ts +8 -0
- package/dist/plugins/index.js +24 -0
- package/dist/shared.d.ts +15 -11
- package/dist/utils/common-config-helpers.d.ts +1 -5
- package/dist/utils/location-encoding-filename-parser.d.ts +2 -2
- package/dist/wordpress-ports/dependency-extraction-webpack-plugin/index.d.ts +1 -1
- package/dist/wordpress-ports/dependency-extraction-webpack-plugin/index.js +1 -5
- package/dist/wordpress-ports/dependency-extraction-webpack-plugin/util.js +1 -0
- package/dist/wordpress-scripts-wrapper.d.ts +1 -1
- package/dist/wordpress-scripts-wrapper.js +4 -4
- package/package.json +10 -8
- /package/dist/utils/{pseduo-semaphore.d.ts → pseudo-semaphore.d.ts} +0 -0
- /package/dist/utils/{pseduo-semaphore.js → pseudo-semaphore.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ 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.20.0] - 2026-08-24
|
|
9
|
+
### Added
|
|
10
|
+
- Mixable versions of the `BiPhasicGroup...` plugins
|
|
11
|
+
- This comes from version `2.99.0`
|
|
12
|
+
- Entrypoints to allow other code to reference some of the plugins and utilities
|
|
13
|
+
- This comes from version `2.99.0`
|
|
14
|
+
|
|
15
|
+
### Internals
|
|
16
|
+
- Dropped unnecessary constructor parameters to make re-using the more general components easier
|
|
17
|
+
- This comes from version `2.99.0`
|
|
18
|
+
|
|
19
|
+
## [3.19.0] - 2026-08-18
|
|
20
|
+
### Added
|
|
21
|
+
- Automatic sync of WordPress's bundled packages list
|
|
22
|
+
- This comes from version `2.98.0`
|
|
23
|
+
|
|
8
24
|
## [3.18.0] - 2026-08-18
|
|
9
25
|
### Added
|
|
10
26
|
- David's improvements to build pipeline efficiency (Credit: David)
|
|
@@ -275,6 +291,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
275
291
|
- Legacy PostCSS features that have been integrated into modern CSS
|
|
276
292
|
- `@extends` support
|
|
277
293
|
|
|
294
|
+
## [2.99.0] - 2026-08-24
|
|
295
|
+
### Added
|
|
296
|
+
- Mixable versions of the `BiPhasicGroup...` plugins
|
|
297
|
+
- Entrypoints to allow other code to reference some of the plugins and utilities
|
|
298
|
+
|
|
299
|
+
### Internals
|
|
300
|
+
- Dropped unnecessary constructor parameters to make re-using the more general components easier
|
|
301
|
+
|
|
302
|
+
## [2.98.0] - 2026-08-18
|
|
303
|
+
### Added
|
|
304
|
+
- Automatic sync of WordPress's bundled packages list
|
|
305
|
+
|
|
278
306
|
## [2.97.0] - 2026-08-18
|
|
279
307
|
### Added
|
|
280
308
|
- David's improvements to build pipeline efficiency
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MinimumViableMetadata, ParsedAssetJsonProvider, ParsedAssetsJson } from "../shared";
|
|
2
|
-
import type { ExtensibleEntryObject
|
|
3
|
-
import { PseudoSemaphore } from "../utils/
|
|
2
|
+
import type { ExtensibleEntryObject } from "../utils/common-config-helpers";
|
|
3
|
+
import { PseudoSemaphore } from "../utils/pseudo-semaphore";
|
|
4
4
|
import { AbstractBiPhasicGroupPlugin } from "./AbstractBiPhasicGroupPlugin";
|
|
5
5
|
import { type Compilation, type Compiler, type Entrypoint } from "webpack";
|
|
6
6
|
export type EntryProvider<M extends MinimumViableMetadata = MinimumViableMetadata> = () => ExtensibleEntryObject<M> | Promise<ExtensibleEntryObject<M>>;
|
|
@@ -9,7 +9,7 @@ export declare abstract class AbstractBiPhasicGroupAndEntryPlugin<M extends Mini
|
|
|
9
9
|
private readonly entry;
|
|
10
10
|
private static readonly configuredCompilations;
|
|
11
11
|
private readonly entryMetadataRecord;
|
|
12
|
-
|
|
12
|
+
constructor(group: string, semaphores: PseudoSemaphore<any>[], context: string, entry: EntryProvider<M>);
|
|
13
13
|
apply(compiler: Compiler): void;
|
|
14
14
|
protected attachStandardPhase(compilation: Compilation): void;
|
|
15
15
|
/**
|
|
@@ -9,8 +9,8 @@ class AbstractBiPhasicGroupAndEntryPlugin extends AbstractBiPhasicGroupPlugin_1.
|
|
|
9
9
|
entry;
|
|
10
10
|
static configuredCompilations = new WeakSet();
|
|
11
11
|
entryMetadataRecord = {};
|
|
12
|
-
constructor(
|
|
13
|
-
super(
|
|
12
|
+
constructor(group, semaphores, context, entry) {
|
|
13
|
+
super(group, semaphores);
|
|
14
14
|
this.context = context;
|
|
15
15
|
this.entry = entry;
|
|
16
16
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Compilation, Compiler, type WebpackPluginInstance } from "webpack";
|
|
2
|
-
import { PseudoSemaphore } from "../utils/
|
|
3
|
-
import type { VerifiedPlauditWordpressWebpackConfig } from "../utils/common-config-helpers";
|
|
2
|
+
import { PseudoSemaphore } from "../utils/pseudo-semaphore";
|
|
4
3
|
import { type ParsedAssetJsonProvider } from "../shared";
|
|
5
4
|
type TapWithAssetsJsonOptions = {
|
|
6
5
|
name?: string;
|
|
@@ -10,14 +9,13 @@ type TapWithAssetsJsonOptions = {
|
|
|
10
9
|
type TapWithAssetsJsonFn = Parameters<Compilation['hooks']['processAssets']['tapPromise']>[1];
|
|
11
10
|
type TapWithParsedAssetsJsonFn = (parsedAssetJsonProvider: ParsedAssetJsonProvider, assets: Parameters<TapWithAssetsJsonFn>[0]) => Promise<void> | void;
|
|
12
11
|
export declare abstract class AbstractBiPhasicGroupPlugin implements WebpackPluginInstance {
|
|
13
|
-
protected readonly config: VerifiedPlauditWordpressWebpackConfig;
|
|
14
12
|
readonly group: string;
|
|
15
13
|
private readonly semaphores;
|
|
16
14
|
protected static readonly uniquePhaseAttached: {
|
|
17
15
|
[key in string]: any;
|
|
18
16
|
};
|
|
19
17
|
protected readonly id: string;
|
|
20
|
-
|
|
18
|
+
constructor(group: string, semaphores: PseudoSemaphore<any>[]);
|
|
21
19
|
apply(compiler: Compiler): void;
|
|
22
20
|
protected resetSemaphores(): void;
|
|
23
21
|
protected rejectSemaphores(): void;
|
|
@@ -4,13 +4,11 @@ exports.AbstractBiPhasicGroupPlugin = void 0;
|
|
|
4
4
|
const webpack_1 = require("webpack");
|
|
5
5
|
const shared_1 = require("../shared");
|
|
6
6
|
class AbstractBiPhasicGroupPlugin {
|
|
7
|
-
config;
|
|
8
7
|
group;
|
|
9
8
|
semaphores;
|
|
10
9
|
static uniquePhaseAttached = {};
|
|
11
10
|
id;
|
|
12
|
-
constructor(
|
|
13
|
-
this.config = config;
|
|
11
|
+
constructor(group, semaphores) {
|
|
14
12
|
this.group = group;
|
|
15
13
|
this.semaphores = semaphores;
|
|
16
14
|
this.id = Math.random().toString();
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { AbstractBiPhasicGroupPlugin } from "./AbstractBiPhasicGroupPlugin";
|
|
2
2
|
import type { AbstractBiPhasicGroupAndEntryPlugin } from "./AbstractBiPhasicGroupAndEntryPlugin";
|
|
3
|
-
import { VerifiedPlauditWordpressWebpackConfig } from "../utils/common-config-helpers";
|
|
4
3
|
import { Compilation } from "webpack";
|
|
5
4
|
export declare class AdditionalDependencyInjectorPlugin extends AbstractBiPhasicGroupPlugin {
|
|
6
5
|
private readonly processingModules;
|
|
7
6
|
private readonly addExternalizedDep;
|
|
8
7
|
private readonly referencePlugin;
|
|
9
|
-
constructor(
|
|
8
|
+
constructor(processingModules: boolean | undefined, addExternalizedDep: (dep: string) => void, referencePlugin: AbstractBiPhasicGroupAndEntryPlugin<any>);
|
|
10
9
|
protected attachStandardPhase(compilation: Compilation): void;
|
|
11
10
|
protected attachUniquePhase(): void;
|
|
12
11
|
}
|
|
@@ -12,8 +12,8 @@ class AdditionalDependencyInjectorPlugin extends AbstractBiPhasicGroupPlugin_1.A
|
|
|
12
12
|
processingModules;
|
|
13
13
|
addExternalizedDep;
|
|
14
14
|
referencePlugin;
|
|
15
|
-
constructor(
|
|
16
|
-
super(
|
|
15
|
+
constructor(processingModules, addExternalizedDep, referencePlugin) {
|
|
16
|
+
super("additional-dependency-injector-plugin", []);
|
|
17
17
|
this.processingModules = processingModules;
|
|
18
18
|
this.addExternalizedDep = addExternalizedDep;
|
|
19
19
|
this.referencePlugin = referencePlugin;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Compilation } from "webpack";
|
|
2
2
|
import type WebpackRemoveEmptyScriptsPlugin from "webpack-remove-empty-scripts";
|
|
3
3
|
import { AbstractBiPhasicGroupAndEntryPlugin, EntryProvider } from "./AbstractBiPhasicGroupAndEntryPlugin";
|
|
4
|
-
import { AssetMetaSegment, BlockEntrypointInfo, FileSegmentBlockEntrypointInfo, ParsedAssetJsonProvider, ParsedAssetsJson, ScriptArgsObject, VerifiedAdvancedOutputConfig } from "../shared";
|
|
5
|
-
import type { VerifiedPlauditWordpressWebpackConfig } from "../utils/common-config-helpers";
|
|
4
|
+
import { AssetMetaSegment, BlockEntrypointInfo, FileSegmentBlockEntrypointInfo, ParsedAssetJsonProvider, ParsedAssetsJson, ScriptArgsObject, VerifiedAdvancedOutputConfig, VerifiedPlauditWordpressWebpackConfig } from "../shared";
|
|
6
5
|
type WorkableBlockEntrypointInfo = Omit<FileSegmentBlockEntrypointInfo, 'originalValue' | 'pathQueryParameters'> & Partial<Pick<FileSegmentBlockEntrypointInfo, 'originalValue'>> & {
|
|
7
6
|
outputPath: string;
|
|
8
7
|
assetData: ParsedAssetsJson[string];
|
|
@@ -18,6 +17,7 @@ type CollatedWorkableBlockInfo = Record<string, {
|
|
|
18
17
|
blockJsonText?: string;
|
|
19
18
|
}>;
|
|
20
19
|
export declare class EnhancedBlockJSONPlugin extends AbstractBiPhasicGroupAndEntryPlugin<BlockEntrypointInfo> {
|
|
20
|
+
private readonly config;
|
|
21
21
|
private readonly dest;
|
|
22
22
|
private readonly webpackRemoveEmptyScriptsPlugin;
|
|
23
23
|
private static readonly semaphore;
|
|
@@ -12,13 +12,15 @@ const AbstractBiPhasicGroupAndEntryPlugin_1 = require("./AbstractBiPhasicGroupAn
|
|
|
12
12
|
const UnifiedLoaderGenerator_1 = require("./UnifiedLoaderGenerator");
|
|
13
13
|
const shared_1 = require("../shared");
|
|
14
14
|
const path_query_and_related_helpers_1 = require("../utils/path-query-and-related-helpers");
|
|
15
|
-
const
|
|
15
|
+
const pseudo_semaphore_1 = require("../utils/pseudo-semaphore");
|
|
16
16
|
class EnhancedBlockJSONPlugin extends AbstractBiPhasicGroupAndEntryPlugin_1.AbstractBiPhasicGroupAndEntryPlugin {
|
|
17
|
+
config;
|
|
17
18
|
dest;
|
|
18
19
|
webpackRemoveEmptyScriptsPlugin;
|
|
19
|
-
static semaphore = new
|
|
20
|
+
static semaphore = new pseudo_semaphore_1.PseudoSemaphore("Block JSON v3");
|
|
20
21
|
constructor(config, dest, webpackRemoveEmptyScriptsPlugin, context, entry) {
|
|
21
|
-
super(
|
|
22
|
+
super(`block-json-${dest.destination}`, [EnhancedBlockJSONPlugin.semaphore, UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore], context, entry);
|
|
23
|
+
this.config = config;
|
|
22
24
|
this.dest = dest;
|
|
23
25
|
this.webpackRemoveEmptyScriptsPlugin = webpackRemoveEmptyScriptsPlugin;
|
|
24
26
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Compilation } from "webpack";
|
|
2
2
|
import { AbstractBiPhasicGroupAndEntryPlugin, EntryProvider } from "./AbstractBiPhasicGroupAndEntryPlugin";
|
|
3
|
-
import type {
|
|
4
|
-
import { ParsedAssetJsonProvider } from "../shared";
|
|
3
|
+
import type { ParsedAssetJsonProvider } from "../shared";
|
|
5
4
|
export declare class EnhancedDynamicEntryPlugin extends AbstractBiPhasicGroupAndEntryPlugin {
|
|
6
|
-
constructor(
|
|
5
|
+
constructor(context: string, entry: EntryProvider);
|
|
7
6
|
protected attachUniquePhase(): void;
|
|
8
7
|
protected processAssets(compilation: Compilation, parsedAssetJsonProvider: ParsedAssetJsonProvider): void;
|
|
9
8
|
}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EnhancedDynamicEntryPlugin = void 0;
|
|
4
4
|
const AbstractBiPhasicGroupAndEntryPlugin_1 = require("./AbstractBiPhasicGroupAndEntryPlugin");
|
|
5
5
|
class EnhancedDynamicEntryPlugin extends AbstractBiPhasicGroupAndEntryPlugin_1.AbstractBiPhasicGroupAndEntryPlugin {
|
|
6
|
-
constructor(
|
|
7
|
-
super(
|
|
6
|
+
constructor(context, entry) {
|
|
7
|
+
super(`enhanced-dynamic-entries`, [], context, entry);
|
|
8
8
|
}
|
|
9
9
|
attachUniquePhase() { }
|
|
10
10
|
processAssets(compilation, parsedAssetJsonProvider) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AbstractBiPhasicGroupAndEntryPlugin, EntryProvider } from "./AbstractBiPhasicGroupAndEntryPlugin";
|
|
2
|
-
import { MinimumViableMetadata, ParsedAssetJsonProvider, VerifiedAdvancedOutputConfig } from "../shared";
|
|
3
|
-
import type { VerifiedPlauditWordpressWebpackConfig } from "../utils/common-config-helpers";
|
|
2
|
+
import { MinimumViableMetadata, ParsedAssetJsonProvider, VerifiedAdvancedOutputConfig, VerifiedPlauditWordpressWebpackConfig } from "../shared";
|
|
4
3
|
import { Compilation, type Compiler } from "webpack";
|
|
5
4
|
export type ExtensionConfigFileGeneratorMetadata = MinimumViableMetadata & {
|
|
6
5
|
extensionId: string;
|
|
7
6
|
};
|
|
8
7
|
export declare class ExtensionsConfigFileGeneratorPlugin extends AbstractBiPhasicGroupAndEntryPlugin<ExtensionConfigFileGeneratorMetadata> {
|
|
8
|
+
private readonly config;
|
|
9
9
|
private readonly extensionsSrcPath;
|
|
10
10
|
private readonly dest;
|
|
11
11
|
private static readonly semaphore;
|
|
@@ -8,15 +8,17 @@ const expressions_1 = require("@plaudit/php-writer/expressions");
|
|
|
8
8
|
const AbstractBiPhasicGroupAndEntryPlugin_1 = require("./AbstractBiPhasicGroupAndEntryPlugin");
|
|
9
9
|
const UnifiedLoaderGenerator_1 = require("./UnifiedLoaderGenerator");
|
|
10
10
|
const shared_1 = require("../shared");
|
|
11
|
-
const
|
|
11
|
+
const pseudo_semaphore_1 = require("../utils/pseudo-semaphore");
|
|
12
12
|
const webpack_1 = require("webpack");
|
|
13
13
|
class ExtensionsConfigFileGeneratorPlugin extends AbstractBiPhasicGroupAndEntryPlugin_1.AbstractBiPhasicGroupAndEntryPlugin {
|
|
14
|
+
config;
|
|
14
15
|
extensionsSrcPath;
|
|
15
16
|
dest;
|
|
16
|
-
static semaphore = new
|
|
17
|
+
static semaphore = new pseudo_semaphore_1.PseudoSemaphore("Extensions");
|
|
17
18
|
setupFiles = [];
|
|
18
19
|
constructor(config, extensionsSrcPath, dest, context, entry) {
|
|
19
|
-
super(
|
|
20
|
+
super(`extensions-v2-${dest.destination}`, [ExtensionsConfigFileGeneratorPlugin.semaphore, UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore], context, entry);
|
|
21
|
+
this.config = config;
|
|
20
22
|
this.extensionsSrcPath = extensionsSrcPath;
|
|
21
23
|
this.dest = dest;
|
|
22
24
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { AbstractBiPhasicGroupAndEntryPlugin, EntryProvider } from "./AbstractBiPhasicGroupAndEntryPlugin";
|
|
2
2
|
import type { ParsedAssetJsonProvider } from "../shared";
|
|
3
|
-
import type { VerifiedPlauditWordpressWebpackConfig } from "../utils/common-config-helpers";
|
|
4
3
|
import { Compilation } from "webpack";
|
|
5
4
|
export declare class ExtensionsConfigFileGeneratorPluginV1 extends AbstractBiPhasicGroupAndEntryPlugin {
|
|
6
5
|
private readonly extensionsDest;
|
|
7
|
-
constructor(
|
|
6
|
+
constructor(extensionsDest: string, context: string, entry: EntryProvider);
|
|
8
7
|
protected attachUniquePhase(): void;
|
|
9
8
|
protected processAssets(compilation: Compilation, parsedAssetJsonProvider: ParsedAssetJsonProvider): void;
|
|
10
9
|
}
|
|
@@ -12,8 +12,8 @@ const UnifiedLoaderGenerator_1 = require("./UnifiedLoaderGenerator");
|
|
|
12
12
|
const webpack_1 = require("webpack");
|
|
13
13
|
class ExtensionsConfigFileGeneratorPluginV1 extends AbstractBiPhasicGroupAndEntryPlugin_1.AbstractBiPhasicGroupAndEntryPlugin {
|
|
14
14
|
extensionsDest;
|
|
15
|
-
constructor(
|
|
16
|
-
super(
|
|
15
|
+
constructor(extensionsDest, context, entry) {
|
|
16
|
+
super(`extensions-v1-${extensionsDest}`, [UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore], context, entry);
|
|
17
17
|
this.extensionsDest = extensionsDest;
|
|
18
18
|
}
|
|
19
19
|
attachUniquePhase() { }
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AbstractBiPhasicGroupPlugin } from "./AbstractBiPhasicGroupPlugin";
|
|
2
|
+
import { Compilation } from "webpack";
|
|
3
|
+
export declare class MixableBiPhasicGroupAndEntryPlugin extends AbstractBiPhasicGroupPlugin {
|
|
4
|
+
protected attachStandardPhase(compilation: Compilation): void;
|
|
5
|
+
protected attachUniquePhase(compilation: Compilation): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MixableBiPhasicGroupAndEntryPlugin = void 0;
|
|
4
|
+
const AbstractBiPhasicGroupPlugin_1 = require("./AbstractBiPhasicGroupPlugin");
|
|
5
|
+
class MixableBiPhasicGroupAndEntryPlugin extends AbstractBiPhasicGroupPlugin_1.AbstractBiPhasicGroupPlugin {
|
|
6
|
+
attachStandardPhase(compilation) {
|
|
7
|
+
throw new Error("This must be implemented");
|
|
8
|
+
}
|
|
9
|
+
attachUniquePhase(compilation) {
|
|
10
|
+
throw new Error("This must be implemented");
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.MixableBiPhasicGroupAndEntryPlugin = MixableBiPhasicGroupAndEntryPlugin;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AbstractBiPhasicGroupPlugin } from "./AbstractBiPhasicGroupPlugin";
|
|
2
|
+
import { Compilation } from "webpack";
|
|
3
|
+
export declare class MixableBiPhasicGroupPlugin extends AbstractBiPhasicGroupPlugin {
|
|
4
|
+
protected attachStandardPhase(compilation: Compilation): void;
|
|
5
|
+
protected attachUniquePhase(compilation: Compilation): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MixableBiPhasicGroupPlugin = void 0;
|
|
4
|
+
const AbstractBiPhasicGroupPlugin_1 = require("./AbstractBiPhasicGroupPlugin");
|
|
5
|
+
class MixableBiPhasicGroupPlugin extends AbstractBiPhasicGroupPlugin_1.AbstractBiPhasicGroupPlugin {
|
|
6
|
+
attachStandardPhase(compilation) {
|
|
7
|
+
throw new Error("This must be implemented");
|
|
8
|
+
}
|
|
9
|
+
attachUniquePhase(compilation) {
|
|
10
|
+
throw new Error("This must be implemented");
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.MixableBiPhasicGroupPlugin = MixableBiPhasicGroupPlugin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BlockEntrypointInfo, ParsedAssetJsonProvider, VerifiedAdvancedOutputConfig } from "../shared";
|
|
2
|
-
import type { VerifiedPlauditWordpressWebpackConfig } from "../utils/common-config-helpers";
|
|
1
|
+
import { BlockEntrypointInfo, ParsedAssetJsonProvider, VerifiedAdvancedOutputConfig, VerifiedPlauditWordpressWebpackConfig } from "../shared";
|
|
3
2
|
import { AbstractBiPhasicGroupAndEntryPlugin, EntryProvider } from "./AbstractBiPhasicGroupAndEntryPlugin";
|
|
4
3
|
import { Compilation } from "webpack";
|
|
5
4
|
export declare class PlainEntrypointsConfigFileGeneratorPlugin extends AbstractBiPhasicGroupAndEntryPlugin<BlockEntrypointInfo> {
|
|
5
|
+
private readonly config;
|
|
6
6
|
private readonly buildRoot;
|
|
7
7
|
private readonly outputDir;
|
|
8
8
|
private readonly dest;
|
|
@@ -5,19 +5,21 @@ const node_path_1 = require("node:path");
|
|
|
5
5
|
const php_writer_1 = require("@plaudit/php-writer");
|
|
6
6
|
const expressions_1 = require("@plaudit/php-writer/expressions");
|
|
7
7
|
const shared_1 = require("../shared");
|
|
8
|
-
const
|
|
8
|
+
const pseudo_semaphore_1 = require("../utils/pseudo-semaphore");
|
|
9
9
|
const path_query_and_related_helpers_1 = require("../utils/path-query-and-related-helpers");
|
|
10
10
|
const AbstractBiPhasicGroupAndEntryPlugin_1 = require("./AbstractBiPhasicGroupAndEntryPlugin");
|
|
11
11
|
const UnifiedLoaderGenerator_1 = require("./UnifiedLoaderGenerator");
|
|
12
12
|
const webpack_1 = require("webpack");
|
|
13
13
|
class PlainEntrypointsConfigFileGeneratorPlugin extends AbstractBiPhasicGroupAndEntryPlugin_1.AbstractBiPhasicGroupAndEntryPlugin {
|
|
14
|
+
config;
|
|
14
15
|
buildRoot;
|
|
15
16
|
outputDir;
|
|
16
17
|
dest;
|
|
17
18
|
useUnifiedLoader;
|
|
18
|
-
static semaphore = new
|
|
19
|
+
static semaphore = new pseudo_semaphore_1.PseudoSemaphore("Plain");
|
|
19
20
|
constructor(config, buildRoot, outputDir, dest, useUnifiedLoader, context, entry) {
|
|
20
|
-
super(
|
|
21
|
+
super("plain-entrypoints-v2", [PlainEntrypointsConfigFileGeneratorPlugin.semaphore, UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore], context, entry);
|
|
22
|
+
this.config = config;
|
|
21
23
|
this.buildRoot = buildRoot;
|
|
22
24
|
this.outputDir = outputDir;
|
|
23
25
|
this.dest = dest;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { VerifiedPlauditWordpressWebpackConfig } from "../shared";
|
|
2
2
|
import { AbstractBiPhasicGroupPlugin } from "./AbstractBiPhasicGroupPlugin";
|
|
3
3
|
import { Compilation } from "webpack";
|
|
4
4
|
export declare class SpecialAssetHandlingPlugin extends AbstractBiPhasicGroupPlugin {
|
|
5
|
+
private readonly config;
|
|
5
6
|
private static readonly semaphore;
|
|
6
7
|
private static validPathname?;
|
|
7
8
|
constructor(config: VerifiedPlauditWordpressWebpackConfig);
|
|
@@ -8,15 +8,17 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
8
8
|
const php_writer_1 = require("@plaudit/php-writer");
|
|
9
9
|
const expressions_1 = require("@plaudit/php-writer/expressions");
|
|
10
10
|
const shared_1 = require("../shared");
|
|
11
|
-
const
|
|
11
|
+
const pseudo_semaphore_1 = require("../utils/pseudo-semaphore");
|
|
12
12
|
const AbstractBiPhasicGroupPlugin_1 = require("./AbstractBiPhasicGroupPlugin");
|
|
13
13
|
const UnifiedLoaderGenerator_1 = require("./UnifiedLoaderGenerator");
|
|
14
14
|
const webpack_1 = require("webpack");
|
|
15
15
|
class SpecialAssetHandlingPlugin extends AbstractBiPhasicGroupPlugin_1.AbstractBiPhasicGroupPlugin {
|
|
16
|
-
|
|
16
|
+
config;
|
|
17
|
+
static semaphore = new pseudo_semaphore_1.PseudoSemaphore("Special");
|
|
17
18
|
static validPathname = undefined;
|
|
18
19
|
constructor(config) {
|
|
19
|
-
super(
|
|
20
|
+
super("special-assets", [SpecialAssetHandlingPlugin.semaphore, UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore]);
|
|
21
|
+
this.config = config;
|
|
20
22
|
}
|
|
21
23
|
attachStandardPhase(compilation) {
|
|
22
24
|
compilation.hooks.processAssets.tapPromise({ name: this.constructor.name, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_ANALYSE }, async (assets) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PHPFile } from "@plaudit/php-writer";
|
|
2
2
|
import { AbstractBiPhasicGroupPlugin } from "./AbstractBiPhasicGroupPlugin";
|
|
3
|
-
import
|
|
4
|
-
import { PseudoSemaphore } from "../utils/
|
|
3
|
+
import { VerifiedPlauditWordpressWebpackConfig } from "../shared";
|
|
4
|
+
import { PseudoSemaphore } from "../utils/pseudo-semaphore";
|
|
5
5
|
import { Compilation } from "webpack";
|
|
6
6
|
export type LoaderInfo = {
|
|
7
7
|
group: string;
|
|
@@ -11,6 +11,7 @@ export type LoaderInfo = {
|
|
|
11
11
|
priority?: number;
|
|
12
12
|
};
|
|
13
13
|
export declare class UnifiedLoaderGenerator extends AbstractBiPhasicGroupPlugin {
|
|
14
|
+
private readonly config;
|
|
14
15
|
static readonly semaphore: PseudoSemaphore<LoaderInfo>;
|
|
15
16
|
constructor(config: VerifiedPlauditWordpressWebpackConfig);
|
|
16
17
|
protected attachStandardPhase(compilation: Compilation): void;
|
|
@@ -39,13 +39,15 @@ const php_writer_1 = require("@plaudit/php-writer");
|
|
|
39
39
|
const expressions_1 = require("@plaudit/php-writer/expressions");
|
|
40
40
|
const AbstractBiPhasicGroupPlugin_1 = require("./AbstractBiPhasicGroupPlugin");
|
|
41
41
|
const shared_1 = require("../shared");
|
|
42
|
-
const
|
|
42
|
+
const pseudo_semaphore_1 = require("../utils/pseudo-semaphore");
|
|
43
43
|
const webpack_1 = require("webpack");
|
|
44
44
|
const promises_1 = require("node:fs/promises");
|
|
45
45
|
class UnifiedLoaderGenerator extends AbstractBiPhasicGroupPlugin_1.AbstractBiPhasicGroupPlugin {
|
|
46
|
-
|
|
46
|
+
config;
|
|
47
|
+
static semaphore = new pseudo_semaphore_1.PseudoSemaphore("Unified");
|
|
47
48
|
constructor(config) {
|
|
48
|
-
super(
|
|
49
|
+
super("unified-loader", []);
|
|
50
|
+
this.config = config;
|
|
49
51
|
}
|
|
50
52
|
attachStandardPhase(compilation) {
|
|
51
53
|
compilation.hooks.afterProcessAssets.tap(this.constructor.name, () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VerifiedPlauditWordpressWebpackConfig } from "../
|
|
1
|
+
import type { VerifiedPlauditWordpressWebpackConfig } from "../shared";
|
|
2
2
|
import type { Compiler, WebpackPluginInstance } from "webpack";
|
|
3
3
|
export declare class VariablesJSMonitorPlugin implements WebpackPluginInstance {
|
|
4
4
|
private readonly config;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./AbstractBiPhasicGroupAndEntryPlugin";
|
|
2
|
+
export * from "./AbstractBiPhasicGroupPlugin";
|
|
3
|
+
export * from "./EnhancedBlockJSONPlugin";
|
|
4
|
+
export * from "./ExtensionsConfigFileGeneratorPlugin";
|
|
5
|
+
export * from "./MixableBiPhasicGroupAndEntryPlugin";
|
|
6
|
+
export * from "./MixableBiPhasicGroupPlugin";
|
|
7
|
+
export * from "./PlainEntrypointsConfigFileGeneratorPlugin";
|
|
8
|
+
export * from "./UnifiedLoaderGenerator";
|
|
@@ -0,0 +1,24 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AbstractBiPhasicGroupAndEntryPlugin"), exports);
|
|
18
|
+
__exportStar(require("./AbstractBiPhasicGroupPlugin"), exports);
|
|
19
|
+
__exportStar(require("./EnhancedBlockJSONPlugin"), exports);
|
|
20
|
+
__exportStar(require("./ExtensionsConfigFileGeneratorPlugin"), exports);
|
|
21
|
+
__exportStar(require("./MixableBiPhasicGroupAndEntryPlugin"), exports);
|
|
22
|
+
__exportStar(require("./MixableBiPhasicGroupPlugin"), exports);
|
|
23
|
+
__exportStar(require("./PlainEntrypointsConfigFileGeneratorPlugin"), exports);
|
|
24
|
+
__exportStar(require("./UnifiedLoaderGenerator"), exports);
|
package/dist/shared.d.ts
CHANGED
|
@@ -158,6 +158,10 @@ export type PlauditWordpressWebpackConfig = {
|
|
|
158
158
|
targetNamespace?: string;
|
|
159
159
|
useBlockSupportsAsThemeJsonDefaults?: boolean;
|
|
160
160
|
};
|
|
161
|
+
export type VerifiedPlauditWordpressWebpackConfig = Required<Omit<PlauditWordpressWebpackConfig, 'variables' | 'src' | 'externals' | 'standard'>> & {
|
|
162
|
+
variablesFilePath?: string;
|
|
163
|
+
currentVariables: Record<string, any>;
|
|
164
|
+
} & Pick<PlauditWordpressWebpackConfig, 'externals'>;
|
|
161
165
|
/** Unified-loader watch output: `dist` → `dist-dev` when SERVER_MODE is development. */
|
|
162
166
|
export declare function shouldWriteDistDev(config: Pick<PlauditWordpressWebpackConfig, 'outputDir' | 'useUnifiedLoader' | 'omitDistDev'>): boolean;
|
|
163
167
|
/**
|
|
@@ -166,30 +170,30 @@ export declare function shouldWriteDistDev(config: Pick<PlauditWordpressWebpackC
|
|
|
166
170
|
*/
|
|
167
171
|
export declare function isDistDevOutputPath(outputPath: string): boolean;
|
|
168
172
|
export declare function applyStandards(config: PlauditWordpressWebpackConfig): {
|
|
169
|
-
readonly standard?:
|
|
173
|
+
readonly standard?: '2026-03-13';
|
|
170
174
|
readonly standaloneBlocks?: boolean;
|
|
171
175
|
readonly variables?: Record<string, any>;
|
|
172
176
|
readonly verbose?: boolean;
|
|
173
177
|
readonly src?: string[] | SourcesObject;
|
|
174
|
-
readonly stats?: Configuration[
|
|
178
|
+
readonly stats?: Configuration['stats'];
|
|
175
179
|
readonly postcss?: {
|
|
176
|
-
functions?: (variables: (name: string) => unknown) => PostcssFunctionsOptions[
|
|
180
|
+
functions?: (variables: (name: string) => unknown) => PostcssFunctionsOptions['functions'];
|
|
177
181
|
};
|
|
178
182
|
readonly externals?: Externals;
|
|
179
183
|
readonly assumeGlobalizedPlauditLibraries?: boolean;
|
|
180
|
-
useWebpackResourceFiltering?: boolean;
|
|
181
|
-
outputDir?: string;
|
|
182
|
-
extensionsVersion?: 1 | 2 | 3;
|
|
183
184
|
readonly targetHandlePrefix?: string;
|
|
184
|
-
plainEntrypointsVersion?: 1 | 2;
|
|
185
|
-
srcDir?: string;
|
|
186
185
|
readonly srcPrefixes?: string[];
|
|
187
|
-
useUnifiedLoader?: boolean;
|
|
188
186
|
readonly includePostInitFallback?: boolean;
|
|
189
187
|
readonly omitDistDev?: boolean;
|
|
190
|
-
onlyRunPostCSSOnPCSS?: boolean;
|
|
191
188
|
readonly targetNamespace?: string;
|
|
192
189
|
readonly useBlockSupportsAsThemeJsonDefaults?: boolean;
|
|
190
|
+
useWebpackResourceFiltering?: boolean | undefined;
|
|
191
|
+
extensionsVersion?: 1 | 2 | 3 | undefined;
|
|
192
|
+
plainEntrypointsVersion?: 1 | 2 | undefined;
|
|
193
|
+
srcDir?: string | undefined;
|
|
194
|
+
outputDir?: string | undefined;
|
|
195
|
+
useUnifiedLoader?: boolean | undefined;
|
|
196
|
+
onlyRunPostCSSOnPCSS?: boolean | undefined;
|
|
193
197
|
};
|
|
194
198
|
export declare function resolveStandard(standard: PlauditWordpressWebpackConfig['standard']): {
|
|
195
199
|
readonly useWebpackResourceFiltering: true;
|
|
@@ -232,7 +236,7 @@ export declare const scriptExtension: RegExp;
|
|
|
232
236
|
export declare const scriptWithoutModuleExtension: RegExp;
|
|
233
237
|
export declare const scriptWithModuleExtension: RegExp;
|
|
234
238
|
export declare const styleExtension: RegExp;
|
|
235
|
-
export declare function scriptOrStyleTest(entryPath: string, scriptExtension: RegExp): "
|
|
239
|
+
export declare function scriptOrStyleTest(entryPath: string, scriptExtension: RegExp): "" | "script" | "style";
|
|
236
240
|
export declare function isStyleField(field: string): field is 'style' | 'viewStyle' | 'editorStyle';
|
|
237
241
|
export declare function isScriptModuleField(field: string): field is 'viewScriptModule';
|
|
238
242
|
export declare function mergeModuleDependencyArrays(a: WPModuleDependency[] | undefined, b: WPModuleDependency[] | undefined): WPModuleDependency[] | undefined;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import type { AbstractBiPhasicGroupAndEntryPlugin, EntryProvider } from "../plugins/AbstractBiPhasicGroupAndEntryPlugin";
|
|
2
2
|
import type { AdditionalDependencyInjectorPlugin } from "../plugins/AdditionalDependencyInjectorPlugin";
|
|
3
|
-
import { EntrypointFields,
|
|
3
|
+
import { EntrypointFields, VerifiedPlauditWordpressWebpackConfig, BlockEntrypointInfo, VerifiedAdvancedOutputConfig, MinimumViableMetadata } from "../shared";
|
|
4
4
|
import type { Compiler, Configuration, DynamicEntryPlugin, WebpackPluginInstance } from "webpack";
|
|
5
5
|
import type WebpackRemoveEmptyScriptsPlugin from "webpack-remove-empty-scripts";
|
|
6
|
-
export type VerifiedPlauditWordpressWebpackConfig = Required<Omit<PlauditWordpressWebpackConfig, 'variables' | 'src' | 'externals' | 'standard'>> & {
|
|
7
|
-
variablesFilePath?: string;
|
|
8
|
-
currentVariables: Record<string, any>;
|
|
9
|
-
} & Pick<PlauditWordpressWebpackConfig, 'externals'>;
|
|
10
6
|
export type CommonPluginConfig = {
|
|
11
7
|
plugins: (WebpackPluginInstance | ((this: Compiler, compiler: Compiler) => void))[];
|
|
12
8
|
removeEmptyScriptsPlugin: WebpackRemoveEmptyScriptsPlugin;
|
|
@@ -22,9 +22,9 @@ export declare function parseLocationEncodingFilenameForBlock(filename: string,
|
|
|
22
22
|
* @param segment
|
|
23
23
|
*/
|
|
24
24
|
export declare function extractLocationFromPropertyEncodingFilenameSegment(segment: string): {
|
|
25
|
-
readonly locationName: "
|
|
25
|
+
readonly locationName: "admin" | "analytics" | "blockAssets" | "clientEditor" | "clientView" | "customizer" | "login" | "register";
|
|
26
26
|
readonly priority: number | true;
|
|
27
27
|
} | {
|
|
28
|
-
readonly locationName: false;
|
|
29
28
|
readonly priority?: undefined;
|
|
29
|
+
readonly locationName: false;
|
|
30
30
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import LegacyDependencyExtractionWebpackPlugin from "@wordpress/dependency-extraction-webpack-plugin";
|
|
1
|
+
import type LegacyDependencyExtractionWebpackPlugin from "@wordpress/dependency-extraction-webpack-plugin";
|
|
2
2
|
import { Compilation, Compiler, Module, type TemplatePath } from "webpack";
|
|
3
3
|
export interface EnhancedDependencyExtractionWebpackPluginOptions {
|
|
4
4
|
injectPolyfill?: boolean;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.EnhancedDependencyExtractionWebpackPlugin = void 0;
|
|
7
|
-
const dependency_extraction_webpack_plugin_1 = __importDefault(require("@wordpress/dependency-extraction-webpack-plugin"));
|
|
8
4
|
const webpack_1 = require("webpack");
|
|
9
5
|
/**
|
|
10
6
|
* Internal dependencies
|
|
@@ -34,7 +30,7 @@ class EnhancedDependencyExtractionWebpackPlugin {
|
|
|
34
30
|
*/
|
|
35
31
|
useModules = false;
|
|
36
32
|
constructor(options) {
|
|
37
|
-
if (options
|
|
33
|
+
if (typeof options === 'object' && options?.constructor?.name === 'DependencyExtractionWebpackPlugin') {
|
|
38
34
|
options = options.options;
|
|
39
35
|
}
|
|
40
36
|
if (options instanceof EnhancedDependencyExtractionWebpackPlugin) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PlauditWordpressWebpackConfig } from "./shared";
|
|
2
2
|
import type { Configuration } from "webpack";
|
|
3
|
-
declare const _default: (config: PlauditWordpressWebpackConfig, webpackConfig?: Configuration[] | Configuration) => Configuration[];
|
|
4
3
|
export = _default;
|
|
4
|
+
declare function _default(config: PlauditWordpressWebpackConfig, webpackConfig?: Configuration[] | Configuration): Configuration[];
|
|
@@ -461,14 +461,14 @@ function buildCommonPluginConfig(webpackConfig, config, bundleAnalyzer, assumeGl
|
|
|
461
461
|
if ((0, shared_1.isDistDevOutputPath)(config.outputDir)) {
|
|
462
462
|
try {
|
|
463
463
|
const { PlauditDevPlugin } = require("@plaudit/dev-webpack-plugin");
|
|
464
|
-
plugins.push(new PlauditDevPlugin());
|
|
464
|
+
plugins.push(new PlauditDevPlugin(config));
|
|
465
465
|
}
|
|
466
466
|
catch { }
|
|
467
467
|
}
|
|
468
468
|
return {
|
|
469
469
|
plugins, removeEmptyScriptsPlugin,
|
|
470
470
|
makeAdditionalDependencyInjectorPlugin(referencePlugin) {
|
|
471
|
-
return new AdditionalDependencyInjectorPlugin_1.AdditionalDependencyInjectorPlugin(
|
|
471
|
+
return new AdditionalDependencyInjectorPlugin_1.AdditionalDependencyInjectorPlugin(webpackConfig.output?.module, builtDependencyExtractionWebpackPlugin.addExternalizedDep, referencePlugin);
|
|
472
472
|
}
|
|
473
473
|
};
|
|
474
474
|
}
|
|
@@ -593,7 +593,7 @@ function processIndividualWebpackConfig(config, webpackConfig, sources, canClean
|
|
|
593
593
|
};
|
|
594
594
|
plugin = config.extensionsVersion > 1
|
|
595
595
|
? new ExtensionsConfigFileGeneratorPlugin_1.ExtensionsConfigFileGeneratorPlugin(config, srcRoot, dest, contextPath, entry)
|
|
596
|
-
: new ExtensionsConfigFileGeneratorPluginV1_1.ExtensionsConfigFileGeneratorPluginV1(
|
|
596
|
+
: new ExtensionsConfigFileGeneratorPluginV1_1.ExtensionsConfigFileGeneratorPluginV1(dest.destination, contextPath, entry);
|
|
597
597
|
plugins.push(plugin);
|
|
598
598
|
}
|
|
599
599
|
else if (sourceType === "plain" /* SourceType.plain */) {
|
|
@@ -613,7 +613,7 @@ function processIndividualWebpackConfig(config, webpackConfig, sources, canClean
|
|
|
613
613
|
console.error("Using directory mode with legacy plain entrypoint handling is not supported");
|
|
614
614
|
continue;
|
|
615
615
|
}
|
|
616
|
-
plugin = new EnhancedDynamicEntryPlugin_1.EnhancedDynamicEntryPlugin(
|
|
616
|
+
plugin = new EnhancedDynamicEntryPlugin_1.EnhancedDynamicEntryPlugin(contextPath, () => ({ [baseDest]: { import: Array.isArray(srcRoot) ? srcRoot : [srcRoot], plauditMetadata: { purpose: "plain-entrypoint", dest, absoluteSrc } } }));
|
|
617
617
|
}
|
|
618
618
|
plugins.push(plugin);
|
|
619
619
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaudit/webpack-extensions",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.20.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
"exports": {
|
|
17
17
|
"./wordpress-scripts-wrapper": "./dist/wordpress-scripts-wrapper.js",
|
|
18
18
|
"./location-encoding-filename-parser": "./dist/utils/location-encoding-filename-parser.js",
|
|
19
|
-
"./shared": "./dist/shared.js"
|
|
19
|
+
"./shared": "./dist/shared.js",
|
|
20
|
+
"./plugins": "./dist/plugins/index.js",
|
|
21
|
+
"./utils/pseudo-semaphore": "./dist/utils/pseudo-semaphore.js"
|
|
20
22
|
},
|
|
21
23
|
"typesVersions": {
|
|
22
24
|
"*": {
|
|
@@ -34,12 +36,13 @@
|
|
|
34
36
|
"devDependencies": {
|
|
35
37
|
"@plaudit/dev-webpack-plugin": "^1.0.1",
|
|
36
38
|
"@plaudit/gutenberg-api-extensions": "^2.98.2",
|
|
37
|
-
"@types/jsdom": "^
|
|
38
|
-
"@types/node": "^
|
|
39
|
+
"@types/jsdom": "^30.0.0",
|
|
40
|
+
"@types/node": "^26.2.0",
|
|
39
41
|
"@types/postcss-functions": "^4.0.4",
|
|
40
42
|
"@types/postcss-import": "^14.0.3",
|
|
41
43
|
"@types/tapable": "^2.3.0",
|
|
42
44
|
"@types/webpack-sources": "^3.2.3",
|
|
45
|
+
"@wordpress/dependency-extraction-webpack-plugin": "^6.53.0",
|
|
43
46
|
"atob": "^2.1.2",
|
|
44
47
|
"css-loader": "^6.11.0",
|
|
45
48
|
"glob": "^7.2.3",
|
|
@@ -50,7 +53,7 @@
|
|
|
50
53
|
"react": "^18.3.1",
|
|
51
54
|
"react-dom": "^18.3.1",
|
|
52
55
|
"rimraf": "^5.0.10",
|
|
53
|
-
"typescript": "^
|
|
56
|
+
"typescript": "^7.0.2",
|
|
54
57
|
"webpack-bundle-analyzer": "^5.3.1"
|
|
55
58
|
},
|
|
56
59
|
"dependencies": {
|
|
@@ -58,15 +61,13 @@
|
|
|
58
61
|
"@plaudit/postcss-color-function": "^5.1.0",
|
|
59
62
|
"@plaudit/postcss-strip-units": "^3.0.0",
|
|
60
63
|
"@plaudit/postcss-variables": "^2.0.1",
|
|
61
|
-
"@wordpress/dependency-extraction-webpack-plugin": "^6.53.0",
|
|
62
64
|
"@wordpress/scripts": "^32.6.0",
|
|
63
65
|
"autoprefixer": "^10.5.4",
|
|
64
66
|
"copy-webpack-plugin": "10.2.4",
|
|
65
67
|
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
66
68
|
"cssnano": "^7.1.9",
|
|
67
69
|
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
|
68
|
-
"
|
|
69
|
-
"jsdom": "^29.1.1",
|
|
70
|
+
"jsdom": "^30.0.1",
|
|
70
71
|
"json2php": "0.0.12",
|
|
71
72
|
"postcss": "^8.5.26",
|
|
72
73
|
"postcss-calc": "^10.1.1",
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
"build": "tsc",
|
|
98
99
|
"clean": "rm -rf dist",
|
|
99
100
|
"build:clean": "pnpm run clean && pnpm run build",
|
|
101
|
+
"build:sync-wp-bundled-packages": "node tools/bundled-packages-sync.mts",
|
|
100
102
|
"watch": "tsc -w",
|
|
101
103
|
"test": "pnpm run build && pnpm run test:no-build",
|
|
102
104
|
"test:no-build": "rm -rf tests/.tmp/coverage/jest && NODE_V8_COVERAGE=tests/.tmp/coverage/jest jest",
|
|
File without changes
|
|
File without changes
|