@datadog/esbuild-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 esbuild from 'esbuild';
3
1
  import { UnpluginOptions } from 'unplugin';
2
+ import esbuild from 'esbuild';
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 datadogEsbuildPlugin: (options: src.EsbuildPluginOptions) => esbuild.Plugin;
145
+ declare const datadogEsbuildPlugin: (options: Options) => esbuild.Plugin;
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/esbuild-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 ESBuild Plugin";
@@ -36507,7 +36507,6 @@ var devDependencies = {
36507
36507
  var peerDependencies = {
36508
36508
  esbuild: ">=0.x"
36509
36509
  };
36510
- var stableVersion = "2.3.0";
36511
36510
  var pkg = {
36512
36511
  name: name,
36513
36512
  packageManager: packageManager,
@@ -36525,8 +36524,7 @@ var pkg = {
36525
36524
  files: files,
36526
36525
  scripts: scripts,
36527
36526
  devDependencies: devDependencies,
36528
- peerDependencies: peerDependencies,
36529
- stableVersion: stableVersion
36527
+ peerDependencies: peerDependencies
36530
36528
  };
36531
36529
 
36532
36530
  const datadogEsbuildPlugin = buildPluginFactory({