Files
klz-cables.com/.pnpm-store/v10/files/c9/dc075d1c109914d75ca4b8e02e4bfc5886bbd275647f02cd179360e304a6ea3241fd9c4f09d2167d599b0091dcea52924341795c17b181a4df6cdfd2893b7b
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

45 lines
1.2 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = deprecationWarning;
const warnings = new Set();
function deprecationWarning(oldName, newName, prefix = "", cacheKey = oldName) {
if (warnings.has(cacheKey)) return;
warnings.add(cacheKey);
const {
internal,
trace
} = captureShortStackTrace(1, 2);
if (internal) {
return;
}
console.warn(`${prefix}\`${oldName}\` has been deprecated, please migrate to \`${newName}\`\n${trace}`);
}
function captureShortStackTrace(skip, length) {
const {
stackTraceLimit,
prepareStackTrace
} = Error;
let stackTrace;
Error.stackTraceLimit = 1 + skip + length;
Error.prepareStackTrace = function (err, stack) {
stackTrace = stack;
};
new Error().stack;
Error.stackTraceLimit = stackTraceLimit;
Error.prepareStackTrace = prepareStackTrace;
if (!stackTrace) return {
internal: false,
trace: ""
};
const shortStackTrace = stackTrace.slice(1 + skip, 1 + skip + length);
return {
internal: /[\\/]@babel[\\/]/.test(shortStackTrace[1].getFileName()),
trace: shortStackTrace.map(frame => ` at ${frame}`).join("\n")
};
}
//# sourceMappingURL=deprecationWarning.js.map