dd-trace 6.7.0 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ci/test-optimization-validation/command-output-policy.js +5 -5
- package/ci/test-optimization-validation/framework-adapters/playwright.js +5 -5
- package/ci/test-optimization-validation/generated-files.js +9 -9
- package/ci/test-optimization-validation/generated-test-contract.js +1 -3
- package/ci/test-optimization-validation/manifest-scaffold.js +1 -2
- package/ci/test-optimization-validation/offline-output.js +6 -6
- package/ci/test-optimization-validation/runner-command.js +1 -1
- package/ci/test-optimization-validation/safe-files.js +4 -4
- package/ci/test-optimization-validation/scenarios/basic-reporting.js +1 -1
- package/ci/test-optimization-validation/scenarios/test-management.js +2 -2
- package/ci/vitest-no-worker-init-setup.mjs +348 -51
- package/index.d.ts +77 -13
- package/package.json +9 -3
- package/packages/datadog-core/src/utils/src/kebabcase.js +8 -2
- package/packages/datadog-esbuild/index.js +4 -2
- package/packages/datadog-esbuild/src/utils.js +1 -1
- package/packages/datadog-instrumentations/src/claude-agent-sdk.js +4 -4
- package/packages/datadog-instrumentations/src/cucumber.js +9 -6
- package/packages/datadog-instrumentations/src/helpers/extract-package-and-module-path.js +10 -0
- package/packages/datadog-instrumentations/src/helpers/hook.js +19 -2
- package/packages/datadog-instrumentations/src/helpers/hooks.js +2 -0
- package/packages/datadog-instrumentations/src/helpers/register.js +9 -3
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +1 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/index.js +1 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/webdriverio.js +57 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/transforms.js +50 -18
- package/packages/datadog-instrumentations/src/helpers/router-helper.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/shared-utils.js +39 -0
- package/packages/datadog-instrumentations/src/http/client.js +1 -3
- package/packages/datadog-instrumentations/src/jest.js +8 -14
- package/packages/datadog-instrumentations/src/mocha/common.js +1 -3
- package/packages/datadog-instrumentations/src/mocha/main.js +2 -42
- package/packages/datadog-instrumentations/src/mocha/utils.js +68 -2
- package/packages/datadog-instrumentations/src/mocha/webdriverio-protocol.js +19 -0
- package/packages/datadog-instrumentations/src/mocha/worker.js +446 -42
- package/packages/datadog-instrumentations/src/moleculer/client.js +1 -1
- package/packages/datadog-instrumentations/src/playwright.js +3 -2
- package/packages/datadog-instrumentations/src/rhea.js +1 -1
- package/packages/datadog-instrumentations/src/vitest-main-no-worker-init.js +525 -56
- package/packages/datadog-instrumentations/src/vitest-main.js +90 -10
- package/packages/datadog-instrumentations/src/webdriverio.js +914 -0
- package/packages/datadog-plugin-aerospike/src/index.js +1 -3
- package/packages/datadog-plugin-amqplib/src/client.js +1 -1
- package/packages/datadog-plugin-amqplib/src/producer.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/eventbridge.js +2 -2
- package/packages/datadog-plugin-aws-sdk/src/services/stepfunctions.js +2 -2
- package/packages/datadog-plugin-azure-event-hubs/src/producer.js +1 -3
- package/packages/datadog-plugin-azure-service-bus/src/producer.js +5 -3
- package/packages/datadog-plugin-bullmq/src/producer.js +3 -3
- package/packages/datadog-plugin-child_process/src/index.js +3 -3
- package/packages/datadog-plugin-child_process/src/scrub-cmd-params.js +5 -8
- package/packages/datadog-plugin-cypress/src/source-map-utils.js +1 -1
- package/packages/datadog-plugin-fastify/src/tracing.js +1 -1
- package/packages/datadog-plugin-fs/src/index.js +0 -4
- package/packages/datadog-plugin-google-cloud-pubsub/src/consumer.js +14 -7
- package/packages/datadog-plugin-google-cloud-pubsub/src/producer.js +19 -10
- package/packages/datadog-plugin-graphql/src/execute.js +1 -0
- package/packages/datadog-plugin-graphql/src/tools/signature.js +1 -1
- package/packages/datadog-plugin-http/src/client.js +2 -1
- package/packages/datadog-plugin-jest/src/index.js +2 -3
- package/packages/datadog-plugin-jest/src/util.js +2 -1
- package/packages/datadog-plugin-langchain/src/tokens.js +2 -2
- package/packages/datadog-plugin-mocha/src/index.js +25 -6
- package/packages/datadog-plugin-prisma/src/index.js +5 -1
- package/packages/datadog-plugin-rhea/src/consumer.js +16 -13
- package/packages/datadog-plugin-rhea/src/producer.js +1 -1
- package/packages/datadog-plugin-undici/src/index.js +2 -1
- package/packages/datadog-plugin-vitest/src/index.js +84 -11
- package/packages/datadog-webpack/index.js +2 -2
- package/packages/dd-trace/src/appsec/downstream_requests.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/hardcoded-base-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/hardcoded-password-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/sql-injection-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/taint-tracking-impl.js +1 -3
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/utils.js +1 -1
- package/packages/dd-trace/src/appsec/iast/vulnerability-reporter.js +2 -2
- package/packages/dd-trace/src/appsec/sdk/track_event.js +1 -1
- package/packages/dd-trace/src/appsec/waf/waf_manager.js +1 -1
- package/packages/dd-trace/src/ci-visibility/exporters/ci-validation/sink.js +7 -6
- package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +2 -1
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/index.js +4 -0
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/webdriverio.js +26 -0
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/writer.js +9 -1
- package/packages/dd-trace/src/ci-visibility/requests/request.js +3 -3
- package/packages/dd-trace/src/ci-visibility/test-optimization-http-cache-schema.js +1 -1
- package/packages/dd-trace/src/config/defaults.js +14 -6
- package/packages/dd-trace/src/config/generated-config-types.d.ts +2 -2
- package/packages/dd-trace/src/config/index.js +15 -0
- package/packages/dd-trace/src/config/parsers.js +19 -1
- package/packages/dd-trace/src/config/supported-configurations.json +5 -6
- package/packages/dd-trace/src/datastreams/encoding.js +3 -4
- package/packages/dd-trace/src/debugger/devtools_client/log.js +2 -1
- package/packages/dd-trace/src/debugger/devtools_client/probe_sampler.js +1 -4
- package/packages/dd-trace/src/debugger/devtools_client/send.js +1 -2
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/index.js +2 -2
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/redaction.js +16 -2
- package/packages/dd-trace/src/encode/tags-processors.js +2 -2
- package/packages/dd-trace/src/exporters/common/url.js +3 -5
- package/packages/dd-trace/src/exporters/electron/index.js +4 -1
- package/packages/dd-trace/src/external-logger/src/index.js +1 -2
- package/packages/dd-trace/src/flare/index.js +2 -2
- package/packages/dd-trace/src/id.js +1 -1
- package/packages/dd-trace/src/llmobs/constants/tags.js +1 -1
- package/packages/dd-trace/src/llmobs/experiments/client.js +4 -2
- package/packages/dd-trace/src/llmobs/experiments/dataset.js +66 -14
- package/packages/dd-trace/src/llmobs/experiments/experiment.js +289 -95
- package/packages/dd-trace/src/llmobs/experiments/index.js +51 -12
- package/packages/dd-trace/src/llmobs/experiments/noop.js +95 -10
- package/packages/dd-trace/src/llmobs/experiments/result.js +13 -2
- package/packages/dd-trace/src/llmobs/experiments/util.js +218 -0
- package/packages/dd-trace/src/llmobs/plugins/anthropic/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/claude-agent-sdk/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/genai/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/index.js +1 -1
- package/packages/dd-trace/src/llmobs/sdk.js +4 -11
- package/packages/dd-trace/src/llmobs/span_processor.js +9 -7
- package/packages/dd-trace/src/llmobs/tagger.js +1 -2
- package/packages/dd-trace/src/llmobs/writers/spans.js +12 -6
- package/packages/dd-trace/src/noop/proxy.js +2 -2
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_transformer.js +1 -1
- package/packages/dd-trace/src/opentelemetry/metrics/periodic_metric_reader.js +2 -1
- package/packages/dd-trace/src/opentracing/span.js +1 -1
- package/packages/dd-trace/src/opentracing/span_context.js +1 -1
- package/packages/dd-trace/src/plugins/ci_plugin.js +105 -20
- package/packages/dd-trace/src/plugins/index.js +1 -0
- package/packages/dd-trace/src/plugins/plugin.js +1 -1
- package/packages/dd-trace/src/plugins/tracing.js +1 -0
- package/packages/dd-trace/src/plugins/util/ci.js +7 -6
- package/packages/dd-trace/src/plugins/util/git.js +1 -1
- package/packages/dd-trace/src/plugins/util/http-otel-semantics.js +1 -1
- package/packages/dd-trace/src/plugins/util/llm.js +2 -2
- package/packages/dd-trace/src/plugins/util/tags.js +2 -0
- package/packages/dd-trace/src/plugins/util/test.js +38 -12
- package/packages/dd-trace/src/plugins/util/url.js +5 -5
- package/packages/dd-trace/src/plugins/util/user-provided-git.js +1 -1
- package/packages/dd-trace/src/plugins/util/web.js +1 -1
- package/packages/dd-trace/src/priority_sampler.js +6 -3
- package/packages/dd-trace/src/profiling/profilers/poisson.js +1 -1
- package/packages/dd-trace/src/profiling/profilers/shared.js +2 -2
- package/packages/dd-trace/src/ritm.js +5 -20
- package/packages/dd-trace/src/startup-log.js +3 -0
- package/packages/dd-trace/src/telemetry/logs/log-collector.js +3 -1
- package/packages/dd-trace/src/util.js +16 -0
- package/vendor/dist/@apm-js-collab/code-transformer/index.js +12 -12
- package/vendor/dist/pprof-format/index.js +1 -1
- package/vendor/dist/source-map/index.js +1 -1
|
@@ -71,21 +71,21 @@ function cleanupCommandOutputs (states) {
|
|
|
71
71
|
*
|
|
72
72
|
* @param {string} outputPath output path
|
|
73
73
|
* @param {string} repositoryRoot repository root
|
|
74
|
-
* @returns {{path: string, dev:
|
|
74
|
+
* @returns {{path: string, dev: bigint, ino: bigint}[]} parent identities
|
|
75
75
|
*/
|
|
76
76
|
function captureExistingParentIdentities (outputPath, repositoryRoot) {
|
|
77
77
|
const identities = []
|
|
78
78
|
const relative = path.relative(repositoryRoot, path.dirname(outputPath))
|
|
79
79
|
let current = repositoryRoot
|
|
80
80
|
for (const segment of relative ? relative.split(path.sep) : []) {
|
|
81
|
-
const stat = fs.lstatSync(current)
|
|
81
|
+
const stat = fs.lstatSync(current, { bigint: true })
|
|
82
82
|
assertRegularDirectory(stat, current)
|
|
83
83
|
identities.push({ path: current, dev: stat.dev, ino: stat.ino })
|
|
84
84
|
current = path.join(current, segment)
|
|
85
85
|
if (!pathExists(current)) return identities
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
const stat = fs.lstatSync(current)
|
|
88
|
+
const stat = fs.lstatSync(current, { bigint: true })
|
|
89
89
|
assertRegularDirectory(stat, current)
|
|
90
90
|
identities.push({ path: current, dev: stat.dev, ino: stat.ino })
|
|
91
91
|
return identities
|
|
@@ -98,7 +98,7 @@ function captureExistingParentIdentities (outputPath, repositoryRoot) {
|
|
|
98
98
|
*/
|
|
99
99
|
function assertOutputParentsUnchanged (state) {
|
|
100
100
|
for (const identity of state.parentIdentities) {
|
|
101
|
-
const stat = fs.lstatSync(identity.path)
|
|
101
|
+
const stat = fs.lstatSync(identity.path, { bigint: true })
|
|
102
102
|
assertRegularDirectory(stat, identity.path)
|
|
103
103
|
if (stat.dev !== identity.dev || stat.ino !== identity.ino) {
|
|
104
104
|
throw new Error(`Refusing command output cleanup because a parent directory changed: ${identity.path}`)
|
|
@@ -118,7 +118,7 @@ function assertOutputParentsUnchanged (state) {
|
|
|
118
118
|
/**
|
|
119
119
|
* Refuses symbolic links and non-directory parent components.
|
|
120
120
|
*
|
|
121
|
-
* @param {fs.Stats} stat path status
|
|
121
|
+
* @param {fs.Stats | fs.BigIntStats} stat path status
|
|
122
122
|
* @param {string} directory directory path
|
|
123
123
|
*/
|
|
124
124
|
function assertRegularDirectory (stat, directory) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const path = require('node:path')
|
|
4
4
|
|
|
5
5
|
const CONFIG_PATTERN = /^playwright\.config\.[cm]?[jt]s$/
|
|
6
|
-
const TEST_FILE_PATTERN =
|
|
6
|
+
const TEST_FILE_PATTERN = /\.(?:spec|test)\.[cm]?[jt]sx?$/
|
|
7
7
|
const GENERATED_CONFIG_FILENAME = 'dd-test-optimization-validation.playwright.config.cjs'
|
|
8
8
|
const VALIDATION_OUTPUT_DIRECTORY = '.dd-test-optimization-validation-playwright-output'
|
|
9
9
|
const PLAYWRIGHT_PACKAGE = '@playwright/test'
|
|
@@ -139,12 +139,12 @@ function getOutputPath (filename) {
|
|
|
139
139
|
*/
|
|
140
140
|
function getObservedTestCount (output) {
|
|
141
141
|
const observed = sumLastMatchCounts(output, [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
/^[ \t]*(\d+)[ \t]+passed\b/gim,
|
|
143
|
+
/^[ \t]*(\d+)[ \t]+failed\b/gim,
|
|
144
|
+
/^[ \t]*(\d+)[ \t]+flaky\b/gim,
|
|
145
145
|
])
|
|
146
146
|
if (observed !== null) return observed
|
|
147
|
-
return
|
|
147
|
+
return /^[ \t]*\d+[ \t]+skipped\b/im.test(output) ? 0 : null
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const fs = require('fs')
|
|
4
|
-
const path = require('path')
|
|
3
|
+
const fs = require('node:fs')
|
|
4
|
+
const path = require('node:path')
|
|
5
5
|
|
|
6
6
|
const {
|
|
7
7
|
MAX_GENERATED_FILES,
|
|
@@ -132,7 +132,7 @@ function getMissingDirectories (root, directory) {
|
|
|
132
132
|
function cleanupCreatedDirectories (root) {
|
|
133
133
|
const outcome = { removed: 0, retained: 0 }
|
|
134
134
|
const resolvedRoot = path.resolve(root)
|
|
135
|
-
const directories = [...createdGeneratedDirectories
|
|
135
|
+
const directories = [...createdGeneratedDirectories]
|
|
136
136
|
.filter(([directory]) => isPathInside(resolvedRoot, directory))
|
|
137
137
|
.sort(([left], [right]) => right.length - left.length)
|
|
138
138
|
|
|
@@ -251,7 +251,7 @@ function forgetWrittenGeneratedFiles (filenames) {
|
|
|
251
251
|
function authorizePathForCleanup (root, filename) {
|
|
252
252
|
const lexicalRoot = path.resolve(root)
|
|
253
253
|
const physicalRoot = fs.realpathSync(lexicalRoot)
|
|
254
|
-
const rootStat = fs.statSync(physicalRoot)
|
|
254
|
+
const rootStat = fs.statSync(physicalRoot, { bigint: true })
|
|
255
255
|
const authorization = {
|
|
256
256
|
lexicalRoot,
|
|
257
257
|
physicalRoot,
|
|
@@ -276,7 +276,7 @@ function pinCleanupParent (authorization, filename) {
|
|
|
276
276
|
try {
|
|
277
277
|
const physicalParent = fs.realpathSync(path.dirname(filename))
|
|
278
278
|
if (!isPathInside(authorization.physicalRoot, physicalParent)) return
|
|
279
|
-
const parentStat = fs.statSync(physicalParent)
|
|
279
|
+
const parentStat = fs.statSync(physicalParent, { bigint: true })
|
|
280
280
|
authorization.physicalParent = physicalParent
|
|
281
281
|
authorization.parentDevice = parentStat.dev
|
|
282
282
|
authorization.parentInode = parentStat.ino
|
|
@@ -285,7 +285,7 @@ function pinCleanupParent (authorization, filename) {
|
|
|
285
285
|
|
|
286
286
|
function pinCleanupTarget (authorization, filename) {
|
|
287
287
|
try {
|
|
288
|
-
const targetStat = fs.lstatSync(filename)
|
|
288
|
+
const targetStat = fs.lstatSync(filename, { bigint: true })
|
|
289
289
|
authorization.targetDevice = targetStat.dev
|
|
290
290
|
authorization.targetInode = targetStat.ino
|
|
291
291
|
} catch {}
|
|
@@ -294,7 +294,7 @@ function pinCleanupTarget (authorization, filename) {
|
|
|
294
294
|
function isCleanupAuthorizationValid (filename, authorization) {
|
|
295
295
|
try {
|
|
296
296
|
const currentPhysicalRoot = fs.realpathSync(authorization.lexicalRoot)
|
|
297
|
-
const rootStat = fs.statSync(currentPhysicalRoot)
|
|
297
|
+
const rootStat = fs.statSync(currentPhysicalRoot, { bigint: true })
|
|
298
298
|
if (currentPhysicalRoot !== authorization.physicalRoot ||
|
|
299
299
|
rootStat.dev !== authorization.rootDevice || rootStat.ino !== authorization.rootInode) {
|
|
300
300
|
return false
|
|
@@ -302,14 +302,14 @@ function isCleanupAuthorizationValid (filename, authorization) {
|
|
|
302
302
|
|
|
303
303
|
if (authorization.physicalParent === undefined) return false
|
|
304
304
|
const physicalParent = fs.realpathSync(path.dirname(filename))
|
|
305
|
-
const parentStat = fs.statSync(physicalParent)
|
|
305
|
+
const parentStat = fs.statSync(physicalParent, { bigint: true })
|
|
306
306
|
if (physicalParent !== authorization.physicalParent ||
|
|
307
307
|
parentStat.dev !== authorization.parentDevice || parentStat.ino !== authorization.parentInode) {
|
|
308
308
|
return false
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
if (authorization.targetDevice !== undefined) {
|
|
312
|
-
const targetStat = fs.lstatSync(filename)
|
|
312
|
+
const targetStat = fs.lstatSync(filename, { bigint: true })
|
|
313
313
|
if (targetStat.dev !== authorization.targetDevice || targetStat.ino !== authorization.targetInode) {
|
|
314
314
|
return false
|
|
315
315
|
}
|
|
@@ -192,9 +192,7 @@ function getGeneratedTestContractError (framework) {
|
|
|
192
192
|
if (!cleanupPaths.has(path.normalize(stepsFile))) {
|
|
193
193
|
return 'must include the isolated Cucumber step definitions in cleanupPaths.'
|
|
194
194
|
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
if (framework.framework === 'playwright') {
|
|
195
|
+
} else if (framework.framework === 'playwright') {
|
|
198
196
|
const configPath = playwrightAdapter.getGeneratedConfigPath(strategy.testDirectory)
|
|
199
197
|
const config = files.find(file => path.normalize(file.path) === path.normalize(configPath))
|
|
200
198
|
if (config?.contentLines?.join('\n') !== playwrightAdapter.getGeneratedConfigContent()) {
|
|
@@ -477,8 +477,7 @@ function buildGeneratedTestStrategy ({ framework, projectRoot, representative })
|
|
|
477
477
|
const stepsFile = cucumber.getGeneratedStepsPath(testDirectory)
|
|
478
478
|
files.push({ path: stepsFile, contentLines: cucumber.getGeneratedStepsContent().split('\n') })
|
|
479
479
|
cleanupPaths.push(stepsFile)
|
|
480
|
-
}
|
|
481
|
-
if (framework === 'playwright') {
|
|
480
|
+
} else if (framework === 'playwright') {
|
|
482
481
|
const configFile = playwright.getGeneratedConfigPath(testDirectory)
|
|
483
482
|
files.push({ path: configFile, contentLines: playwright.getGeneratedConfigContent().split('\n') })
|
|
484
483
|
cleanupPaths.push(configFile)
|
|
@@ -57,8 +57,8 @@ function readOfflineOutput (outputRoot) {
|
|
|
57
57
|
if (!exporterInitialized) return emptyOutput()
|
|
58
58
|
|
|
59
59
|
const state = {
|
|
60
|
-
bytes:
|
|
61
|
-
completionBytes:
|
|
60
|
+
bytes: 0n,
|
|
61
|
+
completionBytes: 0n,
|
|
62
62
|
decodedEntries: 0,
|
|
63
63
|
files: 0,
|
|
64
64
|
}
|
|
@@ -150,7 +150,7 @@ function readPayloadFiles (payloadsRoot, kind, state, consume) {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
function readRegularFile (filename, individualLimit, state, completion) {
|
|
153
|
-
const stat = fs.lstatSync(filename)
|
|
153
|
+
const stat = fs.lstatSync(filename, { bigint: true })
|
|
154
154
|
if (!stat.isFile() || stat.isSymbolicLink() || stat.nlink > 1) {
|
|
155
155
|
throw new Error('Offline validation artifact must be a regular, unlinked file.')
|
|
156
156
|
}
|
|
@@ -163,16 +163,16 @@ function readRegularFile (filename, individualLimit, state, completion) {
|
|
|
163
163
|
|
|
164
164
|
const file = fs.openSync(filename, fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW || 0))
|
|
165
165
|
try {
|
|
166
|
-
const opened = fs.fstatSync(file)
|
|
166
|
+
const opened = fs.fstatSync(file, { bigint: true })
|
|
167
167
|
if (!opened.isFile() || opened.nlink > 1 || opened.dev !== stat.dev || opened.ino !== stat.ino) {
|
|
168
168
|
throw new Error('Offline validation artifact changed while it was opened.')
|
|
169
169
|
}
|
|
170
170
|
const buffer = fs.readFileSync(file)
|
|
171
|
-
const completed = fs.fstatSync(file)
|
|
171
|
+
const completed = fs.fstatSync(file, { bigint: true })
|
|
172
172
|
if (completed.size !== opened.size || completed.mtimeMs !== opened.mtimeMs) {
|
|
173
173
|
throw new Error('Offline validation artifact changed while it was read.')
|
|
174
174
|
}
|
|
175
|
-
state[totalKey] += buffer.length
|
|
175
|
+
state[totalKey] += BigInt(buffer.length)
|
|
176
176
|
return buffer
|
|
177
177
|
} finally {
|
|
178
178
|
fs.closeSync(file)
|
|
@@ -211,7 +211,7 @@ function getRunnerArgs (framework, testFile, generated) {
|
|
|
211
211
|
*/
|
|
212
212
|
function getRunnerEnv (framework) {
|
|
213
213
|
return {
|
|
214
|
-
...
|
|
214
|
+
...framework.validation.environment,
|
|
215
215
|
...(framework.framework === 'cucumber' ? { CUCUMBER_PUBLISH_QUIET: 'true' } : {}),
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -129,10 +129,10 @@ function openAndWrite (root, filename, data, label, creationFlag) {
|
|
|
129
129
|
*
|
|
130
130
|
* @param {string} directory directory path
|
|
131
131
|
* @param {string} label customer-facing path label
|
|
132
|
-
* @returns {{dev:
|
|
132
|
+
* @returns {{dev: bigint, ino: bigint}} directory identity
|
|
133
133
|
*/
|
|
134
134
|
function getDirectoryIdentity (directory, label) {
|
|
135
|
-
const stat = fs.lstatSync(directory)
|
|
135
|
+
const stat = fs.lstatSync(directory, { bigint: true })
|
|
136
136
|
if (!stat.isDirectory() || stat.isSymbolicLink()) {
|
|
137
137
|
throw new Error(`Refusing ${label} because its parent is not a regular directory: ${directory}`)
|
|
138
138
|
}
|
|
@@ -143,7 +143,7 @@ function getDirectoryIdentity (directory, label) {
|
|
|
143
143
|
* Refuses replacement of a parent directory between safe creation and publication.
|
|
144
144
|
*
|
|
145
145
|
* @param {string} directory directory path
|
|
146
|
-
* @param {{dev:
|
|
146
|
+
* @param {{dev: bigint, ino: bigint}} expected expected identity
|
|
147
147
|
* @param {string} label customer-facing path label
|
|
148
148
|
*/
|
|
149
149
|
function assertDirectoryIdentity (directory, expected, label) {
|
|
@@ -158,7 +158,7 @@ function assertDirectoryIdentity (directory, expected, label) {
|
|
|
158
158
|
*
|
|
159
159
|
* @param {string} filename temporary filename
|
|
160
160
|
* @param {string} parent expected parent directory
|
|
161
|
-
* @param {{dev:
|
|
161
|
+
* @param {{dev: bigint, ino: bigint}} parentIdentity expected parent identity
|
|
162
162
|
*/
|
|
163
163
|
function removeTemporaryFile (filename, parent, parentIdentity) {
|
|
164
164
|
try {
|
|
@@ -58,7 +58,7 @@ async function runBasicReporting ({ framework, out, options }) {
|
|
|
58
58
|
selector,
|
|
59
59
|
settingsLoadedFromCache: run.offline.inputs.settings?.status === 'loaded',
|
|
60
60
|
}
|
|
61
|
-
evidence.foundationalReportingEstablished
|
|
61
|
+
evidence.foundationalReportingEstablished &&= selector.verified
|
|
62
62
|
|
|
63
63
|
if (run.result.timedOut) {
|
|
64
64
|
return inconclusive(
|
|
@@ -149,7 +149,7 @@ function buildQuarantinedResponse (framework, scenario, discoveredIdentities = [
|
|
|
149
149
|
for (const identity of identities) {
|
|
150
150
|
for (const suite of getSuiteCandidates(identity, scenario)) {
|
|
151
151
|
for (const name of getNameCandidates(identity)) {
|
|
152
|
-
suites[suite]
|
|
152
|
+
suites[suite] ||= { tests: {} }
|
|
153
153
|
suites[suite].tests[name] = {
|
|
154
154
|
properties: {
|
|
155
155
|
quarantined: true,
|
|
@@ -210,7 +210,7 @@ function summarizeManagedTests (testManagementTests) {
|
|
|
210
210
|
}
|
|
211
211
|
summary.set(displaySuite, testNames)
|
|
212
212
|
}
|
|
213
|
-
return [...summary
|
|
213
|
+
return [...summary].slice(0, 5).map(([suite, tests]) => ({
|
|
214
214
|
suite,
|
|
215
215
|
tests: [...tests].slice(0, 5),
|
|
216
216
|
}))
|