Updating @types/node

Needs some minor code changes too to support the new typings
This commit is contained in:
Matt Bierner
2025-03-24 13:02:28 -07:00
parent 0dcae01c07
commit 8225b496b1
27 changed files with 160 additions and 130 deletions

View File

@@ -56,12 +56,13 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.12.11", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/ansi-styles": { "node_modules/ansi-styles": {
@@ -92,10 +93,11 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
} }
} }
} }

View File

@@ -20,12 +20,13 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/balanced-match": { "node_modules/balanced-match": {
@@ -81,10 +82,11 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
}, },
"node_modules/vscode-jsonrpc": { "node_modules/vscode-jsonrpc": {
"version": "9.0.0-next.6", "version": "9.0.0-next.6",

View File

@@ -16,19 +16,21 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
} }
} }
} }

View File

@@ -81,12 +81,13 @@
"integrity": "sha1-JEywLHfsLnT3ipvTGCGKvJxQCmE= sha512-ZsZ2I9Vzso3Ho/pjZFsmmZ++FWeEd/txqybHTm4OgaZzdS8V9V/YYWQwg5TC38Z7uLWUV1vavpLLbjJtKubR1A==" "integrity": "sha1-JEywLHfsLnT3ipvTGCGKvJxQCmE= sha512-ZsZ2I9Vzso3Ho/pjZFsmmZ++FWeEd/txqybHTm4OgaZzdS8V9V/YYWQwg5TC38Z7uLWUV1vavpLLbjJtKubR1A=="
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/@vscode/emmet-helper": { "node_modules/@vscode/emmet-helper": {
@@ -151,10 +152,11 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
}, },
"node_modules/vscode-languageserver-textdocument": { "node_modules/vscode-languageserver-textdocument": {
"version": "1.0.12", "version": "1.0.12",

View File

@@ -182,12 +182,13 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/@types/picomatch": { "node_modules/@types/picomatch": {
@@ -383,10 +384,11 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
}, },
"node_modules/util-deprecate": { "node_modules/util-deprecate": {
"version": "1.0.2", "version": "1.0.2",

View File

@@ -145,12 +145,13 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/@vscode/extension-telemetry": { "node_modules/@vscode/extension-telemetry": {
@@ -220,10 +221,11 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
}, },
"node_modules/vscode-jsonrpc": { "node_modules/vscode-jsonrpc": {
"version": "9.0.0-next.6", "version": "9.0.0-next.6",

View File

@@ -143,12 +143,13 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/@vscode/extension-telemetry": { "node_modules/@vscode/extension-telemetry": {
@@ -166,10 +167,11 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
} }
} }
} }

View File

@@ -202,12 +202,13 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/@types/node-fetch": { "node_modules/@types/node-fetch": {
@@ -456,10 +457,11 @@
"integrity": "sha512-V+uqV66BOQnWxvI6HjDnE4VkInmYZUQ4dgB7gzaDyFyFSK1i1nF/j7DpS9UbQAgV9NaF1XpcyuavnM1qOeiEIg==" "integrity": "sha512-V+uqV66BOQnWxvI6HjDnE4VkInmYZUQ4dgB7gzaDyFyFSK1i1nF/j7DpS9UbQAgV9NaF1XpcyuavnM1qOeiEIg=="
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
}, },
"node_modules/uuid": { "node_modules/uuid": {
"version": "8.3.2", "version": "8.3.2",

View File

@@ -16,19 +16,21 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
} }
} }
} }

View File

