Deprecate Enumerator.toArray and update WMI version

Marked Enumerator.toArray as deprecated in favor of Array.from and updated its fallback implementation. Refactored lib/wmi.js to use Array.from instead of toArray, and bumped VERSIONINFO to 0.1.4. Modified setup.iss to add ScriptEngine and ScriptHostEncode registry entries and removed file associations for several script extensions.
This commit is contained in:
Namhyeon Go 2025-11-23 23:06:19 +09:00
parent a51e9ff1b4
commit 227cd0f6d4
3 changed files with 11 additions and 7 deletions

View File

@ -74,6 +74,13 @@ function GetResource(ResourceName) {
Enumerator.prototype.toArray = Array.from;
})();
// @deprecated Enumerator.toArray() is deprecated since version 0.2.7.56. Use Array.from()
if (!Enumerator.prototype.toArray) {
Enumerator.prototype.toArray = function() {
return Array.from(this);
};
}
// [lib/std] the time of `sleep()' function is not accuracy #34
function sleep(ms, callback) {
var handler = null;

View File

@ -58,7 +58,7 @@ var WMIQueryObject = function() {
};
this.fetchAll = function() {
return this.cursor.toArray();
return Array.from(this.cursor);
};
this.get = function(key) {
@ -161,6 +161,6 @@ exports.create = create;
exports.execQuery = execQuery;
exports.setClass = setClass;
exports.VERSIONINFO = "WMI interface (wmi.js) version 0.1.3";
exports.VERSIONINFO = "WMI interface (wmi.js) version 0.1.4";
exports.global = global;
exports.require = global.require;

View File

@ -37,12 +37,9 @@ Root: HKCR; Subkey: "{cm:AppName}.Script\DefaultIcon"; ValueType: string; ValueD
Root: HKCR; Subkey: "{cm:AppName}.Script\shell"; ValueType: string; ValueData: "open"; Flags: uninsdeletevalue
Root: HKCR; Subkey: "{cm:AppName}.Script\shell\open"; ValueType: string; ValueData: "Run with {cm:AppName}"; Flags: uninsdeletevalue
Root: HKCR; Subkey: "{cm:AppName}.Script\shell\open\command"; ValueType: string; ValueData: """{userappdata}\{cm:AppName}\bin\WelsonJS.Launcher.exe"" --file ""%1"""; Flags: uninsdeletevalue
Root: HKCR; Subkey: "{cm:AppName}.Script\ScriptEngine"; ValueType: string; ValueData: "JScript"; Flags: uninsdeletevalue
Root: HKCR; Subkey: "{cm:AppName}.Script\ScriptHostEncode"; ValueType: string; ValueData: "{{85131630-480C-11D2-B1F9-00C04F86C324}}"; Flags: uninsdeletevalue
Root: HKCR; Subkey: ".js"; ValueType: string; ValueData: "{cm:AppName}.Script"; Flags: uninsdeletevalue
Root: HKCR; Subkey: ".ts"; ValueType: string; ValueData: "{cm:AppName}.Script"; Flags: uninsdeletevalue
Root: HKCR; Subkey: ".re"; ValueType: string; ValueData: "{cm:AppName}.Script"; Flags: uninsdeletevalue
Root: HKCR; Subkey: ".res"; ValueType: string; ValueData: "{cm:AppName}.Script"; Flags: uninsdeletevalue
Root: HKCR; Subkey: ".ls"; ValueType: string; ValueData: "{cm:AppName}.Script"; Flags: uninsdeletevalue
Root: HKCR; Subkey: ".coffee"; ValueType: string; ValueData: "{cm:AppName}.Script"; Flags: uninsdeletevalue
[Files]
Source: "app.js"; DestDir: "{app}";