diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d23fc2b31e5..891a2bba0e7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -31,6 +31,12 @@ updates: - dependency-name: "jest-docblock" # 30.0.0 onwards only supports Node.js 18.14.x and above update-types: ["version-update:semver-major"] + # The path-to-regexp version has to be the same as used in express v4. + # Consider vendoring it instead. + - dependency-name: "path-to-regexp" + - dependency-name: "lru-cache" + # 11.0.0 onwards only supports Node.js 20 and above + update-types: ["version-update:semver-major"] groups: dev-minor-and-patch-dependencies: dependency-type: "development" diff --git a/.github/workflows/platform.yml b/.github/workflows/platform.yml index df72c1cc9c6..37e7675732a 100644 --- a/.github/workflows/platform.yml +++ b/.github/workflows/platform.yml @@ -296,6 +296,7 @@ jobs: version: ${{ matrix.version }} - uses: ./.github/actions/install - run: yarn add --ignore-scripts mocha@10 # Use older mocha to support old Node.js versions + - run: yarn add --ignore-scripts express@4 # Use older express to support old Node.js versions - run: node node_modules/.bin/mocha --colors --timeout 30000 integration-tests/init.spec.js integration-guardrails-unsupported: diff --git a/LICENSE-3rdparty.csv b/LICENSE-3rdparty.csv index accec9c62df..9b2483261c4 100644 --- a/LICENSE-3rdparty.csv +++ b/LICENSE-3rdparty.csv @@ -68,6 +68,7 @@ dev,sinon,BSD-3-Clause,Copyright 2010-2017 Christian Johansen dev,sinon-chai,WTFPL and BSD-2-Clause,Copyright 2004 Sam Hocevar 2012–2017 Domenic Denicola dev,tap,ISC,Copyright 2011-2022 Isaac Z. Schlueter and Contributors dev,tiktoken,MIT,Copyright (c) 2022 OpenAI, Shantanu Jain +dev,workerpool,Apache license 2.0,Copyright (C) 2014-2024 Jos de Jong wjosdejong@gmail.com dev,yaml,ISC,Copyright Eemeli Aro dev,yarn-deduplicate,Apache license 2.0,Copyright [yyyy] [name of copyright owner] file,aws-lambda-nodejs-runtime-interface-client,Apache 2.0,Copyright 2019 Amazon.com Inc. or its affiliates. All Rights Reserved. diff --git a/benchmark/sirun/appsec-iast/insecure-bank.js b/benchmark/sirun/appsec-iast/insecure-bank.js index d07ab7c762f..0bfef252aa7 100644 --- a/benchmark/sirun/appsec-iast/insecure-bank.js +++ b/benchmark/sirun/appsec-iast/insecure-bank.js @@ -1,3 +1,5 @@ +'use strict' + const http = require('http') const app = require('/opt/insecure-bank-js/app') // eslint-disable-line import/no-absolute-path diff --git a/benchmark/sirun/appsec/insecure-bank.js b/benchmark/sirun/appsec/insecure-bank.js index d07ab7c762f..0bfef252aa7 100644 --- a/benchmark/sirun/appsec/insecure-bank.js +++ b/benchmark/sirun/appsec/insecure-bank.js @@ -1,3 +1,5 @@ +'use strict' + const http = require('http') const app = require('/opt/insecure-bank-js/app') // eslint-disable-line import/no-absolute-path diff --git a/benchmark/sirun/encoding/index.js b/benchmark/sirun/encoding/index.js index fcbc8d470f8..9c8056e9723 100644 --- a/benchmark/sirun/encoding/index.js +++ b/benchmark/sirun/encoding/index.js @@ -1,3 +1,5 @@ +'use strict' + const { ENCODER_VERSION } = process.env diff --git a/benchmark/sirun/gc.js b/benchmark/sirun/gc.js index 0386c5e1b74..b3e74e81c6e 100644 --- a/benchmark/sirun/gc.js +++ b/benchmark/sirun/gc.js @@ -1,3 +1,5 @@ +'use strict' + const { createHistogram, PerformanceObserver } = require('perf_hooks') if (createHistogram) { const StatsD = require('./statsd') diff --git a/benchmark/sirun/means.js b/benchmark/sirun/means.js index e7233965b28..6ccdf9d49dc 100644 --- a/benchmark/sirun/means.js +++ b/benchmark/sirun/means.js @@ -1,3 +1,5 @@ +'use strict' + /* eslint-disable no-console */ const chunks = [] diff --git a/benchmark/sirun/scope/index.js b/benchmark/sirun/scope/index.js index 20c2f6da2f6..026f2a6ae76 100644 --- a/benchmark/sirun/scope/index.js +++ b/benchmark/sirun/scope/index.js @@ -1,3 +1,5 @@ +'use strict' + const { DD_TRACE_SCOPE, COUNT diff --git a/benchmark/sirun/shimmer-runtime/index.js b/benchmark/sirun/shimmer-runtime/index.js index aff01fc2e17..3edb0dac16e 100644 --- a/benchmark/sirun/shimmer-runtime/index.js +++ b/benchmark/sirun/shimmer-runtime/index.js @@ -1,3 +1,5 @@ +'use strict' + /* eslint-disable require-await */ const shimmer = require('../../../packages/datadog-shimmer') diff --git a/benchmark/sirun/shimmer-startup/index.js b/benchmark/sirun/shimmer-startup/index.js index d57168af36a..b33c49420ca 100644 --- a/benchmark/sirun/shimmer-startup/index.js +++ b/benchmark/sirun/shimmer-startup/index.js @@ -1,3 +1,5 @@ +'use strict' + /* eslint-disable require-await */ const shimmer = require('../../../packages/datadog-shimmer') diff --git a/benchmark/sirun/spans/spans.js b/benchmark/sirun/spans/spans.js index e12f187bd1d..e931339012e 100644 --- a/benchmark/sirun/spans/spans.js +++ b/benchmark/sirun/spans/spans.js @@ -1,3 +1,5 @@ +'use strict' + const tracer = require('../../..').init() tracer._tracer._processor.process = function process (span) { diff --git a/benchmark/sirun/strip-unwanted-results.js b/benchmark/sirun/strip-unwanted-results.js index fe22d2d2628..9f26a05c8c6 100755 --- a/benchmark/sirun/strip-unwanted-results.js +++ b/benchmark/sirun/strip-unwanted-results.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +'use strict' const fs = require('fs') const path = require('path') diff --git a/ci/cypress/after-run.js b/ci/cypress/after-run.js index 8fec98e3d1f..7607066d253 100644 --- a/ci/cypress/after-run.js +++ b/ci/cypress/after-run.js @@ -1 +1,3 @@ +'use strict' + module.exports = require('../../packages/datadog-plugin-cypress/src/after-run') diff --git a/ci/cypress/after-spec.js b/ci/cypress/after-spec.js index 9c3ae9da74d..c7dbe88df4d 100644 --- a/ci/cypress/after-spec.js +++ b/ci/cypress/after-spec.js @@ -1 +1,3 @@ +'use strict' + module.exports = require('../../packages/datadog-plugin-cypress/src/after-spec') diff --git a/ci/cypress/plugin.js b/ci/cypress/plugin.js index a53439910ab..4b1da7d266f 100644 --- a/ci/cypress/plugin.js +++ b/ci/cypress/plugin.js @@ -1,3 +1,5 @@ +'use strict' + const { NODE_MAJOR } = require('../../version') // These polyfills are here because cypress@6.7.0, which we still support for v5, runs its plugin code diff --git a/ci/cypress/polyfills.js b/ci/cypress/polyfills.js index a22f6a52ad5..1c3d99e9253 100644 --- a/ci/cypress/polyfills.js +++ b/ci/cypress/polyfills.js @@ -1,3 +1,5 @@ +'use strict' + if (!Object.hasOwn) { Object.defineProperty(Object, 'hasOwn', { // eslint-disable-next-line prefer-object-has-own diff --git a/ci/cypress/support.js b/ci/cypress/support.js index fb0b2f711bb..822476ae3a1 100644 --- a/ci/cypress/support.js +++ b/ci/cypress/support.js @@ -1 +1,3 @@ +'use strict' + require('../../packages/datadog-plugin-cypress/src/support') diff --git a/ci/init.js b/ci/init.js index 5928c826ae0..54257cb8922 100644 --- a/ci/init.js +++ b/ci/init.js @@ -1,3 +1,5 @@ +'use strict' + /* eslint-disable no-console */ const tracer = require('../packages/dd-trace') const { isTrue, isFalse } = require('../packages/dd-trace/src/util') diff --git a/docker-compose.yml b/docker-compose.yml index e70dcc6c0de..56fa9340fcf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -165,14 +165,14 @@ services: # Use this for local development when making new VCR cassettes to persist to the test agent # Do not use the above testagent service if using this one. - testagent-vcr: - image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.24.1 - ports: - - "127.0.0.1:9126:9126" - environment: - - LOG_LEVEL=DEBUG - - TRACE_LANGUAGE=javascript - - ENABLED_CHECKS=trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service - - PORT=9126 - volumes: - - ${VCR_CASSETTES_PATH:-/tmp/empty-vcr}:/vcr-cassettes:delegated + # testagent-vcr: + # image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.24.1 + # ports: + # - "127.0.0.1:9126:9126" + # environment: + # - LOG_LEVEL=DEBUG + # - TRACE_LANGUAGE=javascript + # - ENABLED_CHECKS=trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service + # - PORT=9126 + # volumes: + # - ${VCR_CASSETTES_PATH:-/tmp/empty-vcr}:/vcr-cassettes:delegated diff --git a/esbuild.js b/esbuild.js index 424ba5cb908..5c80493515a 100644 --- a/esbuild.js +++ b/esbuild.js @@ -1,3 +1,5 @@ 'use strict' +// TODO: It shouldn't be necessary to disable n/no-unpublished-require - Research +// eslint-disable-next-line n/no-unpublished-require module.exports = require('./packages/datadog-esbuild/index.js') diff --git a/eslint.config.mjs b/eslint.config.mjs index 475cde84ac6..9c90e9a1275 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -286,6 +286,19 @@ export default [ yoda: ['error', 'never'] } }, + { + ...eslintPluginN.configs['flat/recommended'], + ignores: [ + 'integration-tests/debugger/target-app/re-evaluation/index.js', + 'integration-tests/debugger/target-app/re-evaluation/unique-filename.js', + 'packages/dd-trace/test/appsec/next/app-dir/**/*.js', + 'packages/dd-trace/test/appsec/next/pages-dir/**/*.js', + 'packages/datadog-plugin-next/test/app/**/*.js', + 'packages/datadog-plugin-next/test/**/pages/**/*.js', + 'packages/datadog-plugin-next/test/middleware.js', + '**/*.mjs' // TODO: This shoudln't be required, research why it is + ] + }, { name: 'dd-trace/defaults', @@ -328,10 +341,23 @@ export default [ }], 'import/no-extraneous-dependencies': 'error', 'n/no-restricted-require': ['error', ['diagnostics_channel']], + 'n/hashbang': 'off', // TODO: Enable this rule once we have a plan to address it + 'n/no-process-exit': 'off', // TODO: Enable this rule once we have a plan to address it + 'n/no-unsupported-features/node-builtins': ['error', { + ignores: [ + 'Response', + 'async_hooks.createHook', + 'async_hooks.executionAsyncId', + 'async_hooks.executionAsyncResource', + 'fetch', + 'fs/promises.cp' + ] + }], 'no-console': 'error', 'no-prototype-builtins': 'off', // Override (turned on by @eslint/js/recommended) 'no-var': 'error', - 'require-await': 'error' + 'require-await': 'error', + strict: 'error' } }, { @@ -421,6 +447,26 @@ export default [ ...eslintPluginMocha.configs.flat.recommended, files: TEST_FILES }, + { + name: 'dd-trace/benchmarks', + files: [ + 'benchmark/**/*' + ], + rules: { + 'n/no-missing-require': 'off' + } + }, + { + name: 'dd-trace/scripts', + files: [ + 'scripts/**/*' + ], + rules: { + 'n/no-unsupported-features/node-builtins': ['error', { + allowExperimental: true + }] + } + }, { name: 'dd-trace/tests/all', files: TEST_FILES, @@ -447,6 +493,10 @@ export default [ 'mocha/no-skipped-tests': 'off', 'mocha/no-top-level-hooks': 'off', 'n/handle-callback-err': 'off', + 'n/no-missing-require': 'off', + 'n/no-unsupported-features/node-builtins': ['error', { + allowExperimental: true + }], 'require-await': 'off' } }, diff --git a/index.js b/index.js index a8c61274ad8..ed48ff2fea5 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ 'use strict' +// TODO: It shouldn't be necessary to disable n/no-unpublished-require - Research +// eslint-disable-next-line n/no-unpublished-require module.exports = require('./packages/dd-trace') diff --git a/init.js b/init.js index 625d493b3b1..63fa9ba96be 100644 --- a/init.js +++ b/init.js @@ -2,6 +2,8 @@ /* eslint-disable no-var */ +// TODO: It shouldn't be necessary to disable n/no-unpublished-require - Research +// eslint-disable-next-line n/no-unpublished-require var guard = require('./packages/dd-trace/src/guardrails') module.exports = guard(function () { diff --git a/initialize.mjs b/initialize.mjs index 42787ce3d02..f60a544be7d 100644 --- a/initialize.mjs +++ b/initialize.mjs @@ -10,6 +10,8 @@ * hook will always be active for ESM support. */ +/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['module.register'] }] */ + import { isMainThread } from 'worker_threads' import * as Module from 'node:module' diff --git a/integration-tests/appsec/esm-app/custom-noop-hooks.mjs b/integration-tests/appsec/esm-app/custom-noop-hooks.mjs index 9641f541057..0f367ba4c01 100644 --- a/integration-tests/appsec/esm-app/custom-noop-hooks.mjs +++ b/integration-tests/appsec/esm-app/custom-noop-hooks.mjs @@ -1,5 +1,3 @@ -'use strict' - function dummyOperation (a) { return a + 'should have ' + 'dummy operation to be rewritten' + ' without crashing' } diff --git a/integration-tests/appsec/esm-app/index.mjs b/integration-tests/appsec/esm-app/index.mjs index e0285273f99..504e71d1c20 100644 --- a/integration-tests/appsec/esm-app/index.mjs +++ b/integration-tests/appsec/esm-app/index.mjs @@ -1,4 +1,4 @@ -'use strict' +/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['module.register'] }] */ import childProcess from 'node:child_process' import express from 'express' diff --git a/integration-tests/appsec/esm-app/worker-dep.mjs b/integration-tests/appsec/esm-app/worker-dep.mjs index 5b967fff099..eed83bdfc5a 100644 --- a/integration-tests/appsec/esm-app/worker-dep.mjs +++ b/integration-tests/appsec/esm-app/worker-dep.mjs @@ -1,5 +1,3 @@ -'use strict' - function dummyOperation (a) { return a + 'dummy operation with concat in worker-dep' } diff --git a/integration-tests/appsec/esm-security-controls/index.mjs b/integration-tests/appsec/esm-security-controls/index.mjs index 382ea10985b..ce944602823 100644 --- a/integration-tests/appsec/esm-security-controls/index.mjs +++ b/integration-tests/appsec/esm-security-controls/index.mjs @@ -1,5 +1,3 @@ -'use strict' - import childProcess from 'node:child_process' import express from 'express' import { sanitize } from './sanitizer.mjs' diff --git a/integration-tests/appsec/esm-security-controls/sanitizer-default.mjs b/integration-tests/appsec/esm-security-controls/sanitizer-default.mjs index 6e580f450c5..eac6c9d94af 100644 --- a/integration-tests/appsec/esm-security-controls/sanitizer-default.mjs +++ b/integration-tests/appsec/esm-security-controls/sanitizer-default.mjs @@ -1,5 +1,3 @@ -'use strict' - function sanitizeDefault (input) { return input } diff --git a/integration-tests/appsec/esm-security-controls/sanitizer.mjs b/integration-tests/appsec/esm-security-controls/sanitizer.mjs index 4529126061d..6cc1047555a 100644 --- a/integration-tests/appsec/esm-security-controls/sanitizer.mjs +++ b/integration-tests/appsec/esm-security-controls/sanitizer.mjs @@ -1,5 +1,3 @@ -'use strict' - export function sanitize (input) { return input } diff --git a/integration-tests/appsec/esm-security-controls/validator.mjs b/integration-tests/appsec/esm-security-controls/validator.mjs index 3542aa8d17c..214e5c2c24c 100644 --- a/integration-tests/appsec/esm-security-controls/validator.mjs +++ b/integration-tests/appsec/esm-security-controls/validator.mjs @@ -1,5 +1,3 @@ -'use strict' - export function validate (input) { return true } diff --git a/integration-tests/ci-visibility-intake.js b/integration-tests/ci-visibility-intake.js index a5ab4e5c394..0f84d33181e 100644 --- a/integration-tests/ci-visibility-intake.js +++ b/integration-tests/ci-visibility-intake.js @@ -1,3 +1,5 @@ +'use strict' + const express = require('express') const bodyParser = require('body-parser') const msgpack = require('@msgpack/msgpack') diff --git a/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/logger.js b/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/logger.js index 5480f1ee574..2490746e554 100644 --- a/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/logger.js +++ b/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/logger.js @@ -1,3 +1,5 @@ +'use strict' + const { createLogger, format, transports } = require('winston') module.exports = createLogger({ diff --git a/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/steps.js b/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/steps.js index 2d1bdb4e906..90f3d25aa6e 100644 --- a/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/steps.js +++ b/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/steps.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') const { When, Then } = require('@cucumber/cucumber') diff --git a/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/sum.js b/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/sum.js index cce61142972..f9836281a39 100644 --- a/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/sum.js +++ b/integration-tests/ci-visibility/automatic-log-submission-cucumber/support/sum.js @@ -1,3 +1,5 @@ +'use strict' + const logger = require('./logger') module.exports = function (a, b) { diff --git a/integration-tests/ci-visibility/automatic-log-submission-playwright/automatic-log-submission-test.js b/integration-tests/ci-visibility/automatic-log-submission-playwright/automatic-log-submission-test.js index 9152122c531..3f9cdcf15ab 100644 --- a/integration-tests/ci-visibility/automatic-log-submission-playwright/automatic-log-submission-test.js +++ b/integration-tests/ci-visibility/automatic-log-submission-playwright/automatic-log-submission-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') const logger = require('./logger') const sum = require('./sum') diff --git a/integration-tests/ci-visibility/automatic-log-submission-playwright/logger.js b/integration-tests/ci-visibility/automatic-log-submission-playwright/logger.js index 5480f1ee574..2490746e554 100644 --- a/integration-tests/ci-visibility/automatic-log-submission-playwright/logger.js +++ b/integration-tests/ci-visibility/automatic-log-submission-playwright/logger.js @@ -1,3 +1,5 @@ +'use strict' + const { createLogger, format, transports } = require('winston') module.exports = createLogger({ diff --git a/integration-tests/ci-visibility/automatic-log-submission-playwright/sum.js b/integration-tests/ci-visibility/automatic-log-submission-playwright/sum.js index cce61142972..f9836281a39 100644 --- a/integration-tests/ci-visibility/automatic-log-submission-playwright/sum.js +++ b/integration-tests/ci-visibility/automatic-log-submission-playwright/sum.js @@ -1,3 +1,5 @@ +'use strict' + const logger = require('./logger') module.exports = function (a, b) { diff --git a/integration-tests/ci-visibility/automatic-log-submission/automatic-log-submission-test.js b/integration-tests/ci-visibility/automatic-log-submission/automatic-log-submission-test.js index cfc60b8d3b0..6a557c46119 100644 --- a/integration-tests/ci-visibility/automatic-log-submission/automatic-log-submission-test.js +++ b/integration-tests/ci-visibility/automatic-log-submission/automatic-log-submission-test.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') const logger = require('./logger') diff --git a/integration-tests/ci-visibility/automatic-log-submission/config-jest.js b/integration-tests/ci-visibility/automatic-log-submission/config-jest.js index 56afa0d36db..453408298ea 100644 --- a/integration-tests/ci-visibility/automatic-log-submission/config-jest.js +++ b/integration-tests/ci-visibility/automatic-log-submission/config-jest.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = { projects: [], testPathIgnorePatterns: ['/node_modules/'], diff --git a/integration-tests/ci-visibility/automatic-log-submission/logger.js b/integration-tests/ci-visibility/automatic-log-submission/logger.js index 5480f1ee574..2490746e554 100644 --- a/integration-tests/ci-visibility/automatic-log-submission/logger.js +++ b/integration-tests/ci-visibility/automatic-log-submission/logger.js @@ -1,3 +1,5 @@ +'use strict' + const { createLogger, format, transports } = require('winston') module.exports = createLogger({ diff --git a/integration-tests/ci-visibility/automatic-log-submission/sum.js b/integration-tests/ci-visibility/automatic-log-submission/sum.js index cce61142972..f9836281a39 100644 --- a/integration-tests/ci-visibility/automatic-log-submission/sum.js +++ b/integration-tests/ci-visibility/automatic-log-submission/sum.js @@ -1,3 +1,5 @@ +'use strict' + const logger = require('./logger') module.exports = function (a, b) { diff --git a/integration-tests/ci-visibility/dynamic-instrumentation/dependency.js b/integration-tests/ci-visibility/dynamic-instrumentation/dependency.js index b53ebf22f97..5a564174560 100644 --- a/integration-tests/ci-visibility/dynamic-instrumentation/dependency.js +++ b/integration-tests/ci-visibility/dynamic-instrumentation/dependency.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = function (a, b) { const localVariable = 2 if (a > 10) { diff --git a/integration-tests/ci-visibility/dynamic-instrumentation/test-hit-breakpoint.js b/integration-tests/ci-visibility/dynamic-instrumentation/test-hit-breakpoint.js index 7b317b7f249..ec6a043a1b9 100644 --- a/integration-tests/ci-visibility/dynamic-instrumentation/test-hit-breakpoint.js +++ b/integration-tests/ci-visibility/dynamic-instrumentation/test-hit-breakpoint.js @@ -1,3 +1,5 @@ +'use strict' + const sum = require('./dependency') const { expect } = require('chai') diff --git a/integration-tests/ci-visibility/dynamic-instrumentation/test-not-hit-breakpoint.js b/integration-tests/ci-visibility/dynamic-instrumentation/test-not-hit-breakpoint.js index ff652d88673..04591f0050b 100644 --- a/integration-tests/ci-visibility/dynamic-instrumentation/test-not-hit-breakpoint.js +++ b/integration-tests/ci-visibility/dynamic-instrumentation/test-not-hit-breakpoint.js @@ -1,3 +1,5 @@ +'use strict' + const sum = require('./dependency') const { expect } = require('chai') diff --git a/integration-tests/ci-visibility/features-di/support/steps.js b/integration-tests/ci-visibility/features-di/support/steps.js index 00880f83467..a488786c0b4 100644 --- a/integration-tests/ci-visibility/features-di/support/steps.js +++ b/integration-tests/ci-visibility/features-di/support/steps.js @@ -1,3 +1,5 @@ +'use strict' + const assert = require('assert') const { When, Then } = require('@cucumber/cucumber') const sum = require('./sum') diff --git a/integration-tests/ci-visibility/features-di/support/sum.js b/integration-tests/ci-visibility/features-di/support/sum.js index cb1d7adb951..9c6536232cb 100644 --- a/integration-tests/ci-visibility/features-di/support/sum.js +++ b/integration-tests/ci-visibility/features-di/support/sum.js @@ -1,3 +1,5 @@ +'use strict' + function funSum (a, b) { const localVariable = 2 if (a > 10) { diff --git a/integration-tests/ci-visibility/features-flaky/support/steps.js b/integration-tests/ci-visibility/features-flaky/support/steps.js index 2e4a335cfb7..0f93352c1e6 100644 --- a/integration-tests/ci-visibility/features-flaky/support/steps.js +++ b/integration-tests/ci-visibility/features-flaky/support/steps.js @@ -1,3 +1,5 @@ +'use strict' + const assert = require('assert') const { When, Then } = require('@cucumber/cucumber') diff --git a/integration-tests/ci-visibility/features-impacted-test/support/steps.js b/integration-tests/ci-visibility/features-impacted-test/support/steps.js index 182284616c6..1c5acdda063 100644 --- a/integration-tests/ci-visibility/features-impacted-test/support/steps.js +++ b/integration-tests/ci-visibility/features-impacted-test/support/steps.js @@ -1,3 +1,5 @@ +'use strict' + const assert = require('assert') const { When, Then } = require('@cucumber/cucumber') diff --git a/integration-tests/ci-visibility/features-retry/support/steps.js b/integration-tests/ci-visibility/features-retry/support/steps.js index 50da213fb75..04331c1acdd 100644 --- a/integration-tests/ci-visibility/features-retry/support/steps.js +++ b/integration-tests/ci-visibility/features-retry/support/steps.js @@ -1,3 +1,5 @@ +'use strict' + const assert = require('assert') const { When, Then } = require('@cucumber/cucumber') diff --git a/integration-tests/ci-visibility/features-selenium/support/steps.js b/integration-tests/ci-visibility/features-selenium/support/steps.js index 307c947189f..2e2052cdc72 100644 --- a/integration-tests/ci-visibility/features-selenium/support/steps.js +++ b/integration-tests/ci-visibility/features-selenium/support/steps.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') const { By, Builder } = require('selenium-webdriver') const chrome = require('selenium-webdriver/chrome') diff --git a/integration-tests/ci-visibility/features-test-management/support/steps.js b/integration-tests/ci-visibility/features-test-management/support/steps.js index 67a2ed51361..0b80cddcf8a 100644 --- a/integration-tests/ci-visibility/features-test-management/support/steps.js +++ b/integration-tests/ci-visibility/features-test-management/support/steps.js @@ -1,3 +1,5 @@ +'use strict' + const assert = require('assert') const { When, Then } = require('@cucumber/cucumber') diff --git a/integration-tests/ci-visibility/features/support/steps.js b/integration-tests/ci-visibility/features/support/steps.js index 23320b6ed46..889b88632b5 100644 --- a/integration-tests/ci-visibility/features/support/steps.js +++ b/integration-tests/ci-visibility/features/support/steps.js @@ -1,3 +1,5 @@ +'use strict' + const assert = require('assert') const { When, Then, Before, After } = require('@cucumber/cucumber') const tracer = require('dd-trace') diff --git a/integration-tests/ci-visibility/jest-flaky/flaky-fails.js b/integration-tests/ci-visibility/jest-flaky/flaky-fails.js index 2717720f364..63bc4640188 100644 --- a/integration-tests/ci-visibility/jest-flaky/flaky-fails.js +++ b/integration-tests/ci-visibility/jest-flaky/flaky-fails.js @@ -1,3 +1,5 @@ +'use strict' + describe('test-flaky-test-retries', () => { it('can retry failed tests', () => { expect(1).toEqual(2) diff --git a/integration-tests/ci-visibility/jest-flaky/flaky-passes.js b/integration-tests/ci-visibility/jest-flaky/flaky-passes.js index 31e43b9a78f..e00c0c61762 100644 --- a/integration-tests/ci-visibility/jest-flaky/flaky-passes.js +++ b/integration-tests/ci-visibility/jest-flaky/flaky-passes.js @@ -1,3 +1,5 @@ +'use strict' + let counter = 0 describe('test-flaky-test-retries', () => { diff --git a/integration-tests/ci-visibility/jest/failing-test.js b/integration-tests/ci-visibility/jest/failing-test.js index 9acd66538de..9a9201fe1f7 100644 --- a/integration-tests/ci-visibility/jest/failing-test.js +++ b/integration-tests/ci-visibility/jest/failing-test.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('failing', () => { diff --git a/integration-tests/ci-visibility/jest/mocked-test.js b/integration-tests/ci-visibility/jest/mocked-test.js index f320779e33a..95af183a1b4 100644 --- a/integration-tests/ci-visibility/jest/mocked-test.js +++ b/integration-tests/ci-visibility/jest/mocked-test.js @@ -1,3 +1,5 @@ +'use strict' + // eslint-disable-next-line no-undef jest.mock('../test/sum.js') diff --git a/integration-tests/ci-visibility/jestEnvironmentBadInit.js b/integration-tests/ci-visibility/jestEnvironmentBadInit.js index 9915e4b7785..b442a905852 100644 --- a/integration-tests/ci-visibility/jestEnvironmentBadInit.js +++ b/integration-tests/ci-visibility/jestEnvironmentBadInit.js @@ -1,3 +1,5 @@ +'use strict' + require('dd-trace').init({ service: 'dd-trace-bad-init' }) diff --git a/integration-tests/ci-visibility/office-addin-mock/dependency.js b/integration-tests/ci-visibility/office-addin-mock/dependency.js index 363131a422a..227a43ededd 100644 --- a/integration-tests/ci-visibility/office-addin-mock/dependency.js +++ b/integration-tests/ci-visibility/office-addin-mock/dependency.js @@ -1,3 +1,5 @@ +'use strict' + require('office-addin-mock') function sum (a, b) { diff --git a/integration-tests/ci-visibility/office-addin-mock/test.js b/integration-tests/ci-visibility/office-addin-mock/test.js index 50a3b6c2e28..5d40e2fad6f 100644 --- a/integration-tests/ci-visibility/office-addin-mock/test.js +++ b/integration-tests/ci-visibility/office-addin-mock/test.js @@ -1,3 +1,5 @@ +'use strict' + const sum = require('./dependency') const { expect } = require('chai') diff --git a/integration-tests/ci-visibility/playwright-tests-active-test-span/active-test-span-custom-span-test.js b/integration-tests/ci-visibility/playwright-tests-active-test-span/active-test-span-custom-span-test.js index b2e667c0bf4..9b81c8a8a08 100644 --- a/integration-tests/ci-visibility/playwright-tests-active-test-span/active-test-span-custom-span-test.js +++ b/integration-tests/ci-visibility/playwright-tests-active-test-span/active-test-span-custom-span-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') const tracer = require('dd-trace') diff --git a/integration-tests/ci-visibility/playwright-tests-active-test-span/active-test-span-tags-test.js b/integration-tests/ci-visibility/playwright-tests-active-test-span/active-test-span-tags-test.js index 0a8d0e57469..e7424277e39 100644 --- a/integration-tests/ci-visibility/playwright-tests-active-test-span/active-test-span-tags-test.js +++ b/integration-tests/ci-visibility/playwright-tests-active-test-span/active-test-span-tags-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') const tracer = require('dd-trace') diff --git a/integration-tests/ci-visibility/playwright-tests-automatic-retry/automatic-retry-test.js b/integration-tests/ci-visibility/playwright-tests-automatic-retry/automatic-retry-test.js index ac0cc8e33c1..70e7a48255b 100644 --- a/integration-tests/ci-visibility/playwright-tests-automatic-retry/automatic-retry-test.js +++ b/integration-tests/ci-visibility/playwright-tests-automatic-retry/automatic-retry-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/playwright-tests-error/before-all-timeout-test.js b/integration-tests/ci-visibility/playwright-tests-error/before-all-timeout-test.js index 9736f2b801d..6c3265ca896 100644 --- a/integration-tests/ci-visibility/playwright-tests-error/before-all-timeout-test.js +++ b/integration-tests/ci-visibility/playwright-tests-error/before-all-timeout-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/playwright-tests-exit-code/exit-code-test.js b/integration-tests/ci-visibility/playwright-tests-exit-code/exit-code-test.js index a6a4f191af4..6888fce622e 100644 --- a/integration-tests/ci-visibility/playwright-tests-exit-code/exit-code-test.js +++ b/integration-tests/ci-visibility/playwright-tests-exit-code/exit-code-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') // eslint-disable-next-line no-unused-vars const dummy = require('dummy') // This should not exist, so should throw an error diff --git a/integration-tests/ci-visibility/playwright-tests-impacted-tests/impacted-test.js b/integration-tests/ci-visibility/playwright-tests-impacted-tests/impacted-test.js index bb8710de53c..c80a5ba643c 100644 --- a/integration-tests/ci-visibility/playwright-tests-impacted-tests/impacted-test.js +++ b/integration-tests/ci-visibility/playwright-tests-impacted-tests/impacted-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/playwright-tests-max-failures/failing-test-and-another-test.js b/integration-tests/ci-visibility/playwright-tests-max-failures/failing-test-and-another-test.js index 317b97f4175..fdff3ed9bbc 100644 --- a/integration-tests/ci-visibility/playwright-tests-max-failures/failing-test-and-another-test.js +++ b/integration-tests/ci-visibility/playwright-tests-max-failures/failing-test-and-another-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/playwright-tests-rum/active-test-span-rum-test.js b/integration-tests/ci-visibility/playwright-tests-rum/active-test-span-rum-test.js index 67d7250eb83..85bb5d11767 100644 --- a/integration-tests/ci-visibility/playwright-tests-rum/active-test-span-rum-test.js +++ b/integration-tests/ci-visibility/playwright-tests-rum/active-test-span-rum-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/playwright-tests-test-capabilities/passing-test.js b/integration-tests/ci-visibility/playwright-tests-test-capabilities/passing-test.js index 736db3aeb1c..d9e88e19ecf 100644 --- a/integration-tests/ci-visibility/playwright-tests-test-capabilities/passing-test.js +++ b/integration-tests/ci-visibility/playwright-tests-test-capabilities/passing-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/playwright-tests-test-management/attempt-to-fix-test.js b/integration-tests/ci-visibility/playwright-tests-test-management/attempt-to-fix-test.js index f235d10f549..a5b1148573b 100644 --- a/integration-tests/ci-visibility/playwright-tests-test-management/attempt-to-fix-test.js +++ b/integration-tests/ci-visibility/playwright-tests-test-management/attempt-to-fix-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/playwright-tests-test-management/disabled-test.js b/integration-tests/ci-visibility/playwright-tests-test-management/disabled-test.js index f4dde8335a2..46409b33b7c 100644 --- a/integration-tests/ci-visibility/playwright-tests-test-management/disabled-test.js +++ b/integration-tests/ci-visibility/playwright-tests-test-management/disabled-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/playwright-tests-test-management/quarantine-test.js b/integration-tests/ci-visibility/playwright-tests-test-management/quarantine-test.js index 69287e98ecb..4a4da88e205 100644 --- a/integration-tests/ci-visibility/playwright-tests-test-management/quarantine-test.js +++ b/integration-tests/ci-visibility/playwright-tests-test-management/quarantine-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/playwright-tests/landing-page-test.js b/integration-tests/ci-visibility/playwright-tests/landing-page-test.js index 5115ee7939f..b4b342513ce 100644 --- a/integration-tests/ci-visibility/playwright-tests/landing-page-test.js +++ b/integration-tests/ci-visibility/playwright-tests/landing-page-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') const tracer = require('dd-trace') diff --git a/integration-tests/ci-visibility/playwright-tests/skipped-suite-test.js b/integration-tests/ci-visibility/playwright-tests/skipped-suite-test.js index 6865cb4cd39..d15d798f60c 100644 --- a/integration-tests/ci-visibility/playwright-tests/skipped-suite-test.js +++ b/integration-tests/ci-visibility/playwright-tests/skipped-suite-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/playwright-tests/todo-list-page-test.js b/integration-tests/ci-visibility/playwright-tests/todo-list-page-test.js index 6a002cab86c..e53fadb416e 100644 --- a/integration-tests/ci-visibility/playwright-tests/todo-list-page-test.js +++ b/integration-tests/ci-visibility/playwright-tests/todo-list-page-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/run-jest-bad-init.js b/integration-tests/ci-visibility/run-jest-bad-init.js index 8917ef833bd..f9251aca38e 100644 --- a/integration-tests/ci-visibility/run-jest-bad-init.js +++ b/integration-tests/ci-visibility/run-jest-bad-init.js @@ -1,3 +1,5 @@ +'use strict' + const jest = require('jest') const options = { diff --git a/integration-tests/ci-visibility/run-jest.js b/integration-tests/ci-visibility/run-jest.js index 9e644bc374a..a7f8054b720 100644 --- a/integration-tests/ci-visibility/run-jest.js +++ b/integration-tests/ci-visibility/run-jest.js @@ -1,3 +1,5 @@ +'use strict' + const jest = require('jest') const options = { diff --git a/integration-tests/ci-visibility/run-mocha.js b/integration-tests/ci-visibility/run-mocha.js index 19d009ca9a2..37111d3c3f4 100644 --- a/integration-tests/ci-visibility/run-mocha.js +++ b/integration-tests/ci-visibility/run-mocha.js @@ -1,3 +1,5 @@ +'use strict' + const Mocha = require('mocha') const mocha = new Mocha({ diff --git a/integration-tests/ci-visibility/run-workerpool.js b/integration-tests/ci-visibility/run-workerpool.js index 4ab60a1fc0c..0c00fb66050 100644 --- a/integration-tests/ci-visibility/run-workerpool.js +++ b/integration-tests/ci-visibility/run-workerpool.js @@ -1,3 +1,5 @@ +'use strict' + const workerpool = require('workerpool') const pool = workerpool.pool({ workerType: 'process' }) diff --git a/integration-tests/ci-visibility/sharding-test/sharding-test-1.js b/integration-tests/ci-visibility/sharding-test/sharding-test-1.js index a336f30caca..0a26a920193 100644 --- a/integration-tests/ci-visibility/sharding-test/sharding-test-1.js +++ b/integration-tests/ci-visibility/sharding-test/sharding-test-1.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('sharding test 1', () => { diff --git a/integration-tests/ci-visibility/sharding-test/sharding-test-2.js b/integration-tests/ci-visibility/sharding-test/sharding-test-2.js index 670ad7dc6ba..2381beb5939 100644 --- a/integration-tests/ci-visibility/sharding-test/sharding-test-2.js +++ b/integration-tests/ci-visibility/sharding-test/sharding-test-2.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('sharding test 2', () => { diff --git a/integration-tests/ci-visibility/sharding-test/sharding-test-3.js b/integration-tests/ci-visibility/sharding-test/sharding-test-3.js index ee67ff25c8c..60757fa3df9 100644 --- a/integration-tests/ci-visibility/sharding-test/sharding-test-3.js +++ b/integration-tests/ci-visibility/sharding-test/sharding-test-3.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('sharding test 3', () => { diff --git a/integration-tests/ci-visibility/sharding-test/sharding-test-4.js b/integration-tests/ci-visibility/sharding-test/sharding-test-4.js index 4fd0add71d4..90330b62a74 100644 --- a/integration-tests/ci-visibility/sharding-test/sharding-test-4.js +++ b/integration-tests/ci-visibility/sharding-test/sharding-test-4.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('sharding test 4', () => { diff --git a/integration-tests/ci-visibility/sharding-test/sharding-test-5.js b/integration-tests/ci-visibility/sharding-test/sharding-test-5.js index a13a2354eae..4b56d06cd79 100644 --- a/integration-tests/ci-visibility/sharding-test/sharding-test-5.js +++ b/integration-tests/ci-visibility/sharding-test/sharding-test-5.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('sharding test 5', () => { diff --git a/integration-tests/ci-visibility/subproject/cypress.config.js b/integration-tests/ci-visibility/subproject/cypress.config.js index 9a786e4ef75..7b9383ea40d 100644 --- a/integration-tests/ci-visibility/subproject/cypress.config.js +++ b/integration-tests/ci-visibility/subproject/cypress.config.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = { defaultCommandTimeout: 100, e2e: { diff --git a/integration-tests/ci-visibility/subproject/cypress/plugins-old/index.js b/integration-tests/ci-visibility/subproject/cypress/plugins-old/index.js index f80695694a9..2f6ed52ee52 100644 --- a/integration-tests/ci-visibility/subproject/cypress/plugins-old/index.js +++ b/integration-tests/ci-visibility/subproject/cypress/plugins-old/index.js @@ -1 +1,3 @@ +'use strict' + module.exports = require('dd-trace/ci/cypress/plugin') diff --git a/integration-tests/ci-visibility/subproject/cypress/support/e2e.js b/integration-tests/ci-visibility/subproject/cypress/support/e2e.js index 26fdad7588a..78bc2b9dc57 100644 --- a/integration-tests/ci-visibility/subproject/cypress/support/e2e.js +++ b/integration-tests/ci-visibility/subproject/cypress/support/e2e.js @@ -1 +1,3 @@ +'use strict' + require('dd-trace/ci/cypress/support') diff --git a/integration-tests/ci-visibility/subproject/dependency.js b/integration-tests/ci-visibility/subproject/dependency.js index 2012896b44c..86d4a1c94ef 100644 --- a/integration-tests/ci-visibility/subproject/dependency.js +++ b/integration-tests/ci-visibility/subproject/dependency.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = function (a, b) { return a + b } diff --git a/integration-tests/ci-visibility/subproject/features/support/steps.js b/integration-tests/ci-visibility/subproject/features/support/steps.js index 6a946067ca9..bff74e09dbd 100644 --- a/integration-tests/ci-visibility/subproject/features/support/steps.js +++ b/integration-tests/ci-visibility/subproject/features/support/steps.js @@ -1,3 +1,5 @@ +'use strict' + const assert = require('assert') const { When, Then } = require('@cucumber/cucumber') class Greeter { diff --git a/integration-tests/ci-visibility/subproject/package.json b/integration-tests/ci-visibility/subproject/package.json index dc1d9050f8e..c3fded33440 100644 --- a/integration-tests/ci-visibility/subproject/package.json +++ b/integration-tests/ci-visibility/subproject/package.json @@ -2,5 +2,8 @@ "name": "subproject", "private": true, "version": "1.0.0", - "description": "app within repo" + "description": "app within repo", + "dependencies": { + "dd-trace": "file:../../.." + } } diff --git a/integration-tests/ci-visibility/subproject/playwright-tests/landing-page-test.js b/integration-tests/ci-visibility/subproject/playwright-tests/landing-page-test.js index 34e6eb2c3aa..a6728facade 100644 --- a/integration-tests/ci-visibility/subproject/playwright-tests/landing-page-test.js +++ b/integration-tests/ci-visibility/subproject/playwright-tests/landing-page-test.js @@ -1,3 +1,5 @@ +'use strict' + const { test, expect } = require('@playwright/test') test.beforeEach(async ({ page }) => { diff --git a/integration-tests/ci-visibility/subproject/playwright.config.js b/integration-tests/ci-visibility/subproject/playwright.config.js index 3be77049e3b..c5bf661511a 100644 --- a/integration-tests/ci-visibility/subproject/playwright.config.js +++ b/integration-tests/ci-visibility/subproject/playwright.config.js @@ -1,3 +1,5 @@ +'use strict' + // Playwright config file for integration tests const { devices } = require('@playwright/test') diff --git a/integration-tests/ci-visibility/subproject/subproject-test.js b/integration-tests/ci-visibility/subproject/subproject-test.js index 1545789c108..021028a4dbb 100644 --- a/integration-tests/ci-visibility/subproject/subproject-test.js +++ b/integration-tests/ci-visibility/subproject/subproject-test.js @@ -1,3 +1,7 @@ +'use strict' + +// TODO: It shouldn't be necessary to disable n/no-extraneous-require - Research +// eslint-disable-next-line n/no-extraneous-require const { expect } = require('chai') const dependency = require('./dependency') diff --git a/integration-tests/ci-visibility/test-custom-tags/custom-tags.js b/integration-tests/ci-visibility/test-custom-tags/custom-tags.js index dbc4ae5d5b4..c6a7d1a5bc7 100644 --- a/integration-tests/ci-visibility/test-custom-tags/custom-tags.js +++ b/integration-tests/ci-visibility/test-custom-tags/custom-tags.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') const sum = require('../test/sum') const tracer = require('dd-trace') diff --git a/integration-tests/ci-visibility/test-early-flake-detection/jest-snapshot.js b/integration-tests/ci-visibility/test-early-flake-detection/jest-snapshot.js index 15fadb1601e..b0e3078ba6f 100644 --- a/integration-tests/ci-visibility/test-early-flake-detection/jest-snapshot.js +++ b/integration-tests/ci-visibility/test-early-flake-detection/jest-snapshot.js @@ -1,3 +1,5 @@ +'use strict' + describe('test', () => { it('can do snapshot', () => { expect(1 + 2).toMatchSnapshot() diff --git a/integration-tests/ci-visibility/test-early-flake-detection/mocha-parameterized.js b/integration-tests/ci-visibility/test-early-flake-detection/mocha-parameterized.js index b286dfeb359..ed9f2c34a38 100644 --- a/integration-tests/ci-visibility/test-early-flake-detection/mocha-parameterized.js +++ b/integration-tests/ci-visibility/test-early-flake-detection/mocha-parameterized.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') const forEach = require('mocha-each') diff --git a/integration-tests/ci-visibility/test-early-flake-detection/occasionally-failing-test.js b/integration-tests/ci-visibility/test-early-flake-detection/occasionally-failing-test.js index 22b6d91935b..e444b98034a 100644 --- a/integration-tests/ci-visibility/test-early-flake-detection/occasionally-failing-test.js +++ b/integration-tests/ci-visibility/test-early-flake-detection/occasionally-failing-test.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') let globalCounter = 0 diff --git a/integration-tests/ci-visibility/test-early-flake-detection/skipped-and-todo-test.js b/integration-tests/ci-visibility/test-early-flake-detection/skipped-and-todo-test.js index b778a31711e..de339a65ae3 100644 --- a/integration-tests/ci-visibility/test-early-flake-detection/skipped-and-todo-test.js +++ b/integration-tests/ci-visibility/test-early-flake-detection/skipped-and-todo-test.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('ci visibility', () => { diff --git a/integration-tests/ci-visibility/test-early-flake-detection/test-parameterized.js b/integration-tests/ci-visibility/test-early-flake-detection/test-parameterized.js index 8ff884c6c28..0c95a1a57b3 100644 --- a/integration-tests/ci-visibility/test-early-flake-detection/test-parameterized.js +++ b/integration-tests/ci-visibility/test-early-flake-detection/test-parameterized.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('parameterized', () => { diff --git a/integration-tests/ci-visibility/test-early-flake-detection/test.js b/integration-tests/ci-visibility/test-early-flake-detection/test.js index e3306f69374..3a708c06b8f 100644 --- a/integration-tests/ci-visibility/test-early-flake-detection/test.js +++ b/integration-tests/ci-visibility/test-early-flake-detection/test.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('ci visibility', () => { diff --git a/integration-tests/ci-visibility/test-early-flake-detection/weird-test-names.js b/integration-tests/ci-visibility/test-early-flake-detection/weird-test-names.js index 60b30a65fb0..755dff5c50d 100644 --- a/integration-tests/ci-visibility/test-early-flake-detection/weird-test-names.js +++ b/integration-tests/ci-visibility/test-early-flake-detection/weird-test-names.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') it('no describe can do stuff', () => { diff --git a/integration-tests/ci-visibility/test-flaky-test-retries/eventually-passing-test.js b/integration-tests/ci-visibility/test-flaky-test-retries/eventually-passing-test.js index de08821128d..e4c3b90f2e1 100644 --- a/integration-tests/ci-visibility/test-flaky-test-retries/eventually-passing-test.js +++ b/integration-tests/ci-visibility/test-flaky-test-retries/eventually-passing-test.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') let counter = 0 diff --git a/integration-tests/ci-visibility/test-impacted-test/test-impacted-1.js b/integration-tests/ci-visibility/test-impacted-test/test-impacted-1.js index 086759f6178..5a696c4f0cb 100644 --- a/integration-tests/ci-visibility/test-impacted-test/test-impacted-1.js +++ b/integration-tests/ci-visibility/test-impacted-test/test-impacted-1.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('impacted tests', () => { diff --git a/integration-tests/ci-visibility/test-impacted-test/test-impacted-2.js b/integration-tests/ci-visibility/test-impacted-test/test-impacted-2.js index 6a226f1131e..aadc8ae4272 100644 --- a/integration-tests/ci-visibility/test-impacted-test/test-impacted-2.js +++ b/integration-tests/ci-visibility/test-impacted-test/test-impacted-2.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('impacted tests 2', () => { diff --git a/integration-tests/ci-visibility/test-management/test-attempt-to-fix-1.js b/integration-tests/ci-visibility/test-management/test-attempt-to-fix-1.js index be05f47fd50..f6f1d0585da 100644 --- a/integration-tests/ci-visibility/test-management/test-attempt-to-fix-1.js +++ b/integration-tests/ci-visibility/test-management/test-attempt-to-fix-1.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') let numAttempts = 0 diff --git a/integration-tests/ci-visibility/test-management/test-attempt-to-fix-2.js b/integration-tests/ci-visibility/test-management/test-attempt-to-fix-2.js index 053d1d62eb0..cb3a60f8ade 100644 --- a/integration-tests/ci-visibility/test-management/test-attempt-to-fix-2.js +++ b/integration-tests/ci-visibility/test-management/test-attempt-to-fix-2.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('attempt to fix tests 2', () => { diff --git a/integration-tests/ci-visibility/test-management/test-disabled-1.js b/integration-tests/ci-visibility/test-management/test-disabled-1.js index c3483031ec8..6a0dc33232f 100644 --- a/integration-tests/ci-visibility/test-management/test-disabled-1.js +++ b/integration-tests/ci-visibility/test-management/test-disabled-1.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('disable tests', () => { diff --git a/integration-tests/ci-visibility/test-management/test-disabled-2.js b/integration-tests/ci-visibility/test-management/test-disabled-2.js index d47525c555b..7435a1d2b10 100644 --- a/integration-tests/ci-visibility/test-management/test-disabled-2.js +++ b/integration-tests/ci-visibility/test-management/test-disabled-2.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('disable tests 2', () => { diff --git a/integration-tests/ci-visibility/test-management/test-quarantine-1.js b/integration-tests/ci-visibility/test-management/test-quarantine-1.js index 71733e2af1c..2ad8a7963e7 100644 --- a/integration-tests/ci-visibility/test-management/test-quarantine-1.js +++ b/integration-tests/ci-visibility/test-management/test-quarantine-1.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('quarantine tests', () => { diff --git a/integration-tests/ci-visibility/test-management/test-quarantine-2.js b/integration-tests/ci-visibility/test-management/test-quarantine-2.js index f94386f1b87..8d3816454d0 100644 --- a/integration-tests/ci-visibility/test-management/test-quarantine-2.js +++ b/integration-tests/ci-visibility/test-management/test-quarantine-2.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('quarantine tests 2', () => { diff --git a/integration-tests/ci-visibility/test-nested-hooks/test-nested-hooks.js b/integration-tests/ci-visibility/test-nested-hooks/test-nested-hooks.js index 3e270592b73..89d1b969e31 100644 --- a/integration-tests/ci-visibility/test-nested-hooks/test-nested-hooks.js +++ b/integration-tests/ci-visibility/test-nested-hooks/test-nested-hooks.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') let globalAttempts = 0 diff --git a/integration-tests/ci-visibility/test-parsing-error/parsing-error-2.js b/integration-tests/ci-visibility/test-parsing-error/parsing-error-2.js index 81286c0ee5d..bb43f645de4 100644 --- a/integration-tests/ci-visibility/test-parsing-error/parsing-error-2.js +++ b/integration-tests/ci-visibility/test-parsing-error/parsing-error-2.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chao') describe('test-parsing-error-2', () => { diff --git a/integration-tests/ci-visibility/test-parsing-error/parsing-error.js b/integration-tests/ci-visibility/test-parsing-error/parsing-error.js index e6d9108a9ea..9ede9a25a37 100644 --- a/integration-tests/ci-visibility/test-parsing-error/parsing-error.js +++ b/integration-tests/ci-visibility/test-parsing-error/parsing-error.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chao') describe('test-parsing-error', () => { diff --git a/integration-tests/ci-visibility/test-total-code-coverage/test-run.js b/integration-tests/ci-visibility/test-total-code-coverage/test-run.js index 2256f75f069..6b6d2b5a4eb 100644 --- a/integration-tests/ci-visibility/test-total-code-coverage/test-run.js +++ b/integration-tests/ci-visibility/test-total-code-coverage/test-run.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') const sum = require('./used-dependency') diff --git a/integration-tests/ci-visibility/test-total-code-coverage/test-skipped.js b/integration-tests/ci-visibility/test-total-code-coverage/test-skipped.js index 1410740bfa3..3367eab54e0 100644 --- a/integration-tests/ci-visibility/test-total-code-coverage/test-skipped.js +++ b/integration-tests/ci-visibility/test-total-code-coverage/test-skipped.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') const sum = require('./unused-dependency') diff --git a/integration-tests/ci-visibility/test-total-code-coverage/unused-dependency.js b/integration-tests/ci-visibility/test-total-code-coverage/unused-dependency.js index 2012896b44c..86d4a1c94ef 100644 --- a/integration-tests/ci-visibility/test-total-code-coverage/unused-dependency.js +++ b/integration-tests/ci-visibility/test-total-code-coverage/unused-dependency.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = function (a, b) { return a + b } diff --git a/integration-tests/ci-visibility/test-total-code-coverage/used-dependency.js b/integration-tests/ci-visibility/test-total-code-coverage/used-dependency.js index 2012896b44c..86d4a1c94ef 100644 --- a/integration-tests/ci-visibility/test-total-code-coverage/used-dependency.js +++ b/integration-tests/ci-visibility/test-total-code-coverage/used-dependency.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = function (a, b) { return a + b } diff --git a/integration-tests/ci-visibility/test/ci-visibility-test-2.js b/integration-tests/ci-visibility/test/ci-visibility-test-2.js index 58316835b52..f6edf100993 100644 --- a/integration-tests/ci-visibility/test/ci-visibility-test-2.js +++ b/integration-tests/ci-visibility/test/ci-visibility-test-2.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') const sum = require('./sum') diff --git a/integration-tests/ci-visibility/test/ci-visibility-test.js b/integration-tests/ci-visibility/test/ci-visibility-test.js index 11713ffaf86..9ce350498f9 100644 --- a/integration-tests/ci-visibility/test/ci-visibility-test.js +++ b/integration-tests/ci-visibility/test/ci-visibility-test.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') const sum = require('./sum') diff --git a/integration-tests/ci-visibility/test/fail-test.js b/integration-tests/ci-visibility/test/fail-test.js index efca6e21432..c6be99aa6f3 100644 --- a/integration-tests/ci-visibility/test/fail-test.js +++ b/integration-tests/ci-visibility/test/fail-test.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('fail', () => { diff --git a/integration-tests/ci-visibility/test/selenium-no-framework.js b/integration-tests/ci-visibility/test/selenium-no-framework.js index cca24586bfd..a99e081fec4 100644 --- a/integration-tests/ci-visibility/test/selenium-no-framework.js +++ b/integration-tests/ci-visibility/test/selenium-no-framework.js @@ -1,3 +1,5 @@ +'use strict' + const { By, Builder } = require('selenium-webdriver') const chrome = require('selenium-webdriver/chrome') diff --git a/integration-tests/ci-visibility/test/selenium-test.js b/integration-tests/ci-visibility/test/selenium-test.js index 71260f8da95..45a2bf00432 100644 --- a/integration-tests/ci-visibility/test/selenium-test.js +++ b/integration-tests/ci-visibility/test/selenium-test.js @@ -1,3 +1,5 @@ +'use strict' + const { By, Builder } = require('selenium-webdriver') const chrome = require('selenium-webdriver/chrome') const { expect } = require('chai') diff --git a/integration-tests/ci-visibility/test/sum.js b/integration-tests/ci-visibility/test/sum.js index 2012896b44c..86d4a1c94ef 100644 --- a/integration-tests/ci-visibility/test/sum.js +++ b/integration-tests/ci-visibility/test/sum.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = function (a, b) { return a + b } diff --git a/integration-tests/ci-visibility/unskippable-test/test-to-run.js b/integration-tests/ci-visibility/unskippable-test/test-to-run.js index f093d1e39ed..40326d2276a 100644 --- a/integration-tests/ci-visibility/unskippable-test/test-to-run.js +++ b/integration-tests/ci-visibility/unskippable-test/test-to-run.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('test-to-run', () => { diff --git a/integration-tests/ci-visibility/unskippable-test/test-to-skip.js b/integration-tests/ci-visibility/unskippable-test/test-to-skip.js index 74655c102ae..54223246967 100644 --- a/integration-tests/ci-visibility/unskippable-test/test-to-skip.js +++ b/integration-tests/ci-visibility/unskippable-test/test-to-skip.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('test-to-skip', () => { diff --git a/integration-tests/ci-visibility/unskippable-test/test-unskippable.js b/integration-tests/ci-visibility/unskippable-test/test-unskippable.js index 6530097c7d4..a0b0d303340 100644 --- a/integration-tests/ci-visibility/unskippable-test/test-unskippable.js +++ b/integration-tests/ci-visibility/unskippable-test/test-unskippable.js @@ -1,6 +1,7 @@ /** * @datadog {"unskippable": true} */ +'use strict' const { expect } = require('chai') diff --git a/integration-tests/ci-visibility/web-app-server-with-redirect.js b/integration-tests/ci-visibility/web-app-server-with-redirect.js index 388aa1b4016..1860f62b6f5 100644 --- a/integration-tests/ci-visibility/web-app-server-with-redirect.js +++ b/integration-tests/ci-visibility/web-app-server-with-redirect.js @@ -1,3 +1,5 @@ +'use strict' + // File to spin an HTTP server that returns an HTML for playwright to visit const http = require('http') diff --git a/integration-tests/ci-visibility/web-app-server.js b/integration-tests/ci-visibility/web-app-server.js index 1cd5f81ef07..5b32e07121a 100644 --- a/integration-tests/ci-visibility/web-app-server.js +++ b/integration-tests/ci-visibility/web-app-server.js @@ -1,3 +1,5 @@ +'use strict' + // File to spin an HTTP server that returns an HTML for playwright to visit const http = require('http') const coverage = require('../ci-visibility/fixtures/coverage.json') diff --git a/integration-tests/config-jest-multiproject.js b/integration-tests/config-jest-multiproject.js index e06aec35930..90190430044 100644 --- a/integration-tests/config-jest-multiproject.js +++ b/integration-tests/config-jest-multiproject.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = { projects: [ { diff --git a/integration-tests/config-jest.js b/integration-tests/config-jest.js index f30aec0ad35..8d85aa43a8f 100644 --- a/integration-tests/config-jest.js +++ b/integration-tests/config-jest.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = { projects: process.env.PROJECTS ? JSON.parse(process.env.PROJECTS) : [__dirname], testPathIgnorePatterns: ['/node_modules/'], diff --git a/integration-tests/cucumber/cucumber.spec.js b/integration-tests/cucumber/cucumber.spec.js index 4b48e978ab7..ea1f9668afb 100644 --- a/integration-tests/cucumber/cucumber.spec.js +++ b/integration-tests/cucumber/cucumber.spec.js @@ -1743,7 +1743,7 @@ versions.forEach(version => { retriedTest.meta[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_FILE_SUFFIX}`] .endsWith('ci-visibility/features-di/support/sum.js') ) - assert.equal(retriedTest.metrics[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_LINE_SUFFIX}`], 4) + assert.equal(retriedTest.metrics[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_LINE_SUFFIX}`], 6) const snapshotIdKey = `${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_SNAPSHOT_ID_SUFFIX}` assert.exists(retriedTest.meta[snapshotIdKey]) @@ -1761,7 +1761,7 @@ versions.forEach(version => { level: 'error' }) assert.equal(diLog.debugger.snapshot.language, 'javascript') - assert.deepInclude(diLog.debugger.snapshot.captures.lines['4'].locals, { + assert.deepInclude(diLog.debugger.snapshot.captures.lines['6'].locals, { a: { type: 'number', value: '11' diff --git a/integration-tests/cypress.config.js b/integration-tests/cypress.config.js index 529980e298c..44437e49c0f 100644 --- a/integration-tests/cypress.config.js +++ b/integration-tests/cypress.config.js @@ -1,3 +1,5 @@ +'use strict' + const ddAfterRun = require('dd-trace/ci/cypress/after-run') const ddAfterSpec = require('dd-trace/ci/cypress/after-spec') const cypressFailFast = require('cypress-fail-fast/plugin') diff --git a/integration-tests/cypress/plugins-old/index.js b/integration-tests/cypress/plugins-old/index.js index 66de6be80fe..d4ff411dbc0 100644 --- a/integration-tests/cypress/plugins-old/index.js +++ b/integration-tests/cypress/plugins-old/index.js @@ -1,3 +1,5 @@ +'use strict' + const ddAfterRun = require('dd-trace/ci/cypress/after-run') const ddAfterSpec = require('dd-trace/ci/cypress/after-spec') diff --git a/integration-tests/debugger/source-map-support.spec.js b/integration-tests/debugger/source-map-support.spec.js index 4c6f2f0efe5..51ef099b19a 100644 --- a/integration-tests/debugger/source-map-support.spec.js +++ b/integration-tests/debugger/source-map-support.spec.js @@ -38,7 +38,7 @@ describe('Dynamic Instrumentation', function () { t.agent.on('debugger-input', ({ payload: [{ debugger: { snapshot: { probe: { location } } } }] }) => { assert.deepEqual(location, { file: 'target-app/source-map-support/minify.js', - lines: ['6'] + lines: ['8'] }) done() }) diff --git a/integration-tests/debugger/target-app/source-map-support/minify.js b/integration-tests/debugger/target-app/source-map-support/minify.js index a6ac62607f7..d9cca1ce2b6 100644 --- a/integration-tests/debugger/target-app/source-map-support/minify.js +++ b/integration-tests/debugger/target-app/source-map-support/minify.js @@ -1,3 +1,5 @@ +'use strict' + require('dd-trace/init') const { createServer } = require('node:http') diff --git a/integration-tests/debugger/target-app/source-map-support/minify.min.js b/integration-tests/debugger/target-app/source-map-support/minify.min.js index d50f262152e..7bb28d474b7 100644 --- a/integration-tests/debugger/target-app/source-map-support/minify.min.js +++ b/integration-tests/debugger/target-app/source-map-support/minify.min.js @@ -1,2 +1,2 @@ -require("dd-trace/init");const{createServer}=require("node:http");const server=createServer((req,res)=>{res.end("hello world")});server.listen(process.env.APP_PORT||0,()=>{process.send?.({port:server.address().port})}); +"use strict";require("dd-trace/init");const{createServer}=require("node:http");const server=createServer((req,res)=>{res.end("hello world")});server.listen(process.env.APP_PORT||0,()=>{process.send?.({port:server.address().port})}); //# sourceMappingURL=minify.min.js.map \ No newline at end of file diff --git a/integration-tests/debugger/target-app/source-map-support/minify.min.js.map b/integration-tests/debugger/target-app/source-map-support/minify.min.js.map index 00c4797001e..0c367242ae0 100644 --- a/integration-tests/debugger/target-app/source-map-support/minify.min.js.map +++ b/integration-tests/debugger/target-app/source-map-support/minify.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["integration-tests/debugger/target-app/source-map-support/minify.js"],"names":["require","createServer","server","req","res","end","listen","process","env","APP_PORT","send","port","address"],"mappings":"AAAAA,QAAQ,eAAe,EAEvB,KAAM,CAAEC,YAAa,EAAID,QAAQ,WAAW,EAE5C,MAAME,OAASD,aAAa,CAACE,IAAKC,OAChCA,IAAIC,IAAI,aAAa,CACvB,CAAC,EAEDH,OAAOI,OAAOC,QAAQC,IAAIC,UAAY,EAAG,KACvCF,QAAQG,OAAO,CAAEC,KAAMT,OAAOU,QAAQ,EAAED,IAAK,CAAC,CAChD,CAAC"} \ No newline at end of file +{"version":3,"sources":["integration-tests/debugger/target-app/source-map-support/minify.js"],"names":["require","createServer","server","req","res","end","listen","process","env","APP_PORT","send","port","address"],"mappings":"AAAA,aAEAA,QAAQ,eAAe,EAEvB,KAAM,CAAEC,YAAa,EAAID,QAAQ,WAAW,EAE5C,MAAME,OAASD,aAAa,CAACE,IAAKC,OAChCA,IAAIC,IAAI,aAAa,CACvB,CAAC,EAEDH,OAAOI,OAAOC,QAAQC,IAAIC,UAAY,EAAG,KACvCF,QAAQG,OAAO,CAAEC,KAAMT,OAAOU,QAAQ,EAAED,IAAK,CAAC,CAChD,CAAC"} \ No newline at end of file diff --git a/integration-tests/esbuild/aws-sdk.js b/integration-tests/esbuild/aws-sdk.js index c89f570689b..0f0f1383117 100644 --- a/integration-tests/esbuild/aws-sdk.js +++ b/integration-tests/esbuild/aws-sdk.js @@ -1,3 +1,5 @@ +'use strict' + require('../../').init() // dd-trace const aws = require('aws-sdk') diff --git a/integration-tests/esbuild/basic-test.js b/integration-tests/esbuild/basic-test.js index 5e95234eddf..4d8b34de672 100755 --- a/integration-tests/esbuild/basic-test.js +++ b/integration-tests/esbuild/basic-test.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +'use strict' const tracer = require('../../').init() // dd-trace diff --git a/integration-tests/esbuild/build-and-test-aws-sdk.js b/integration-tests/esbuild/build-and-test-aws-sdk.js index 3324c6b60fc..925459169f9 100755 --- a/integration-tests/esbuild/build-and-test-aws-sdk.js +++ b/integration-tests/esbuild/build-and-test-aws-sdk.js @@ -1,4 +1,6 @@ #!/usr/bin/env node +'use strict' + /* eslint-disable no-console */ const fs = require('fs') const { spawnSync } = require('child_process') diff --git a/integration-tests/esbuild/build-and-test-openai.js b/integration-tests/esbuild/build-and-test-openai.js index c0889b22e41..77a2fd3ca47 100644 --- a/integration-tests/esbuild/build-and-test-openai.js +++ b/integration-tests/esbuild/build-and-test-openai.js @@ -1,4 +1,6 @@ #!/usr/bin/env node +'use strict' + /* eslint-disable no-console */ const fs = require('fs') const { spawnSync } = require('child_process') diff --git a/integration-tests/esbuild/build-and-test-skip-external.js b/integration-tests/esbuild/build-and-test-skip-external.js index 659e8a0c6eb..0960e96d3f7 100755 --- a/integration-tests/esbuild/build-and-test-skip-external.js +++ b/integration-tests/esbuild/build-and-test-skip-external.js @@ -1,4 +1,6 @@ #!/usr/bin/env node +'use strict' + const fs = require('fs') const assert = require('assert') diff --git a/integration-tests/esbuild/build.esm.common-config.js b/integration-tests/esbuild/build.esm.common-config.js index 2b921f05380..6642c9eed93 100644 --- a/integration-tests/esbuild/build.esm.common-config.js +++ b/integration-tests/esbuild/build.esm.common-config.js @@ -1,4 +1,7 @@ +'use strict' + const ddPlugin = require('../../esbuild') + module.exports = { format: 'esm', entryPoints: ['basic-test.js'], diff --git a/integration-tests/esbuild/build.js b/integration-tests/esbuild/build.js index 60ba653548f..418d794f85f 100755 --- a/integration-tests/esbuild/build.js +++ b/integration-tests/esbuild/build.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +'use strict' const ddPlugin = require('../../esbuild') // dd-trace/esbuild const esbuild = require('esbuild') diff --git a/integration-tests/esbuild/complex-app.js b/integration-tests/esbuild/complex-app.js index 8f402cd4271..27592dd2f33 100755 --- a/integration-tests/esbuild/complex-app.js +++ b/integration-tests/esbuild/complex-app.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +'use strict' require('../../').init() // dd-trace const assert = require('assert') diff --git a/integration-tests/esbuild/index.spec.js b/integration-tests/esbuild/index.spec.js index 4a1dee5b788..01fe1e6cef1 100755 --- a/integration-tests/esbuild/index.spec.js +++ b/integration-tests/esbuild/index.spec.js @@ -7,6 +7,8 @@ const chproc = require('child_process') const path = require('path') const fs = require('fs') +// TODO: It shouldn't be necessary to disable n/no-extraneous-require - Research +// eslint-disable-next-line n/no-extraneous-require const { assert } = require('chai') const TEST_DIR = path.join(__dirname, '.') diff --git a/integration-tests/esbuild/openai.js b/integration-tests/esbuild/openai.js index d663cd3cd55..678d1963d35 100644 --- a/integration-tests/esbuild/openai.js +++ b/integration-tests/esbuild/openai.js @@ -1,2 +1,4 @@ +'use strict' + require('../../').init() require('openai') diff --git a/integration-tests/esbuild/skip-external.js b/integration-tests/esbuild/skip-external.js index 1381bd5beea..ece6d197bca 100644 --- a/integration-tests/esbuild/skip-external.js +++ b/integration-tests/esbuild/skip-external.js @@ -1,3 +1,5 @@ +'use strict' + require('../../').init() // dd-trace // this should be bundled diff --git a/integration-tests/graphql/index.js b/integration-tests/graphql/index.js index e1f16c470a7..4774473d20a 100644 --- a/integration-tests/graphql/index.js +++ b/integration-tests/graphql/index.js @@ -1,3 +1,5 @@ +'use strict' + const tracer = require('dd-trace') const path = require('path') diff --git a/integration-tests/init.spec.js b/integration-tests/init.spec.js index 43dd718fada..6435b96b3e4 100644 --- a/integration-tests/init.spec.js +++ b/integration-tests/init.spec.js @@ -1,3 +1,5 @@ +'use strict' + const semver = require('semver') const { runAndCheckWithTelemetry: testFile, diff --git a/integration-tests/init/instrument.js b/integration-tests/init/instrument.js index b1114e6237b..3e5ea87d56c 100644 --- a/integration-tests/init/instrument.js +++ b/integration-tests/init/instrument.js @@ -1,3 +1,5 @@ +'use strict' + const http = require('http') const dc = require('dc-polyfill') diff --git a/integration-tests/init/trace.js b/integration-tests/init/trace.js index a05665b5ea9..c4c1d0b78e8 100644 --- a/integration-tests/init/trace.js +++ b/integration-tests/init/trace.js @@ -1,3 +1,5 @@ +'use strict' + // eslint-disable-next-line no-console console.log(!!global._ddtrace) // eslint-disable-next-line no-console diff --git a/integration-tests/jest/jest.spec.js b/integration-tests/jest/jest.spec.js index 58afad50266..35f910a47fd 100644 --- a/integration-tests/jest/jest.spec.js +++ b/integration-tests/jest/jest.spec.js @@ -547,7 +547,7 @@ describe('jest CommonJS', () => { retriedTest.meta[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_FILE_SUFFIX}`] .endsWith('ci-visibility/dynamic-instrumentation/dependency.js') ) - assert.equal(retriedTest.metrics[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_LINE_SUFFIX}`], 4) + assert.equal(retriedTest.metrics[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_LINE_SUFFIX}`], 6) const snapshotIdKey = `${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_SNAPSHOT_ID_SUFFIX}` assert.exists(retriedTest.meta[snapshotIdKey]) @@ -2716,7 +2716,7 @@ describe('jest CommonJS', () => { retriedTest.meta[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_FILE_SUFFIX}`] .endsWith('ci-visibility/dynamic-instrumentation/dependency.js') ) - assert.equal(retriedTest.metrics[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_LINE_SUFFIX}`], 4) + assert.equal(retriedTest.metrics[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_LINE_SUFFIX}`], 6) const snapshotIdKey = `${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_SNAPSHOT_ID_SUFFIX}` assert.exists(retriedTest.meta[snapshotIdKey]) @@ -2738,7 +2738,7 @@ describe('jest CommonJS', () => { level: 'error' }) assert.equal(diLog.debugger.snapshot.language, 'javascript') - assert.deepInclude(diLog.debugger.snapshot.captures.lines['4'].locals, { + assert.deepInclude(diLog.debugger.snapshot.captures.lines['6'].locals, { a: { type: 'number', value: '11' diff --git a/integration-tests/memory-leak/index.js b/integration-tests/memory-leak/index.js index 01d4c2c439e..8d87a5ab99e 100644 --- a/integration-tests/memory-leak/index.js +++ b/integration-tests/memory-leak/index.js @@ -1,3 +1,5 @@ +'use strict' + const tracer = require('../../') tracer.init() diff --git a/integration-tests/mocha/mocha.spec.js b/integration-tests/mocha/mocha.spec.js index bbe3f784dcf..3e9ff44bb21 100644 --- a/integration-tests/mocha/mocha.spec.js +++ b/integration-tests/mocha/mocha.spec.js @@ -2401,7 +2401,7 @@ describe('mocha CommonJS', function () { retriedTest.meta[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_FILE_SUFFIX}`] .endsWith('ci-visibility/dynamic-instrumentation/dependency.js') ) - assert.equal(retriedTest.metrics[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_LINE_SUFFIX}`], 4) + assert.equal(retriedTest.metrics[`${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_LINE_SUFFIX}`], 6) const snapshotIdKey = `${DI_DEBUG_ERROR_PREFIX}.0.${DI_DEBUG_ERROR_SNAPSHOT_ID_SUFFIX}` @@ -2424,7 +2424,7 @@ describe('mocha CommonJS', function () { level: 'error' }) assert.equal(diLog.debugger.snapshot.language, 'javascript') - assert.deepInclude(diLog.debugger.snapshot.captures.lines['4'].locals, { + assert.deepInclude(diLog.debugger.snapshot.captures.lines['6'].locals, { a: { type: 'number', value: '11' diff --git a/integration-tests/my-nyc.config.js b/integration-tests/my-nyc.config.js index b0d1235ecd2..88a8b9aac3e 100644 --- a/integration-tests/my-nyc.config.js +++ b/integration-tests/my-nyc.config.js @@ -1,3 +1,5 @@ +'use strict' + // non default name so that it only gets picked up intentionally module.exports = { exclude: ['node_modules/**'], diff --git a/integration-tests/opentelemetry/auto-instrumentation.js b/integration-tests/opentelemetry/auto-instrumentation.js index 8a1ba5c2c77..8628fc43be7 100644 --- a/integration-tests/opentelemetry/auto-instrumentation.js +++ b/integration-tests/opentelemetry/auto-instrumentation.js @@ -1,3 +1,5 @@ +'use strict' + const tracer = require('dd-trace').init() const { TracerProvider } = tracer const provider = new TracerProvider() diff --git a/integration-tests/package-guardrails.spec.js b/integration-tests/package-guardrails.spec.js index 8a9a2ce57c1..f257d742a63 100644 --- a/integration-tests/package-guardrails.spec.js +++ b/integration-tests/package-guardrails.spec.js @@ -1,3 +1,5 @@ +'use strict' + const { runAndCheckWithTelemetry: testFile, useEnv, diff --git a/integration-tests/playwright.config.js b/integration-tests/playwright.config.js index 34b0a69a859..b00c9ddb1ca 100644 --- a/integration-tests/playwright.config.js +++ b/integration-tests/playwright.config.js @@ -1,3 +1,5 @@ +'use strict' + // Playwright config file for integration tests const { devices } = require('@playwright/test') diff --git a/integration-tests/profiler/dnstest.js b/integration-tests/profiler/dnstest.js index 36398cb2a05..71d6d51aaea 100644 --- a/integration-tests/profiler/dnstest.js +++ b/integration-tests/profiler/dnstest.js @@ -1,3 +1,5 @@ +'use strict' + const dns = require('node:dns') require('dd-trace').init().profilerStarted().then(() => { diff --git a/integration-tests/profiler/fstest.js b/integration-tests/profiler/fstest.js index c65887c102e..ef49f715bdb 100644 --- a/integration-tests/profiler/fstest.js +++ b/integration-tests/profiler/fstest.js @@ -1,3 +1,5 @@ +'use strict' + const fs = require('fs') const os = require('os') const path = require('path') diff --git a/integration-tests/profiler/nettest.js b/integration-tests/profiler/nettest.js index e9f3002d6b0..ed50e2a81f9 100644 --- a/integration-tests/profiler/nettest.js +++ b/integration-tests/profiler/nettest.js @@ -1,3 +1,5 @@ +'use strict' + const net = require('net') async function streamToString (stream) { diff --git a/integration-tests/selenium/selenium.spec.js b/integration-tests/selenium/selenium.spec.js index 74738967c9a..491522e40ee 100644 --- a/integration-tests/selenium/selenium.spec.js +++ b/integration-tests/selenium/selenium.spec.js @@ -1,3 +1,5 @@ +'use strict' + const { exec } = require('child_process') const { assert } = require('chai') diff --git a/package.json b/package.json index 887ac2f0ef1..20f164172b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dd-trace", - "version": "5.58.0", + "version": "5.58.1", "description": "Datadog APM tracing client for JavaScript", "main": "index.js", "typings": "index.d.ts", @@ -97,18 +97,18 @@ "@opentelemetry/core": "^1.14.0", "crypto-randomuuid": "^1.0.0", "dc-polyfill": "^0.1.9", - "ignore": "^5.2.4", + "ignore": "^7.0.5", "import-in-the-middle": "^1.14.2", "istanbul-lib-coverage": "^3.2.2", "jest-docblock": "^29.7.0", "jsonpath-plus": "^10.3.0", "koalas": "^1.0.2", - "limiter": "^1.1.5", + "limiter": "^3.0.0", "lodash.sortby": "^4.7.0", - "lru-cache": "^7.18.3", + "lru-cache": "^10.4.3", "module-details-from-path": "^1.0.4", "mutexify": "^1.4.0", - "opentracing": ">=0.12.1", + "opentracing": ">=0.14.7", "path-to-regexp": "^0.1.12", "pprof-format": "^2.1.0", "protobufjs": "^7.5.3", @@ -138,7 +138,7 @@ "eslint-plugin-n": "^17.20.0", "eslint-plugin-promise": "^7.2.1", "eslint-plugin-unicorn": "^59.0.1", - "express": "^4.21.2", + "express": "^5.1.0", "get-port": "^5.1.1", "glob": "^7.2.3", "globals": "^15.15.0", @@ -156,6 +156,7 @@ "sinon-chai": "^3.7.0", "tap": "^16.3.10", "tiktoken": "^1.0.21", + "workerpool": "^9.2.0", "yaml": "^2.8.0", "yarn-deduplicate": "^6.0.2" } diff --git a/packages/datadog-instrumentations/src/apollo.js b/packages/datadog-instrumentations/src/apollo.js index a26bfb86eca..0e5719ea574 100644 --- a/packages/datadog-instrumentations/src/apollo.js +++ b/packages/datadog-instrumentations/src/apollo.js @@ -1,3 +1,5 @@ +'use strict' + const { addHook, channel @@ -16,20 +18,15 @@ const CHANNELS = { const generalErrorCh = channel('apm:apollo:gateway:general:error') -function wrapExecutor (executor) { - return function (...args) { - const channel = CHANNELS['gateway.request'] - const ctx = { requestContext: args[0], gateway: this } - - return channel.tracePromise(executor, ctx, this, ...args) - } -} - function wrapApolloGateway (ApolloGateway) { class ApolloGatewayWrapper extends ApolloGateway { constructor (...args) { super(...args) - shimmer.wrap(this, 'executor', wrapExecutor) + shimmer.wrap(this, 'executor', (originalExecutor) => (...args) => { + const channel = CHANNELS['gateway.request'] + const ctx = { requestContext: args[0], gateway: this } + return channel.tracePromise(originalExecutor, ctx, this, ...args) + }) } } return ApolloGatewayWrapper diff --git a/packages/datadog-instrumentations/src/avsc.js b/packages/datadog-instrumentations/src/avsc.js index 6d71b1744bf..c37d8a4cb67 100644 --- a/packages/datadog-instrumentations/src/avsc.js +++ b/packages/datadog-instrumentations/src/avsc.js @@ -1,3 +1,5 @@ +'use strict' + const shimmer = require('../../datadog-shimmer') const { addHook } = require('./helpers/instrument') diff --git a/packages/datadog-instrumentations/src/cypress.js b/packages/datadog-instrumentations/src/cypress.js index c116f67ea98..57604d7356b 100644 --- a/packages/datadog-instrumentations/src/cypress.js +++ b/packages/datadog-instrumentations/src/cypress.js @@ -1,3 +1,5 @@ +'use strict' + const { addHook } = require('./helpers/instrument') const { DD_MAJOR } = require('../../../version') diff --git a/packages/datadog-instrumentations/src/fetch.js b/packages/datadog-instrumentations/src/fetch.js index 8a1c855790e..731a420a31d 100644 --- a/packages/datadog-instrumentations/src/fetch.js +++ b/packages/datadog-instrumentations/src/fetch.js @@ -1,5 +1,7 @@ 'use strict' +/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['fetch', 'Request'] }] */ + const { isInServerlessEnvironment } = require('../../dd-trace/src/serverless') if (globalThis.fetch) { diff --git a/packages/datadog-instrumentations/src/mocha.js b/packages/datadog-instrumentations/src/mocha.js index 5449d769b03..a476f027b41 100644 --- a/packages/datadog-instrumentations/src/mocha.js +++ b/packages/datadog-instrumentations/src/mocha.js @@ -1,3 +1,5 @@ +'use strict' + const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper') if (getEnvironmentVariable('MOCHA_WORKER_ID')) { diff --git a/packages/datadog-instrumentations/src/mocha/common.js b/packages/datadog-instrumentations/src/mocha/common.js index c25ab2fdb21..71962f05f25 100644 --- a/packages/datadog-instrumentations/src/mocha/common.js +++ b/packages/datadog-instrumentations/src/mocha/common.js @@ -1,3 +1,5 @@ +'use strict' + const { addHook, channel } = require('../helpers/instrument') const shimmer = require('../../../datadog-shimmer') const { getCallSites } = require('../../../dd-trace/src/plugins/util/stacktrace') diff --git a/packages/datadog-instrumentations/src/nyc.js b/packages/datadog-instrumentations/src/nyc.js index 93aa3ae1ad8..4459c6e36a7 100644 --- a/packages/datadog-instrumentations/src/nyc.js +++ b/packages/datadog-instrumentations/src/nyc.js @@ -1,3 +1,5 @@ +'use strict' + const { addHook, channel } = require('./helpers/instrument') const shimmer = require('../../datadog-shimmer') const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper') diff --git a/packages/datadog-instrumentations/src/orchestrion-config/index.js b/packages/datadog-instrumentations/src/orchestrion-config/index.js index 15830d1bc34..9849f5b36fe 100644 --- a/packages/datadog-instrumentations/src/orchestrion-config/index.js +++ b/packages/datadog-instrumentations/src/orchestrion-config/index.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = ` version: 1 dc_module: dc-polyfill diff --git a/packages/datadog-instrumentations/src/playwright.js b/packages/datadog-instrumentations/src/playwright.js index 1e46bcf81ab..ffdb236dedb 100644 --- a/packages/datadog-instrumentations/src/playwright.js +++ b/packages/datadog-instrumentations/src/playwright.js @@ -1,3 +1,5 @@ +'use strict' + const satisfies = require('semifies') const { addHook, channel } = require('./helpers/instrument') diff --git a/packages/datadog-instrumentations/src/protobufjs.js b/packages/datadog-instrumentations/src/protobufjs.js index 44ff70dba77..c11706582d6 100644 --- a/packages/datadog-instrumentations/src/protobufjs.js +++ b/packages/datadog-instrumentations/src/protobufjs.js @@ -1,3 +1,5 @@ +'use strict' + const shimmer = require('../../datadog-shimmer') const { addHook } = require('./helpers/instrument') diff --git a/packages/datadog-instrumentations/src/selenium.js b/packages/datadog-instrumentations/src/selenium.js index 141aa967e40..a99a9042443 100644 --- a/packages/datadog-instrumentations/src/selenium.js +++ b/packages/datadog-instrumentations/src/selenium.js @@ -1,3 +1,5 @@ +'use strict' + const { addHook, channel } = require('./helpers/instrument') const shimmer = require('../../datadog-shimmer') diff --git a/packages/datadog-instrumentations/src/vitest.js b/packages/datadog-instrumentations/src/vitest.js index cbae57ea093..081a2256f4e 100644 --- a/packages/datadog-instrumentations/src/vitest.js +++ b/packages/datadog-instrumentations/src/vitest.js @@ -1,3 +1,5 @@ +'use strict' + const { addHook, channel } = require('./helpers/instrument') const shimmer = require('../../datadog-shimmer') const log = require('../../dd-trace/src/log') diff --git a/packages/datadog-instrumentations/test/helpers/check-require-cache/bad-order.js b/packages/datadog-instrumentations/test/helpers/check-require-cache/bad-order.js index e549c600516..697ffcb45bc 100755 --- a/packages/datadog-instrumentations/test/helpers/check-require-cache/bad-order.js +++ b/packages/datadog-instrumentations/test/helpers/check-require-cache/bad-order.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +'use strict' require('express') // package required before tracer const tracer = require('../../../../../') diff --git a/packages/datadog-instrumentations/test/helpers/check-require-cache/good-order.js b/packages/datadog-instrumentations/test/helpers/check-require-cache/good-order.js index f90e9c6fbbb..a7845938758 100755 --- a/packages/datadog-instrumentations/test/helpers/check-require-cache/good-order.js +++ b/packages/datadog-instrumentations/test/helpers/check-require-cache/good-order.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +'use strict' const tracer = require('../../../../../') require('express') // package required after tracer diff --git a/packages/datadog-plugin-aerospike/test/naming.js b/packages/datadog-plugin-aerospike/test/naming.js index bed64a71625..ef8c48ecd08 100644 --- a/packages/datadog-plugin-aerospike/test/naming.js +++ b/packages/datadog-plugin-aerospike/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-amqp10/test/naming.js b/packages/datadog-plugin-amqp10/test/naming.js index e8bc0e42c3e..d367eea4ac5 100644 --- a/packages/datadog-plugin-amqp10/test/naming.js +++ b/packages/datadog-plugin-amqp10/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-amqplib/test/naming.js b/packages/datadog-plugin-amqplib/test/naming.js index fdb90a66d8c..15981d83e04 100644 --- a/packages/datadog-plugin-amqplib/test/naming.js +++ b/packages/datadog-plugin-amqplib/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-apollo/test/fixtures.js b/packages/datadog-plugin-apollo/test/fixtures.js index 6e0a992f5ca..fbf59b92fa1 100644 --- a/packages/datadog-plugin-apollo/test/fixtures.js +++ b/packages/datadog-plugin-apollo/test/fixtures.js @@ -1,3 +1,5 @@ +'use strict' + const typeDefs = ` type Query { hello(name: String, title: String): String diff --git a/packages/datadog-plugin-apollo/test/naming.js b/packages/datadog-plugin-apollo/test/naming.js index bc8e2247b82..c9f0c823898 100644 --- a/packages/datadog-plugin-apollo/test/naming.js +++ b/packages/datadog-plugin-apollo/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-avsc/src/index.js b/packages/datadog-plugin-avsc/src/index.js index be0ef970e50..853c4c1df3c 100644 --- a/packages/datadog-plugin-avsc/src/index.js +++ b/packages/datadog-plugin-avsc/src/index.js @@ -1,3 +1,5 @@ +'use strict' + const SchemaPlugin = require('../../dd-trace/src/plugins/schema') const SchemaExtractor = require('./schema_iterator') diff --git a/packages/datadog-plugin-avsc/src/schema_iterator.js b/packages/datadog-plugin-avsc/src/schema_iterator.js index c35ebf9604a..efee2e0425d 100644 --- a/packages/datadog-plugin-avsc/src/schema_iterator.js +++ b/packages/datadog-plugin-avsc/src/schema_iterator.js @@ -1,3 +1,5 @@ +'use strict' + const AVRO = 'avro' const { SCHEMA_DEFINITION, diff --git a/packages/datadog-plugin-avsc/test/helpers.js b/packages/datadog-plugin-avsc/test/helpers.js index 8e5be7ac433..7e941b5e184 100644 --- a/packages/datadog-plugin-avsc/test/helpers.js +++ b/packages/datadog-plugin-avsc/test/helpers.js @@ -1,3 +1,5 @@ +'use strict' + const fs = require('fs') async function loadMessage (avro, messageTypeName) { diff --git a/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/index.js b/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/index.js index c123c02fa65..e4706be8818 100644 --- a/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/index.js +++ b/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/index.js @@ -1,3 +1,5 @@ +'use strict' + const CompositePlugin = require('../../../../dd-trace/src/plugins/composite') const BedrockRuntimeTracing = require('./tracing') const BedrockRuntimeLLMObsPlugin = require('../../../../dd-trace/src/llmobs/plugins/bedrockruntime') diff --git a/packages/datadog-plugin-aws-sdk/test/kinesis-naming.js b/packages/datadog-plugin-aws-sdk/test/kinesis-naming.js index d6013a2cd88..c87a7197b7c 100644 --- a/packages/datadog-plugin-aws-sdk/test/kinesis-naming.js +++ b/packages/datadog-plugin-aws-sdk/test/kinesis-naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-aws-sdk/test/lambda-naming.js b/packages/datadog-plugin-aws-sdk/test/lambda-naming.js index 19c3ea4e8db..22a83302d52 100644 --- a/packages/datadog-plugin-aws-sdk/test/lambda-naming.js +++ b/packages/datadog-plugin-aws-sdk/test/lambda-naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-aws-sdk/test/s3-naming.js b/packages/datadog-plugin-aws-sdk/test/s3-naming.js index 137ab586dfd..ca4ec3167e5 100644 --- a/packages/datadog-plugin-aws-sdk/test/s3-naming.js +++ b/packages/datadog-plugin-aws-sdk/test/s3-naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-aws-sdk/test/sns-naming.js b/packages/datadog-plugin-aws-sdk/test/sns-naming.js index 10a01b898da..96646fb48b2 100644 --- a/packages/datadog-plugin-aws-sdk/test/sns-naming.js +++ b/packages/datadog-plugin-aws-sdk/test/sns-naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-aws-sdk/test/sqs-naming.js b/packages/datadog-plugin-aws-sdk/test/sqs-naming.js index 2f677e4b69a..2df142a9463 100644 --- a/packages/datadog-plugin-aws-sdk/test/sqs-naming.js +++ b/packages/datadog-plugin-aws-sdk/test/sqs-naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-aws-sdk/test/util.spec.js b/packages/datadog-plugin-aws-sdk/test/util.spec.js index 4a4ad0a8b12..ede5ba21724 100644 --- a/packages/datadog-plugin-aws-sdk/test/util.spec.js +++ b/packages/datadog-plugin-aws-sdk/test/util.spec.js @@ -1,3 +1,5 @@ +'use strict' + const { generatePointerHash, encodeValue, extractPrimaryKeys } = require('../src/util') describe('generatePointerHash', () => { diff --git a/packages/datadog-plugin-cassandra-driver/test/naming.js b/packages/datadog-plugin-cassandra-driver/test/naming.js index 10d93008b8a..e2aa5dfb16b 100644 --- a/packages/datadog-plugin-cassandra-driver/test/naming.js +++ b/packages/datadog-plugin-cassandra-driver/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-confluentinc-kafka-javascript/test/naming.js b/packages/datadog-plugin-confluentinc-kafka-javascript/test/naming.js index 78b1f5f3a1c..2adceec4ba9 100644 --- a/packages/datadog-plugin-confluentinc-kafka-javascript/test/naming.js +++ b/packages/datadog-plugin-confluentinc-kafka-javascript/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-couchbase/test/naming.js b/packages/datadog-plugin-couchbase/test/naming.js index aa3debd7fb7..aaa6376edd6 100644 --- a/packages/datadog-plugin-couchbase/test/naming.js +++ b/packages/datadog-plugin-couchbase/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const serviceName = { diff --git a/packages/datadog-plugin-couchbase/test/suite.js b/packages/datadog-plugin-couchbase/test/suite.js index b4d03b35e11..b44243e32d8 100644 --- a/packages/datadog-plugin-couchbase/test/suite.js +++ b/packages/datadog-plugin-couchbase/test/suite.js @@ -1,4 +1,5 @@ 'use strict' + // const suiteTest = require('../../dd-trace/test/plugins/suite') // suiteTest('couchbase', 'couchbase/couchnode', 'v3.1.3') diff --git a/packages/datadog-plugin-cucumber/test/features/simple.js b/packages/datadog-plugin-cucumber/test/features/simple.js index 48af91cbc92..5d618d089b8 100644 --- a/packages/datadog-plugin-cucumber/test/features/simple.js +++ b/packages/datadog-plugin-cucumber/test/features/simple.js @@ -1,3 +1,5 @@ +'use strict' + const { Before, Given, When, Then, setWorldConstructor } = require('@cucumber/cucumber') const { expect } = require('chai') diff --git a/packages/datadog-plugin-cypress/src/after-run.js b/packages/datadog-plugin-cypress/src/after-run.js index 288218850d8..a15549a45fa 100644 --- a/packages/datadog-plugin-cypress/src/after-run.js +++ b/packages/datadog-plugin-cypress/src/after-run.js @@ -1,3 +1,5 @@ +'use strict' + const cypressPlugin = require('./cypress-plugin') module.exports = cypressPlugin.afterRun.bind(cypressPlugin) diff --git a/packages/datadog-plugin-cypress/src/after-spec.js b/packages/datadog-plugin-cypress/src/after-spec.js index 4fdf98ad582..a5c167a80c0 100644 --- a/packages/datadog-plugin-cypress/src/after-spec.js +++ b/packages/datadog-plugin-cypress/src/after-spec.js @@ -1,3 +1,5 @@ +'use strict' + const cypressPlugin = require('./cypress-plugin') module.exports = cypressPlugin.afterSpec.bind(cypressPlugin) diff --git a/packages/datadog-plugin-cypress/src/cypress-plugin.js b/packages/datadog-plugin-cypress/src/cypress-plugin.js index b930dfbb5ad..91e8e8c551b 100644 --- a/packages/datadog-plugin-cypress/src/cypress-plugin.js +++ b/packages/datadog-plugin-cypress/src/cypress-plugin.js @@ -1,3 +1,5 @@ +'use strict' + const { TEST_STATUS, TEST_IS_RUM_ACTIVE, diff --git a/packages/datadog-plugin-cypress/src/index.js b/packages/datadog-plugin-cypress/src/index.js index 932e462a243..0995a8f033f 100644 --- a/packages/datadog-plugin-cypress/src/index.js +++ b/packages/datadog-plugin-cypress/src/index.js @@ -1,3 +1,5 @@ +'use strict' + const Plugin = require('../../dd-trace/src/plugins/plugin') // Cypress plugin does not patch any library. This is just a placeholder to diff --git a/packages/datadog-plugin-cypress/src/plugin.js b/packages/datadog-plugin-cypress/src/plugin.js index 86d32839ac6..7226d0ad25b 100644 --- a/packages/datadog-plugin-cypress/src/plugin.js +++ b/packages/datadog-plugin-cypress/src/plugin.js @@ -1,3 +1,5 @@ +'use strict' + const NoopTracer = require('../../dd-trace/src/noop/tracer') const cypressPlugin = require('./cypress-plugin') const satisfies = require('semifies') diff --git a/packages/datadog-plugin-cypress/src/support.js b/packages/datadog-plugin-cypress/src/support.js index 38021aa6b68..86679d9de79 100644 --- a/packages/datadog-plugin-cypress/src/support.js +++ b/packages/datadog-plugin-cypress/src/support.js @@ -1,3 +1,5 @@ +'use strict' + let isEarlyFlakeDetectionEnabled = false let isKnownTestsEnabled = false let knownTestsForSuite = [] diff --git a/packages/datadog-plugin-cypress/test/app-10/app-server.js b/packages/datadog-plugin-cypress/test/app-10/app-server.js index 36512930879..37edf68e055 100644 --- a/packages/datadog-plugin-cypress/test/app-10/app-server.js +++ b/packages/datadog-plugin-cypress/test/app-10/app-server.js @@ -1,3 +1,5 @@ +'use strict' + // File to spin an HTTP server that returns an HTML for cypress to visit const http = require('http') diff --git a/packages/datadog-plugin-cypress/test/app-10/cypress.config.js b/packages/datadog-plugin-cypress/test/app-10/cypress.config.js index 6bb3b079f5d..fdd1c0b5a49 100644 --- a/packages/datadog-plugin-cypress/test/app-10/cypress.config.js +++ b/packages/datadog-plugin-cypress/test/app-10/cypress.config.js @@ -1,3 +1,5 @@ +'use strict' + const setupNodeEvents = require('./cypress/plugins/index.js') module.exports = { diff --git a/packages/datadog-plugin-cypress/test/app-10/cypress/plugins/index.js b/packages/datadog-plugin-cypress/test/app-10/cypress/plugins/index.js index 07594d7af6b..209aa20cb8b 100644 --- a/packages/datadog-plugin-cypress/test/app-10/cypress/plugins/index.js +++ b/packages/datadog-plugin-cypress/test/app-10/cypress/plugins/index.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = (on, config) => { // We can't use the tracer available in the testing process, because this code is // run in a different process. We need to init a different tracer reporting to the diff --git a/packages/datadog-plugin-cypress/test/app-10/cypress/support/index.js b/packages/datadog-plugin-cypress/test/app-10/cypress/support/index.js index 929c713d2eb..3371ce88469 100644 --- a/packages/datadog-plugin-cypress/test/app-10/cypress/support/index.js +++ b/packages/datadog-plugin-cypress/test/app-10/cypress/support/index.js @@ -1 +1,3 @@ +'use strict' + require('../../../../src/support') diff --git a/packages/datadog-plugin-cypress/test/app/app-server.js b/packages/datadog-plugin-cypress/test/app/app-server.js index 36512930879..37edf68e055 100644 --- a/packages/datadog-plugin-cypress/test/app/app-server.js +++ b/packages/datadog-plugin-cypress/test/app/app-server.js @@ -1,3 +1,5 @@ +'use strict' + // File to spin an HTTP server that returns an HTML for cypress to visit const http = require('http') diff --git a/packages/datadog-plugin-cypress/test/app/cypress/plugins/index.js b/packages/datadog-plugin-cypress/test/app/cypress/plugins/index.js index 51c263d8ce6..ddeb86b685d 100644 --- a/packages/datadog-plugin-cypress/test/app/cypress/plugins/index.js +++ b/packages/datadog-plugin-cypress/test/app/cypress/plugins/index.js @@ -1 +1,3 @@ +'use strict' + module.exports = require('../../../../../../ci/cypress/plugin') diff --git a/packages/datadog-plugin-cypress/test/app/cypress/support/index.js b/packages/datadog-plugin-cypress/test/app/cypress/support/index.js index 929c713d2eb..3371ce88469 100644 --- a/packages/datadog-plugin-cypress/test/app/cypress/support/index.js +++ b/packages/datadog-plugin-cypress/test/app/cypress/support/index.js @@ -1 +1,3 @@ +'use strict' + require('../../../../src/support') diff --git a/packages/datadog-plugin-elasticsearch/test/naming.js b/packages/datadog-plugin-elasticsearch/test/naming.js index 737c724d81b..3d2c2af4d9e 100644 --- a/packages/datadog-plugin-elasticsearch/test/naming.js +++ b/packages/datadog-plugin-elasticsearch/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-fetch/test/naming.js b/packages/datadog-plugin-fetch/test/naming.js index e46f0960947..563b98f5821 100644 --- a/packages/datadog-plugin-fetch/test/naming.js +++ b/packages/datadog-plugin-fetch/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-google-cloud-pubsub/test/naming.js b/packages/datadog-plugin-google-cloud-pubsub/test/naming.js index da2ffd55247..b03e300f346 100644 --- a/packages/datadog-plugin-google-cloud-pubsub/test/naming.js +++ b/packages/datadog-plugin-google-cloud-pubsub/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-google-cloud-vertexai/src/utils.js b/packages/datadog-plugin-google-cloud-vertexai/src/utils.js index 81e6c7398f1..9b359361ccc 100644 --- a/packages/datadog-plugin-google-cloud-vertexai/src/utils.js +++ b/packages/datadog-plugin-google-cloud-vertexai/src/utils.js @@ -1,3 +1,5 @@ +'use strict' + function extractModel (instance) { const model = instance.model || instance.resourcePath || instance.publisherModelEndpoint return model?.split('/').pop() diff --git a/packages/datadog-plugin-graphql/src/utils.js b/packages/datadog-plugin-graphql/src/utils.js index dabeaac00fa..382a98b5f64 100644 --- a/packages/datadog-plugin-graphql/src/utils.js +++ b/packages/datadog-plugin-graphql/src/utils.js @@ -1,3 +1,5 @@ +'use strict' + function extractErrorIntoSpanEvent (config, span, exc) { const attributes = {} diff --git a/packages/datadog-plugin-graphql/test/naming.js b/packages/datadog-plugin-graphql/test/naming.js index ac873109936..7cf138a4697 100644 --- a/packages/datadog-plugin-graphql/test/naming.js +++ b/packages/datadog-plugin-graphql/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-grpc/test/naming.js b/packages/datadog-plugin-grpc/test/naming.js index 3328170b208..f9dd00b4ae6 100644 --- a/packages/datadog-plugin-grpc/test/naming.js +++ b/packages/datadog-plugin-grpc/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-http/test/naming.js b/packages/datadog-plugin-http/test/naming.js index 46635ddc678..eff07e598e8 100644 --- a/packages/datadog-plugin-http/test/naming.js +++ b/packages/datadog-plugin-http/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-http2/test/naming.js b/packages/datadog-plugin-http2/test/naming.js index 46635ddc678..eff07e598e8 100644 --- a/packages/datadog-plugin-http2/test/naming.js +++ b/packages/datadog-plugin-http2/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-ioredis/test/naming.js b/packages/datadog-plugin-ioredis/test/naming.js index 1ed3f17e428..6d116c36968 100644 --- a/packages/datadog-plugin-ioredis/test/naming.js +++ b/packages/datadog-plugin-ioredis/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-iovalkey/test/naming.js b/packages/datadog-plugin-iovalkey/test/naming.js index 57d556782e4..332d65ed39a 100644 --- a/packages/datadog-plugin-iovalkey/test/naming.js +++ b/packages/datadog-plugin-iovalkey/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-jest/src/index.js b/packages/datadog-plugin-jest/src/index.js index 39f88a70d74..6b1c3564928 100644 --- a/packages/datadog-plugin-jest/src/index.js +++ b/packages/datadog-plugin-jest/src/index.js @@ -1,3 +1,5 @@ +'use strict' + const CiPlugin = require('../../dd-trace/src/plugins/ci_plugin') const { storage } = require('../../datadog-core') const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper') diff --git a/packages/datadog-plugin-jest/src/util.js b/packages/datadog-plugin-jest/src/util.js index 58bda8ef74b..335d910aa9d 100644 --- a/packages/datadog-plugin-jest/src/util.js +++ b/packages/datadog-plugin-jest/src/util.js @@ -1,3 +1,5 @@ +'use strict' + const { readFileSync } = require('fs') const { parse, extract } = require('jest-docblock') diff --git a/packages/datadog-plugin-jest/test/env.js b/packages/datadog-plugin-jest/test/env.js index fd843d8d0ca..17bac3a2f91 100644 --- a/packages/datadog-plugin-jest/test/env.js +++ b/packages/datadog-plugin-jest/test/env.js @@ -1,3 +1,5 @@ +'use strict' + const env = require(`../../../versions/${global.__libraryName__}@${global.__libraryVersion__}`).get() module.exports = env.default ? env.default : env diff --git a/packages/datadog-plugin-jest/test/fixtures/test-to-run.js b/packages/datadog-plugin-jest/test/fixtures/test-to-run.js index f093d1e39ed..40326d2276a 100644 --- a/packages/datadog-plugin-jest/test/fixtures/test-to-run.js +++ b/packages/datadog-plugin-jest/test/fixtures/test-to-run.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('test-to-run', () => { diff --git a/packages/datadog-plugin-jest/test/fixtures/test-to-skip.js b/packages/datadog-plugin-jest/test/fixtures/test-to-skip.js index 74655c102ae..54223246967 100644 --- a/packages/datadog-plugin-jest/test/fixtures/test-to-skip.js +++ b/packages/datadog-plugin-jest/test/fixtures/test-to-skip.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('test-to-skip', () => { diff --git a/packages/datadog-plugin-jest/test/fixtures/test-unskippable.js b/packages/datadog-plugin-jest/test/fixtures/test-unskippable.js index 6530097c7d4..a0b0d303340 100644 --- a/packages/datadog-plugin-jest/test/fixtures/test-unskippable.js +++ b/packages/datadog-plugin-jest/test/fixtures/test-unskippable.js @@ -1,6 +1,7 @@ /** * @datadog {"unskippable": true} */ +'use strict' const { expect } = require('chai') diff --git a/packages/datadog-plugin-jest/test/jest-focus.js b/packages/datadog-plugin-jest/test/jest-focus.js index 7c7eaddba6d..b741b42b96a 100644 --- a/packages/datadog-plugin-jest/test/jest-focus.js +++ b/packages/datadog-plugin-jest/test/jest-focus.js @@ -1,3 +1,5 @@ +'use strict' + describe('jest-test-focused', () => { it('will be skipped', () => { expect(true).toEqual(true) diff --git a/packages/datadog-plugin-jest/test/jest-hook-failure.js b/packages/datadog-plugin-jest/test/jest-hook-failure.js index d17df4a983f..c3c0aad4aeb 100644 --- a/packages/datadog-plugin-jest/test/jest-hook-failure.js +++ b/packages/datadog-plugin-jest/test/jest-hook-failure.js @@ -1,3 +1,5 @@ +'use strict' + describe('jest-hook-failure', () => { beforeEach(() => { throw new Error('hey, hook error before') diff --git a/packages/datadog-plugin-jest/test/jest-inject-globals.js b/packages/datadog-plugin-jest/test/jest-inject-globals.js index f18333867d0..1057eec03a2 100644 --- a/packages/datadog-plugin-jest/test/jest-inject-globals.js +++ b/packages/datadog-plugin-jest/test/jest-inject-globals.js @@ -1,3 +1,5 @@ +'use strict' + const { describe, it, expect } = require('../../../versions/@jest/globals').get() describe('jest-inject-globals', () => { diff --git a/packages/datadog-plugin-jest/test/jest-test-suite.js b/packages/datadog-plugin-jest/test/jest-test-suite.js index 4d96db61a75..518339bef4b 100644 --- a/packages/datadog-plugin-jest/test/jest-test-suite.js +++ b/packages/datadog-plugin-jest/test/jest-test-suite.js @@ -1,3 +1,5 @@ +'use strict' + describe('jest-test-suite-visibility', () => { it('works', () => { expect(true).toEqual(true) diff --git a/packages/datadog-plugin-jest/test/jest-test.js b/packages/datadog-plugin-jest/test/jest-test.js index d8155bcdc9a..51ddfa6169e 100644 --- a/packages/datadog-plugin-jest/test/jest-test.js +++ b/packages/datadog-plugin-jest/test/jest-test.js @@ -1,3 +1,5 @@ +'use strict' + const http = require('http') const tracer = require('dd-trace') diff --git a/packages/datadog-plugin-jest/test/util.spec.js b/packages/datadog-plugin-jest/test/util.spec.js index 297f1f74161..af28ed6d9ca 100644 --- a/packages/datadog-plugin-jest/test/util.spec.js +++ b/packages/datadog-plugin-jest/test/util.spec.js @@ -1,3 +1,5 @@ +'use strict' + const path = require('path') const { getFormattedJestTestParameters, getJestSuitesToRun } = require('../src/util') diff --git a/packages/datadog-plugin-kafkajs/src/batch-consumer.js b/packages/datadog-plugin-kafkajs/src/batch-consumer.js index 74c3caa1451..0fb16252116 100644 --- a/packages/datadog-plugin-kafkajs/src/batch-consumer.js +++ b/packages/datadog-plugin-kafkajs/src/batch-consumer.js @@ -1,3 +1,5 @@ +'use strict' + const ConsumerPlugin = require('../../dd-trace/src/plugins/consumer') const { getMessageSize } = require('../../dd-trace/src/datastreams') const { convertToTextMap } = require('./utils') diff --git a/packages/datadog-plugin-kafkajs/test/naming.js b/packages/datadog-plugin-kafkajs/test/naming.js index 78b1f5f3a1c..2adceec4ba9 100644 --- a/packages/datadog-plugin-kafkajs/test/naming.js +++ b/packages/datadog-plugin-kafkajs/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-mariadb/test/naming.js b/packages/datadog-plugin-mariadb/test/naming.js index 81bc7d60f0d..dfc38455cdf 100644 --- a/packages/datadog-plugin-mariadb/test/naming.js +++ b/packages/datadog-plugin-mariadb/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-memcached/test/naming.js b/packages/datadog-plugin-memcached/test/naming.js index 80a164f42d4..df6b8837c6b 100644 --- a/packages/datadog-plugin-memcached/test/naming.js +++ b/packages/datadog-plugin-memcached/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-microgateway-core/test/proxy.js b/packages/datadog-plugin-microgateway-core/test/proxy.js index dd9f0fdad4f..5c276ba16b2 100644 --- a/packages/datadog-plugin-microgateway-core/test/proxy.js +++ b/packages/datadog-plugin-microgateway-core/test/proxy.js @@ -1,3 +1,5 @@ +'use strict' + const http = require('http') const net = require('net') const tls = require('tls') diff --git a/packages/datadog-plugin-mocha/test/mocha-active-span-in-hooks.js b/packages/datadog-plugin-mocha/test/mocha-active-span-in-hooks.js index e5382e3de43..dccc56e256c 100644 --- a/packages/datadog-plugin-mocha/test/mocha-active-span-in-hooks.js +++ b/packages/datadog-plugin-mocha/test/mocha-active-span-in-hooks.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') let currentTestTraceId diff --git a/packages/datadog-plugin-mocha/test/mocha-fail-hook-async.js b/packages/datadog-plugin-mocha/test/mocha-fail-hook-async.js index 9f2e4aa7bba..2017fd3911b 100644 --- a/packages/datadog-plugin-mocha/test/mocha-fail-hook-async.js +++ b/packages/datadog-plugin-mocha/test/mocha-fail-hook-async.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-fail-before-all', function () { diff --git a/packages/datadog-plugin-mocha/test/mocha-fail-hook-sync.js b/packages/datadog-plugin-mocha/test/mocha-fail-hook-sync.js index 18f618b3578..928dac52896 100644 --- a/packages/datadog-plugin-mocha/test/mocha-fail-hook-sync.js +++ b/packages/datadog-plugin-mocha/test/mocha-fail-hook-sync.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-fail-hook-sync', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-async-fail.js b/packages/datadog-plugin-mocha/test/mocha-test-async-fail.js index d0bf922a319..88698671cef 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-async-fail.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-async-fail.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-async-fail', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-async-pass.js b/packages/datadog-plugin-mocha/test/mocha-test-async-pass.js index ae83996a137..8660312ac98 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-async-pass.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-async-pass.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-async-pass', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-code-coverage.js b/packages/datadog-plugin-mocha/test/mocha-test-code-coverage.js index 5daf79e48f6..fd318ddde23 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-code-coverage.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-code-coverage.js @@ -1,3 +1,5 @@ +'use strict' + describe('mocha-coverage', () => { it('can sum', () => { expect(1 + 2).to.equal(3) diff --git a/packages/datadog-plugin-mocha/test/mocha-test-done-fail-badly.js b/packages/datadog-plugin-mocha/test/mocha-test-done-fail-badly.js index 6745f4e51d7..ae21c2b1358 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-done-fail-badly.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-done-fail-badly.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-done-fail', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-done-fail.js b/packages/datadog-plugin-mocha/test/mocha-test-done-fail.js index f229e45509f..485875cfd6f 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-done-fail.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-done-fail.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-done-fail', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-done-pass.js b/packages/datadog-plugin-mocha/test/mocha-test-done-pass.js index 9c6ecd8fec3..6d3969526a0 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-done-pass.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-done-pass.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-done-pass', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-fail.js b/packages/datadog-plugin-mocha/test/mocha-test-fail.js index f8b7da0b6d6..44247c88089 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-fail.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-fail.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-fail', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-integration.js b/packages/datadog-plugin-mocha/test/mocha-test-integration.js index 3130b5b4960..ac6579fe426 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-integration.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-integration.js @@ -1,3 +1,5 @@ +'use strict' + const http = require('http') describe('mocha-test-integration-http', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-itr-1.js b/packages/datadog-plugin-mocha/test/mocha-test-itr-1.js index 355fe6eafad..605b3a1eaf3 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-itr-1.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-itr-1.js @@ -1,3 +1,5 @@ +'use strict' + describe('mocha-itr-1', () => { it('can sum', () => { expect(1 + 2).to.equal(3) diff --git a/packages/datadog-plugin-mocha/test/mocha-test-itr-2.js b/packages/datadog-plugin-mocha/test/mocha-test-itr-2.js index 048fef1441d..79879da1c57 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-itr-2.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-itr-2.js @@ -1,3 +1,5 @@ +'use strict' + describe('mocha-itr-2', () => { it('can sum', () => { expect(1 + 2).to.equal(3) diff --git a/packages/datadog-plugin-mocha/test/mocha-test-parameterized.js b/packages/datadog-plugin-mocha/test/mocha-test-parameterized.js index 0d5378099cc..8c0da9581d7 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-parameterized.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-parameterized.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') const forEach = require('../../../versions/mocha-each').get() diff --git a/packages/datadog-plugin-mocha/test/mocha-test-pass.js b/packages/datadog-plugin-mocha/test/mocha-test-pass.js index 6d40be6f5a6..cd72b5e9244 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-pass.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-pass.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-pass', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-promise-fail.js b/packages/datadog-plugin-mocha/test/mocha-test-promise-fail.js index 874eb8ca8d9..3da477c204d 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-promise-fail.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-promise-fail.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-promise-fail', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-promise-pass.js b/packages/datadog-plugin-mocha/test/mocha-test-promise-pass.js index ab872e2eccb..4101e84a26b 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-promise-pass.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-promise-pass.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-promise-pass', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-retries.js b/packages/datadog-plugin-mocha/test/mocha-test-retries.js index 6417f21a4f0..13b8863acf8 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-retries.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-retries.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') let attempt = 0 diff --git a/packages/datadog-plugin-mocha/test/mocha-test-skip-describe.js b/packages/datadog-plugin-mocha/test/mocha-test-skip-describe.js index 1e0f4228337..5513c9c8087 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-skip-describe.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-skip-describe.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-skip-describe', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-skip.js b/packages/datadog-plugin-mocha/test/mocha-test-skip.js index 9c9ad98ec2b..78300ef7056 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-skip.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-skip.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-skip', () => { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-after-each.js b/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-after-each.js index 5e948dde33e..5f8b4c11193 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-after-each.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-after-each.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-suite-level-pass', function () { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-skip-describe.js b/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-skip-describe.js index ccd960b50a1..2f79fd8ed21 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-skip-describe.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-skip-describe.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-suite-level-fail', function () { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-test.js b/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-test.js index 50ca4d85f12..3263d26a8a6 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-test.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-suite-level-fail-test.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-suite-level-fail', function () { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-suite-level-pass.js b/packages/datadog-plugin-mocha/test/mocha-test-suite-level-pass.js index 3e2f4b23c13..855e4d86a63 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-suite-level-pass.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-suite-level-pass.js @@ -1,3 +1,5 @@ +'use strict' + const { expect } = require('chai') describe('mocha-test-suite-level-fail', function () { diff --git a/packages/datadog-plugin-mocha/test/mocha-test-timeout-fail.js b/packages/datadog-plugin-mocha/test/mocha-test-timeout-fail.js index d86d68f2e17..eac8964efb8 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-timeout-fail.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-timeout-fail.js @@ -1,3 +1,5 @@ +'use strict' + describe('mocha-test-timeout-fail', () => { it('times out', function (done) { this.timeout(100) diff --git a/packages/datadog-plugin-mocha/test/mocha-test-timeout-pass.js b/packages/datadog-plugin-mocha/test/mocha-test-timeout-pass.js index 3d10c03c42c..75868497e69 100644 --- a/packages/datadog-plugin-mocha/test/mocha-test-timeout-pass.js +++ b/packages/datadog-plugin-mocha/test/mocha-test-timeout-pass.js @@ -1,3 +1,5 @@ +'use strict' + describe('mocha-test-timeout-pass', () => { it('does not timeout', function (done) { this.timeout(300) diff --git a/packages/datadog-plugin-moleculer/test/naming.js b/packages/datadog-plugin-moleculer/test/naming.js index ee339847550..c46d358d11f 100644 --- a/packages/datadog-plugin-moleculer/test/naming.js +++ b/packages/datadog-plugin-moleculer/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-mongodb-core/test/naming.js b/packages/datadog-plugin-mongodb-core/test/naming.js index c5113333a29..0ff68b6c167 100644 --- a/packages/datadog-plugin-mongodb-core/test/naming.js +++ b/packages/datadog-plugin-mongodb-core/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-mysql/test/naming.js b/packages/datadog-plugin-mysql/test/naming.js index d9f2342d5d1..8c1ae665808 100644 --- a/packages/datadog-plugin-mysql/test/naming.js +++ b/packages/datadog-plugin-mysql/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-mysql2/test/naming.js b/packages/datadog-plugin-mysql2/test/naming.js index d9f2342d5d1..8c1ae665808 100644 --- a/packages/datadog-plugin-mysql2/test/naming.js +++ b/packages/datadog-plugin-mysql2/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-next/test/datadog.js b/packages/datadog-plugin-next/test/datadog.js index 565fe15db99..ba88ff20ea9 100644 --- a/packages/datadog-plugin-next/test/datadog.js +++ b/packages/datadog-plugin-next/test/datadog.js @@ -1,3 +1,5 @@ +'use strict' + const config = { validateStatus: code => false, hooks: { diff --git a/packages/datadog-plugin-next/test/naming.js b/packages/datadog-plugin-next/test/naming.js index 8b2f1740410..ee5bc55e43d 100644 --- a/packages/datadog-plugin-next/test/naming.js +++ b/packages/datadog-plugin-next/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-next/test/next.config.js b/packages/datadog-plugin-next/test/next.config.js index 7bdbd848df9..98a25b8f285 100644 --- a/packages/datadog-plugin-next/test/next.config.js +++ b/packages/datadog-plugin-next/test/next.config.js @@ -1,3 +1,5 @@ +'use strict' + // Build config dynamically for ease in testing and modification const { satisfies } = require('semver') diff --git a/packages/datadog-plugin-nyc/src/index.js b/packages/datadog-plugin-nyc/src/index.js index c407b55221c..3252e9be24b 100644 --- a/packages/datadog-plugin-nyc/src/index.js +++ b/packages/datadog-plugin-nyc/src/index.js @@ -1,3 +1,5 @@ +'use strict' + const CiPlugin = require('../../dd-trace/src/plugins/ci_plugin') class NycPlugin extends CiPlugin { diff --git a/packages/datadog-plugin-openai/test/index.spec.js b/packages/datadog-plugin-openai/test/index.spec.js index 6035af1b6bf..501b9b06e18 100644 --- a/packages/datadog-plugin-openai/test/index.spec.js +++ b/packages/datadog-plugin-openai/test/index.spec.js @@ -42,7 +42,7 @@ describe('Plugin', () => { after(() => { if (semver.satisfies(realVersion, '>=5.0.0') && NODE_MAJOR < 20) { - global.File = globalFile + global.File = globalFile // eslint-disable-line n/no-unsupported-features/node-builtins } return agent.close({ ritmReset: false }) @@ -62,8 +62,8 @@ describe('Plugin', () => { * Error: `File` is not defined as a global, which is required for file uploads. * Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`. */ - globalFile = global.File - global.File = require('node:buffer').File + globalFile = global.File // eslint-disable-line n/no-unsupported-features/node-builtins + global.File = require('node:buffer').File // eslint-disable-line n/no-unsupported-features/node-builtins } if (semver.satisfies(realVersion, '>=4.0.0')) { diff --git a/packages/datadog-plugin-openai/test/no-init.js b/packages/datadog-plugin-openai/test/no-init.js index 002e07cb03d..d34bae7a9ad 100755 --- a/packages/datadog-plugin-openai/test/no-init.js +++ b/packages/datadog-plugin-openai/test/no-init.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +'use strict' /** * Due to the complexity of the service initialization required by openai diff --git a/packages/datadog-plugin-opensearch/test/naming.js b/packages/datadog-plugin-opensearch/test/naming.js index 72b158196a0..fedf4903d1b 100644 --- a/packages/datadog-plugin-opensearch/test/naming.js +++ b/packages/datadog-plugin-opensearch/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-oracledb/src/connection-parser.js b/packages/datadog-plugin-oracledb/src/connection-parser.js index 8db94c4e9c2..89fada7b75a 100644 --- a/packages/datadog-plugin-oracledb/src/connection-parser.js +++ b/packages/datadog-plugin-oracledb/src/connection-parser.js @@ -1,3 +1,5 @@ +'use strict' + const { URL } = require('url') const log = require('../../dd-trace/src/log') diff --git a/packages/datadog-plugin-oracledb/test/naming.js b/packages/datadog-plugin-oracledb/test/naming.js index eaed0fa7516..6a7d84806a8 100644 --- a/packages/datadog-plugin-oracledb/test/naming.js +++ b/packages/datadog-plugin-oracledb/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-pg/test/naming.js b/packages/datadog-plugin-pg/test/naming.js index a961906a417..e24c5c21005 100644 --- a/packages/datadog-plugin-pg/test/naming.js +++ b/packages/datadog-plugin-pg/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-prisma/test/naming.js b/packages/datadog-plugin-prisma/test/naming.js index 1dfe11ca8df..74a05b60fc5 100644 --- a/packages/datadog-plugin-prisma/test/naming.js +++ b/packages/datadog-plugin-prisma/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-protobufjs/src/index.js b/packages/datadog-plugin-protobufjs/src/index.js index 800c3d9e3cb..bf2f2992ec6 100644 --- a/packages/datadog-plugin-protobufjs/src/index.js +++ b/packages/datadog-plugin-protobufjs/src/index.js @@ -1,3 +1,5 @@ +'use strict' + const SchemaPlugin = require('../../dd-trace/src/plugins/schema') const SchemaExtractor = require('./schema_iterator') diff --git a/packages/datadog-plugin-protobufjs/src/schema_iterator.js b/packages/datadog-plugin-protobufjs/src/schema_iterator.js index a1f8cb3bc5b..f7dba6439d5 100644 --- a/packages/datadog-plugin-protobufjs/src/schema_iterator.js +++ b/packages/datadog-plugin-protobufjs/src/schema_iterator.js @@ -1,3 +1,5 @@ +'use strict' + const PROTOBUF = 'protobuf' const { SCHEMA_DEFINITION, diff --git a/packages/datadog-plugin-protobufjs/test/helpers.js b/packages/datadog-plugin-protobufjs/test/helpers.js index d91be2e496b..8fdd54294df 100644 --- a/packages/datadog-plugin-protobufjs/test/helpers.js +++ b/packages/datadog-plugin-protobufjs/test/helpers.js @@ -1,3 +1,5 @@ +'use strict' + async function loadMessage (protobuf, messageTypeName) { if (messageTypeName === 'OtherMessage') { const root = await protobuf.load('packages/datadog-plugin-protobufjs/test/schemas/other_message.proto') diff --git a/packages/datadog-plugin-redis/test/naming.js b/packages/datadog-plugin-redis/test/naming.js index 1ed3f17e428..6d116c36968 100644 --- a/packages/datadog-plugin-redis/test/naming.js +++ b/packages/datadog-plugin-redis/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-rhea/test/naming.js b/packages/datadog-plugin-rhea/test/naming.js index f4e4508e8a7..f174f794963 100644 --- a/packages/datadog-plugin-rhea/test/naming.js +++ b/packages/datadog-plugin-rhea/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-selenium/src/index.js b/packages/datadog-plugin-selenium/src/index.js index fd1a8f1e651..05266d45bab 100644 --- a/packages/datadog-plugin-selenium/src/index.js +++ b/packages/datadog-plugin-selenium/src/index.js @@ -1,3 +1,5 @@ +'use strict' + const CiPlugin = require('../../dd-trace/src/plugins/ci_plugin') const { storage } = require('../../datadog-core') diff --git a/packages/datadog-plugin-tedious/test/naming.js b/packages/datadog-plugin-tedious/test/naming.js index da01aad5a8f..b1e0d53be0c 100644 --- a/packages/datadog-plugin-tedious/test/naming.js +++ b/packages/datadog-plugin-tedious/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-undici/test/naming.js b/packages/datadog-plugin-undici/test/naming.js index 5bf2be387c3..8ca1b94fea4 100644 --- a/packages/datadog-plugin-undici/test/naming.js +++ b/packages/datadog-plugin-undici/test/naming.js @@ -1,3 +1,5 @@ +'use strict' + const { resolveNaming } = require('../../dd-trace/test/plugins/helpers') const rawExpectedSchema = { diff --git a/packages/datadog-plugin-vitest/src/index.js b/packages/datadog-plugin-vitest/src/index.js index 281c542acca..0d6e60a4437 100644 --- a/packages/datadog-plugin-vitest/src/index.js +++ b/packages/datadog-plugin-vitest/src/index.js @@ -1,3 +1,5 @@ +'use strict' + const CiPlugin = require('../../dd-trace/src/plugins/ci_plugin') const { storage } = require('../../datadog-core') const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper') diff --git a/packages/dd-trace/src/appsec/iast/iast-context.js b/packages/dd-trace/src/appsec/iast/iast-context.js index 6daff4aa348..d123d4316f8 100644 --- a/packages/dd-trace/src/appsec/iast/iast-context.js +++ b/packages/dd-trace/src/appsec/iast/iast-context.js @@ -1,3 +1,5 @@ +'use strict' + const IAST_CONTEXT_KEY = Symbol('_dd.iast.context') const IAST_TRANSACTION_ID = Symbol('_dd.iast.transactionId') @@ -52,7 +54,9 @@ function cleanIastContext (store, context, iastContext) { context[IAST_CONTEXT_KEY] = null } if (iastContext) { - Object.keys(iastContext).forEach(key => delete iastContext[key]) + if (typeof iastContext === 'object') { // eslint-disable-line eslint-rules/eslint-safe-typeof-object + Object.keys(iastContext).forEach(key => delete iastContext[key]) + } return true } return false diff --git a/packages/dd-trace/src/appsec/iast/index.js b/packages/dd-trace/src/appsec/iast/index.js index 8601dc3c8ca..1f16df27eea 100644 --- a/packages/dd-trace/src/appsec/iast/index.js +++ b/packages/dd-trace/src/appsec/iast/index.js @@ -1,3 +1,5 @@ +'use strict' + const vulnerabilityReporter = require('./vulnerability-reporter') const { enableAllAnalyzers, disableAllAnalyzers } = require('./analyzers') const web = require('../../plugins/util/web') diff --git a/packages/dd-trace/src/appsec/iast/overhead-controller.js b/packages/dd-trace/src/appsec/iast/overhead-controller.js index 3aa7bb651d5..ad5f005fd84 100644 --- a/packages/dd-trace/src/appsec/iast/overhead-controller.js +++ b/packages/dd-trace/src/appsec/iast/overhead-controller.js @@ -1,6 +1,6 @@ 'use strict' -const LRUCache = require('lru-cache') +const { LRUCache } = require('lru-cache') const web = require('../../plugins/util/web') const vulnerabilities = require('./vulnerabilities') diff --git a/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-esm.mjs b/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-esm.mjs index 2bd186619fd..a5075668ea4 100644 --- a/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-esm.mjs +++ b/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-esm.mjs @@ -1,5 +1,3 @@ -'use strict' - import path from 'path' import { URL } from 'url' import { getName } from '../telemetry/verbosity.js' diff --git a/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js b/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js index ab0b5ec878f..6c7a61a9f95 100644 --- a/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +++ b/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js @@ -1,5 +1,7 @@ 'use strict' +/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['module.register'] }] */ + const Module = require('module') const { pathToFileURL } = require('url') const { MessageChannel } = require('worker_threads') diff --git a/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-regex.js b/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-regex.js index c8abc9e3a76..2adcb5cc302 100644 --- a/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-regex.js +++ b/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-regex.js @@ -1,3 +1,5 @@ +'use strict' + // eslint-disable-next-line @stylistic/max-len const DEFAULT_IAST_REDACTION_NAME_PATTERN = '(?:p(?:ass)?w(?:or)?d|pass(?:_?phrase)?|secret|(?:api_?|private_?|public_?|access_?|secret_?)key(?:_?id)?|token|consumer_?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?|(?:sur|last)name|user(?:name)?|address|e?mail)' // eslint-disable-next-line @stylistic/max-len diff --git a/packages/dd-trace/src/appsec/iast/vulnerabilities.js b/packages/dd-trace/src/appsec/iast/vulnerabilities.js index 639ee43df8b..7a38f3741c3 100644 --- a/packages/dd-trace/src/appsec/iast/vulnerabilities.js +++ b/packages/dd-trace/src/appsec/iast/vulnerabilities.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = { COMMAND_INJECTION: 'COMMAND_INJECTION', CODE_INJECTION: 'CODE_INJECTION', diff --git a/packages/dd-trace/src/appsec/iast/vulnerability-reporter.js b/packages/dd-trace/src/appsec/iast/vulnerability-reporter.js index ce03870aaab..201a945b25e 100644 --- a/packages/dd-trace/src/appsec/iast/vulnerability-reporter.js +++ b/packages/dd-trace/src/appsec/iast/vulnerability-reporter.js @@ -1,6 +1,6 @@ 'use strict' -const LRU = require('lru-cache') +const { LRUCache } = require('lru-cache') const vulnerabilitiesFormatter = require('./vulnerabilities-formatter') const { IAST_ENABLED_TAG_KEY, IAST_JSON_TAG_KEY } = require('./tags') const { keepTrace } = require('../../priority_sampler') @@ -10,7 +10,7 @@ const { ASM } = require('../../standalone/product') const VULNERABILITIES_KEY = 'vulnerabilities' const VULNERABILITY_HASHES_MAX_SIZE = 1000 -const VULNERABILITY_HASHES = new LRU({ max: VULNERABILITY_HASHES_MAX_SIZE }) +const VULNERABILITY_HASHES = new LRUCache({ max: VULNERABILITY_HASHES_MAX_SIZE }) const RESET_VULNERABILITY_CACHE_INTERVAL = 60 * 60 * 1000 // 1 hour let tracer @@ -114,7 +114,7 @@ function isDuplicatedVulnerability (vulnerability) { } function getVulnerabilityCallSiteFrames () { - return getCallsiteFrames(stackTraceMaxDepth) + return getCallsiteFrames(stackTraceMaxDepth, getVulnerabilityCallSiteFrames) } function replaceCallSiteFromSourceMap (callsite) { diff --git a/packages/dd-trace/src/appsec/rasp/utils.js b/packages/dd-trace/src/appsec/rasp/utils.js index 4fc891cf1a9..f3b3cea6ba9 100644 --- a/packages/dd-trace/src/appsec/rasp/utils.js +++ b/packages/dd-trace/src/appsec/rasp/utils.js @@ -41,7 +41,7 @@ function handleResult (result, req, res, abortController, config, raspRule) { const ruleTriggered = !!result?.events?.length if (generateStackTraceAction && enabled && canReportStackTrace(rootSpan, maxStackTraces)) { - const frames = getCallsiteFrames(maxDepth) + const frames = getCallsiteFrames(maxDepth, handleResult) reportStackTrace( rootSpan, diff --git a/packages/dd-trace/src/appsec/stack_trace.js b/packages/dd-trace/src/appsec/stack_trace.js index 448b19c9d53..c40d1124d19 100644 --- a/packages/dd-trace/src/appsec/stack_trace.js +++ b/packages/dd-trace/src/appsec/stack_trace.js @@ -9,36 +9,36 @@ const STACK_TRACE_NAMESPACES = { IAST: 'vulnerability' } -function getCallSiteList (maxDepth = 100) { +function prepareStackTrace (_, callsites) { + return callsites +} + +function getCallSiteList (maxDepth = 100, constructorOpt) { const previousPrepareStackTrace = Error.prepareStackTrace const previousStackTraceLimit = Error.stackTraceLimit - let callsiteList // Since some frames will be discarded because they come from tracer codebase, a buffer is added // to the limit in order to get as close as `maxDepth` number of frames. Error.stackTraceLimit = maxDepth + LIBRARY_FRAMES_BUFFER try { - Error.prepareStackTrace = function (_, callsites) { - callsiteList = callsites - } - const e = new Error('message') - e.stack + Error.prepareStackTrace = prepareStackTrace + const obj = {} + Error.captureStackTrace(obj, constructorOpt) + return obj.stack } finally { Error.prepareStackTrace = previousPrepareStackTrace Error.stackTraceLimit = previousStackTraceLimit } - - return callsiteList } function filterOutFramesFromLibrary (callSiteList) { return callSiteList.filter(callSite => !callSite.getFileName()?.startsWith(ddBasePath)) } -function getCallsiteFrames (maxDepth = 32, callSiteListGetter = getCallSiteList) { +function getCallsiteFrames (maxDepth = 32, constructorOpt = getCallsiteFrames, callSiteListGetter = getCallSiteList) { if (maxDepth < 1) maxDepth = Infinity - const callSiteList = callSiteListGetter(maxDepth) + const callSiteList = callSiteListGetter(maxDepth, constructorOpt) const filteredFrames = filterOutFramesFromLibrary(callSiteList) const half = filteredFrames.length > maxDepth ? Math.round(maxDepth / 2) : Infinity diff --git a/packages/dd-trace/src/appsec/telemetry/common.js b/packages/dd-trace/src/appsec/telemetry/common.js index a63e4b133ff..06ce35554ff 100644 --- a/packages/dd-trace/src/appsec/telemetry/common.js +++ b/packages/dd-trace/src/appsec/telemetry/common.js @@ -1,4 +1,4 @@ -'use strinct' +'use strict' const DD_TELEMETRY_REQUEST_METRICS = Symbol('_dd.appsec.telemetry.request.metrics') diff --git a/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js b/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js index d6f1c5a4d22..6f10be0ba9d 100644 --- a/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +++ b/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js @@ -1,3 +1,5 @@ +'use strict' + const request = require('../../exporters/common/request') const id = require('../../id') const log = require('../../log') diff --git a/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js b/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js index c58c472e1e7..b74a148202f 100644 --- a/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +++ b/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js @@ -1,3 +1,5 @@ +'use strict' + const fs = require('fs') const path = require('path') diff --git a/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js b/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js index 9f545d06348..ac7e0e1ee8b 100644 --- a/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +++ b/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js @@ -1,3 +1,5 @@ +'use strict' + const request = require('../../exporters/common/request') const log = require('../../log') const { getEnvironmentVariable } = require('../../config-helper') diff --git a/packages/dd-trace/src/ci-visibility/log-submission/log-submission-plugin.js b/packages/dd-trace/src/ci-visibility/log-submission/log-submission-plugin.js index b97ee9731af..811edd0712a 100644 --- a/packages/dd-trace/src/ci-visibility/log-submission/log-submission-plugin.js +++ b/packages/dd-trace/src/ci-visibility/log-submission/log-submission-plugin.js @@ -1,3 +1,5 @@ +'use strict' + const Plugin = require('../../plugins/plugin') const log = require('../../log') const { getEnvironmentVariable } = require('../../config-helper') diff --git a/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js b/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js index 1d4febd98e4..e16b62dcdfa 100644 --- a/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js +++ b/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js @@ -1,3 +1,5 @@ +'use strict' + const request = require('../../exporters/common/request') const id = require('../../id') const log = require('../../log') diff --git a/packages/dd-trace/src/ci-visibility/telemetry.js b/packages/dd-trace/src/ci-visibility/telemetry.js index 7b23d38db08..b93c23b0eaf 100644 --- a/packages/dd-trace/src/ci-visibility/telemetry.js +++ b/packages/dd-trace/src/ci-visibility/telemetry.js @@ -1,3 +1,5 @@ +'use strict' + const telemetryMetrics = require('../telemetry/metrics') const ciVisibilityMetrics = telemetryMetrics.manager.namespace('civisibility') diff --git a/packages/dd-trace/src/ci-visibility/test-api-manual/test-api-manual-plugin.js b/packages/dd-trace/src/ci-visibility/test-api-manual/test-api-manual-plugin.js index 9cd37098143..fa6730288d2 100644 --- a/packages/dd-trace/src/ci-visibility/test-api-manual/test-api-manual-plugin.js +++ b/packages/dd-trace/src/ci-visibility/test-api-manual/test-api-manual-plugin.js @@ -1,3 +1,5 @@ +'use strict' + const CiPlugin = require('../../plugins/ci_plugin') const { TEST_STATUS, diff --git a/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js b/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js index 2e1897e7cb7..f31f855668c 100644 --- a/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +++ b/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js @@ -1,3 +1,5 @@ +'use strict' + const request = require('../../exporters/common/request') const id = require('../../id') const { getEnvironmentVariable } = require('../../config-helper') diff --git a/packages/dd-trace/src/config_stable.js b/packages/dd-trace/src/config_stable.js index fa7855ca3e1..bbd459772b3 100644 --- a/packages/dd-trace/src/config_stable.js +++ b/packages/dd-trace/src/config_stable.js @@ -1,3 +1,5 @@ +'use strict' + const os = require('os') const fs = require('fs') const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper') diff --git a/packages/dd-trace/src/datastreams/checkpointer.js b/packages/dd-trace/src/datastreams/checkpointer.js index 1b6e2a28c0f..ae36db43fdc 100644 --- a/packages/dd-trace/src/datastreams/checkpointer.js +++ b/packages/dd-trace/src/datastreams/checkpointer.js @@ -1,3 +1,5 @@ +'use strict' + const DataStreamsContext = require('./context') class DataStreamsCheckpointer { diff --git a/packages/dd-trace/src/datastreams/context.js b/packages/dd-trace/src/datastreams/context.js index 263840fe1c8..dccb204bee2 100644 --- a/packages/dd-trace/src/datastreams/context.js +++ b/packages/dd-trace/src/datastreams/context.js @@ -1,3 +1,5 @@ +'use strict' + const { storage } = require('../../../datadog-core') const log = require('../log') diff --git a/packages/dd-trace/src/datastreams/encoding.js b/packages/dd-trace/src/datastreams/encoding.js index e6e75548533..66f9998c73d 100644 --- a/packages/dd-trace/src/datastreams/encoding.js +++ b/packages/dd-trace/src/datastreams/encoding.js @@ -1,3 +1,5 @@ +'use strict' + // encodes positive and negative numbers, using zig zag encoding to reduce the size of the variable length encoding. // uses high and low part to ensure those parts are under the limit for byte operations in javascript (32 bits) // maximum number possible to encode is MAX_SAFE_INTEGER/2 (using zig zag shifts the bits by 1 to the left) diff --git a/packages/dd-trace/src/datastreams/fnv.js b/packages/dd-trace/src/datastreams/fnv.js index 4d04fa0c102..c4deb32d9d0 100644 --- a/packages/dd-trace/src/datastreams/fnv.js +++ b/packages/dd-trace/src/datastreams/fnv.js @@ -1,3 +1,5 @@ +'use strict' + const FNV_64_PRIME = BigInt('0x100000001B3') const FNV1_64_INIT = BigInt('0xCBF29CE484222325') diff --git a/packages/dd-trace/src/datastreams/pathway.js b/packages/dd-trace/src/datastreams/pathway.js index ddcd6ae9876..fe235148ae6 100644 --- a/packages/dd-trace/src/datastreams/pathway.js +++ b/packages/dd-trace/src/datastreams/pathway.js @@ -1,14 +1,15 @@ +'use strict' + // encoding used here is sha256 // other languages use FNV1 // this inconsistency is ok because hashes do not need to be consistent across services const crypto = require('crypto') const { encodeVarint, decodeVarint } = require('./encoding') -const LRUCache = require('lru-cache') +const { LRUCache } = require('lru-cache') const log = require('../log') const pick = require('../../../datadog-core/src/utils/src/pick') -const options = { max: 500 } -const cache = new LRUCache(options) +const cache = new LRUCache({ max: 500 }) const CONTEXT_PROPAGATION_KEY = 'dd-pathway-ctx' const CONTEXT_PROPAGATION_KEY_BASE64 = 'dd-pathway-ctx-base64' @@ -24,15 +25,16 @@ function computeHash (service, env, edgeTags, parentHash) { edgeTags.sort() const hashableEdgeTags = edgeTags.filter(item => item !== 'manual_checkpoint:true') - const key = `${service}${env}` + hashableEdgeTags.join('') + parentHash.toString() - if (cache.get(key)) { - return cache.get(key) + const key = `${service}${env}${hashableEdgeTags.join('')}${parentHash}` + let value = cache.get(key) + if (value) { + return value } const currentHash = shaHash(`${service}${env}` + hashableEdgeTags.join('')) const buf = Buffer.concat([currentHash, parentHash], 16) - const val = shaHash(buf.toString()) - cache.set(key, val) - return val + value = shaHash(buf.toString()) + cache.set(key, value) + return value } function encodePathwayContext (dataStreamsContext) { diff --git a/packages/dd-trace/src/datastreams/processor.js b/packages/dd-trace/src/datastreams/processor.js index f65e28fa64b..5bc503d9f5f 100644 --- a/packages/dd-trace/src/datastreams/processor.js +++ b/packages/dd-trace/src/datastreams/processor.js @@ -1,3 +1,5 @@ +'use strict' + const os = require('os') const pkg = require('../../../../package.json') @@ -78,15 +80,14 @@ class StatsBucket { return this._backlogs } - forCheckpoint (checkpoint) { - const key = checkpoint.hash - if (!this._checkpoints.has(key)) { - this._checkpoints.set( - key, new StatsPoint(checkpoint.hash, checkpoint.parentHash, checkpoint.edgeTags) - ) + forCheckpoint ({ hash, parentHash, edgeTags }) { + let checkpoint = this._checkpoints.get(hash) + if (!checkpoint) { + checkpoint = new StatsPoint(hash, parentHash, edgeTags) + this._checkpoints.set(hash, checkpoint) } - return this._checkpoints.get(key) + return checkpoint } /** diff --git a/packages/dd-trace/src/datastreams/schemas/schema.js b/packages/dd-trace/src/datastreams/schemas/schema.js index 4378e37d080..a20da49149c 100644 --- a/packages/dd-trace/src/datastreams/schemas/schema.js +++ b/packages/dd-trace/src/datastreams/schemas/schema.js @@ -1,3 +1,5 @@ +'use strict' + class Schema { constructor (definition, id) { this.definition = definition diff --git a/packages/dd-trace/src/datastreams/schemas/schema_builder.js b/packages/dd-trace/src/datastreams/schemas/schema_builder.js index 6e4fee424e1..6bcf58becd9 100644 --- a/packages/dd-trace/src/datastreams/schemas/schema_builder.js +++ b/packages/dd-trace/src/datastreams/schemas/schema_builder.js @@ -1,4 +1,6 @@ -const LRUCache = require('lru-cache') +'use strict' + +const { LRUCache } = require('lru-cache') const { fnv64 } = require('../fnv') const { Schema } = require('./schema') @@ -25,10 +27,12 @@ class SchemaBuilder { } static getSchema (schemaName, iterator, builder) { - if (!CACHE.has(schemaName)) { - CACHE.set(schemaName, (builder ?? new SchemaBuilder(iterator)).build()) + let entry = CACHE.get(schemaName) + if (!entry) { + entry = (builder ?? new SchemaBuilder(iterator)).build() + CACHE.set(schemaName, entry) } - return CACHE.get(schemaName) + return entry } build () { diff --git a/packages/dd-trace/src/datastreams/schemas/schema_sampler.js b/packages/dd-trace/src/datastreams/schemas/schema_sampler.js index 01e8502e90f..f1ec1c4ce04 100644 --- a/packages/dd-trace/src/datastreams/schemas/schema_sampler.js +++ b/packages/dd-trace/src/datastreams/schemas/schema_sampler.js @@ -1,3 +1,5 @@ +'use strict' + const SAMPLE_INTERVAL_MILLIS = 30 * 1000 class SchemaSampler { diff --git a/packages/dd-trace/src/datastreams/writer.js b/packages/dd-trace/src/datastreams/writer.js index f810c81d9c8..f7fdfd59c22 100644 --- a/packages/dd-trace/src/datastreams/writer.js +++ b/packages/dd-trace/src/datastreams/writer.js @@ -1,3 +1,5 @@ +'use strict' + const pkg = require('../../../../package.json') const log = require('../log') const request = require('../exporters/common/request') diff --git a/packages/dd-trace/src/debugger/devtools_client/index.js b/packages/dd-trace/src/debugger/devtools_client/index.js index 321c655c67d..10ba81032fd 100644 --- a/packages/dd-trace/src/debugger/devtools_client/index.js +++ b/packages/dd-trace/src/debugger/devtools_client/index.js @@ -40,11 +40,19 @@ const SUPPORT_ARRAY_BUFFER_RESIZE = NODE_MAJOR >= 20 const oneSecondNs = 1_000_000_000n let globalSnapshotSamplingRateWindowStart = 0n let snapshotsSampledWithinTheLastSecond = 0 -// TODO: Is a limit of 256 snapshots ever going to be a problem? -const snapshotProbeIndexBuffer = new ArrayBuffer(1, { maxByteLength: 256 }) -// TODO: Is a limit of 256 probes ever going to be a problem? + // TODO: Change to const once we drop support for Node.js 18 -let snapshotProbeIndex = new Uint8Array(snapshotProbeIndexBuffer) +let snapshotProbeIndexBuffer, snapshotProbeIndex + +if (SUPPORT_ARRAY_BUFFER_RESIZE) { + // TODO: Is a limit of 256 snapshots ever going to be a problem? + // eslint-disable-next-line n/no-unsupported-features/es-syntax + snapshotProbeIndexBuffer = new ArrayBuffer(1, { maxByteLength: 256 }) + // TODO: Is a limit of 256 probes ever going to be a problem? + snapshotProbeIndex = new Uint8Array(snapshotProbeIndexBuffer) +} else { + snapshotProbeIndex = new Uint8Array(1) +} // WARNING: The code above the line `await session.post('Debugger.resume')` is highly optimized. Please edit with care! session.on('Debugger.paused', async ({ params }) => { diff --git a/packages/dd-trace/src/debugger/devtools_client/inspector_promises_polyfill.js b/packages/dd-trace/src/debugger/devtools_client/inspector_promises_polyfill.js index bb4b0340be6..26f6f7e3b7f 100644 --- a/packages/dd-trace/src/debugger/devtools_client/inspector_promises_polyfill.js +++ b/packages/dd-trace/src/debugger/devtools_client/inspector_promises_polyfill.js @@ -1,5 +1,7 @@ 'use strict' +/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['inspector/promises'] }] */ + const { builtinModules } = require('node:module') if (builtinModules.includes('inspector/promises')) { diff --git a/packages/dd-trace/src/debugger/devtools_client/snapshot/symbols.js b/packages/dd-trace/src/debugger/devtools_client/snapshot/symbols.js index 66a82d0a160..5b250610437 100644 --- a/packages/dd-trace/src/debugger/devtools_client/snapshot/symbols.js +++ b/packages/dd-trace/src/debugger/devtools_client/snapshot/symbols.js @@ -1,4 +1,4 @@ -'use stict' +'use strict' module.exports = { collectionSizeSym: Symbol('datadog.collectionSize'), diff --git a/packages/dd-trace/src/encode/tags-processors.js b/packages/dd-trace/src/encode/tags-processors.js index efa0a78bb97..a832b5b0565 100644 --- a/packages/dd-trace/src/encode/tags-processors.js +++ b/packages/dd-trace/src/encode/tags-processors.js @@ -1,3 +1,5 @@ +'use strict' + // From agent truncators: https://github.com/DataDog/datadog-agent/blob/main/pkg/trace/agent/truncator.go // Values from: https://github.com/DataDog/datadog-agent/blob/main/pkg/trace/traceutil/truncate.go#L22-L27 diff --git a/packages/dd-trace/src/exporters/common/agent-info-exporter.js b/packages/dd-trace/src/exporters/common/agent-info-exporter.js index 3a77eab1c57..84026e1e30c 100644 --- a/packages/dd-trace/src/exporters/common/agent-info-exporter.js +++ b/packages/dd-trace/src/exporters/common/agent-info-exporter.js @@ -1,3 +1,5 @@ +'use strict' + const { URL, format } = require('url') const request = require('./request') diff --git a/packages/dd-trace/src/exporters/common/util.js b/packages/dd-trace/src/exporters/common/util.js index cc1c50c0965..5dd66c43726 100644 --- a/packages/dd-trace/src/exporters/common/util.js +++ b/packages/dd-trace/src/exporters/common/util.js @@ -1,3 +1,5 @@ +'use strict' + const { getEnvironmentVariable } = require('../../config-helper') function safeJSONStringify (value) { diff --git a/packages/dd-trace/src/exporters/span-stats/index.js b/packages/dd-trace/src/exporters/span-stats/index.js index 7feec80f578..e7a36fe271a 100644 --- a/packages/dd-trace/src/exporters/span-stats/index.js +++ b/packages/dd-trace/src/exporters/span-stats/index.js @@ -1,3 +1,5 @@ +'use strict' + const { URL, format } = require('url') const { Writer } = require('./writer') diff --git a/packages/dd-trace/src/exporters/span-stats/writer.js b/packages/dd-trace/src/exporters/span-stats/writer.js index 64258a99dcb..692dde47ca4 100644 --- a/packages/dd-trace/src/exporters/span-stats/writer.js +++ b/packages/dd-trace/src/exporters/span-stats/writer.js @@ -1,3 +1,5 @@ +'use strict' + const { SpanStatsEncoder } = require('../../encode/span-stats') const pkg = require('../../../../../package.json') diff --git a/packages/dd-trace/src/external-logger/src/index.js b/packages/dd-trace/src/external-logger/src/index.js index 1a2198f3bde..77f5523648a 100644 --- a/packages/dd-trace/src/external-logger/src/index.js +++ b/packages/dd-trace/src/external-logger/src/index.js @@ -1,3 +1,5 @@ +'use strict' + const tracerLogger = require('../../log')// path to require tracer logger const https = require('https') diff --git a/packages/dd-trace/src/git_metadata_tagger.js b/packages/dd-trace/src/git_metadata_tagger.js index dd3db945940..f33e18bc408 100644 --- a/packages/dd-trace/src/git_metadata_tagger.js +++ b/packages/dd-trace/src/git_metadata_tagger.js @@ -1,3 +1,5 @@ +'use strict' + const { SCI_COMMIT_SHA, SCI_REPOSITORY_URL } = require('./constants') class GitMetadataTagger { diff --git a/packages/dd-trace/src/git_properties.js b/packages/dd-trace/src/git_properties.js index d6429232226..43eaa119dcf 100644 --- a/packages/dd-trace/src/git_properties.js +++ b/packages/dd-trace/src/git_properties.js @@ -1,3 +1,5 @@ +'use strict' + const commitSHARegex = /git\.commit\.sha=([a-f\d]{40})/ const repositoryUrlRegex = /git\.repository_url=([\w\d:@/.-]+)/ diff --git a/packages/dd-trace/src/llmobs/plugins/bedrockruntime.js b/packages/dd-trace/src/llmobs/plugins/bedrockruntime.js index 7378949e3ac..62754072fb6 100644 --- a/packages/dd-trace/src/llmobs/plugins/bedrockruntime.js +++ b/packages/dd-trace/src/llmobs/plugins/bedrockruntime.js @@ -1,3 +1,5 @@ +'use strict' + const BaseLLMObsPlugin = require('./base') const { storage } = require('../../../../datadog-core') const llmobsStore = storage('llmobs') diff --git a/packages/dd-trace/src/noop/dogstatsd.js b/packages/dd-trace/src/noop/dogstatsd.js index 5ecb5d45840..686508badaa 100644 --- a/packages/dd-trace/src/noop/dogstatsd.js +++ b/packages/dd-trace/src/noop/dogstatsd.js @@ -1,3 +1,5 @@ +'use strict' + /** * @import { DogStatsD } from "../../../../index.d.ts" * @implements {DogStatsD} diff --git a/packages/dd-trace/src/opentracing/propagation/text_map_dsm.js b/packages/dd-trace/src/opentracing/propagation/text_map_dsm.js index 109746a620a..c9739e48255 100644 --- a/packages/dd-trace/src/opentracing/propagation/text_map_dsm.js +++ b/packages/dd-trace/src/opentracing/propagation/text_map_dsm.js @@ -1,3 +1,5 @@ +'use strict' + const pick = require('../../../../datadog-core/src/utils/src/pick') const log = require('../../log') diff --git a/packages/dd-trace/src/payload-tagging/config/index.js b/packages/dd-trace/src/payload-tagging/config/index.js index a5c8dc6cf1f..318e6b47247 100644 --- a/packages/dd-trace/src/payload-tagging/config/index.js +++ b/packages/dd-trace/src/payload-tagging/config/index.js @@ -1,3 +1,5 @@ +'use strict' + const aws = require('./aws.json') const sdks = { aws } diff --git a/packages/dd-trace/src/payload-tagging/index.js b/packages/dd-trace/src/payload-tagging/index.js index 342dcd75158..b80ce08d29a 100644 --- a/packages/dd-trace/src/payload-tagging/index.js +++ b/packages/dd-trace/src/payload-tagging/index.js @@ -1,3 +1,5 @@ +'use strict' + const rfdc = require('rfdc')({ proto: false, circles: false }) const { diff --git a/packages/dd-trace/src/payload-tagging/tagging.js b/packages/dd-trace/src/payload-tagging/tagging.js index 206e60b4a61..8e31ae40ee3 100644 --- a/packages/dd-trace/src/payload-tagging/tagging.js +++ b/packages/dd-trace/src/payload-tagging/tagging.js @@ -1,3 +1,5 @@ +'use strict' + const { PAYLOAD_TAGGING_MAX_TAGS } = require('../constants') const redactedKeys = new Set([ diff --git a/packages/dd-trace/src/plugins/apollo.js b/packages/dd-trace/src/plugins/apollo.js index 1c0d6aa98fd..b9d00d8ffe4 100644 --- a/packages/dd-trace/src/plugins/apollo.js +++ b/packages/dd-trace/src/plugins/apollo.js @@ -1,3 +1,5 @@ +'use strict' + const TracingPlugin = require('./tracing') const { storage } = require('../../../datadog-core') diff --git a/packages/dd-trace/src/plugins/ci_plugin.js b/packages/dd-trace/src/plugins/ci_plugin.js index f20b70c25b6..f57cb685b7e 100644 --- a/packages/dd-trace/src/plugins/ci_plugin.js +++ b/packages/dd-trace/src/plugins/ci_plugin.js @@ -1,3 +1,5 @@ +'use strict' + const { storage } = require('../../../datadog-core') const { getTestEnvironmentMetadata, diff --git a/packages/dd-trace/src/plugins/util/ci.js b/packages/dd-trace/src/plugins/util/ci.js index fcc4cee811e..e855b5460e9 100644 --- a/packages/dd-trace/src/plugins/util/ci.js +++ b/packages/dd-trace/src/plugins/util/ci.js @@ -1,3 +1,5 @@ +'use strict' + const { readFileSync } = require('fs') const { GIT_BRANCH, diff --git a/packages/dd-trace/src/plugins/util/env.js b/packages/dd-trace/src/plugins/util/env.js index c1721c4bb11..0b11b4abb78 100644 --- a/packages/dd-trace/src/plugins/util/env.js +++ b/packages/dd-trace/src/plugins/util/env.js @@ -1,3 +1,5 @@ +'use strict' + const os = require('os') const OS_PLATFORM = 'os.platform' diff --git a/packages/dd-trace/src/plugins/util/git.js b/packages/dd-trace/src/plugins/util/git.js index 45bb4e2af84..a94c1afcf5e 100644 --- a/packages/dd-trace/src/plugins/util/git.js +++ b/packages/dd-trace/src/plugins/util/git.js @@ -1,3 +1,5 @@ +'use strict' + const cp = require('child_process') const os = require('os') const path = require('path') diff --git a/packages/dd-trace/src/plugins/util/inferred_proxy.js b/packages/dd-trace/src/plugins/util/inferred_proxy.js index 965b62ae154..76f8696276c 100644 --- a/packages/dd-trace/src/plugins/util/inferred_proxy.js +++ b/packages/dd-trace/src/plugins/util/inferred_proxy.js @@ -1,3 +1,5 @@ +'use strict' + const log = require('../../log') const tags = require('../../../../../ext/tags') diff --git a/packages/dd-trace/src/plugins/util/llm.js b/packages/dd-trace/src/plugins/util/llm.js index 22a7ad211dc..92aedc7e5de 100644 --- a/packages/dd-trace/src/plugins/util/llm.js +++ b/packages/dd-trace/src/plugins/util/llm.js @@ -1,3 +1,5 @@ +'use strict' + const Sampler = require('../../sampler') const RE_NEWLINE = /\n/g diff --git a/packages/dd-trace/src/plugins/util/serverless.js b/packages/dd-trace/src/plugins/util/serverless.js index 3e969ffdfad..43958314705 100644 --- a/packages/dd-trace/src/plugins/util/serverless.js +++ b/packages/dd-trace/src/plugins/util/serverless.js @@ -1,3 +1,5 @@ +'use strict' + const types = require('../../../../../ext/types') const web = require('./web') diff --git a/packages/dd-trace/src/plugins/util/tags.js b/packages/dd-trace/src/plugins/util/tags.js index 9c3dc911e06..ec3a818396a 100644 --- a/packages/dd-trace/src/plugins/util/tags.js +++ b/packages/dd-trace/src/plugins/util/tags.js @@ -1,3 +1,5 @@ +'use strict' + const GIT_COMMIT_SHA = 'git.commit.sha' const GIT_BRANCH = 'git.branch' const GIT_REPOSITORY_URL = 'git.repository_url' diff --git a/packages/dd-trace/src/plugins/util/test.js b/packages/dd-trace/src/plugins/util/test.js index 341173ae383..3c3924495ac 100644 --- a/packages/dd-trace/src/plugins/util/test.js +++ b/packages/dd-trace/src/plugins/util/test.js @@ -1,3 +1,5 @@ +'use strict' + const path = require('path') const fs = require('fs') const { URL } = require('url') diff --git a/packages/dd-trace/src/plugins/util/url.js b/packages/dd-trace/src/plugins/util/url.js index 1d3cef5d41e..de95dee7b10 100644 --- a/packages/dd-trace/src/plugins/util/url.js +++ b/packages/dd-trace/src/plugins/util/url.js @@ -1,3 +1,5 @@ +'use strict' + const { URL } = require('url') function filterSensitiveInfoFromRepository (repositoryUrl) { diff --git a/packages/dd-trace/src/plugins/util/user-provided-git.js b/packages/dd-trace/src/plugins/util/user-provided-git.js index c2195cc92e4..e35a03b0108 100644 --- a/packages/dd-trace/src/plugins/util/user-provided-git.js +++ b/packages/dd-trace/src/plugins/util/user-provided-git.js @@ -1,3 +1,5 @@ +'use strict' + const { GIT_COMMIT_SHA, GIT_BRANCH, diff --git a/packages/dd-trace/src/profiling/exporters/event_serializer.js b/packages/dd-trace/src/profiling/exporters/event_serializer.js index 4a3e591d97e..58f028e7983 100644 --- a/packages/dd-trace/src/profiling/exporters/event_serializer.js +++ b/packages/dd-trace/src/profiling/exporters/event_serializer.js @@ -1,3 +1,7 @@ +'use strict' + +/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['os.availableParallelism'] }] */ + const os = require('os') const perf = require('perf_hooks').performance const version = require('../../../../../package.json').version diff --git a/packages/dd-trace/src/profiling/profilers/event_plugins/dns.js b/packages/dd-trace/src/profiling/profilers/event_plugins/dns.js index 29b1e62775f..04df7e40db8 100644 --- a/packages/dd-trace/src/profiling/profilers/event_plugins/dns.js +++ b/packages/dd-trace/src/profiling/profilers/event_plugins/dns.js @@ -1,3 +1,5 @@ +'use strict' + const EventPlugin = require('./event') class DNSPlugin extends EventPlugin { diff --git a/packages/dd-trace/src/profiling/profilers/event_plugins/dns_lookup.js b/packages/dd-trace/src/profiling/profilers/event_plugins/dns_lookup.js index 13f7ff3bd77..6597326b970 100644 --- a/packages/dd-trace/src/profiling/profilers/event_plugins/dns_lookup.js +++ b/packages/dd-trace/src/profiling/profilers/event_plugins/dns_lookup.js @@ -1,3 +1,5 @@ +'use strict' + const DNSPlugin = require('./dns') class DNSLookupPlugin extends DNSPlugin { diff --git a/packages/dd-trace/src/profiling/profilers/event_plugins/dns_lookupservice.js b/packages/dd-trace/src/profiling/profilers/event_plugins/dns_lookupservice.js index c40eb37518d..f270fd7c81c 100644 --- a/packages/dd-trace/src/profiling/profilers/event_plugins/dns_lookupservice.js +++ b/packages/dd-trace/src/profiling/profilers/event_plugins/dns_lookupservice.js @@ -1,3 +1,5 @@ +'use strict' + const DNSPlugin = require('./dns') class DNSLookupServicePlugin extends DNSPlugin { diff --git a/packages/dd-trace/src/profiling/profilers/event_plugins/dns_resolve.js b/packages/dd-trace/src/profiling/profilers/event_plugins/dns_resolve.js index d649d8a65ef..8c65ba71d41 100644 --- a/packages/dd-trace/src/profiling/profilers/event_plugins/dns_resolve.js +++ b/packages/dd-trace/src/profiling/profilers/event_plugins/dns_resolve.js @@ -1,3 +1,5 @@ +'use strict' + const DNSPlugin = require('./dns') const queryNames = new Map() diff --git a/packages/dd-trace/src/profiling/profilers/event_plugins/dns_reverse.js b/packages/dd-trace/src/profiling/profilers/event_plugins/dns_reverse.js index ad01ff13ea4..2e67ef8dd40 100644 --- a/packages/dd-trace/src/profiling/profilers/event_plugins/dns_reverse.js +++ b/packages/dd-trace/src/profiling/profilers/event_plugins/dns_reverse.js @@ -1,3 +1,5 @@ +'use strict' + const DNSPlugin = require('./dns') class DNSReversePlugin extends DNSPlugin { diff --git a/packages/dd-trace/src/profiling/profilers/event_plugins/event.js b/packages/dd-trace/src/profiling/profilers/event_plugins/event.js index 35d6728b9b0..4812990bc88 100644 --- a/packages/dd-trace/src/profiling/profilers/event_plugins/event.js +++ b/packages/dd-trace/src/profiling/profilers/event_plugins/event.js @@ -1,3 +1,5 @@ +'use strict' + const TracingPlugin = require('../../../plugins/tracing') const { performance } = require('perf_hooks') diff --git a/packages/dd-trace/src/profiling/profilers/event_plugins/fs.js b/packages/dd-trace/src/profiling/profilers/event_plugins/fs.js index 34eb7b52353..263ba9b7db0 100644 --- a/packages/dd-trace/src/profiling/profilers/event_plugins/fs.js +++ b/packages/dd-trace/src/profiling/profilers/event_plugins/fs.js @@ -1,3 +1,5 @@ +'use strict' + const EventPlugin = require('./event') // Values taken from parameter names in datadog-instrumentations/src/fs.js. diff --git a/packages/dd-trace/src/profiling/profilers/event_plugins/net.js b/packages/dd-trace/src/profiling/profilers/event_plugins/net.js index ffd99bbda70..e85a124cd98 100644 --- a/packages/dd-trace/src/profiling/profilers/event_plugins/net.js +++ b/packages/dd-trace/src/profiling/profilers/event_plugins/net.js @@ -1,3 +1,5 @@ +'use strict' + const EventPlugin = require('./event') class NetPlugin extends EventPlugin { diff --git a/packages/dd-trace/src/profiling/profilers/events.js b/packages/dd-trace/src/profiling/profilers/events.js index 62a75bbd1a3..440e12d493e 100644 --- a/packages/dd-trace/src/profiling/profilers/events.js +++ b/packages/dd-trace/src/profiling/profilers/events.js @@ -1,3 +1,5 @@ +'use strict' + const { performance, constants, PerformanceObserver } = require('perf_hooks') const { END_TIMESTAMP_LABEL, SPAN_ID_LABEL, LOCAL_ROOT_SPAN_ID_LABEL, encodeProfileAsync } = require('./shared') const { Function, Label, Line, Location, Profile, Sample, StringTable, ValueType } = require('pprof-format') diff --git a/packages/dd-trace/src/profiling/webspan-utils.js b/packages/dd-trace/src/profiling/webspan-utils.js index a2541ca4216..c5436e79641 100644 --- a/packages/dd-trace/src/profiling/webspan-utils.js +++ b/packages/dd-trace/src/profiling/webspan-utils.js @@ -1,3 +1,5 @@ +'use strict' + const { HTTP_METHOD, HTTP_ROUTE, RESOURCE_NAME, SPAN_TYPE } = require('../../../../ext/tags') const { WEB } = require('../../../../ext/types') diff --git a/packages/dd-trace/src/rate_limiter.js b/packages/dd-trace/src/rate_limiter.js index 3789ffaeb72..a584216335f 100644 --- a/packages/dd-trace/src/rate_limiter.js +++ b/packages/dd-trace/src/rate_limiter.js @@ -5,7 +5,7 @@ const limiter = require('limiter') class RateLimiter { constructor (rateLimit, interval = 'second') { this._rateLimit = Number.parseInt(rateLimit) - this._limiter = new limiter.RateLimiter(this._rateLimit, interval) + this._limiter = new limiter.RateLimiter({ tokensPerInterval: this._rateLimit, interval }) this._tokensRequested = 0 this._prevIntervalTokens = 0 this._prevTokensRequested = 0 diff --git a/packages/dd-trace/src/runtime_metrics/runtime_metrics.js b/packages/dd-trace/src/runtime_metrics/runtime_metrics.js index ab7865093a9..8550c449d84 100644 --- a/packages/dd-trace/src/runtime_metrics/runtime_metrics.js +++ b/packages/dd-trace/src/runtime_metrics/runtime_metrics.js @@ -1,5 +1,7 @@ 'use strict' +/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['v8.GCProfiler'] }] */ + // TODO: capture every second and flush every 10 seconds const v8 = require('v8') diff --git a/packages/dd-trace/src/service-naming/index.js b/packages/dd-trace/src/service-naming/index.js index 470a9daa82d..385d6945d3f 100644 --- a/packages/dd-trace/src/service-naming/index.js +++ b/packages/dd-trace/src/service-naming/index.js @@ -1,3 +1,5 @@ +'use strict' + class SchemaManager { constructor () { this.schemas = {} diff --git a/packages/dd-trace/src/service-naming/schemas/definition.js b/packages/dd-trace/src/service-naming/schemas/definition.js index 44149ac48d9..d4f64602ee5 100644 --- a/packages/dd-trace/src/service-naming/schemas/definition.js +++ b/packages/dd-trace/src/service-naming/schemas/definition.js @@ -1,3 +1,5 @@ +'use strict' + class SchemaDefinition { constructor (schema) { this.schema = schema diff --git a/packages/dd-trace/src/service-naming/schemas/util.js b/packages/dd-trace/src/service-naming/schemas/util.js index 179ea7a04fe..97f5d80b677 100644 --- a/packages/dd-trace/src/service-naming/schemas/util.js +++ b/packages/dd-trace/src/service-naming/schemas/util.js @@ -1,3 +1,5 @@ +'use strict' + function identityService ({ tracerService }) { return tracerService } diff --git a/packages/dd-trace/src/service-naming/schemas/v0/graphql.js b/packages/dd-trace/src/service-naming/schemas/v0/graphql.js index db0c63778f4..5b5d04ded8d 100644 --- a/packages/dd-trace/src/service-naming/schemas/v0/graphql.js +++ b/packages/dd-trace/src/service-naming/schemas/v0/graphql.js @@ -1,3 +1,5 @@ +'use strict' + const { identityService } = require('../util') const graphql = { diff --git a/packages/dd-trace/src/service-naming/schemas/v0/index.js b/packages/dd-trace/src/service-naming/schemas/v0/index.js index 1b0b746035d..3ee4c59de11 100644 --- a/packages/dd-trace/src/service-naming/schemas/v0/index.js +++ b/packages/dd-trace/src/service-naming/schemas/v0/index.js @@ -1,3 +1,5 @@ +'use strict' + const SchemaDefinition = require('../definition') const messaging = require('./messaging') const storage = require('./storage') diff --git a/packages/dd-trace/src/service-naming/schemas/v0/messaging.js b/packages/dd-trace/src/service-naming/schemas/v0/messaging.js index 8b8742661f2..fa9dc21a066 100644 --- a/packages/dd-trace/src/service-naming/schemas/v0/messaging.js +++ b/packages/dd-trace/src/service-naming/schemas/v0/messaging.js @@ -1,3 +1,5 @@ +'use strict' + const { identityService, awsServiceV0 } = require('../util') function amqpServiceName ({ tracerService }) { diff --git a/packages/dd-trace/src/service-naming/schemas/v0/serverless.js b/packages/dd-trace/src/service-naming/schemas/v0/serverless.js index 64202b11873..2e32ac25950 100644 --- a/packages/dd-trace/src/service-naming/schemas/v0/serverless.js +++ b/packages/dd-trace/src/service-naming/schemas/v0/serverless.js @@ -1,3 +1,5 @@ +'use strict' + const { identityService } = require('../util') const serverless = { diff --git a/packages/dd-trace/src/service-naming/schemas/v0/storage.js b/packages/dd-trace/src/service-naming/schemas/v0/storage.js index d5ed0713fa9..c252ac798e8 100644 --- a/packages/dd-trace/src/service-naming/schemas/v0/storage.js +++ b/packages/dd-trace/src/service-naming/schemas/v0/storage.js @@ -1,3 +1,5 @@ +'use strict' + function getRedisService (pluginConfig, connectionName) { if (pluginConfig.splitByInstance && connectionName) { return pluginConfig.service diff --git a/packages/dd-trace/src/service-naming/schemas/v0/web.js b/packages/dd-trace/src/service-naming/schemas/v0/web.js index 777c5db1b9c..23046f8ce8d 100644 --- a/packages/dd-trace/src/service-naming/schemas/v0/web.js +++ b/packages/dd-trace/src/service-naming/schemas/v0/web.js @@ -1,3 +1,5 @@ +'use strict' + const { identityService, httpPluginClientService, awsServiceV0 } = require('../util') const web = { diff --git a/packages/dd-trace/src/service-naming/schemas/v1/graphql.js b/packages/dd-trace/src/service-naming/schemas/v1/graphql.js index 1a207d807c2..9cfcf599ce1 100644 --- a/packages/dd-trace/src/service-naming/schemas/v1/graphql.js +++ b/packages/dd-trace/src/service-naming/schemas/v1/graphql.js @@ -1,3 +1,5 @@ +'use strict' + const { identityService } = require('../util') const graphql = { diff --git a/packages/dd-trace/src/service-naming/schemas/v1/index.js b/packages/dd-trace/src/service-naming/schemas/v1/index.js index 1b0b746035d..3ee4c59de11 100644 --- a/packages/dd-trace/src/service-naming/schemas/v1/index.js +++ b/packages/dd-trace/src/service-naming/schemas/v1/index.js @@ -1,3 +1,5 @@ +'use strict' + const SchemaDefinition = require('../definition') const messaging = require('./messaging') const storage = require('./storage') diff --git a/packages/dd-trace/src/service-naming/schemas/v1/messaging.js b/packages/dd-trace/src/service-naming/schemas/v1/messaging.js index b7e3da0663a..931b90d6cab 100644 --- a/packages/dd-trace/src/service-naming/schemas/v1/messaging.js +++ b/packages/dd-trace/src/service-naming/schemas/v1/messaging.js @@ -1,3 +1,5 @@ +'use strict' + const { identityService } = require('../util') const amqpInbound = { diff --git a/packages/dd-trace/src/service-naming/schemas/v1/serverless.js b/packages/dd-trace/src/service-naming/schemas/v1/serverless.js index 64202b11873..2e32ac25950 100644 --- a/packages/dd-trace/src/service-naming/schemas/v1/serverless.js +++ b/packages/dd-trace/src/service-naming/schemas/v1/serverless.js @@ -1,3 +1,5 @@ +'use strict' + const { identityService } = require('../util') const serverless = { diff --git a/packages/dd-trace/src/service-naming/schemas/v1/storage.js b/packages/dd-trace/src/service-naming/schemas/v1/storage.js index 2836d6b2bcd..04ed9943819 100644 --- a/packages/dd-trace/src/service-naming/schemas/v1/storage.js +++ b/packages/dd-trace/src/service-naming/schemas/v1/storage.js @@ -1,3 +1,5 @@ +'use strict' + function configWithFallback ({ tracerService, pluginConfig }) { return pluginConfig.service || tracerService } diff --git a/packages/dd-trace/src/service-naming/schemas/v1/web.js b/packages/dd-trace/src/service-naming/schemas/v1/web.js index 333ccae51c3..66b1afee22f 100644 --- a/packages/dd-trace/src/service-naming/schemas/v1/web.js +++ b/packages/dd-trace/src/service-naming/schemas/v1/web.js @@ -1,3 +1,5 @@ +'use strict' + const { identityService, httpPluginClientService } = require('../util') const web = { diff --git a/packages/dd-trace/src/span_stats.js b/packages/dd-trace/src/span_stats.js index 4e7c3377a5b..1bf0d378a6b 100644 --- a/packages/dd-trace/src/span_stats.js +++ b/packages/dd-trace/src/span_stats.js @@ -1,3 +1,5 @@ +'use strict' + const os = require('os') const { version } = require('./pkg') const pkg = require('../../../package.json') diff --git a/packages/dd-trace/src/telemetry/send-data.js b/packages/dd-trace/src/telemetry/send-data.js index 9a1d9e828f9..43851f63583 100644 --- a/packages/dd-trace/src/telemetry/send-data.js +++ b/packages/dd-trace/src/telemetry/send-data.js @@ -1,3 +1,5 @@ +'use strict' + const request = require('../exporters/common/request') const log = require('../log') const { isTrue } = require('../util') diff --git a/packages/dd-trace/test/appsec/graphql.spec.js b/packages/dd-trace/test/appsec/graphql.spec.js index f624be32284..8ead52c42b8 100644 --- a/packages/dd-trace/test/appsec/graphql.spec.js +++ b/packages/dd-trace/test/appsec/graphql.spec.js @@ -1,3 +1,5 @@ +'use strict' + const proxyquire = require('proxyquire') const waf = require('../../src/appsec/waf') const web = require('../../src/plugins/util/web') diff --git a/packages/dd-trace/test/appsec/iast/analyzers/resources/random-functions.js b/packages/dd-trace/test/appsec/iast/analyzers/resources/random-functions.js index f608645242d..a533953b5e6 100644 --- a/packages/dd-trace/test/appsec/iast/analyzers/resources/random-functions.js +++ b/packages/dd-trace/test/appsec/iast/analyzers/resources/random-functions.js @@ -1,3 +1,5 @@ +'use strict' + function weakRandom () { return Math.random() } diff --git a/packages/dd-trace/test/appsec/iast/analyzers/weak-randomness-analyzer.spec.js b/packages/dd-trace/test/appsec/iast/analyzers/weak-randomness-analyzer.spec.js index a80c257760a..de46384f8c3 100644 --- a/packages/dd-trace/test/appsec/iast/analyzers/weak-randomness-analyzer.spec.js +++ b/packages/dd-trace/test/appsec/iast/analyzers/weak-randomness-analyzer.spec.js @@ -94,7 +94,7 @@ describe('weak-randomness-analyzer', () => { occurrences: 1, location: { path: randomFunctionsPath, - line: 2 + line: 4 } }) }) diff --git a/packages/dd-trace/test/appsec/iast/index.spec.js b/packages/dd-trace/test/appsec/iast/index.spec.js index 5fdb00bd260..e0351d5201d 100644 --- a/packages/dd-trace/test/appsec/iast/index.spec.js +++ b/packages/dd-trace/test/appsec/iast/index.spec.js @@ -1,3 +1,5 @@ +'use strict' + const proxyquire = require('proxyquire') const Config = require('../../../src/config') const agent = require('../../plugins/agent') diff --git a/packages/dd-trace/test/appsec/iast/path-line.spec.js b/packages/dd-trace/test/appsec/iast/path-line.spec.js index 592ceb9f821..e69782fcab8 100644 --- a/packages/dd-trace/test/appsec/iast/path-line.spec.js +++ b/packages/dd-trace/test/appsec/iast/path-line.spec.js @@ -1,3 +1,5 @@ +'use strict' + const proxyquire = require('proxyquire') const path = require('path') const os = require('os') @@ -199,7 +201,7 @@ describe('path-line', function () { const basePath = pathLine.ddBasePath pathLine.ddBasePath = path.join('test', 'base', 'path') - const list = getCallsiteFrames(32, getCallSiteInfo) + const list = getCallsiteFrames(32, getCallSiteInfo, getCallSiteInfo) const firstNonDDPath = pathLine.getNonDDCallSiteFrames(list)[0] const expectedPath = path.join('node_modules', firstNonDDPath.path) diff --git a/packages/dd-trace/test/appsec/iast/taint-tracking/resources/propagationFunctions.js b/packages/dd-trace/test/appsec/iast/taint-tracking/resources/propagationFunctions.js index de37c351789..f1988e78a61 100644 --- a/packages/dd-trace/test/appsec/iast/taint-tracking/resources/propagationFunctions.js +++ b/packages/dd-trace/test/appsec/iast/taint-tracking/resources/propagationFunctions.js @@ -1,3 +1,5 @@ +'use strict' + function concatSuffix (str) { return str + '_suffix' } diff --git a/packages/dd-trace/test/appsec/iast/vulnerability-reporter.spec.js b/packages/dd-trace/test/appsec/iast/vulnerability-reporter.spec.js index 996d87d2019..717cf3080f5 100644 --- a/packages/dd-trace/test/appsec/iast/vulnerability-reporter.spec.js +++ b/packages/dd-trace/test/appsec/iast/vulnerability-reporter.spec.js @@ -1,3 +1,5 @@ +'use strict' + const { addVulnerability, sendVulnerabilities, clearCache, start, stop } = require('../../../src/appsec/iast/vulnerability-reporter') const VulnerabilityAnalyzer = require('../../../../dd-trace/src/appsec/iast/analyzers/vulnerability-analyzer') diff --git a/packages/dd-trace/test/appsec/next/pages-dir/server.js b/packages/dd-trace/test/appsec/next/pages-dir/server.js index 6bfac617836..d0827f71565 100644 --- a/packages/dd-trace/test/appsec/next/pages-dir/server.js +++ b/packages/dd-trace/test/appsec/next/pages-dir/server.js @@ -1,5 +1,3 @@ -'use strict' - const { PORT, HOSTNAME } = process.env const { createServer } = require('http') diff --git a/packages/dd-trace/test/appsec/stack_trace.spec.js b/packages/dd-trace/test/appsec/stack_trace.spec.js index 406944c0381..6599d0caa66 100644 --- a/packages/dd-trace/test/appsec/stack_trace.spec.js +++ b/packages/dd-trace/test/appsec/stack_trace.spec.js @@ -66,7 +66,7 @@ describe('Stack trace reporter', () => { const rootSpan = {} const stackId = 'test_stack_id' const maxDepth = 32 - const frames = getCallsiteFrames(maxDepth, () => callSiteList) + const frames = getCallsiteFrames(maxDepth, getCallsiteFrames, () => callSiteList) reportStackTrace(rootSpan, stackId, frames) @@ -112,7 +112,7 @@ describe('Stack trace reporter', () => { } )) - const frames = getCallsiteFrames(maxDepth, () => callSiteList) + const frames = getCallsiteFrames(maxDepth, getCallsiteFrames, () => callSiteList) reportStackTrace(rootSpan, stackId, frames) @@ -141,7 +141,7 @@ describe('Stack trace reporter', () => { } )) - const frames = getCallsiteFrames(maxDepth, () => callSiteList) + const frames = getCallsiteFrames(maxDepth, getCallsiteFrames, () => callSiteList) reportStackTrace(rootSpan, stackId, frames) @@ -174,7 +174,7 @@ describe('Stack trace reporter', () => { } )) - const frames = getCallsiteFrames(maxDepth, () => callSiteList) + const frames = getCallsiteFrames(maxDepth, getCallsiteFrames, () => callSiteList) reportStackTrace(rootSpan, stackId, frames) @@ -216,7 +216,7 @@ describe('Stack trace reporter', () => { const stackId = 'test_stack_id' const maxDepth = 32 - const frames = getCallsiteFrames(maxDepth, () => callSiteList) + const frames = getCallsiteFrames(maxDepth, getCallsiteFrames, () => callSiteList) reportStackTrace(rootSpan, stackId, frames) @@ -265,7 +265,7 @@ describe('Stack trace reporter', () => { } )) - const frames = getCallsiteFrames(maxDepth, () => callSiteList) + const frames = getCallsiteFrames(maxDepth, getCallsiteFrames, () => callSiteList) reportStackTrace(rootSpan, stackId, frames) @@ -316,7 +316,7 @@ describe('Stack trace reporter', () => { } )) - const frames = getCallsiteFrames(maxDepth, () => callSiteListWithLibraryFrames) + const frames = getCallsiteFrames(maxDepth, getCallsiteFrames, () => callSiteListWithLibraryFrames) reportStackTrace(rootSpan, stackId, frames) @@ -339,7 +339,7 @@ describe('Stack trace reporter', () => { } )) - const frames = getCallsiteFrames(maxDepth, () => callSiteList) + const frames = getCallsiteFrames(maxDepth, getCallsiteFrames, () => callSiteList) reportStackTrace(rootSpan, stackId, frames) @@ -362,7 +362,7 @@ describe('Stack trace reporter', () => { } )) - const frames = getCallsiteFrames(maxDepth, () => callSiteList) + const frames = getCallsiteFrames(maxDepth, getCallsiteFrames, () => callSiteList) reportStackTrace(rootSpan, stackId, frames) diff --git a/packages/dd-trace/test/custom-metrics-app.js b/packages/dd-trace/test/custom-metrics-app.js index c46f41f18b4..06b870a8a0f 100644 --- a/packages/dd-trace/test/custom-metrics-app.js +++ b/packages/dd-trace/test/custom-metrics-app.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +'use strict' /* eslint-disable no-console */ diff --git a/packages/dd-trace/test/datastreams/data_streams_checkpointer.spec.js b/packages/dd-trace/test/datastreams/data_streams_checkpointer.spec.js index db29f96b575..0851facbea6 100644 --- a/packages/dd-trace/test/datastreams/data_streams_checkpointer.spec.js +++ b/packages/dd-trace/test/datastreams/data_streams_checkpointer.spec.js @@ -1,3 +1,5 @@ +'use strict' + require('../setup/tap') const agent = require('../plugins/agent') diff --git a/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-collection-size.js b/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-collection-size.js index 09c8ca81100..69f0af85afe 100644 --- a/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-collection-size.js +++ b/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-collection-size.js @@ -1,4 +1,4 @@ -'use stict' +'use strict' function run () { const arr = [] diff --git a/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-field-count-scopes.js b/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-field-count-scopes.js index 90b317b8104..993a682ff6c 100644 --- a/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-field-count-scopes.js +++ b/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-field-count-scopes.js @@ -1,4 +1,4 @@ -'use stict' +'use strict' function run () { // local scope diff --git a/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-field-count.js b/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-field-count.js index ea8eb955079..2a1f6d2fdac 100644 --- a/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-field-count.js +++ b/packages/dd-trace/test/debugger/devtools_client/snapshot/target-code/max-field-count.js @@ -1,4 +1,4 @@ -'use stict' +'use strict' function run () { const obj = {} diff --git a/packages/dd-trace/test/git_properties.spec.js b/packages/dd-trace/test/git_properties.spec.js index 1ba42840fc4..efa628c80a5 100644 --- a/packages/dd-trace/test/git_properties.spec.js +++ b/packages/dd-trace/test/git_properties.spec.js @@ -1,3 +1,5 @@ +'use strict' + require('./setup/tap') const { getGitMetadataFromGitProperties } = require('../src/git_properties') diff --git a/packages/dd-trace/test/lambda/fixtures/handler.js b/packages/dd-trace/test/lambda/fixtures/handler.js index 12cf0e8ad08..7eb425872ca 100644 --- a/packages/dd-trace/test/lambda/fixtures/handler.js +++ b/packages/dd-trace/test/lambda/fixtures/handler.js @@ -1,4 +1,5 @@ 'use strict' + const _tracer = require('../../../../dd-trace') const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)) diff --git a/packages/dd-trace/test/payload-tagging/index.spec.js b/packages/dd-trace/test/payload-tagging/index.spec.js index a4f4da8108e..7ee6e580c59 100644 --- a/packages/dd-trace/test/payload-tagging/index.spec.js +++ b/packages/dd-trace/test/payload-tagging/index.spec.js @@ -1,3 +1,5 @@ +'use strict' + const { PAYLOAD_TAG_REQUEST_PREFIX, PAYLOAD_TAG_RESPONSE_PREFIX diff --git a/packages/dd-trace/test/payload_tagging.spec.js b/packages/dd-trace/test/payload_tagging.spec.js index 630c773d567..6d7b48999f8 100644 --- a/packages/dd-trace/test/payload_tagging.spec.js +++ b/packages/dd-trace/test/payload_tagging.spec.js @@ -1,3 +1,5 @@ +'use strict' + require('./setup/tap') const { diff --git a/packages/dd-trace/test/plugins/util/inferred_proxy.spec.js b/packages/dd-trace/test/plugins/util/inferred_proxy.spec.js index a5fd2805875..b5e493353cc 100644 --- a/packages/dd-trace/test/plugins/util/inferred_proxy.spec.js +++ b/packages/dd-trace/test/plugins/util/inferred_proxy.spec.js @@ -3,7 +3,6 @@ require('../../setup/tap') const agent = require('../agent') -const getPort = require('get-port') const { expect } = require('chai') const axios = require('axios') @@ -19,7 +18,6 @@ describe('Inferred Proxy Spans', function () { process.env.DD_SERVICE = 'aws-server' process.env.DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED = 'true' - port = await getPort() require('../../../../dd-trace') await agent.load(['http'], null, options) @@ -37,14 +35,19 @@ describe('Inferred Proxy Spans', function () { } }) - appListener = server.listen(port, '127.0.0.1') + return new Promise((resolve, reject) => { + appListener = server.listen(0, '127.0.0.1', () => { + port = server.address().port + resolve() + }) + }) } // test cleanup function - const cleanupTest = function () { + const cleanupTest = async function () { appListener && appListener.close() try { - agent.close({ ritmReset: false }) + await agent.close({ ritmReset: false }) } catch { // pass } @@ -59,6 +62,8 @@ describe('Inferred Proxy Spans', function () { 'x-dd-proxy-stage': 'dev' } + afterEach(cleanupTest) + describe('without configuration', () => { it('should create a parent span and a child span for a 200', async () => { await loadTest({}) @@ -103,7 +108,7 @@ describe('Inferred Proxy Spans', function () { continue } } - }).then(cleanupTest).catch(cleanupTest) + }) }) it('should create a parent span and a child span for an error', async () => { @@ -150,7 +155,7 @@ describe('Inferred Proxy Spans', function () { continue } } - }).then(cleanupTest).catch(cleanupTest) + }) }) it('should not create an API Gateway span if all necessary headers are missing', async () => { @@ -182,7 +187,7 @@ describe('Inferred Proxy Spans', function () { continue } } - }).then(cleanupTest).catch(cleanupTest) + }) }) it('should not create an API Gateway span if missing the proxy system header', async () => { @@ -217,7 +222,7 @@ describe('Inferred Proxy Spans', function () { continue } } - }).then(cleanupTest).catch(cleanupTest) + }) }) }) @@ -251,7 +256,7 @@ describe('Inferred Proxy Spans', function () { continue } } - }).then(cleanupTest).catch(cleanupTest) + }) }) }) }) diff --git a/packages/dd-trace/test/remote_config/resources/index.js b/packages/dd-trace/test/remote_config/resources/index.js index a9e0bacaa8b..b76e302f019 100644 --- a/packages/dd-trace/test/remote_config/resources/index.js +++ b/packages/dd-trace/test/remote_config/resources/index.js @@ -13,6 +13,9 @@ app.get('/', async (req, res) => { res.end('OK') }) -const server = app.listen(process.env.APP_PORT || 0, () => { +const server = app.listen(process.env.APP_PORT || 0, (error) => { + if (error) { + throw error + } process.send?.({ port: server.address().port }) }) diff --git a/packages/dd-trace/test/ritm-tests/module-b.js b/packages/dd-trace/test/ritm-tests/module-b.js index 265fa450071..d01c29043f3 100644 --- a/packages/dd-trace/test/ritm-tests/module-b.js +++ b/packages/dd-trace/test/ritm-tests/module-b.js @@ -1,3 +1,5 @@ +'use strict' + const { a } = require('./module-a') module.exports.b = () => { return a() } diff --git a/packages/dd-trace/test/service-naming/schema.spec.js b/packages/dd-trace/test/service-naming/schema.spec.js index 2cb994f4ff6..38487c6cdb5 100644 --- a/packages/dd-trace/test/service-naming/schema.spec.js +++ b/packages/dd-trace/test/service-naming/schema.spec.js @@ -1,3 +1,5 @@ +'use strict' + require('../setup/tap') const { expect } = require('chai') diff --git a/packages/dd-trace/test/setup/services/oracledb.js b/packages/dd-trace/test/setup/services/oracledb.js index b39a4d1f390..669cb93f17b 100644 --- a/packages/dd-trace/test/setup/services/oracledb.js +++ b/packages/dd-trace/test/setup/services/oracledb.js @@ -1,3 +1,5 @@ +'use strict' + const RetryOperation = require('../operation') const oracledb = require('../../../../../versions/oracledb').get() diff --git a/register.js b/register.js index 5ce6d6dec06..752069bda95 100644 --- a/register.js +++ b/register.js @@ -1,3 +1,7 @@ +'use strict' + +/* eslint n/no-unsupported-features/node-builtins: ['error', { version: '>=20.6.0', allowExperimental: true }] */ + const { register } = require('node:module') const { pathToFileURL } = require('node:url') diff --git a/scripts/check-proposal-labels.js b/scripts/check-proposal-labels.js index 87d89cce777..2d182cf641e 100644 --- a/scripts/check-proposal-labels.js +++ b/scripts/check-proposal-labels.js @@ -1,3 +1,5 @@ +'use strict' + /* eslint-disable no-console */ const childProcess = require('child_process') diff --git a/scripts/flakiness.mjs b/scripts/flakiness.mjs index 0503e6abc69..b09be3e22fc 100644 --- a/scripts/flakiness.mjs +++ b/scripts/flakiness.mjs @@ -1,5 +1,3 @@ -'use strict' - /* eslint-disable no-console */ import { Octokit } from 'octokit' diff --git a/scripts/get-chrome-driver-download-url.js b/scripts/get-chrome-driver-download-url.js index 99f98a9079b..67fd4b916c4 100644 --- a/scripts/get-chrome-driver-download-url.js +++ b/scripts/get-chrome-driver-download-url.js @@ -1,3 +1,5 @@ +'use strict' + const URL = 'https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json' // Get chrome driver download URL from a given chrome version, provided via CHROME_VERSION env var diff --git a/scripts/verify-ci-config.js b/scripts/verify-ci-config.js index 486fa282626..7ea874e60c7 100644 --- a/scripts/verify-ci-config.js +++ b/scripts/verify-ci-config.js @@ -1,5 +1,7 @@ 'use strict' + /* eslint-disable no-console */ +/* eslint n/no-unsupported-features/node-builtins: ['error', { version: '>=22.0.0' }] */ const fs = require('fs') const path = require('path') diff --git a/yarn.lock b/yarn.lock index 5f3e61dab2c..8edfc60c376 100644 --- a/yarn.lock +++ b/yarn.lock @@ -874,13 +874,13 @@ resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== +accepts@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-2.0.0.tgz#bbcf4ba5075467f3f2131eab3cffc73c2f5d7895" + integrity sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng== dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" + mime-types "^3.0.0" + negotiator "^1.0.0" acorn-import-attributes@^1.9.5: version "1.9.5" @@ -994,11 +994,6 @@ array-buffer-byte-length@^1.0.1, array-buffer-byte-length@^1.0.2: call-bound "^1.0.3" is-array-buffer "^3.0.5" -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - array-includes@^3.1.9: version "3.1.9" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.9.tgz#1f0ccaa08e90cdbc3eb433210f903ad0f17c3f3a" @@ -1133,24 +1128,6 @@ bind-obj-methods@^3.0.0: resolved "https://registry.yarnpkg.com/bind-obj-methods/-/bind-obj-methods-3.0.0.tgz#65b66544d9d668d80dfefe2089dd347ad1dbcaed" integrity sha512-nLEaaz3/sEzNSyPWRsN9HNsqwk1AUyECtGj+XwGdIi3xABnEqecvXtIJ0wehQXuuER5uZ/5fTs2usONgYjG+iw== -body-parser@1.20.3: - version "1.20.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" - integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.13.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - body-parser@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-2.2.0.tgz#f7a9656de305249a715b549b7b8fd1ab9dfddcfa" @@ -1496,14 +1473,14 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== +content-disposition@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-1.0.0.tgz#844426cb398f934caefcbb172200126bc7ceace2" + integrity sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg== dependencies: safe-buffer "5.2.1" -content-type@^1.0.5, content-type@~1.0.4, content-type@~1.0.5: +content-type@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== @@ -1523,15 +1500,15 @@ convert-to-spaces@^1.0.1: resolved "https://registry.yarnpkg.com/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz#7e3e48bbe6d997b1417ddca2868204b4d3d85715" integrity sha512-cj09EBuObp9gZNQCzc7hByQyrs6jVGE+o9kSJmeUoj+GiPiJvi5LYqEH/Hmme4+MTLHM+Ejtq+FChpjjEnsPdQ== -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== +cookie-signature@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.2.2.tgz#57c7fc3cc293acab9fec54d73e15690ebe4a1793" + integrity sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg== -cookie@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" - integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== +cookie@^0.7.1: + version "0.7.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7" + integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w== core-js-compat@^3.41.0: version "3.43.0" @@ -1596,13 +1573,6 @@ dc-polyfill@^0.1.9: resolved "https://registry.yarnpkg.com/dc-polyfill/-/dc-polyfill-0.1.9.tgz#ee594f4366a6dcf006db1c1f9d3672f57a720856" integrity sha512-D5mJThEEk9hf+CJPwTf9JFsrWdlWp8Pccjxkhf7uUT/E/cU9Mx3ebWe2Bz2OawRmJ6WS9eaDPBkeBE4uOKq9uw== -debug@2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -1674,16 +1644,11 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -depd@2.0.0: +depd@2.0.0, depd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -1745,12 +1710,7 @@ emoji-regex@^9.2.2: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -encodeurl@~2.0.0: +encodeurl@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== @@ -1876,7 +1836,7 @@ escalade@^3.1.1, escalade@^3.2.0: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== -escape-html@~1.0.3: +escape-html@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== @@ -2123,7 +2083,7 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@~1.8.1: +etag@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== @@ -2133,42 +2093,38 @@ events-to-array@^1.0.1: resolved "https://registry.yarnpkg.com/events-to-array/-/events-to-array-1.1.2.tgz#2d41f563e1fe400ed4962fe1a4d5c6a7539df7f6" integrity sha512-inRWzRY7nG+aXZxBzEqYKB3HPgwflZRopAjDCHv0whhRx+MTUr1ei0ICZUypdyE0HRm4L2d5VEcIqLD6yl+BFA== -express@^4.21.2: - version "4.21.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.21.2.tgz#cf250e48362174ead6cea4a566abef0162c1ec32" - integrity sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.3" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.7.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~2.0.0" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.3.1" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.3" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.12" - proxy-addr "~2.0.7" - qs "6.13.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.19.0" - serve-static "1.16.2" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" +express@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/express/-/express-5.1.0.tgz#d31beaf715a0016f0d53f47d3b4d7acf28c75cc9" + integrity sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA== + dependencies: + accepts "^2.0.0" + body-parser "^2.2.0" + content-disposition "^1.0.0" + content-type "^1.0.5" + cookie "^0.7.1" + cookie-signature "^1.2.1" + debug "^4.4.0" + encodeurl "^2.0.0" + escape-html "^1.0.3" + etag "^1.8.1" + finalhandler "^2.1.0" + fresh "^2.0.0" + http-errors "^2.0.0" + merge-descriptors "^2.0.0" + mime-types "^3.0.0" + on-finished "^2.4.1" + once "^1.4.0" + parseurl "^1.3.3" + proxy-addr "^2.0.7" + qs "^6.14.0" + range-parser "^1.2.1" + router "^2.2.0" + send "^1.1.0" + serve-static "^2.2.0" + statuses "^2.0.1" + type-is "^2.0.1" + vary "^1.1.2" fast-content-type-parse@^3.0.0: version "3.0.0" @@ -2217,18 +2173,17 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" - integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== - dependencies: - debug "2.6.9" - encodeurl "~2.0.0" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" +finalhandler@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-2.1.0.tgz#72306373aa89d05a8242ed569ed86a1bff7c561f" + integrity sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q== + dependencies: + debug "^4.4.0" + encodeurl "^2.0.0" + escape-html "^1.0.3" + on-finished "^2.4.1" + parseurl "^1.3.3" + statuses "^2.0.1" find-cache-dir@^3.2.0: version "3.3.2" @@ -2326,10 +2281,10 @@ forwarded@0.2.0: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== +fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-2.0.0.tgz#8dd7df6a1b3a1b3a5cf186c05a5dd267622635a4" + integrity sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A== fromentries@^1.2.0: version "1.3.2" @@ -2603,13 +2558,6 @@ http-errors@2.0.0, http-errors@^2.0.0: statuses "2.0.1" toidentifier "1.0.1" -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - iconv-lite@0.6.3, iconv-lite@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" @@ -2617,11 +2565,16 @@ iconv-lite@0.6.3, iconv-lite@^0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.2: +ignore@^5.2.0, ignore@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== +ignore@^7.0.5: + version "7.0.5" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9" + integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" @@ -2868,6 +2821,11 @@ is-plain-obj@^2.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== +is-promise@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz#42ff9f84206c1991d26debf520dd5c01042dd2f3" + integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ== + is-regex@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" @@ -3189,10 +3147,10 @@ lie@~3.3.0: dependencies: immediate "~3.0.5" -limiter@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.1.5.tgz#8f92a25b3b16c6131293a0cc834b4a838a2aa7c2" - integrity sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA== +limiter@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/limiter/-/limiter-3.0.0.tgz#03556b76d1a81f547caeecc6b83ecc6f24495715" + integrity sha512-hev7DuXojsTFl2YwyzUJMDnZ/qBDd3yZQLSH3aD4tdL1cqfc3TMnoecEJtWFaQFdErZsKoFMBTxF/FBSkgDbEg== locate-path@^5.0.0: version "5.0.0" @@ -3260,7 +3218,7 @@ loupe@^2.3.6: dependencies: get-func-name "^2.0.1" -lru-cache@^10.2.0: +lru-cache@^10.2.0, lru-cache@^10.4.3: version "10.4.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== @@ -3272,7 +3230,7 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -lru-cache@^7.14.0, lru-cache@^7.18.3: +lru-cache@^7.14.0: version "7.18.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== @@ -3306,16 +3264,16 @@ media-typer@^1.1.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-1.1.0.tgz#6ab74b8f2d3320f2064b2a87a38e7931ff3a5561" integrity sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw== -merge-descriptors@1.0.3, merge-descriptors@~1.0.0: +merge-descriptors@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-2.0.0.tgz#ea922f660635a2249ee565e0449f951e6b603808" + integrity sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g== + +merge-descriptors@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -3326,25 +3284,20 @@ mime-db@^1.54.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.54.0.tgz#cddb3ee4f9c64530dff640236661d42cb6a314f5" integrity sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ== -mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.12, mime-types@~2.1.24: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" -mime-types@^3.0.0: +mime-types@^3.0.0, mime-types@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-3.0.1.tgz#b1d94d6997a9b32fd69ebaed0db73de8acb519ce" integrity sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA== dependencies: mime-db "^1.54.0" -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -3434,12 +3387,7 @@ module-not-found-error@^1.0.0: resolved "https://registry.yarnpkg.com/module-not-found-error/-/module-not-found-error-1.0.1.tgz#cf8b4ff4f29640674d6cdd02b0e3bc523c2bbdc0" integrity sha512-pEk4ECWQXV6z2zjhRZUongnLJNUeGQJ3w6OQ5ctGwD+i5o93qjRQUk2Rt6VdNeu3sEP0AB4LcfvdebpxBRVr4g== -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.3, ms@^2.1.1, ms@^2.1.2, ms@^2.1.3: +ms@^2.1.1, ms@^2.1.2, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -3469,10 +3417,10 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== +negotiator@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-1.0.0.tgz#b6c91bb47172d69f93cfd7c357bbb529019b5f6a" + integrity sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg== nise@^6.0.0: version "6.1.1" @@ -3634,14 +3582,14 @@ octokit@^5.0.3: "@octokit/types" "^14.0.0" "@octokit/webhooks" "^14.0.0" -on-finished@2.4.1, on-finished@^2.4.1: +on-finished@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== dependencies: ee-first "1.1.1" -once@^1.3.0: +once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== @@ -3660,7 +3608,7 @@ opener@^1.5.1: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -opentracing@>=0.12.1: +opentracing@>=0.14.7: version "0.14.7" resolved "https://registry.yarnpkg.com/opentracing/-/opentracing-0.14.7.tgz#25d472bd0296dc0b64d7b94cbc995219031428f5" integrity sha512-vz9iS7MJ5+Bp1URw8Khvdyw1H/hGvzHWlKQ7eRrQojSCDL1/SrWfrY9QebLw97n2deyRtzHRC3MkQfVNUCo91Q== @@ -3765,7 +3713,7 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parseurl@~1.3.3: +parseurl@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== @@ -3803,12 +3751,12 @@ path-scurry@^1.11.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" -path-to-regexp@0.1.12, path-to-regexp@^0.1.12: +path-to-regexp@^0.1.12: version "0.1.12" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7" integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ== -path-to-regexp@^8.1.0: +path-to-regexp@^8.0.0, path-to-regexp@^8.1.0: version "8.2.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-8.2.0.tgz#73990cc29e57a3ff2a0d914095156df5db79e8b4" integrity sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ== @@ -3900,7 +3848,7 @@ protobufjs@^7.5.3: "@types/node" ">=13.7.0" long "^5.0.0" -proxy-addr@~2.0.7: +proxy-addr@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== @@ -3927,13 +3875,6 @@ punycode@^2.0.0, punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -qs@6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" - integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== - dependencies: - side-channel "^1.0.6" - qs@^6.14.0: version "6.14.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.14.0.tgz#c63fa40680d2c5c941412a0e899c89af60c0a930" @@ -3958,21 +3899,11 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -range-parser@~1.2.1: +range-parser@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" - integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - raw-body@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-3.0.0.tgz#25b3476f07a51600619dae3fe82ddc28a36e5e0f" @@ -4163,6 +4094,17 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" +router@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/router/-/router-2.2.0.tgz#019be620b711c87641167cc79b99090f00b146ef" + integrity sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ== + dependencies: + debug "^4.4.0" + depd "^2.0.0" + is-promise "^4.0.0" + parseurl "^1.3.3" + path-to-regexp "^8.0.0" + safe-array-concat@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.3.tgz#c9e54ec4f603b0bbb8e7e5007a5ee7aecd1538c3" @@ -4201,7 +4143,7 @@ safe-regex-test@^1.1.0: es-errors "^1.3.0" is-regex "^1.2.1" -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": +"safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -4229,24 +4171,22 @@ semver@^7.5.0, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3, semver@^7.7.1, semve resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== -send@0.19.0: - version "0.19.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" - integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== +send@^1.1.0, send@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/send/-/send-1.2.0.tgz#32a7554fb777b831dfa828370f773a3808d37212" + integrity sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw== dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" + debug "^4.3.5" + encodeurl "^2.0.0" + escape-html "^1.0.3" + etag "^1.8.1" + fresh "^2.0.0" + http-errors "^2.0.0" + mime-types "^3.0.1" + ms "^2.1.3" + on-finished "^2.4.1" + range-parser "^1.2.1" + statuses "^2.0.1" serialize-javascript@^6.0.2: version "6.0.2" @@ -4255,15 +4195,15 @@ serialize-javascript@^6.0.2: dependencies: randombytes "^2.1.0" -serve-static@1.16.2: - version "1.16.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" - integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== +serve-static@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-2.2.0.tgz#9c02564ee259bdd2251b82d659a2e7e1938d66f9" + integrity sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ== dependencies: - encodeurl "~2.0.0" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.19.0" + encodeurl "^2.0.0" + escape-html "^1.0.3" + parseurl "^1.3.3" + send "^1.2.0" set-blocking@^2.0.0: version "2.0.0" @@ -4357,7 +4297,7 @@ side-channel-weakmap@^1.0.2: object-inspect "^1.13.3" side-channel-map "^1.0.1" -side-channel@^1.0.6, side-channel@^1.1.0: +side-channel@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== @@ -4451,6 +4391,11 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +statuses@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382" + integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw== + stop-iteration-iterator@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz#f481ff70a548f6124d0312c3aa14cbfa7aa542ad" @@ -4794,7 +4739,7 @@ type-fest@^0.8.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-is@^1.6.18, type-is@~1.6.18: +type-is@^1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== @@ -4802,7 +4747,7 @@ type-is@^1.6.18, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -type-is@^2.0.0: +type-is@^2.0.0, type-is@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/type-is/-/type-is-2.0.1.tgz#64f6cf03f92fce4015c2b224793f6bdd4b068c97" integrity sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw== @@ -4905,7 +4850,7 @@ universal-user-agent@^7.0.0, universal-user-agent@^7.0.2: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-7.0.3.tgz#c05870a58125a2dc00431f2df815a77fe69736be" integrity sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A== -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -4930,17 +4875,12 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -vary@~1.1.2: +vary@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== @@ -5023,9 +4963,9 @@ word-wrap@^1.2.5: integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== workerpool@^9.2.0: - version "9.3.2" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-9.3.2.tgz#4c045a8b437ae1bc70c646af11929a8b4d238656" - integrity sha512-Xz4Nm9c+LiBHhDR5bDLnNzmj6+5F+cyEAWPMkbs2awq/dYazR/efelZzUAjB/y3kNHL+uzkHvxVVpaOfGCPV7A== + version "9.3.3" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-9.3.3.tgz#e75281fe62e851afb21cdeef8fa85f6a62ec3583" + integrity sha512-slxCaKbYjEdFT/o2rH9xS1hf4uRDch1w7Uo+apxhZ+sf/1d9e0ZVkn42kPNGP2dgjIx6YFvSevj0zHvbWe2jdw== "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0"