Skip to content

Commit 8071d26

Browse files
committed
fix(smol): update inspector protocol Windows patch
Updates the Windows-specific inspector protocol patch for Node.js v24.10.0 to fix namedtuple ValueError issues in the Python build script. This patch ensures proper handling of Windows paths in the inspector protocol build process.
1 parent 7800556 commit 8071d26

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/node-smol-builder/patches/012-socketsecurity_fix_inspector_protocol_windows_v24.10.0.patch

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Solution:
1717
# 1. Modify Protocol.__init__() to accept config_file parameter
1818
# 2. Compute protocol path from config file location when missing
19-
# 3. Add the path to config.protocol so main() can use it
19+
# 3. Use computed path directly without modifying namedtuple
2020
#
2121
# Original error:
2222
# AttributeError: 'X' object has no attribute 'path'
@@ -28,10 +28,10 @@
2828

2929
--- a/deps/v8/third_party/inspector_protocol/code_generator.py
3030
+++ b/deps/v8/third_party/inspector_protocol/code_generator.py
31-
@@ -357,12 +357,27 @@
32-
31+
@@ -357,12 +357,23 @@
32+
3333
class Protocol(object):
34-
34+
3535
- def __init__(self, config):
3636
+ def __init__(self, config, config_file=None):
3737
self.config = config
@@ -50,10 +50,6 @@
5050
+ protocol_path = os.path.normpath(os.path.join(config_dir, '../../include/js_protocol.pdl'))
5151
+ else:
5252
+ raise Exception("config.protocol.path not set and config_file not provided")
53-
+ # Add path to config so main() can use it later.
54-
+ protocol_obj = config.protocol._replace(path=protocol_path)
55-
+ config = config._replace(protocol=protocol_obj)
56-
+ self.config = config
5753
+ self.generate_domains = self.read_protocol_file(protocol_path)
5854

5955
if config.protocol.options:

0 commit comments

Comments
 (0)