@datadog/webpack-plugin 2.3.1-dev-13 → 2.3.2

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.
@@ -1,6 +1,5 @@
1
- import * as src from 'src';
2
- import webpack from 'webpack';
3
1
  import { UnpluginOptions } from 'unplugin';
2
+ import webpack from 'webpack';
4
3
 
5
4
  declare const CONFIG_KEY$1: "rum";
6
5
 
@@ -103,7 +102,7 @@ type GlobalContext = {
103
102
  start: number;
104
103
  version: string;
105
104
  };
106
- type GetCustomPlugins<T> = (options: T, context: GlobalContext) => UnpluginOptions[];
105
+ type GetCustomPlugins = (options: Options, context: GlobalContext) => UnpluginOptions[];
107
106
  type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
108
107
  type AuthOptions = {
109
108
  apiKey?: string;
@@ -116,7 +115,7 @@ interface GetPluginsOptions {
116
115
  interface Options extends GetPluginsOptions {
117
116
  [CONFIG_KEY$1]?: RumOptions;
118
117
  [CONFIG_KEY]?: TelemetryOptions;
119
- customPlugins?: GetCustomPlugins<Options>;
118
+ customPlugins?: GetCustomPlugins;
120
119
  }
121
120
 
122
121
  interface Metric {
@@ -143,7 +142,7 @@ type TelemetryOptions = {
143
142
  timestamp?: number;
144
143
  };
145
144
 
146
- declare const datadogWebpackPlugin: (options: src.WebpackPluginOptions) => webpack.WebpackPluginInstance;
145
+ declare const datadogWebpackPlugin: (options: Options) => webpack.WebpackPluginInstance;
147
146
 
148
147
  declare const version: string;
149
148
  declare const helpers: {
package/dist/src/index.js CHANGED
@@ -19051,7 +19051,7 @@ ${after}`;
19051
19051
  return "";
19052
19052
  }
19053
19053
  };
19054
- const INJECTED_FILE_PATH = `${Math.random().toString().replace("0.", "")}_${INJECTED_FILE}.js`;
19054
+ const INJECTED_FILE_PATH = `${Date.now()}_${INJECTED_FILE}.js`;
19055
19055
  const plugins = [
19056
19056
  // Prepare and fetch the content to inject for all bundlers.
19057
19057
  {
@@ -36442,7 +36442,7 @@ const buildPluginFactory = ({
36442
36442
 
36443
36443
  var name = "@datadog/webpack-plugin";
36444
36444
  var packageManager = "yarn@4.0.2";
36445
- var version$1 = "2.3.1-dev-13";
36445
+ var version$1 = "2.3.2";
36446
36446
  var license = "MIT";
36447
36447
  var author = "Datadog";
36448
36448
  var description = "Datadog Webpack Plugin";
@@ -36487,7 +36487,7 @@ var scripts = {
36487
36487
  watch: "yarn clean && rollup --config rollup.config.mjs --watch"
36488
36488
  };
36489
36489
  var dependencies = {
36490
- "webpack-sources": "3.2.3"
36490
+ "webpack-sources": "^3"
36491
36491
  };
36492
36492
  var devDependencies = {
36493
36493
  "@babel/core": "7.24.5",
@@ -36508,15 +36508,8 @@ var devDependencies = {
36508
36508
  typescript: "5.4.3"
36509
36509
  };
36510
36510
  var peerDependencies = {
36511
- webpack: ">= 4.x < 6.x",
36512
- "webpack-sources": "^3"
36513
- };
36514
- var peerDependenciesMeta = {
36515
- "webpack-sources": {
36516
- optional: true
36517
- }
36511
+ webpack: ">= 4.x < 6.x"
36518
36512
  };
36519
- var stableVersion = "2.3.0";
36520
36513
  var pkg = {
36521
36514
  name: name,
36522
36515
  packageManager: packageManager,
@@ -36535,9 +36528,7 @@ var pkg = {
36535
36528
  scripts: scripts,
36536
36529
  dependencies: dependencies,
36537
36530
  devDependencies: devDependencies,
36538
- peerDependencies: peerDependencies,
36539
- peerDependenciesMeta: peerDependenciesMeta,
36540
- stableVersion: stableVersion
36531
+ peerDependencies: peerDependencies
36541
36532
  };
36542
36533
 
36543
36534
  const datadogWebpackPlugin = buildPluginFactory({