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:
root
2026-02-20 11:31:28 +00:00
parent d01a6179aa
commit b5eb27a827
1690 changed files with 47348 additions and 16848 deletions

View File

@@ -19,9 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
var expect_exports = {};
__export(expect_exports, {
expect: () => expect,
mergeExpects: () => mergeExpects,
printReceivedStringContainExpectedResult: () => printReceivedStringContainExpectedResult,
printReceivedStringContainExpectedSubstring: () => printReceivedStringContainExpectedSubstring
mergeExpects: () => mergeExpects
});
module.exports = __toCommonJS(expect_exports);
var import_utils = require("playwright-core/lib/utils");
@@ -33,15 +31,6 @@ var import_expectBundle = require("../common/expectBundle");
var import_globals = require("../common/globals");
var import_util = require("../util");
var import_testInfo = require("../worker/testInfo");
const printSubstring = (val) => val.replace(/"|\\/g, "\\$&");
const printReceivedStringContainExpectedSubstring = (received, start, length) => (0, import_expectBundle.RECEIVED_COLOR)(
'"' + printSubstring(received.slice(0, start)) + (0, import_expectBundle.INVERTED_COLOR)(printSubstring(received.slice(start, start + length))) + printSubstring(received.slice(start + length)) + '"'
);
const printReceivedStringContainExpectedResult = (received, result) => result === null ? (0, import_expectBundle.printReceived)(received) : printReceivedStringContainExpectedSubstring(
received,
result.index,
result[0].length
);
function createMatchers(actual, info, prefix) {
return new Proxy((0, import_expectBundle.expect)(actual), new ExpectMetaInfoProxyHandler(actual, info, prefix));
}
@@ -318,7 +307,5 @@ function mergeExpects(...expects) {
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
expect,
mergeExpects,
printReceivedStringContainExpectedResult,
printReceivedStringContainExpectedSubstring
mergeExpects
});

View File

@@ -19,43 +19,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
var matcherHint_exports = {};
__export(matcherHint_exports, {
ExpectError: () => ExpectError,
callLogText: () => callLogText,
formatMatcherMessage: () => formatMatcherMessage,
isJestError: () => isJestError
});
module.exports = __toCommonJS(matcherHint_exports);
var import_utils = require("playwright-core/lib/utils");
var import_expectBundle = require("../common/expectBundle");
function formatMatcherMessage(state, details) {
const receiver = details.receiver ?? (details.locator ? "locator" : "page");
let message = (0, import_expectBundle.DIM_COLOR)("expect(") + (0, import_expectBundle.RECEIVED_COLOR)(receiver) + (0, import_expectBundle.DIM_COLOR)(")" + (state.promise ? "." + state.promise : "") + (state.isNot ? ".not" : "") + ".") + details.matcherName + (0, import_expectBundle.DIM_COLOR)("(") + (0, import_expectBundle.EXPECTED_COLOR)(details.expectation) + (0, import_expectBundle.DIM_COLOR)(")") + " failed\n\n";
const diffLines = details.printedDiff?.split("\n");
if (diffLines?.length === 2) {
details.printedExpected = diffLines[0];
details.printedReceived = diffLines[1];
details.printedDiff = void 0;
}
const align = !details.errorMessage && details.printedExpected?.startsWith("Expected:") && (!details.printedReceived || details.printedReceived.startsWith("Received:"));
if (details.locator)
message += `Locator: ${align ? " " : ""}${String(details.locator)}
`;
if (details.printedExpected)
message += details.printedExpected + "\n";
if (details.printedReceived)
message += details.printedReceived + "\n";
if (details.timedOut && details.timeout)
message += `Timeout: ${align ? " " : ""}${details.timeout}ms
`;
if (details.printedDiff)
message += details.printedDiff + "\n";
if (details.errorMessage) {
message += details.errorMessage;
if (!details.errorMessage.endsWith("\n"))
message += "\n";
}
message += callLogText(details.log);
return message;
}
class ExpectError extends Error {
constructor(jestError, customMessage, stackFrames) {
super("");
@@ -68,20 +35,10 @@ class ExpectError extends Error {
}
}
function isJestError(e) {
return e instanceof Error && "matcherResult" in e;
return e instanceof Error && "matcherResult" in e && !!e.matcherResult;
}
const callLogText = (log) => {
if (!log || !log.some((l) => !!l))
return "";
return `
Call log:
${(0, import_expectBundle.DIM_COLOR)(log.join("\n"))}
`;
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ExpectError,
callLogText,
formatMatcherMessage,
isJestError
});

