[Pkg-javascript-devel] Bug#1107703: unblock: node-webpack/5.97.1+dfsg1+~cs11.18.27-3
Yadd
yadd at debian.org
Thu Jun 12 11:41:04 BST 2025
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: node-webpack at packages.debian.org, kapouer at melix.org, yadd at debian.org
Control: affects -1 + src:node-webpack
User: release.debian.org at packages.debian.org
Usertags: unblock
Please unblock package node-webpack
[ Reason ]
The typescript declaration embedded in webpack contain a syntax error
(#1106361) and made Jupyterlab build fail (FTBFS).
[ Impact ]
Typescript issue when trying to build some packages such as Jupyterlab.
[ Tests ]
No changes in test, but now jupyterlab build is OK
[ Risks ]
No risk, patch is trivial and fixes the syntax error
[ Checklist ]
[X] all changes are documented in the d/changelog
[X] I reviewed all changes and I approve them
[X] attach debdiff against the package in testing
unblock node-webpack/5.97.1+dfsg1+~cs11.18.27-3
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index 65b6a4df..25272eb5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+node-webpack (5.97.1+dfsg1+~cs11.18.27-3) unstable; urgency=medium
+
+ * patch: fix prepareStackTrace type. Closes: #1106361.
+
+ -- J?r?my Lal <kapouer at melix.org> Fri, 23 May 2025 15:34:47 +0200
+
node-webpack (5.97.1+dfsg1+~cs11.18.27-2) unstable; urgency=medium
* Team upload
diff --git a/debian/patches/fix-prepareStackTrace-type.patch b/debian/patches/fix-prepareStackTrace-type.patch
new file mode 100644
index 00000000..03ce68f9
--- /dev/null
+++ b/debian/patches/fix-prepareStackTrace-type.patch
@@ -0,0 +1,71 @@
+From 906627aadc04044060d9c0d446906c3aa2843de0 Mon Sep 17 00:00:00 2001
+From: alexander-akait <sheo13666q at gmail.com>
+Date: Tue, 6 May 2025 15:25:52 +0300
+Subject: [PATCH] fix: type error with latest @types/node
+
+---
+--- a/types.d.ts
++++ b/types.d.ts
+@@ -15474,20 +15474,56 @@
+ deserialize(__0: ObjectDeserializerContext): void;
+
+ /**
+- * Create .stack property on a target object
++ * Creates a `.stack` property on `targetObject`, which when accessed returns
++ * a string representing the location in the code at which
++ * `Error.captureStackTrace()` was called.
++ * ```js
++ * const myObject = {};
++ * Error.captureStackTrace(myObject);
++ * myObject.stack; // Similar to `new Error().stack`
++ * ```
++ * The first line of the trace will be prefixed with
++ * `${myObject.name}: ${myObject.message}`.
++ * The optional `constructorOpt` argument accepts a function. If given, all frames
++ * above `constructorOpt`, including `constructorOpt`, will be omitted from the
++ * generated stack trace.
++ * The `constructorOpt` argument is useful for hiding implementation
++ * details of error generation from the user. For instance:
++ * ```js
++ * function a() {
++ * b();
++ * }
++ * function b() {
++ * c();
++ * }
++ * function c() {
++ * // Create an error without stack trace to avoid calculating the stack trace twice.
++ * const { stackTraceLimit } = Error;
++ * Error.stackTraceLimit = 0;
++ * const error = new Error();
++ * Error.stackTraceLimit = stackTraceLimit;
++ * // Capture the stack trace above function b
++ * Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
++ * throw error;
++ * }
++ * a();
++ * ```
+ */
+ static captureStackTrace(
+ targetObject: object,
+ constructorOpt?: Function
+ ): void;
++ static prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
+
+ /**
+- * Optional override for formatting stack traces
++ * The `Error.stackTraceLimit` property specifies the number of stack frames
++ * collected by a stack trace (whether generated by `new Error().stack` or
++ * `Error.captureStackTrace(obj)`).
++ * The default value is `10` but may be set to any valid JavaScript number. Changes
++ * will affect any stack trace captured _after_ the value has been changed.
++ * If set to a non-number value, or set to a negative number, stack traces will
++ * not capture any frames.
+ */
+- static prepareStackTrace?: (
+- err: Error,
+- stackTraces: NodeJS.CallSite[]
+- ) => any;
+ static stackTraceLimit: number;
+ }
+ declare abstract class WebpackLogger {
diff --git a/debian/patches/series b/debian/patches/series
index 69ed0892..ea9d1a03 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ terser-webpack-plugin.patch
fix-tsconfig.patch
drop-prettier.patch
tsc-workaround.patch
+fix-prepareStackTrace-type.patch
More information about the Pkg-javascript-devel
mailing list