From 8e973c6f7785eb6f7e0091ced80a07f0fa19b836 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 28 May 2026 16:10:40 +0100 Subject: [PATCH 1/5] feat: improve mappings for some `lodash.*` modules --- manifests/micro-utilities.json | 16 ++++ manifests/native.json | 139 +++++++++++++++++++++++++++++++++ manifests/preferred.json | 100 +----------------------- 3 files changed, 157 insertions(+), 98 deletions(-) diff --git a/manifests/micro-utilities.json b/manifests/micro-utilities.json index 5b92d52d..8cf09dbe 100644 --- a/manifests/micro-utilities.json +++ b/manifests/micro-utilities.json @@ -156,6 +156,12 @@ "description": "You can use the modulo operator to check if a number is even.", "example": "(n % 2) === 0" }, + "snippet::is-equal": { + "id": "snippet::is-equal", + "type": "simple", + "description": "You can check if two values are equal using regular equality sign.", + "example": "a === b" + }, "snippet::is-function": { "id": "snippet::is-function", "type": "simple", @@ -663,6 +669,16 @@ "moduleName": "last-char", "replacements": ["snippet::char-last"] }, + "lodash.castarray": { + "type": "module", + "moduleName": "lodash.castarray", + "replacements": ["snippet::array-coerce"] + }, + "lodash.eq": { + "type": "module", + "moduleName": "lodash.eq", + "replacements": ["snippet::is-equal"] + }, "lodash.isboolean": { "type": "module", "moduleName": "lodash.isboolean", diff --git a/manifests/native.json b/manifests/native.json index 8cc7e55c..629501ec 100644 --- a/manifests/native.json +++ b/manifests/native.json @@ -189,6 +189,18 @@ "compatKey": "javascript.builtins.Array.every" } }, + "Array.prototype.fill": { + "id": "Array.prototype.fill", + "type": "native", + "url": { + "type": "mdn", + "id": "Web/JavaScript/Reference/Global_Objects/Array/fill" + }, + "webFeatureId": { + "featureId": "array-fill", + "compatKey": "javascript.builtins.Array.fill" + } + }, "Array.prototype.filter": { "id": "Array.prototype.filter", "type": "native", @@ -861,6 +873,18 @@ "compatKey": "javascript.builtins.Math.sign" } }, + "Math.trunc": { + "id": "Math.trunc", + "type": "native", + "url": { + "type": "mdn", + "id": "Web/JavaScript/Reference/Global_Objects/Math/trunc" + }, + "webFeatureId": { + "featureId": "number", + "compatKey": "javascript.builtins.Math.trunc" + } + }, "Number.isFinite": { "id": "Number.isFinite", "type": "native", @@ -1270,6 +1294,30 @@ "compatKey": "javascript.builtins.String.matchAll" } }, + "String.prototype.toLowerCase": { + "id": "String.prototype.toLowerCase", + "type": "native", + "url": { + "type": "mdn", + "id": "Web/JavaScript/Reference/Global_Objects/String/toLowerCase" + }, + "webFeatureId": { + "featureId": "strings", + "compatKey": "javascript.builtins.String.toLowerCase" + } + }, + "String.prototype.toUpperCase": { + "id": "String.prototype.toUpperCase", + "type": "native", + "url": { + "type": "mdn", + "id": "Web/JavaScript/Reference/Global_Objects/String/toUpperCase" + }, + "webFeatureId": { + "featureId": "strings", + "compatKey": "javascript.builtins.String.toUpperCase" + } + }, "String.prototype.padEnd": { "id": "String.prototype.padEnd", "type": "native", @@ -1627,6 +1675,18 @@ "id": "Web/JavaScript/Reference/Global_Objects/TypedArray" } }, + "optional_chaining": { + "id": "optional_chaining", + "type": "native", + "url": { + "type": "mdn", + "id": "Web/JavaScript/Reference/Operators/Optional_chaining" + }, + "webFeatureId": { + "featureId": "object-object", + "compatKey": "javascript.operators.optional_chaining" + } + }, "parseInt": { "id": "parseInt", "type": "native", @@ -1675,6 +1735,15 @@ "compatKey": "api.Window.requestAnimationFrame" } }, + "structuredClone": { + "id": "structuredClone", + "type": "native", + "url": {"type": "mdn", "id": "Web/API/Window/structuredClone"}, + "webFeatureId": { + "featureId": "structured-clone", + "compatKey": "api.structuredClone" + } + }, "safe-buffer": { "id": "safe-buffer", "type": "removal", @@ -2309,6 +2378,31 @@ "moduleName": "left-pad", "replacements": ["String.prototype.padStart"] }, + "lodash.at": { + "type": "module", + "moduleName": "lodash.at", + "replacements": ["Array.prototype.at"] + }, + "lodash.clone": { + "type": "module", + "moduleName": "lodash.clone", + "replacements": ["structuredClone"] + }, + "lodash.escaperegexp": { + "type": "module", + "moduleName": "lodash.escaperegexp", + "replacements": ["RegExp.escape"] + }, + "lodash.fill": { + "type": "module", + "moduleName": "lodash.fill", + "replacements": ["Array.prototype.fill"] + }, + "lodash.get": { + "type": "module", + "moduleName": "lodash.get", + "replacements": ["optional_chaining"] + }, "lodash.isarray": { "type": "module", "moduleName": "lodash.isarray", @@ -2349,6 +2443,51 @@ "moduleName": "lodash.lastindexof", "replacements": ["Array.prototype.lastIndexOf"] }, + "lodash.toarray": { + "type": "module", + "moduleName": "lodash.toarray", + "replacements": ["Array.from"] + }, + "lodash.tointeger": { + "type": "module", + "moduleName": "lodash.tointeger", + "replacements": ["Math.trunc"] + }, + "lodash.tolower": { + "type": "module", + "moduleName": "lodash.tolower", + "replacements": ["String.prototype.toLowerCase"] + }, + "lodash.toupper": { + "type": "module", + "moduleName": "lodash.toupper", + "replacements": ["String.prototype.toUpperCase"] + }, + "lodash.trim": { + "type": "module", + "moduleName": "lodash.trim", + "replacements": ["String.prototype.trim"] + }, + "lodash.trimend": { + "type": "module", + "moduleName": "lodash.trimend", + "replacements": ["String.prototype.trimEnd"] + }, + "lodash.trimleft": { + "type": "module", + "moduleName": "lodash.trimleft", + "replacements": ["String.prototype.trimStart"] + }, + "lodash.trimright": { + "type": "module", + "moduleName": "lodash.trimright", + "replacements": ["String.prototype.trimEnd"] + }, + "lodash.trimstart": { + "type": "module", + "moduleName": "lodash.trimstart", + "replacements": ["String.prototype.trimStart"] + }, "long": { "type": "module", "moduleName": "long", diff --git a/manifests/preferred.json b/manifests/preferred.json index 4c7ab06f..94a0edc4 100644 --- a/manifests/preferred.json +++ b/manifests/preferred.json @@ -588,12 +588,6 @@ "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.at": { - "type": "module", - "moduleName": "lodash.at", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.attempt": { "type": "module", "moduleName": "lodash.attempt", @@ -642,12 +636,6 @@ "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.castarray": { - "type": "module", - "moduleName": "lodash.castarray", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.ceil": { "type": "module", "moduleName": "lodash.ceil", @@ -666,12 +654,6 @@ "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.clone": { - "type": "module", - "moduleName": "lodash.clone", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.clonedeep": { "type": "module", "moduleName": "lodash.clonedeep", @@ -864,36 +846,18 @@ "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.eq": { - "type": "module", - "moduleName": "lodash.eq", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.escape": { "type": "module", "moduleName": "lodash.escape", "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.escaperegexp": { - "type": "module", - "moduleName": "lodash.escaperegexp", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.every": { "type": "module", "moduleName": "lodash.every", "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.fill": { - "type": "module", - "moduleName": "lodash.fill", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.filter": { "type": "module", "moduleName": "lodash.filter", @@ -1062,12 +1026,6 @@ "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.get": { - "type": "module", - "moduleName": "lodash.get", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.groupby": { "type": "module", "moduleName": "lodash.groupby", @@ -1227,8 +1185,8 @@ "lodash.isequal": { "type": "module", "moduleName": "lodash.isequal", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} + "replacements": ["util.isDeepStrictEqual", "dequal", "Bun.deepEquals"], + "url": {"type": "e18e", "id": "deep-equal"} }, "lodash.isequalwith": { "type": "module", @@ -2028,36 +1986,18 @@ "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.toarray": { - "type": "module", - "moduleName": "lodash.toarray", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.tofinite": { "type": "module", "moduleName": "lodash.tofinite", "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.tointeger": { - "type": "module", - "moduleName": "lodash.tointeger", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.tolength": { "type": "module", "moduleName": "lodash.tolength", "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.tolower": { - "type": "module", - "moduleName": "lodash.tolower", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.tonumber": { "type": "module", "moduleName": "lodash.tonumber", @@ -2100,48 +2040,12 @@ "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.toupper": { - "type": "module", - "moduleName": "lodash.toupper", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.transform": { "type": "module", "moduleName": "lodash.transform", "replacements": ["lodash-underscore", "es-toolkit"], "url": {"type": "e18e", "id": "lodash-underscore"} }, - "lodash.trim": { - "type": "module", - "moduleName": "lodash.trim", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, - "lodash.trimend": { - "type": "module", - "moduleName": "lodash.trimend", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, - "lodash.trimleft": { - "type": "module", - "moduleName": "lodash.trimleft", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, - "lodash.trimright": { - "type": "module", - "moduleName": "lodash.trimright", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, - "lodash.trimstart": { - "type": "module", - "moduleName": "lodash.trimstart", - "replacements": ["lodash-underscore", "es-toolkit"], - "url": {"type": "e18e", "id": "lodash-underscore"} - }, "lodash.trunc": { "type": "module", "moduleName": "lodash.trunc", From 716338a0c8ebf2e2ed0f0f8d435cc1b7b7ce62d5 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 28 May 2026 16:14:11 +0100 Subject: [PATCH 2/5] fix --- manifests/micro-utilities.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/micro-utilities.json b/manifests/micro-utilities.json index 8cf09dbe..f4efa6bf 100644 --- a/manifests/micro-utilities.json +++ b/manifests/micro-utilities.json @@ -150,18 +150,18 @@ "description": "You can use `instanceof Date`, or if cross-realm, use `Object.prototype.toString.call(v) === \"[object Date]\"`", "example": "const isDate = v instanceof Date;\n// for cross-realm\nconst isDateCrossRealm = Object.prototype.toString.call(v) === \"[object Date]\"" }, - "snippet::is-even": { - "id": "snippet::is-even", - "type": "simple", - "description": "You can use the modulo operator to check if a number is even.", - "example": "(n % 2) === 0" - }, "snippet::is-equal": { "id": "snippet::is-equal", "type": "simple", "description": "You can check if two values are equal using regular equality sign.", "example": "a === b" }, + "snippet::is-even": { + "id": "snippet::is-even", + "type": "simple", + "description": "You can use the modulo operator to check if a number is even.", + "example": "(n % 2) === 0" + }, "snippet::is-function": { "id": "snippet::is-function", "type": "simple", From 9c04d6b6bf82aadccd2682d6faf55d0883eb6143 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 28 May 2026 16:16:33 +0100 Subject: [PATCH 3/5] fix --- manifests/native.json | 58 ++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/manifests/native.json b/manifests/native.json index 629501ec..64fc1406 100644 --- a/manifests/native.json +++ b/manifests/native.json @@ -1294,30 +1294,6 @@ "compatKey": "javascript.builtins.String.matchAll" } }, - "String.prototype.toLowerCase": { - "id": "String.prototype.toLowerCase", - "type": "native", - "url": { - "type": "mdn", - "id": "Web/JavaScript/Reference/Global_Objects/String/toLowerCase" - }, - "webFeatureId": { - "featureId": "strings", - "compatKey": "javascript.builtins.String.toLowerCase" - } - }, - "String.prototype.toUpperCase": { - "id": "String.prototype.toUpperCase", - "type": "native", - "url": { - "type": "mdn", - "id": "Web/JavaScript/Reference/Global_Objects/String/toUpperCase" - }, - "webFeatureId": { - "featureId": "strings", - "compatKey": "javascript.builtins.String.toUpperCase" - } - }, "String.prototype.padEnd": { "id": "String.prototype.padEnd", "type": "native", @@ -1390,6 +1366,30 @@ "compatKey": "javascript.builtins.String.substr" } }, + "String.prototype.toLowerCase": { + "id": "String.prototype.toLowerCase", + "type": "native", + "url": { + "type": "mdn", + "id": "Web/JavaScript/Reference/Global_Objects/String/toLowerCase" + }, + "webFeatureId": { + "featureId": "strings", + "compatKey": "javascript.builtins.String.toLowerCase" + } + }, + "String.prototype.toUpperCase": { + "id": "String.prototype.toUpperCase", + "type": "native", + "url": { + "type": "mdn", + "id": "Web/JavaScript/Reference/Global_Objects/String/toUpperCase" + }, + "webFeatureId": { + "featureId": "strings", + "compatKey": "javascript.builtins.String.toUpperCase" + } + }, "String.prototype.trim": { "id": "String.prototype.trim", "type": "native", @@ -2473,16 +2473,6 @@ "moduleName": "lodash.trimend", "replacements": ["String.prototype.trimEnd"] }, - "lodash.trimleft": { - "type": "module", - "moduleName": "lodash.trimleft", - "replacements": ["String.prototype.trimStart"] - }, - "lodash.trimright": { - "type": "module", - "moduleName": "lodash.trimright", - "replacements": ["String.prototype.trimEnd"] - }, "lodash.trimstart": { "type": "module", "moduleName": "lodash.trimstart", From 9a8afe94058e631d582711691b6612b977f8d1fd Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 28 May 2026 16:18:33 +0100 Subject: [PATCH 4/5] fix --- manifests/native.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/native.json b/manifests/native.json index 64fc1406..0dace668 100644 --- a/manifests/native.json +++ b/manifests/native.json @@ -1735,6 +1735,12 @@ "compatKey": "api.Window.requestAnimationFrame" } }, + "safe-buffer": { + "id": "safe-buffer", + "type": "removal", + "description": "All modern versions of Node have `Buffer.from` for safely creating buffers from arbitrary types.", + "url": {"type": "node", "id": "api/buffer.html"} + }, "structuredClone": { "id": "structuredClone", "type": "native", @@ -1744,12 +1750,6 @@ "compatKey": "api.structuredClone" } }, - "safe-buffer": { - "id": "safe-buffer", - "type": "removal", - "description": "All modern versions of Node have `Buffer.from` for safely creating buffers from arbitrary types.", - "url": {"type": "node", "id": "api/buffer.html"} - }, "util.promisify": { "id": "util.promisify", "type": "native", From d0482acf4cc7f4b44b243691703111a0e20f7742 Mon Sep 17 00:00:00 2001 From: "Willow (GHOST)" Date: Thu, 28 May 2026 16:36:54 -0700 Subject: [PATCH 5/5] Update manifests/micro-utilities.json --- manifests/micro-utilities.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/micro-utilities.json b/manifests/micro-utilities.json index f4efa6bf..3758477e 100644 --- a/manifests/micro-utilities.json +++ b/manifests/micro-utilities.json @@ -153,7 +153,7 @@ "snippet::is-equal": { "id": "snippet::is-equal", "type": "simple", - "description": "You can check if two values are equal using regular equality sign.", + "description": "You can determine if two values are equal using regular equality checks.", "example": "a === b" }, "snippet::is-even": {