View File

@@ -61,7 +61,6 @@ var import_toMatchSnapshot = require("./toMatchSnapshot");
var import_config = require("../common/config");
var import_globals = require("../common/globals");
var import_testInfo = require("../worker/testInfo");
var import_matcherHint = require("./matcherHint");
function toBeAttached(locator, options) {
const attached = !options || options.attached === void 0 || options.attached;
const expected = attached ? "attached" : "detached";
@@ -297,7 +296,9 @@ async function toBeOK(response) {
response._fetchLog(),
isTextEncoding ? response.text() : null
]) : [];
const message = () => (0, import_matcherHint.formatMatcherMessage)(this, {
const message = () => (0, import_utils.formatMatcherMessage)(this.utils, {
isNot: this.isNot,
promise: this.promise,
matcherName,
receiver: "response",
expectation: "",

View File

@@ -21,8 +21,8 @@ __export(toBeTruthy_exports, {
toBeTruthy: () => toBeTruthy
});
module.exports = __toCommonJS(toBeTruthy_exports);
var import_utils = require("playwright-core/lib/utils");
var import_util = require("../util");
var import_matcherHint = require("./matcherHint");
async function toBeTruthy(matcherName, locator, receiverType, expected, arg, query, options = {}) {
(0, import_util.expectTypes)(locator, [receiverType], matcherName);
const timeout = options.timeout ?? this.timeout;
@@ -45,10 +45,12 @@ async function toBeTruthy(matcherName, locator, receiverType, expected, arg, que
printedReceived = errorMessage ? "" : `Received: ${received}`;
}
const message = () => {
return (0, import_matcherHint.formatMatcherMessage)(this, {
return (0, import_utils.formatMatcherMessage)(this.utils, {
isNot: this.isNot,
promise: this.promise,
matcherName,
expectation: arg,
locator,
locator: locator.toString(),
timeout,
timedOut,
printedExpected,

View File

@@ -23,7 +23,6 @@ __export(toEqual_exports, {
module.exports = __toCommonJS(toEqual_exports);
var import_utils = require("playwright-core/lib/utils");
var import_util = require("../util");
var import_matcherHint = require("./matcherHint");
const EXPECTED_LABEL = "Expected";
const RECEIVED_LABEL = "Received";
async function toEqual(matcherName, locator, receiverType, query, expected, options = {}) {
@@ -70,10 +69,12 @@ async function toEqual(matcherName, locator, receiverType, query, expected, opti
);
}
const message = () => {
return (0, import_matcherHint.formatMatcherMessage)(this, {
return (0, import_utils.formatMatcherMessage)(this.utils, {
isNot: this.isNot,
promise: this.promise,
matcherName,
expectation: "expected",
locator,
locator: locator.toString(),
timeout,
timedOut,
printedExpected,

View File

@@ -22,9 +22,6 @@ __export(toHaveURL_exports, {
});
module.exports = __toCommonJS(toHaveURL_exports);
var import_utils = require("playwright-core/lib/utils");
var import_expect = require("./expect");
var import_matcherHint = require("./matcherHint");
var import_expectBundle = require("../common/expectBundle");
async function toHaveURLWithPredicate(page, expected, options) {
const matcherName = "toHaveURL";
const timeout = options?.timeout ?? this.timeout;
@@ -75,18 +72,20 @@ function toHaveURLMessage(state, matcherName, expected, received, pass, timedOut
let printedDiff;
if (typeof expected === "function") {
printedExpected = `Expected: predicate to ${!state.isNot ? "succeed" : "fail"}`;
printedReceived = `Received: ${(0, import_expectBundle.printReceived)(receivedString)}`;
printedReceived = `Received: ${state.utils.printReceived(receivedString)}`;
} else {
if (pass) {
printedExpected = `Expected pattern: not ${state.utils.printExpected(expected)}`;
const formattedReceived = (0, import_expect.printReceivedStringContainExpectedResult)(receivedString, null);
const formattedReceived = (0, import_utils.printReceivedStringContainExpectedResult)(state.utils, receivedString, null);
printedReceived = `Received string: ${formattedReceived}`;
} else {
const labelExpected = `Expected ${typeof expected === "string" ? "string" : "pattern"}`;
printedDiff = state.utils.printDiffOrStringify(expected, receivedString, labelExpected, "Received string", false);
}
}
return (0, import_matcherHint.formatMatcherMessage)(state, {
return (0, import_utils.formatMatcherMessage)(state.utils, {
isNot: state.isNot,
promise: state.promise,
matcherName,
expectation: "expected",
timeout,

View File

@@ -34,9 +34,7 @@ module.exports = __toCommonJS(toMatchAriaSnapshot_exports);
var import_fs = __toESM(require("fs"));
var import_path = __toESM(require("path"));
var import_utils = require("playwright-core/lib/utils");
var import_matcherHint = require("./matcherHint");
var import_util = require("../util");
var import_expect = require("./expect");
var import_globals = require("../common/globals");
async function toMatchAriaSnapshot(locator, expectedParam, options = {}) {
const matcherName = "toMatchAriaSnapshot";
@@ -79,16 +77,18 @@ async function toMatchAriaSnapshot(locator, expectedParam, options = {}) {
if (errorMessage) {
printedExpected = `Expected: ${this.isNot ? "not " : ""}${this.utils.printExpected(expected)}`;
} else if (pass) {
const receivedString = (0, import_expect.printReceivedStringContainExpectedSubstring)(typedReceived.raw, typedReceived.raw.indexOf(expected), expected.length);
const receivedString = (0, import_utils.printReceivedStringContainExpectedSubstring)(this.utils, typedReceived.raw, typedReceived.raw.indexOf(expected), expected.length);
printedExpected = `Expected: not ${this.utils.printExpected(expected)}`;
printedReceived = `Received: ${receivedString}`;
} else {
printedDiff = this.utils.printDiffOrStringify(expected, typedReceived.raw, "Expected", "Received", false);
}
return (0, import_matcherHint.formatMatcherMessage)(this, {
return (0, import_utils.formatMatcherMessage)(this.utils, {
isNot: this.isNot,
promise: this.promise,
matcherName,
expectation: "expected",
locator,
locator: locator.toString(),
timeout,
timedOut,
printedExpected,

View File

@@ -39,7 +39,6 @@ var import_utils = require("playwright-core/lib/utils");
var import_utils2 = require("playwright-core/lib/utils");
var import_utilsBundle = require("playwright-core/lib/utilsBundle");
var import_util = require("../util");
var import_matcherHint = require("./matcherHint");
var import_globals = require("../common/globals");
const NonConfigProperties = [
"clip",
@@ -50,7 +49,7 @@ const NonConfigProperties = [
"timeout"
];
class SnapshotHelper {
constructor(testInfo, matcherName, locator, anonymousSnapshotExtension, configOptions, nameOrOptions, optOptions) {
constructor(state, testInfo, matcherName, locator, anonymousSnapshotExtension, configOptions, nameOrOptions, optOptions) {
let name;
if (Array.isArray(nameOrOptions) || typeof nameOrOptions === "string") {
name = nameOrOptions;
@@ -90,6 +89,7 @@ class SnapshotHelper {
this.mimeType = import_utilsBundle.mime.getType(import_path.default.basename(this.expectedPath)) ?? "application/octet-stream";
this.comparator = (0, import_utils.getComparator)(this.mimeType);
this.testInfo = testInfo;
this.state = state;
this.kind = this.mimeType.startsWith("image/") ? "Screenshot" : "Snapshot";
}
createMatcherResult(message, pass, log) {
@@ -162,7 +162,7 @@ class SnapshotHelper {
step?._attachToStep({ name: (0, import_util.addSuffixToFilePath)(this.attachmentBaseName, "-diff"), contentType: this.mimeType, path: this.diffPath });
}
if (log?.length)
output.push((0, import_matcherHint.callLogText)(log));
output.push((0, import_utils.callLogText)(this.state.utils, log));
else
output.push("");
return this.createMatcherResult(output.join("\n"), false, log);
@@ -181,6 +181,7 @@ function toMatchSnapshot(received, nameOrOptions = {}, optOptions = {}) {
return { pass: !this.isNot, message: () => "", name: "toMatchSnapshot", expected: nameOrOptions };
const configOptions = testInfo._projectInternal.expect?.toMatchSnapshot || {};
const helper = new SnapshotHelper(
this,
testInfo,
"toMatchSnapshot",
void 0,
@@ -216,7 +217,7 @@ function toMatchSnapshot(received, nameOrOptions = {}, optOptions = {}) {
const result = helper.comparator(received, expected, helper.options);
if (!result)
return helper.handleMatching();
const header = (0, import_matcherHint.formatMatcherMessage)(this, { matcherName: "toMatchSnapshot", receiver: (0, import_utils.isString)(received) ? "string" : "Buffer", expectation: "expected" });
const header = (0, import_utils.formatMatcherMessage)(this.utils, { promise: this.promise, isNot: this.isNot, matcherName: "toMatchSnapshot", receiver: (0, import_utils.isString)(received) ? "string" : "Buffer", expectation: "expected" });
return helper.handleDifferent(received, expected, void 0, result.diff, header, result.errorMessage, void 0, this._stepInfo);
}
function toHaveScreenshotStepTitle(nameOrOptions = {}, optOptions = {}) {
@@ -236,7 +237,7 @@ async function toHaveScreenshot(pageOrLocator, nameOrOptions = {}, optOptions =
(0, import_util.expectTypes)(pageOrLocator, ["Page", "Locator"], "toHaveScreenshot");
const [page, locator] = pageOrLocator.constructor.name === "Page" ? [pageOrLocator, void 0] : [pageOrLocator.page(), pageOrLocator];
const configOptions = testInfo._projectInternal.expect?.toHaveScreenshot || {};
const helper = new SnapshotHelper(testInfo, "toHaveScreenshot", locator, void 0, configOptions, nameOrOptions, optOptions);
const helper = new SnapshotHelper(this, testInfo, "toHaveScreenshot", locator, void 0, configOptions, nameOrOptions, optOptions);
if (!helper.expectedPath.toLowerCase().endsWith(".png"))
throw new Error(`Screenshot name "${import_path.default.basename(helper.expectedPath)}" must have '.png' extension`);
(0, import_util.expectTypes)(pageOrLocator, ["Page", "Locator"], "toHaveScreenshot");
@@ -273,7 +274,7 @@ async function toHaveScreenshot(pageOrLocator, nameOrOptions = {}, optOptions =
if (!hasSnapshot) {
const { actual: actual2, previous: previous2, diff: diff2, errorMessage: errorMessage2, log: log2, timedOut: timedOut2 } = await page._expectScreenshot(expectScreenshotOptions);
if (errorMessage2) {
const header2 = (0, import_matcherHint.formatMatcherMessage)(this, { matcherName: "toHaveScreenshot", locator, expectation: "expected", timeout, timedOut: timedOut2 });
const header2 = (0, import_utils.formatMatcherMessage)(this.utils, { promise: this.promise, isNot: this.isNot, matcherName: "toHaveScreenshot", locator: locator?.toString(), expectation: "expected", timeout, timedOut: timedOut2 });
return helper.handleDifferent(actual2, void 0, previous2, diff2, header2, errorMessage2, log2, this._stepInfo);
}
return helper.handleMissing(actual2, this._stepInfo);
@@ -297,11 +298,11 @@ async function toHaveScreenshot(pageOrLocator, nameOrOptions = {}, optOptions =
if (helper.updateSnapshots === "changed" || helper.updateSnapshots === "all") {
if (actual)
return writeFiles(actual);
let header2 = (0, import_matcherHint.formatMatcherMessage)(this, { matcherName: "toHaveScreenshot", locator, expectation: "expected", timeout, timedOut });
let header2 = (0, import_utils.formatMatcherMessage)(this.utils, { promise: this.promise, isNot: this.isNot, matcherName: "toHaveScreenshot", locator: locator?.toString(), expectation: "expected", timeout, timedOut });
header2 += " Failed to re-generate expected.\n";
return helper.handleDifferent(actual, expectScreenshotOptions.expected, previous, diff, header2, errorMessage, log, this._stepInfo);
}
const header = (0, import_matcherHint.formatMatcherMessage)(this, { matcherName: "toHaveScreenshot", locator, expectation: "expected", timeout, timedOut });
const header = (0, import_utils.formatMatcherMessage)(this.utils, { promise: this.promise, isNot: this.isNot, matcherName: "toHaveScreenshot", locator: locator?.toString(), expectation: "expected", timeout, timedOut });
return helper.handleDifferent(actual, expectScreenshotOptions.expected, previous, diff, header, errorMessage, log, this._stepInfo);
}
function writeFileSync(aPath, content) {

View File

@@ -21,17 +21,15 @@ __export(toMatchText_exports, {
toMatchText: () => toMatchText
});
module.exports = __toCommonJS(toMatchText_exports);
var import_utils = require("playwright-core/lib/utils");
var import_util = require("../util");
var import_expect = require("./expect");
var import_matcherHint = require("./matcherHint");
var import_expectBundle = require("../common/expectBundle");
async function toMatchText(matcherName, receiver, receiverType, query, expected, options = {}) {
(0, import_util.expectTypes)(receiver, [receiverType], matcherName);
const locator = receiverType === "Locator" ? receiver : void 0;
if (!(typeof expected === "string") && !(expected && typeof expected.test === "function")) {
const errorMessage2 = `Error: ${(0, import_expectBundle.EXPECTED_COLOR)("expected")} value must be a string or regular expression
const errorMessage2 = `Error: ${this.utils.EXPECTED_COLOR("expected")} value must be a string or regular expression
${this.utils.printWithType("Expected", expected, this.utils.printExpected)}`;
throw new Error((0, import_matcherHint.formatMatcherMessage)(this, { locator, matcherName, expectation: "expected", errorMessage: errorMessage2 }));
throw new Error((0, import_utils.formatMatcherMessage)(this.utils, { promise: this.promise, isNot: this.isNot, locator: locator?.toString(), matcherName, expectation: "expected", errorMessage: errorMessage2 }));
}
const timeout = options.timeout ?? this.timeout;
const { matches: pass, received, log, timedOut, errorMessage } = await query(!!this.isNot, timeout);
@@ -53,13 +51,13 @@ ${this.utils.printWithType("Expected", expected, this.utils.printExpected)}`;
if (typeof expected === "string") {
printedExpected = `Expected${expectedSuffix}: not ${this.utils.printExpected(expected)}`;
if (!errorMessage) {
const formattedReceived = (0, import_expect.printReceivedStringContainExpectedSubstring)(receivedString, receivedString.indexOf(expected), expected.length);
const formattedReceived = (0, import_utils.printReceivedStringContainExpectedSubstring)(this.utils, receivedString, receivedString.indexOf(expected), expected.length);
printedReceived = `Received${receivedSuffix}: ${formattedReceived}`;
}
} else {
printedExpected = `Expected${expectedSuffix}: not ${this.utils.printExpected(expected)}`;
if (!errorMessage) {
const formattedReceived = (0, import_expect.printReceivedStringContainExpectedResult)(receivedString, typeof expected.exec === "function" ? expected.exec(receivedString) : null);
const formattedReceived = (0, import_utils.printReceivedStringContainExpectedResult)(this.utils, receivedString, typeof expected.exec === "function" ? expected.exec(receivedString) : null);
printedReceived = `Received${receivedSuffix}: ${formattedReceived}`;
}
}
@@ -70,10 +68,12 @@ ${this.utils.printWithType("Expected", expected, this.utils.printExpected)}`;
printedDiff = this.utils.printDiffOrStringify(expected, receivedString, `Expected${expectedSuffix}`, `Received${receivedSuffix}`, false);
}
const message = () => {
return (0, import_matcherHint.formatMatcherMessage)(this, {
return (0, import_utils.formatMatcherMessage)(this.utils, {
promise: this.promise,
isNot: this.isNot,
matcherName,
expectation: "expected",
locator,
locator: locator?.toString(),
timeout,
timedOut,
printedExpected,