build: update some build dependencies (#44071)

* build: update some build dependencies (#43882)

* build: update some build dependencies

* build: fix eslint issues after updating

* build: disable ts check on busted js example

* build: update internal types for stricter event handling

* restore url.parse behavior

* fix typing issues

* sigh

* build: update easy deps

* build: skip woa engines check

* build: s/colors/chalk

* build: node 20 on windows
This commit is contained in:
Samuel Attard 2024-10-01 13:14:08 -07:00 committed by GitHub
parent 9222396159
commit 5bdaa42b01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
49 changed files with 2359 additions and 1325 deletions

View file

@ -704,7 +704,7 @@ describe('chromium features', () => {
it('should register for intercepted file scheme', (done) => {
const customSession = session.fromPartition('intercept-file');
customSession.protocol.interceptBufferProtocol('file', (request, callback) => {
let file = url.parse(request.url).pathname!;
let file = new URL(request.url).pathname!;
if (file[0] === '/' && process.platform === 'win32') file = file.slice(1);
const content = fs.readFileSync(path.normalize(file));
@ -745,7 +745,7 @@ describe('chromium features', () => {
it('should register for custom scheme', (done) => {
const customSession = session.fromPartition('custom-scheme');
customSession.protocol.registerFileProtocol(serviceWorkerScheme, (request, callback) => {
let file = url.parse(request.url).pathname!;
let file = new URL(request.url).pathname!;
if (file[0] === '/' && process.platform === 'win32') file = file.slice(1);
callback({ path: path.normalize(file) } as any);
@ -1999,7 +1999,7 @@ describe('chromium features', () => {
let contents: WebContents;
before(() => {
protocol.registerFileProtocol(protocolName, (request, callback) => {
const parsedUrl = url.parse(request.url);
const parsedUrl = new URL(request.url);
let filename;
switch (parsedUrl.pathname) {
case '/localStorage' : filename = 'local_storage.html'; break;
@ -2454,7 +2454,7 @@ describe('chromium features', () => {
it('has user agent', async () => {
const server = http.createServer();
const { port } = await listen(server);
const wss = new ws.Server({ server: server });
const wss = new ws.Server({ server });
const finished = new Promise<string | undefined>((resolve, reject) => {
wss.on('error', reject);
wss.on('connection', (ws, upgradeReq) => {
@ -3439,6 +3439,7 @@ describe('navigator.hid', () => {
haveDevices = true;
return true;
}
return false;
});
if (foundDevice) {
callback(foundDevice.deviceId);
@ -3486,6 +3487,7 @@ describe('navigator.hid', () => {
return true;
}
}
return false;
});
}
callback();
@ -3665,6 +3667,7 @@ describe('navigator.usb', () => {
haveDevices = true;
return true;
}
return false;
});
if (foundDevice) {
callback(foundDevice.deviceId);