Skip to content

Commit f2096b1

Browse files
committed
Remaining pieces of webpack 4
1 parent 30e4143 commit f2096b1

4 files changed

Lines changed: 4 additions & 11 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ They are configured from `packages/tests/jest.config.ts` and offer some helpers
6868

6969
Use `yarn test:unit` for unit tests, which are located in-situ, in the respective plugin directories.
7070
You can pass a specific file or directory to run tests only for that part of the codebase, e.g., `yarn test:unit packages/plugins/rum-plugin`.
71-
You can pass one or multiple specific bundler to run tests only for that bundler, e.g., `yarn test:unit --bundlers=esbuild,webpack4,webpack5`.
71+
You can pass one or multiple specific bundler to run tests only for that bundler, e.g., `yarn test:unit --bundlers=esbuild,webpack`.
7272

7373
There are two types of unit tests:
7474
- **Unit tests**: Focus on testing individual functions in isolation.
@@ -94,7 +94,7 @@ They will also use `nock` for mocking HTTP requests, and `memfs` for mocking fil
9494
They are configured from `packages/tests/playwright.config.ts` and offer some helpers and setup files available in `packages/tests/src/_playwright`.
9595

9696
Use `yarn test:e2e` for cross-bundler E2E testing. Test fixtures are organized by feature flow in `packages/tests/src/e2e`.
97-
You can pass a specific project to run tests only for a specific browser and bundler, e.g., `yarn test:e2e --project "chrome | webpack5"`.
97+
You can pass a specific project to run tests only for a specific browser and bundler, e.g., `yarn test:e2e --project "chrome | webpack"`.
9898
You can pass a specific test file or folder to run tests only for that file, e.g., `yarn test:e2e packages/tests/src/e2e/rumBrowserSdk`.
9999

100100
## Code Standards

packages/plugins/injection/src/xpack.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,7 @@ export const getXpackPlugin =
3939
// Delete the file we created.
4040
rmSync(filePath);
4141
};
42-
// Webpack4 doesn't have the "shutdown" hook.
43-
if (compiler.hooks.shutdown) {
44-
compiler.hooks.shutdown.tap(PLUGIN_NAME, hookFn);
45-
} else {
46-
compiler.hooks.done.tap(PLUGIN_NAME, hookFn);
47-
compiler.hooks.failed.tap(PLUGIN_NAME, hookFn);
48-
}
42+
compiler.hooks.shutdown.tap(PLUGIN_NAME, hookFn);
4943

5044
// Handle the InjectPosition.MIDDLE.
5145
type Entry = typeof compiler.options.entry;

packages/plugins/telemetry/src/webpack-plugin/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import type { Compilation, BundlerContext } from '@dd/telemetry-plugin/types';
99
import { Loaders } from './loaders';
1010
import { Tapables } from './tapables';
1111

12-
// FIME: Remove webpack4
1312
export const getWebpackPlugin = (
1413
bundlerContext: BundlerContext,
1514
globalContext: GlobalContext,

packages/tests/src/_jest/helpers/configBundlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const getWebpackOptions = (
6363
...configWebpack({
6464
workingDir,
6565
entry: { main: path.resolve(workingDir, defaultEntry) },
66-
outDir: getOutDir(workingDir, 'webpack5'),
66+
outDir: getOutDir(workingDir, 'webpack'),
6767
plugins: [datadogWebpackPlugin(newPluginOptions)],
6868
}),
6969
...bundlerOverrides,

0 commit comments

Comments
 (0)