@@ -152,12 +152,13 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/@types/semver": { "node_modules/@types/semver": {
@@ -257,10 +258,11 @@
"integrity": "sha512-V+uqV66BOQnWxvI6HjDnE4VkInmYZUQ4dgB7gzaDyFyFSK1i1nF/j7DpS9UbQAgV9NaF1XpcyuavnM1qOeiEIg==" "integrity": "sha512-V+uqV66BOQnWxvI6HjDnE4VkInmYZUQ4dgB7gzaDyFyFSK1i1nF/j7DpS9UbQAgV9NaF1XpcyuavnM1qOeiEIg=="
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
}, },
"node_modules/vscode-tas-client": { "node_modules/vscode-tas-client": {
"version": "0.1.84", "version": "0.1.84",

View File

@@ -26,12 +26,13 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/@types/node-forge": { "node_modules/@types/node-forge": {
@@ -216,10 +217,11 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
}, },
"node_modules/wrap-ansi": { "node_modules/wrap-ansi": {
"version": "7.0.0", "version": "7.0.0",

View File

@@ -24,7 +24,7 @@ export async function createRandomFile(contents: string | Uint8Array = '', dir:
} else { } else {
fakeFile = vscode.Uri.parse(`${testFs.scheme}:/${rndName() + ext}`); fakeFile = vscode.Uri.parse(`${testFs.scheme}:/${rndName() + ext}`);
} }
testFs.writeFile(fakeFile, Buffer.from(contents), { create: true, overwrite: true }); testFs.writeFile(fakeFile, typeof contents === 'string' ? Buffer.from(contents) : Buffer.from(contents), { create: true, overwrite: true });
return fakeFile; return fakeFile;
} }

View File

@@ -16,19 +16,21 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
} }
} }
} }

27
package-lock.json generated
View File

