@plaudit/webpack-extensions 2.76.1 → 2.77.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.
@@ -48,7 +48,7 @@ class UnifiedLoaderGenerator extends AbstractBiPhasicGroupPlugin_1.AbstractBiPha
48
48
  });
49
49
  const staticallyLoadedEntrypoints = new Set(groupedLoaderInfo.flatMap(lig => lig.staticallyLoadedEntrypoints));
50
50
  for (const [file, assetData] of Object.entries((0, shared_1.getAssetsJson)(compilation))) {
51
- if (staticallyLoadedEntrypoints.has(file)) {
51
+ if (staticallyLoadedEntrypoints.has(file) || staticallyLoadedEntrypoints.has(file.replace(/\.css$/, '.js')) || staticallyLoadedEntrypoints.has(file.replace(/\.js$/, '.css'))) {
52
52
  continue;
53
53
  }
54
54
  const parsedPath = node_path_1.default.parse(file);
@@ -98,6 +98,12 @@ function plauditRequestToExternal(ext) {
98
98
  else if (request.startsWith('@plaudit/gutenberg-api-extensions')) {
99
99
  return handleExternalizingEqualsPossibleExternal({ import: ['plaudit', 'gutenbergApiExtensions'], handle: "" }, ext)?.import;
100
100
  }
101
+ else if (request.startsWith('@plaudit/wp-consent-api')) {
102
+ return handleExternalizingEqualsPossibleExternal({ import: ['plaudit'], handle: "" }, ext)?.import;
103
+ }
104
+ else if (request.startsWith('@plaudit/analytics-integrations-api')) {
105
+ return handleExternalizingEqualsPossibleExternal({ import: ['plaudit', 'analyticsIntegrations', 'api'], handle: "" }, ext)?.import;
106
+ }
101
107
  return undefined;
102
108
  };
103
109
  }
@@ -108,6 +114,12 @@ function plauditRequestToHandle(request) {
108
114
  else if (request.startsWith('@plaudit/gutenberg-api-extensions')) {
109
115
  return 'plaudit-gutenberg-api-extensions';
110
116
  }
117
+ else if (request.startsWith('@plaudit/wp-consent-api')) {
118
+ return 'wp-consent-api';
119
+ }
120
+ else if (request.startsWith('@plaudit/analytics-integrations-api')) {
121
+ return 'plaudit/analytics-integrations/api';
122
+ }
111
123
  return undefined;
112
124
  }
113
125
  function curryRequestHandlers(primary, secondary) {
package/build/shared.d.ts CHANGED
@@ -126,8 +126,8 @@ export type MinimumViableMetadata = {
126
126
  };
127
127
  export declare function convertUsageLocationsHandleToEmittableHandle(handle: UsageLocations['handle'], generatedHandle: string): string;
128
128
  export declare function makeEmittableConfigPHP(data: any, asFullFile: boolean, parentIndent?: string): string;
129
- export type EntrypointFields = ["viewScriptModule", "scriptModule"] | ["editorStyle", "viewStyle", "style", "editorScript", "viewScript", "script"];
130
- export declare const entrypointFields: ReadonlyArray<EntrypointFields[number]>;
129
+ export declare const entrypointFields: readonly ["editorStyle", "viewStyle", "style", "editorScript", "viewScript", "script", "viewScriptModule", "scriptModule"];
130
+ export type EntrypointFields = (typeof entrypointFields[number])[];
131
131
  export declare function convertEntrypointFieldForAssetType(entrypointField: EntrypointFields[number], assetType: 'script' | 'style'): EntrypointFields[number];
132
132
  export declare function leadingSlashIt(pathOrSomething: string): string;
133
133
  export declare const scriptExtension: RegExp;
package/build/shared.js CHANGED
@@ -85,9 +85,7 @@ function makeEmittableConfigPHP(data, asFullFile, parentIndent = "") {
85
85
  .replaceAll(/'rest' => \[\n\t+(\[(?:'[^']+')?]),\n\t+('[^']+')(?:,\n\t+(\[[^\n]+]))?\n\t+]/gs, (_, deps, hash, args) => `'rest' => [${[deps, hash, args].filter(value => !!value).join(", ")}]`);
86
86
  return asFullFile ? `<?php return ${prettyPrintedMetadata};` : prettyPrintedMetadata.trim();
87
87
  }
88
- exports.entrypointFields = [
89
- "editorStyle", "viewStyle", "style", "editorScript", "viewScript", "script", "viewScriptModule", "scriptModule"
90
- ];
88
+ exports.entrypointFields = ["editorStyle", "viewStyle", "style", "editorScript", "viewScript", "script", "viewScriptModule", "scriptModule"];
91
89
  function convertEntrypointFieldForAssetType(entrypointField, assetType) {
92
90
  // Using these word fragments instead of the full words allows us to avoid having to deal with the capitalization of the first letter
93
91
  const searchRep = assetType === 'script' ? ['tyle', 'cript'] : ['cript', 'tyle'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaudit/webpack-extensions",
3
- "version": "2.76.1",
3
+ "version": "2.77.0",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "files": [
6
6
  "/build"