Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
8
node_modules/playwright/lib/worker/fixtureRunner.js
generated
vendored
8
node_modules/playwright/lib/worker/fixtureRunner.js
generated
vendored
@@ -44,10 +44,13 @@ class Fixture {
|
||||
title,
|
||||
phase: "setup",
|
||||
location,
|
||||
slot: this.registration.timeout === void 0 ? void 0 : {
|
||||
slot: this.registration.timeout !== void 0 ? {
|
||||
timeout: this.registration.timeout,
|
||||
elapsed: 0
|
||||
}
|
||||
} : this.registration.scope === "worker" ? {
|
||||
timeout: this.runner.workerFixtureTimeout,
|
||||
elapsed: 0
|
||||
} : void 0
|
||||
};
|
||||
this._teardownDescription = { ...this._setupDescription, phase: "teardown" };
|
||||
}
|
||||
@@ -149,6 +152,7 @@ class FixtureRunner {
|
||||
constructor() {
|
||||
this.testScopeClean = true;
|
||||
this.instanceForId = /* @__PURE__ */ new Map();
|
||||
this.workerFixtureTimeout = 0;
|
||||
}
|
||||
setPool(pool) {
|
||||
if (!this.testScopeClean)
|
||||
|
||||
58
node_modules/playwright/lib/worker/testInfo.js
generated
vendored
58
node_modules/playwright/lib/worker/testInfo.js
generated
vendored
@@ -31,7 +31,8 @@ __export(testInfo_exports, {
|
||||
StepSkipError: () => StepSkipError,
|
||||
TestInfoImpl: () => TestInfoImpl,
|
||||
TestSkipError: () => TestSkipError,
|
||||
TestStepInfoImpl: () => TestStepInfoImpl
|
||||
TestStepInfoImpl: () => TestStepInfoImpl,
|
||||
emtpyTestInfoCallbacks: () => emtpyTestInfoCallbacks
|
||||
});
|
||||
module.exports = __toCommonJS(testInfo_exports);
|
||||
var import_fs = __toESM(require("fs"));
|
||||
@@ -42,8 +43,19 @@ var import_util = require("../util");
|
||||
var import_testTracing = require("./testTracing");
|
||||
var import_util2 = require("./util");
|
||||
var import_transform = require("../transform/transform");
|
||||
const emtpyTestInfoCallbacks = {
|
||||
onStepBegin: () => {
|
||||
},
|
||||
onStepEnd: () => {
|
||||
},
|
||||
onAttach: () => {
|
||||
},
|
||||
onTestPaused: () => Promise.reject(new Error("TestInfoImpl not initialized")),
|
||||
onCloneStorage: () => Promise.reject(new Error("TestInfoImpl not initialized")),
|
||||
onUpstreamStorage: () => Promise.resolve()
|
||||
};
|
||||
class TestInfoImpl {
|
||||
constructor(configInternal, projectInternal, workerParams, test, retry, onStepBegin, onStepEnd, onAttach, onTestPaused) {
|
||||
constructor(configInternal, projectInternal, workerParams, test, retry, callbacks) {
|
||||
this._snapshotNames = { lastAnonymousSnapshotIndex: 0, lastNamedSnapshotIndex: {} };
|
||||
this._ariaSnapshotNames = { lastAnonymousSnapshotIndex: 0, lastNamedSnapshotIndex: {} };
|
||||
this._interruptedPromise = new import_utils.ManualPromise();
|
||||
@@ -60,10 +72,7 @@ class TestInfoImpl {
|
||||
this.snapshotSuffix = "";
|
||||
this.errors = [];
|
||||
this.testId = test?.id ?? "";
|
||||
this._onStepBegin = onStepBegin;
|
||||
this._onStepEnd = onStepEnd;
|
||||
this._onAttach = onAttach;
|
||||
this._onTestPaused = onTestPaused;
|
||||
this._callbacks = callbacks;
|
||||
this._startTime = (0, import_utils.monotonicTime)();
|
||||
this._startWallTime = Date.now();
|
||||
this._requireFile = test?._requireFile ?? "";
|
||||
@@ -240,7 +249,7 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
|
||||
suggestedRebaseline: result.suggestedRebaseline,
|
||||
annotations: step.info.annotations
|
||||
};
|
||||
this._onStepEnd(payload);
|
||||
this._callbacks.onStepEnd(payload);
|
||||
}
|
||||
if (step.group !== "internal") {
|
||||
const errorForTrace = step.error ? { name: "", message: step.error.message || "", stack: step.error.stack } : void 0;
|
||||
@@ -262,7 +271,7 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
|
||||
wallTime: Date.now(),
|
||||
location: step.location
|
||||
};
|
||||
this._onStepBegin(payload);
|
||||
this._callbacks.onStepBegin(payload);
|
||||
}
|
||||
if (step.group !== "internal") {
|
||||
this._tracing.appendBeforeActionForStep({
|
||||
@@ -338,8 +347,10 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
|
||||
async _didFinishTestFunction() {
|
||||
const shouldPause = this._workerParams.pauseAtEnd && !this._isFailure() || this._workerParams.pauseOnError && this._isFailure();
|
||||
if (shouldPause) {
|
||||
this._onTestPaused({ testId: this.testId, errors: this._isFailure() ? this.errors : [] });
|
||||
await this._interruptedPromise;
|
||||
await Promise.race([
|
||||
this._callbacks.onTestPaused({ testId: this.testId, errors: this._isFailure() ? this.errors : [], status: this.status }),
|
||||
this._interruptedPromise
|
||||
]);
|
||||
}
|
||||
await this._onDidFinishTestFunctionCallback?.();
|
||||
}
|
||||
@@ -367,7 +378,7 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
|
||||
this._tracing.appendBeforeActionForStep({ stepId: stepId2, title: `Attach ${(0, import_utils.escapeWithQuotes)(attachment.name, '"')}`, category: "test.attach", stack: [] });
|
||||
this._tracing.appendAfterActionForStep(stepId2, void 0, [attachment]);
|
||||
}
|
||||
this._onAttach({
|
||||
this._callbacks.onAttach({
|
||||
testId: this.testId,
|
||||
name: attachment.name,
|
||||
contentType: attachment.contentType,
|
||||
@@ -425,10 +436,6 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
|
||||
if (index > 1)
|
||||
relativeOutputPath = (0, import_util.addSuffixToFilePath)(relativeOutputPath, `-${index - 1}`);
|
||||
}
|
||||
const absoluteSnapshotPath = this._applyPathTemplate(kind, subPath, ext);
|
||||
return { absoluteSnapshotPath, relativeOutputPath };
|
||||
}
|
||||
_applyPathTemplate(kind, relativePath, ext) {
|
||||
const legacyTemplate = "{snapshotDir}/{testFileDir}/{testFileName}-snapshots/{arg}{-projectName}{-snapshotSuffix}{ext}";
|
||||
let template;
|
||||
if (kind === "screenshot") {
|
||||
@@ -439,12 +446,15 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
|
||||
} else {
|
||||
template = this._projectInternal.snapshotPathTemplate || legacyTemplate;
|
||||
}
|
||||
const dir = import_path.default.dirname(relativePath);
|
||||
const name = import_path.default.basename(relativePath, ext);
|
||||
const nameArgument = import_path.default.join(import_path.default.dirname(subPath), import_path.default.basename(subPath, ext));
|
||||
const absoluteSnapshotPath = this._applyPathTemplate(template, nameArgument, ext);
|
||||
return { absoluteSnapshotPath, relativeOutputPath };
|
||||
}
|
||||
_applyPathTemplate(template, nameArgument, ext) {
|
||||
const relativeTestFilePath = import_path.default.relative(this.project.testDir, this._requireFile);
|
||||
const parsedRelativeTestFilePath = import_path.default.parse(relativeTestFilePath);
|
||||
const projectNamePathSegment = (0, import_utils.sanitizeForFilePath)(this.project.name);
|
||||
const snapshotPath = template.replace(/\{(.)?testDir\}/g, "$1" + this.project.testDir).replace(/\{(.)?snapshotDir\}/g, "$1" + this.project.snapshotDir).replace(/\{(.)?snapshotSuffix\}/g, this.snapshotSuffix ? "$1" + this.snapshotSuffix : "").replace(/\{(.)?testFileDir\}/g, "$1" + parsedRelativeTestFilePath.dir).replace(/\{(.)?platform\}/g, "$1" + process.platform).replace(/\{(.)?projectName\}/g, projectNamePathSegment ? "$1" + projectNamePathSegment : "").replace(/\{(.)?testName\}/g, "$1" + this._fsSanitizedTestName()).replace(/\{(.)?testFileName\}/g, "$1" + parsedRelativeTestFilePath.base).replace(/\{(.)?testFilePath\}/g, "$1" + relativeTestFilePath).replace(/\{(.)?arg\}/g, "$1" + import_path.default.join(dir, name)).replace(/\{(.)?ext\}/g, ext ? "$1" + ext : "");
|
||||
const snapshotPath = template.replace(/\{(.)?testDir\}/g, "$1" + this.project.testDir).replace(/\{(.)?snapshotDir\}/g, "$1" + this.project.snapshotDir).replace(/\{(.)?snapshotSuffix\}/g, this.snapshotSuffix ? "$1" + this.snapshotSuffix : "").replace(/\{(.)?testFileDir\}/g, "$1" + parsedRelativeTestFilePath.dir).replace(/\{(.)?platform\}/g, "$1" + process.platform).replace(/\{(.)?projectName\}/g, projectNamePathSegment ? "$1" + projectNamePathSegment : "").replace(/\{(.)?testName\}/g, "$1" + this._fsSanitizedTestName()).replace(/\{(.)?testFileName\}/g, "$1" + parsedRelativeTestFilePath.base).replace(/\{(.)?testFilePath\}/g, "$1" + relativeTestFilePath).replace(/\{(.)?arg\}/g, "$1" + nameArgument).replace(/\{(.)?ext\}/g, ext ? "$1" + ext : "");
|
||||
return import_path.default.normalize(import_path.default.resolve(this._configInternal.configDir, snapshotPath));
|
||||
}
|
||||
snapshotPath(...args) {
|
||||
@@ -462,6 +472,15 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
|
||||
setTimeout(timeout) {
|
||||
this._timeoutManager.setTimeout(timeout);
|
||||
}
|
||||
async _cloneStorage(storageFile) {
|
||||
return await this._callbacks.onCloneStorage({ storageFile });
|
||||
}
|
||||
async _upstreamStorage(storageFile, storageOutFile) {
|
||||
await this._callbacks.onUpstreamStorage({ storageFile, storageOutFile });
|
||||
}
|
||||
artifactsDir() {
|
||||
return this._workerParams.artifactsDir;
|
||||
}
|
||||
}
|
||||
class TestStepInfoImpl {
|
||||
constructor(testInfo, stepId, title, parentStep) {
|
||||
@@ -512,5 +531,6 @@ const stepSymbol = Symbol("step");
|
||||
StepSkipError,
|
||||
TestInfoImpl,
|
||||
TestSkipError,
|
||||
TestStepInfoImpl
|
||||
TestStepInfoImpl,
|
||||
emtpyTestInfoCallbacks
|
||||
});
|
||||
|
||||
33
node_modules/playwright/lib/worker/workerMain.js
generated
vendored
33
node_modules/playwright/lib/worker/workerMain.js
generated
vendored
@@ -95,11 +95,7 @@ class WorkerMain extends import_process.ProcessRunner {
|
||||
if (!this._config) {
|
||||
return;
|
||||
}
|
||||
const fakeTestInfo = new import_testInfo.TestInfoImpl(this._config, this._project, this._params, void 0, 0, () => {
|
||||
}, () => {
|
||||
}, () => {
|
||||
}, () => {
|
||||
});
|
||||
const fakeTestInfo = new import_testInfo.TestInfoImpl(this._config, this._project, this._params, void 0, 0, import_testInfo.emtpyTestInfoCallbacks);
|
||||
const runnable = { type: "teardown" };
|
||||
await fakeTestInfo._runWithTimeout(runnable, () => this._loadIfNeeded()).catch(() => {
|
||||
});
|
||||
@@ -173,6 +169,7 @@ class WorkerMain extends import_process.ProcessRunner {
|
||||
this._config = config;
|
||||
this._project = project;
|
||||
this._poolBuilder = import_poolBuilder.PoolBuilder.createForWorker(this._project);
|
||||
this._fixtureRunner.workerFixtureTimeout = this._project.project.timeout;
|
||||
}
|
||||
async runTestGroup(runPayload) {
|
||||
this._runFinished = new import_utils.ManualPromise();
|
||||
@@ -233,18 +230,22 @@ class WorkerMain extends import_process.ProcessRunner {
|
||||
return { response: {}, error: (0, import_util2.testInfoError)(error) };
|
||||
}
|
||||
}
|
||||
resume(payload) {
|
||||
this._resumePromise?.resolve(payload);
|
||||
}
|
||||
async _runTest(test, retry, nextTest) {
|
||||
const testInfo = new import_testInfo.TestInfoImpl(
|
||||
this._config,
|
||||
this._project,
|
||||
this._params,
|
||||
test,
|
||||
retry,
|
||||
(stepBeginPayload) => this.dispatchEvent("stepBegin", stepBeginPayload),
|
||||
(stepEndPayload) => this.dispatchEvent("stepEnd", stepEndPayload),
|
||||
(attachment) => this.dispatchEvent("attach", attachment),
|
||||
(testPausedPayload) => this.dispatchEvent("testPaused", testPausedPayload)
|
||||
);
|
||||
const testInfo = new import_testInfo.TestInfoImpl(this._config, this._project, this._params, test, retry, {
|
||||
onStepBegin: (payload) => this.dispatchEvent("stepBegin", payload),
|
||||
onStepEnd: (payload) => this.dispatchEvent("stepEnd", payload),
|
||||
onAttach: (payload) => this.dispatchEvent("attach", payload),
|
||||
onTestPaused: (payload) => {
|
||||
this._resumePromise = new import_utils.ManualPromise();
|
||||
this.dispatchEvent("testPaused", payload);
|
||||
return this._resumePromise;
|
||||
},
|
||||
onCloneStorage: async (payload) => this.sendRequest("cloneStorage", payload),
|
||||
onUpstreamStorage: (payload) => this.sendRequest("upstreamStorage", payload)
|
||||
});
|
||||
const processAnnotation = (annotation) => {
|
||||
testInfo.annotations.push(annotation);
|
||||
switch (annotation.type) {
|
||||
|
||||
Reference in New Issue
Block a user