From babea79355f6dd91bc79ee2d733846fa339461f8 Mon Sep 17 00:00:00 2001
From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com>
Date: Sat, 9 Nov 2024 08:24:23 +0800
Subject: [PATCH 1/6] Update nodejs data for `Worker`
---
api/Worker.json | 101 ++++++++++++++++++------------------------------
1 file changed, 38 insertions(+), 63 deletions(-)
diff --git a/api/Worker.json b/api/Worker.json
index 6e205e6f6f0760..d4013402d2a789 100644
--- a/api/Worker.json
+++ b/api/Worker.json
@@ -22,26 +22,15 @@
"ie": {
"version_added": "10"
},
- "nodejs": [
- {
- "version_added": "12.17.0",
- "partial_implementation": true,
- "notes": [
- "Is a Node EventEmitter instead of DOM EventTarget.",
- "Worker script environment expects CommonJS modules or ECMAScript modules.",
- "Must be imported from the worker_threads module."
- ]
- },
- {
- "version_added": "11.7.0",
- "partial_implementation": true,
- "notes": [
- "Is a Node EventEmitter instead of DOM EventTarget.",
- "Worker script environment expects CommonJS modules.",
- "Must be imported from the worker_threads module."
- ]
- }
- ],
+ "nodejs": {
+ "version_added": "11.7.0",
+ "partial_implementation": true,
+ "notes": [
+ "Inherit from a Node EventEmitter instead of DOM EventTarget.",
+ "Also supports CommonJS modules, enabled for files ending with .cjs and for files ending with .js when the nearest parent package.json file contains a top-level field \"type\" with a value not of \"commonjs\".",
+ "Available as a part of the worker_threads module."
+ ]
+ },
"oculus": "mirror",
"opera": {
"version_added": "10.6"
@@ -88,18 +77,11 @@
"ie": {
"version_added": "10"
},
- "nodejs": [
- {
- "version_added": "12.17.0",
- "partial_implementation": true,
- "notes": "Takes entirely different options."
- },
- {
- "version_added": "11.7.0",
- "partial_implementation": true,
- "notes": "Takes entirely different options."
- }
- ],
+ "nodejs": {
+ "version_added": "11.7.0",
+ "partial_implementation": true,
+ "notes": "Takes entirely different options parameters."
+ },
"oculus": "mirror",
"opera": {
"version_added": "10.6"
@@ -318,6 +300,9 @@
"ie": {
"version_added": false
},
+ "nodejs": {
+ "version_added": "11.7.0"
+ },
"oculus": "mirror",
"opera": "mirror",
"opera_android": "mirror",
@@ -359,7 +344,7 @@
"version_added": "10"
},
"nodejs": {
- "version_added": false
+ "version_added": "11.7.0"
},
"oculus": "mirror",
"opera": {
@@ -408,18 +393,9 @@
"ie": {
"version_added": "10"
},
- "nodejs": [
- {
- "version_added": "12.17.0",
- "partial_implementation": true,
- "notes": "Supports the event, but only via Node EventEmitter."
- },
- {
- "version_added": "11.7.0",
- "partial_implementation": true,
- "notes": "Supports the event, but only via Node EventEmitter."
- }
- ],
+ "nodejs": {
+ "version_added": "11.7.0"
+ },
"oculus": "mirror",
"opera": {
"version_added": "10.6"
@@ -468,9 +444,15 @@
"ie": {
"version_added": false
},
- "nodejs": {
- "version_added": false
- },
+ "nodejs": [
+ {
+ "version_added": "14.5.0"
+ },
+ {
+ "version_added": "12.19.0",
+ "version_removed": "13.0.0"
+ }
+ ],
"oculus": "mirror",
"opera": "mirror",
"opera_android": "mirror",
@@ -543,18 +525,11 @@
"version_added": "10",
"notes": "Internet Explorer does not support Transferable objects."
},
- "nodejs": [
- {
- "version_added": "12.17.0",
- "partial_implementation": true,
- "notes": "Supports transferList argument for transferring ArrayBuffer and MessagePort objects"
- },
- {
- "version_added": "11.7.0",
- "partial_implementation": true,
- "notes": "Supports transferList argument for transferring ArrayBuffer and MessagePort objects"
- }
- ],
+ "nodejs": {
+ "version_added": "11.7.0",
+ "partial_implementation": true,
+ "notes": "Only support transferList parameter as an optional array of objects."
+ },
"oculus": "mirror",
"opera": {
"version_added": "10.6"
@@ -603,14 +578,14 @@
},
"nodejs": [
{
- "version_added": "12.17.0",
+ "version_added": "12.5.0",
"partial_implementation": true,
- "notes": "Also takes an optional callback to be executed when the worker has terminated."
+ "notes": "Returns a Promise instead. Taking an optional callback parameter is deprecated."
},
{
"version_added": "11.7.0",
"partial_implementation": true,
- "notes": "Also takes an optional callback to be executed when the worker has terminated."
+ "notes": "Support taking an optional callback parameter to be executed when the worker has terminated."
}
],
"oculus": "mirror",
From d73a105ceb4780627932fd211e11652e1bbd6661 Mon Sep 17 00:00:00 2001
From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com>
Date: Mon, 11 Nov 2024 23:49:41 +0800
Subject: [PATCH 2/6] update notes
---
api/Worker.json | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/api/Worker.json b/api/Worker.json
index d4013402d2a789..5566c581439efc 100644
--- a/api/Worker.json
+++ b/api/Worker.json
@@ -344,7 +344,9 @@
"version_added": "10"
},
"nodejs": {
- "version_added": "11.7.0"
+ "version_added": "11.7.0",
+ "partial_implementation": true,
+ "notes": "Supports the event, but only via Node EventEmitter."
},
"oculus": "mirror",
"opera": {
@@ -394,7 +396,9 @@
"version_added": "10"
},
"nodejs": {
- "version_added": "11.7.0"
+ "version_added": "11.7.0",
+ "partial_implementation": true,
+ "notes": "Supports the event, but only via Node EventEmitter."
},
"oculus": "mirror",
"opera": {
@@ -446,11 +450,15 @@
},
"nodejs": [
{
- "version_added": "14.5.0"
+ "version_added": "14.5.0",
+ "partial_implementation": true,
+ "notes": "Supports the event, but only via Node EventEmitter."
},
{
"version_added": "12.19.0",
- "version_removed": "13.0.0"
+ "version_removed": "13.0.0",
+ "partial_implementation": true,
+ "notes": "Supports the event, but only via Node EventEmitter."
}
],
"oculus": "mirror",
From dd1dc21cf85be1a6c267d76ce549f044a61b68be Mon Sep 17 00:00:00 2001
From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com>
Date: Sat, 23 Nov 2024 09:25:56 +0800
Subject: [PATCH 3/6] Update api/Worker.json
---
api/Worker.json | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/api/Worker.json b/api/Worker.json
index 4ae05c0eb4f54e..238a225bc90955 100644
--- a/api/Worker.json
+++ b/api/Worker.json
@@ -535,7 +535,10 @@
"nodejs": {
"version_added": "11.7.0",
"partial_implementation": true,
- "notes": "Only support `transferList` parameter as an optional array of objects."
+ "notes": [
+ "Only support passing the second parameter as an optional array of objects, not support passing the second parameter as an options object.",
+ "Only support transferring `ArrayBuffer` and `MessagePort` objects."
+ ]
},
"oculus": "mirror",
"opera": {
From 3e2d0ab6057449a4abee2e4d73207e230bdf8c59 Mon Sep 17 00:00:00 2001
From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com>
Date: Sun, 1 Dec 2024 22:33:04 +0800
Subject: [PATCH 4/6] Apply suggestions from code review
Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu
---
api/Worker.json | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/api/Worker.json b/api/Worker.json
index 238a225bc90955..6b088b74c81bfc 100644
--- a/api/Worker.json
+++ b/api/Worker.json
@@ -346,7 +346,7 @@
"nodejs": {
"version_added": "11.7.0",
"partial_implementation": true,
- "notes": "Supports the event, but only via Node EventEmitter."
+ "notes": "Supports the event, but only via Node `EventEmitter`."
},
"oculus": "mirror",
"opera": {
@@ -452,13 +452,13 @@
{
"version_added": "14.5.0",
"partial_implementation": true,
- "notes": "Supports the event, but only via Node EventEmitter."
+ "notes": "Supports the event, but only via Node `EventEmitter`."
},
{
"version_added": "12.19.0",
"version_removed": "13.0.0",
"partial_implementation": true,
- "notes": "Supports the event, but only via Node EventEmitter."
+ "notes": "Supports the event, but only via Node `EventEmitter`."
}
],
"oculus": "mirror",
@@ -590,12 +590,12 @@
{
"version_added": "12.5.0",
"partial_implementation": true,
- "notes": "Returns a Promise instead. Taking an optional callback parameter is deprecated."
+ "notes": "Returns a `Promise`."
},
{
"version_added": "11.7.0",
"partial_implementation": true,
- "notes": "Support taking an optional callback parameter to be executed when the worker has terminated."
+ "notes": "Takes an optional callback parameter to be executed when the worker has terminated."
}
],
"oculus": "mirror",
From 2712777e1c8a27b929919c811da7c6db994f758e Mon Sep 17 00:00:00 2001
From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com>
Date: Tue, 17 Dec 2024 21:07:40 +0800
Subject: [PATCH 5/6] Apply suggestions from code review
Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu
---
api/Worker.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/api/Worker.json b/api/Worker.json
index 24af07a112748e..ba2c38d7581a72 100644
--- a/api/Worker.json
+++ b/api/Worker.json
@@ -26,7 +26,7 @@
"version_added": "11.7.0",
"partial_implementation": true,
"notes": [
- "Inherit from a Node `EventEmitter` instead of DOM `EventTarget`.",
+ "Inherits from a Node `EventEmitter` instead of DOM `EventTarget`.",
"Also supports CommonJS modules, enabled for files ending with `.cjs` and for files ending with `.js` when the nearest parent `package.json` file contains a top-level field `\"type\"` with a value not of `\"commonjs\"`.",
"Available as a part of the `worker_threads` module."
]
@@ -542,8 +542,8 @@
"version_added": "11.7.0",
"partial_implementation": true,
"notes": [
- "Only support passing the second parameter as an optional array of objects, not support passing the second parameter as an options object.",
- "Only support transferring `ArrayBuffer` and `MessagePort` objects."
+ "The options parameter is not supported; the second parameter may only be an array of objects to transfer.",
+ "Only supports transferring `ArrayBuffer` and `MessagePort` objects."
]
},
"oculus": "mirror",
From 0c261d75cf21965fccf267ac64686bcfbe6602c7 Mon Sep 17 00:00:00 2001
From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com>
Date: Tue, 28 Jan 2025 13:04:28 +0800
Subject: [PATCH 6/6] Update api/Worker.json
Co-authored-by: Claas Augner <495429+caugner@users.noreply.github.com>
---
api/Worker.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/api/Worker.json b/api/Worker.json
index ba2c38d7581a72..77570f8af23bb7 100644
--- a/api/Worker.json
+++ b/api/Worker.json
@@ -542,7 +542,7 @@
"version_added": "11.7.0",
"partial_implementation": true,
"notes": [
- "The options parameter is not supported; the second parameter may only be an array of objects to transfer.",
+ "Only accepts an array of transfer objects as the second parameter, not an options object with a `transfer` property.",
"Only supports transferring `ArrayBuffer` and `MessagePort` objects."
]
},