@@ -2436,12 +2436,13 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.14.13", "version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.13.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-+bHoGiZb8UiQ0+WEtmph2IWQCjIqg8MDZMAV+ppRRhUZnquF5mQkP/9vpSwJClEiSM/C7fZZExPzfU0vJTyp8w==", "integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~6.19.2"
} }
}, },
"node_modules/@types/node-fetch": { "node_modules/@types/node-fetch": {
@@ -6079,10 +6080,11 @@
} }
}, },
"node_modules/editorconfig/node_modules/@types/node": { "node_modules/editorconfig/node_modules/@types/node": {
"version": "10.12.21", "version": "10.17.60",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.21.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz",
"integrity": "sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==", "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==",
"dev": true "dev": true,
"license": "MIT"
}, },
"node_modules/editorconfig/node_modules/@types/semver": { "node_modules/editorconfig/node_modules/@types/semver": {
"version": "5.5.0", "version": "5.5.0",
@@ -17753,10 +17755,11 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true "dev": true,
"license": "MIT"
}, },
"node_modules/union-value": { "node_modules/union-value": {
"version": "1.0.1", "version": "1.0.1",

View File

@@ -20,7 +20,7 @@ export interface IObjectCollectionBuffer<T extends ObjectCollectionBufferPropert
/** /**
* The underlying buffer. This **should not** be modified externally. * The underlying buffer. This **should not** be modified externally.
*/ */
readonly buffer: ArrayBuffer; readonly buffer: ArrayBufferLike;
/** /**
* A view of the underlying buffer. This **should not** be modified externally. * A view of the underlying buffer. This **should not** be modified externally.
*/ */
@@ -79,7 +79,7 @@ export function createObjectCollectionBuffer<T extends ObjectCollectionBufferPro
} }
class ObjectCollectionBuffer<T extends ObjectCollectionBufferPropertySpec[]> extends Disposable implements IObjectCollectionBuffer<T> { class ObjectCollectionBuffer<T extends ObjectCollectionBufferPropertySpec[]> extends Disposable implements IObjectCollectionBuffer<T> {
buffer: ArrayBuffer; buffer: ArrayBufferLike;
view: Float32Array; view: Float32Array;
get bufferUsedSize() { get bufferUsedSize() {

View File

@@ -135,10 +135,10 @@ export class ContiguousTokensEditing {
} }
} }
export function toUint32Array(arr: Uint32Array | ArrayBuffer): Uint32Array { export function toUint32Array(arr: Uint32Array | ArrayBuffer): Uint32Array<ArrayBuffer> {
if (arr instanceof Uint32Array) { if (arr instanceof Uint32Array) {
return arr; return arr as Uint32Array<ArrayBuffer>;
} else { } else {
return new Uint32Array(arr); return new Uint32Array<ArrayBuffer>(arr);
} }
} }

View File

@@ -143,7 +143,7 @@ export interface ICommonNativeHostService {
hasWSLFeatureInstalled(): Promise<boolean>; hasWSLFeatureInstalled(): Promise<boolean>;
// Screenshots // Screenshots
getScreenshot(): Promise<ArrayBufferLike | undefined>; getScreenshot(): Promise<VSBuffer | undefined>;
// Process // Process
getProcessId(): Promise<number | undefined>; getProcessId(): Promise<number | undefined>;

View File

@@ -720,11 +720,12 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
//#region Screenshots //#region Screenshots
async getScreenshot(windowId: number | undefined, options?: INativeHostOptions): Promise<ArrayBufferLike | undefined> { async getScreenshot(windowId: number | undefined, options?: INativeHostOptions): Promise<VSBuffer | undefined> {
const window = this.windowById(options?.targetWindowId, windowId); const window = this.windowById(options?.targetWindowId, windowId);
const captured = await window?.win?.webContents.capturePage(); const captured = await window?.win?.webContents.capturePage();
return captured?.toJPEG(95); const buf = captured?.toJPEG(95);
return buf && VSBuffer.wrap(buf);
} }
//#endregion //#endregion

View File

@@ -7,9 +7,9 @@ import { VSBuffer } from '../../../base/common/buffer.js';
import * as extHostProtocol from './extHost.protocol.js'; import * as extHostProtocol from './extHost.protocol.js';
class ArrayBufferSet { class ArrayBufferSet {
public readonly buffers: ArrayBuffer[] = []; public readonly buffers: ArrayBufferLike[] = [];
public add(buffer: ArrayBuffer): number { public add(buffer: ArrayBufferLike): number {
let index = this.buffers.indexOf(buffer); let index = this.buffers.indexOf(buffer);
if (index < 0) { if (index < 0) {
index = this.buffers.length; index = this.buffers.length;

View File

@@ -3,16 +3,17 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { VSBuffer } from '../../../../../base/common/buffer.js';
import { localize } from '../../../../../nls.js'; import { localize } from '../../../../../nls.js';
import { IChatRequestVariableEntry } from '../../common/chatModel.js'; import { IChatRequestVariableEntry } from '../../common/chatModel.js';
export const ScreenshotVariableId = 'screenshot-focused-window'; export const ScreenshotVariableId = 'screenshot-focused-window';
export function convertBufferToScreenshotVariable(buffer: ArrayBufferLike): IChatRequestVariableEntry { export function convertBufferToScreenshotVariable(buffer: VSBuffer): IChatRequestVariableEntry {
return { return {
id: ScreenshotVariableId, id: ScreenshotVariableId,
name: localize('screenshot', 'Screenshot'), name: localize('screenshot', 'Screenshot'),
value: new Uint8Array(buffer), value: buffer.buffer,
isImage: true, isImage: true,
}; };
} }

View File

@@ -147,7 +147,7 @@ export class McpRegistryInputStorage extends Disposable {
const encrypted = await crypto.subtle.encrypt( const encrypted = await crypto.subtle.encrypt(
{ name: MCP_ENCRYPTION_KEY_ALGORITHM, iv: iv.buffer }, { name: MCP_ENCRYPTION_KEY_ALGORITHM, iv: iv.buffer },
key, key,
new TextEncoder().encode(toSeal).buffer, new TextEncoder().encode(toSeal).buffer as ArrayBuffer,
); );
const enc = encodeBase64(VSBuffer.wrap(new Uint8Array(encrypted))); const enc = encodeBase64(VSBuffer.wrap(new Uint8Array(encrypted)));

View File

@@ -41,6 +41,7 @@ import { mainWindow, isAuxiliaryWindow } from '../../../../base/browser/window.j
import { isIOS, isMacintosh } from '../../../../base/common/platform.js'; import { isIOS, isMacintosh } from '../../../../base/common/platform.js';
import { IUserDataProfilesService } from '../../../../platform/userDataProfile/common/userDataProfile.js'; import { IUserDataProfilesService } from '../../../../platform/userDataProfile/common/userDataProfile.js';
import { URI } from '../../../../base/common/uri.js'; import { URI } from '../../../../base/common/uri.js';
import { VSBuffer } from '../../../../base/common/buffer.js';
enum HostShutdownReason { enum HostShutdownReason {
@@ -587,7 +588,7 @@ export class BrowserHostService extends Disposable implements IHostService {
//#region Screenshots //#region Screenshots
async getScreenshot(): Promise<ArrayBufferLike | undefined> { async getScreenshot(): Promise<VSBuffer | undefined> {
// Gets a screenshot from the browser. This gets the screenshot via the browser's display // Gets a screenshot from the browser. This gets the screenshot via the browser's display
// media API which will typically offer a picker of all available screens and windows for // media API which will typically offer a picker of all available screens and windows for
// the user to select. Using the video stream provided by the display media API, this will // the user to select. Using the video stream provided by the display media API, this will
@@ -633,8 +634,8 @@ export class BrowserHostService extends Disposable implements IHostService {
throw new Error('Failed to create blob from canvas'); throw new Error('Failed to create blob from canvas');
} }
// Convert the Blob to an ArrayBuffer const buf = await blob.bytes();
return blob.arrayBuffer(); return VSBuffer.wrap(buf);
} catch (error) { } catch (error) {
console.error('Error taking screenshot:', error); console.error('Error taking screenshot:', error);

View File

@@ -128,7 +128,7 @@ export interface IHostService {
/** /**
* Captures a screenshot. * Captures a screenshot.
*/ */
getScreenshot(): Promise<ArrayBufferLike | undefined>; getScreenshot(): Promise<VSBuffer | undefined>;
//#endregion //#endregion

View File

@@ -193,7 +193,7 @@ class WorkbenchHostService extends Disposable implements IHostService {
//#region Screenshots //#region Screenshots
getScreenshot(): Promise<ArrayBufferLike | undefined> { getScreenshot(): Promise<VSBuffer | undefined> {
return this.nativeHostService.getScreenshot(); return this.nativeHostService.getScreenshot();
} }

View File

@@ -104,7 +104,7 @@ export class TextMateWorkerTokenizerController extends Disposable {
/** /**
* This method is called from the worker through the worker host. * This method is called from the worker through the worker host.
*/ */
public async setTokensAndStates(controllerId: number, versionId: number, rawTokens: ArrayBuffer, stateDeltas: StateDeltas[]): Promise<void> { public async setTokensAndStates(controllerId: number, versionId: number, rawTokens: Uint8Array, stateDeltas: StateDeltas[]): Promise<void> {
if (this.controllerId !== controllerId) { if (this.controllerId !== controllerId) {
// This event is for an outdated controller (the worker didn't receive the delete/create messages yet), ignore the event. // This event is for an outdated controller (the worker didn't receive the delete/create messages yet), ignore the event.
return; return;

View File

@@ -1577,7 +1577,7 @@ export class TestHostService implements IHostService {
async toggleFullScreen(): Promise<void> { } async toggleFullScreen(): Promise<void> { }
async getScreenshot(): Promise<ArrayBufferLike | undefined> { return undefined; } async getScreenshot(): Promise<VSBuffer | undefined> { return undefined; }
async getNativeWindowHandle(_windowId: number): Promise<VSBuffer | undefined> { return undefined; } async getNativeWindowHandle(_windowId: number): Promise<VSBuffer | undefined> { return undefined; }

View File

@@ -161,7 +161,7 @@ export class TestNativeHostService implements INativeHostService {
async hasClipboard(format: string, type?: 'selection' | 'clipboard' | undefined): Promise<boolean> { return false; } async hasClipboard(format: string, type?: 'selection' | 'clipboard' | undefined): Promise<boolean> { return false; }
async windowsGetStringRegKey(hive: 'HKEY_CURRENT_USER' | 'HKEY_LOCAL_MACHINE' | 'HKEY_CLASSES_ROOT' | 'HKEY_USERS' | 'HKEY_CURRENT_CONFIG', path: string, name: string): Promise<string | undefined> { return undefined; } async windowsGetStringRegKey(hive: 'HKEY_CURRENT_USER' | 'HKEY_LOCAL_MACHINE' | 'HKEY_CLASSES_ROOT' | 'HKEY_USERS' | 'HKEY_CURRENT_CONFIG', path: string, name: string): Promise<string | undefined> { return undefined; }
async profileRenderer(): Promise<any> { throw new Error(); } async profileRenderer(): Promise<any> { throw new Error(); }
async getScreenshot(): Promise<ArrayBufferLike | undefined> { return undefined; } async getScreenshot(): Promise<VSBuffer | undefined> { return undefined; }
} }
export class TestExtensionTipsService extends AbstractNativeExtensionTipsService { export class TestExtensionTipsService extends AbstractNativeExtensionTipsService {