mirror of
https://github.com/gnh1201/welsonjs.git
synced 2026-01-20 00:07:32 +00:00
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:
parent
a51e9ff1b4
commit
227cd0f6d4
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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}";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user