Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@datadog/build-plugins",
"private": true,
"version": "3.0.8",
"version": "3.0.9",
"license": "MIT",
"author": "Datadog",
"description": "Root of Datadog's Build Plugins monorepo",
Expand Down
2 changes: 1 addition & 1 deletion packages/published/esbuild-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@datadog/esbuild-plugin",
"packageManager": "yarn@4.0.2",
"version": "3.0.8",
"version": "3.0.9",
"license": "MIT",
"author": "Datadog",
"description": "Datadog ESBuild Plugin",
Expand Down
2 changes: 1 addition & 1 deletion packages/published/rollup-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@datadog/rollup-plugin",
"packageManager": "yarn@4.0.2",
"version": "3.0.8",
"version": "3.0.9",
"license": "MIT",
"author": "Datadog",
"description": "Datadog Rollup Plugin",
Expand Down
2 changes: 1 addition & 1 deletion packages/published/rspack-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@datadog/rspack-plugin",
"packageManager": "yarn@4.0.2",
"version": "3.0.8",
"version": "3.0.9",
"license": "MIT",
"author": "Datadog",
"description": "Datadog Rspack Plugin",
Expand Down
2 changes: 1 addition & 1 deletion packages/published/vite-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@datadog/vite-plugin",
"packageManager": "yarn@4.0.2",
"version": "3.0.8",
"version": "3.0.9",
"license": "MIT",
"author": "Datadog",
"description": "Datadog Vite Plugin",
Expand Down
2 changes: 1 addition & 1 deletion packages/published/webpack-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@datadog/webpack-plugin",
"packageManager": "yarn@4.0.2",
"version": "3.0.8",
"version": "3.0.9",
"license": "MIT",
"author": "Datadog",
"description": "Datadog Webpack Plugin",
Expand Down
3 changes: 3 additions & 0 deletions packages/tests/src/_jest/helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ export const KNOWN_ERRORS: string[] = [
'ExperimentalWarning: buffer.File',
// // Used in Unplugin's xpack loaders.
'[DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir',
// Jest 30 globalsCleanup warnings for nock's internal properties that can't be protected.
"[JEST-01] DeprecationWarning: 'logger' property was accessed on [_FetchInterceptor]",
"[JEST-01] DeprecationWarning: 'now' property was accessed on [Function]",
];
17 changes: 17 additions & 0 deletions packages/tests/src/_jest/setupAfterEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// Copyright 2019-Present Datadog, Inc.

import console from 'console';
import https from 'https';
import http from 'http';
import { protectProperties } from 'jest-util';

import { toBeWithinRange } from './toBeWithinRange.ts';
import { toRepeatStringTimes } from './toRepeatStringTimes.ts';
Expand Down Expand Up @@ -31,9 +34,23 @@ beforeAll(() => {
const nock = jest.requireActual('nock');
// Do not send any HTTP requests.
nock.disableNetConnect();

// Protect timing functions from Jest's globalsCleanup since nock and other
// libraries need them. Without this, we get JEST-01 deprecation warnings in CI.
protectProperties(Date, ['now']);
protectProperties(performance, ['now']);
// Protect HTTP/HTTPS modules that nock patches to prevent warnings about internal properties.
protectProperties(http, ['request', 'get']);
protectProperties(https, ['request', 'get']);
});

afterAll(async () => {
// Clean up nock interceptors before Jest's global cleanup to prevent warnings.
const nock = jest.requireActual('nock');
nock.cleanAll();
nock.restore();
nock.activate();

// Clean the workingDirs from runBundlers();
const { cleanupEverything } = jest.requireActual('./helpers/runBundlers.ts');
await cleanupEverything();
Expand Down