@jsenv/core 29.8.0 → 29.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/babel_helpers/checkInRHS/checkInRHS.js +6 -0
- package/dist/babel_helpers/createClass/createClass.js +2 -1
- package/dist/babel_helpers/defineProperty/defineProperty.js +2 -0
- package/dist/babel_helpers/regeneratorRuntime/regeneratorRuntime.js +38 -21
- package/dist/js/ws.js +29 -8
- package/dist/main.js +6 -1
- package/package.json +7 -7
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import toPropertyKey from "../toPropertyKey/toPropertyKey.js";
|
|
1
2
|
function _defineProperties(target, props) {
|
|
2
3
|
for (var i = 0; i < props.length; i++) {
|
|
3
4
|
var descriptor = props[i];
|
|
4
5
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
5
6
|
descriptor.configurable = true;
|
|
6
7
|
if ("value" in descriptor) descriptor.writable = true;
|
|
7
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
8
|
+
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
export default function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import toPropertyKey from "../toPropertyKey/toPropertyKey.js";
|
|
1
2
|
export default ((obj, key, value) => {
|
|
3
|
+
key = toPropertyKey(key);
|
|
2
4
|
// Shortcircuit the slow defineProperty path when possible.
|
|
3
5
|
// We are trying to avoid issues where setters defined on the
|
|
4
6
|
// prototype cause side effects under the fast path of simple
|
|
@@ -16,6 +16,9 @@ export default function _regeneratorRuntime() {
|
|
|
16
16
|
var exports = {};
|
|
17
17
|
var Op = Object.prototype;
|
|
18
18
|
var hasOwn = Op.hasOwnProperty;
|
|
19
|
+
var defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
20
|
+
obj[key] = desc.value;
|
|
21
|
+
};
|
|
19
22
|
var undefined; // More compressible than void 0.
|
|
20
23
|
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
21
24
|
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
@@ -46,7 +49,9 @@ export default function _regeneratorRuntime() {
|
|
|
46
49
|
|
|
47
50
|
// The ._invoke method unifies the implementations of the .next,
|
|
48
51
|
// .throw, and .return methods.
|
|
49
|
-
generator
|
|
52
|
+
defineProperty(generator, "_invoke", {
|
|
53
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
54
|
+
});
|
|
50
55
|
return generator;
|
|
51
56
|
}
|
|
52
57
|
exports.wrap = wrap;
|
|
@@ -106,8 +111,14 @@ export default function _regeneratorRuntime() {
|
|
|
106
111
|
}
|
|
107
112
|
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
108
113
|
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
109
|
-
|
|
110
|
-
|
|
114
|
+
defineProperty(Gp, "constructor", {
|
|
115
|
+
value: GeneratorFunctionPrototype,
|
|
116
|
+
configurable: true
|
|
117
|
+
});
|
|
118
|
+
defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
119
|
+
value: GeneratorFunction,
|
|
120
|
+
configurable: true
|
|
121
|
+
});
|
|
111
122
|
GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction");
|
|
112
123
|
|
|
113
124
|
// Helper for defining the .next, .throw, and .return methods of the
|
|
@@ -202,7 +213,9 @@ export default function _regeneratorRuntime() {
|
|
|
202
213
|
|
|
203
214
|
// Define the unified helper method that is used to implement .next,
|
|
204
215
|
// .throw, and .return (see defineIteratorMethods).
|
|
205
|
-
this
|
|
216
|
+
defineProperty(this, "_invoke", {
|
|
217
|
+
value: enqueue
|
|
218
|
+
});
|
|
206
219
|
}
|
|
207
220
|
defineIteratorMethods(AsyncIterator.prototype);
|
|
208
221
|
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
@@ -289,27 +302,30 @@ export default function _regeneratorRuntime() {
|
|
|
289
302
|
// delegate iterator, or by modifying context.method and context.arg,
|
|
290
303
|
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
291
304
|
function maybeInvokeDelegate(delegate, context) {
|
|
292
|
-
var
|
|
305
|
+
var methodName = context.method;
|
|
306
|
+
var method = delegate.iterator[methodName];
|
|
293
307
|
if (method === undefined) {
|
|
294
308
|
// A .throw or .return when the delegate iterator has no .throw
|
|
295
|
-
// method always
|
|
309
|
+
// method, or a missing .next mehtod, always terminate the
|
|
310
|
+
// yield* loop.
|
|
296
311
|
context.delegate = null;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}
|
|
312
|
+
|
|
313
|
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
314
|
+
if (methodName === "throw" && delegate.iterator["return"]) {
|
|
315
|
+
// If the delegate iterator has a return method, give it a
|
|
316
|
+
// chance to clean up.
|
|
317
|
+
context.method = "return";
|
|
318
|
+
context.arg = undefined;
|
|
319
|
+
maybeInvokeDelegate(delegate, context);
|
|
320
|
+
if (context.method === "throw") {
|
|
321
|
+
// If maybeInvokeDelegate(context) changed context.method from
|
|
322
|
+
// "return" to "throw", let that override the TypeError below.
|
|
323
|
+
return ContinueSentinel;
|
|
310
324
|
}
|
|
325
|
+
}
|
|
326
|
+
if (methodName !== "return") {
|
|
311
327
|
context.method = "throw";
|
|
312
|
-
context.arg = new TypeError("The iterator does not provide a '
|
|
328
|
+
context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method");
|
|
313
329
|
}
|
|
314
330
|
return ContinueSentinel;
|
|
315
331
|
}
|
|
@@ -401,7 +417,8 @@ export default function _regeneratorRuntime() {
|
|
|
401
417
|
tryLocsList.forEach(pushTryEntry, this);
|
|
402
418
|
this.reset(true);
|
|
403
419
|
}
|
|
404
|
-
exports.keys = function (
|
|
420
|
+
exports.keys = function (val) {
|
|
421
|
+
var object = Object(val);
|
|
405
422
|
var keys = [];
|
|
406
423
|
for (var key in object) {
|
|
407
424
|
keys.push(key);
|
package/dist/js/ws.js
CHANGED
|
@@ -1891,7 +1891,7 @@ const EventTarget = {
|
|
|
1891
1891
|
* Register an event listener.
|
|
1892
1892
|
*
|
|
1893
1893
|
* @param {String} type A string representing the event type to listen for
|
|
1894
|
-
* @param {Function}
|
|
1894
|
+
* @param {(Function|Object)} handler The listener to add
|
|
1895
1895
|
* @param {Object} [options] An options object specifies characteristics about
|
|
1896
1896
|
* the event listener
|
|
1897
1897
|
* @param {Boolean} [options.once=false] A `Boolean` indicating that the
|
|
@@ -1899,7 +1899,12 @@ const EventTarget = {
|
|
|
1899
1899
|
* the listener would be automatically removed when invoked.
|
|
1900
1900
|
* @public
|
|
1901
1901
|
*/
|
|
1902
|
-
addEventListener(type,
|
|
1902
|
+
addEventListener(type, handler, options = {}) {
|
|
1903
|
+
for (const listener of this.listeners(type)) {
|
|
1904
|
+
if (!options[kForOnEventAttribute$1] && listener[kListener$1] === handler && !listener[kForOnEventAttribute$1]) {
|
|
1905
|
+
return;
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1903
1908
|
let wrapper;
|
|
1904
1909
|
if (type === 'message') {
|
|
1905
1910
|
wrapper = function onMessage(data, isBinary) {
|
|
@@ -1907,7 +1912,7 @@ const EventTarget = {
|
|
|
1907
1912
|
data: isBinary ? data : data.toString()
|
|
1908
1913
|
});
|
|
1909
1914
|
event[kTarget] = this;
|
|
1910
|
-
|
|
1915
|
+
callListener(handler, this, event);
|
|
1911
1916
|
};
|
|
1912
1917
|
} else if (type === 'close') {
|
|
1913
1918
|
wrapper = function onClose(code, message) {
|
|
@@ -1917,7 +1922,7 @@ const EventTarget = {
|
|
|
1917
1922
|
wasClean: this._closeFrameReceived && this._closeFrameSent
|
|
1918
1923
|
});
|
|
1919
1924
|
event[kTarget] = this;
|
|
1920
|
-
|
|
1925
|
+
callListener(handler, this, event);
|
|
1921
1926
|
};
|
|
1922
1927
|
} else if (type === 'error') {
|
|
1923
1928
|
wrapper = function onError(error) {
|
|
@@ -1926,19 +1931,19 @@ const EventTarget = {
|
|
|
1926
1931
|
message: error.message
|
|
1927
1932
|
});
|
|
1928
1933
|
event[kTarget] = this;
|
|
1929
|
-
|
|
1934
|
+
callListener(handler, this, event);
|
|
1930
1935
|
};
|
|
1931
1936
|
} else if (type === 'open') {
|
|
1932
1937
|
wrapper = function onOpen() {
|
|
1933
1938
|
const event = new Event('open');
|
|
1934
1939
|
event[kTarget] = this;
|
|
1935
|
-
|
|
1940
|
+
callListener(handler, this, event);
|
|
1936
1941
|
};
|
|
1937
1942
|
} else {
|
|
1938
1943
|
return;
|
|
1939
1944
|
}
|
|
1940
1945
|
wrapper[kForOnEventAttribute$1] = !!options[kForOnEventAttribute$1];
|
|
1941
|
-
wrapper[kListener$1] =
|
|
1946
|
+
wrapper[kListener$1] = handler;
|
|
1942
1947
|
if (options.once) {
|
|
1943
1948
|
this.once(type, wrapper);
|
|
1944
1949
|
} else {
|
|
@@ -1949,7 +1954,7 @@ const EventTarget = {
|
|
|
1949
1954
|
* Remove an event listener.
|
|
1950
1955
|
*
|
|
1951
1956
|
* @param {String} type A string representing the event type to remove
|
|
1952
|
-
* @param {Function} handler The listener to remove
|
|
1957
|
+
* @param {(Function|Object)} handler The listener to remove
|
|
1953
1958
|
* @public
|
|
1954
1959
|
*/
|
|
1955
1960
|
removeEventListener(type, handler) {
|
|
@@ -1968,6 +1973,22 @@ var eventTarget = {
|
|
|
1968
1973
|
EventTarget,
|
|
1969
1974
|
MessageEvent
|
|
1970
1975
|
};
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* Call an event listener
|
|
1979
|
+
*
|
|
1980
|
+
* @param {(Function|Object)} listener The listener to call
|
|
1981
|
+
* @param {*} thisArg The value to use as `this`` when calling the listener
|
|
1982
|
+
* @param {Event} event The event to pass to the listener
|
|
1983
|
+
* @private
|
|
1984
|
+
*/
|
|
1985
|
+
function callListener(listener, thisArg, event) {
|
|
1986
|
+
if (typeof listener === 'object' && listener.handleEvent) {
|
|
1987
|
+
listener.handleEvent.call(listener, event);
|
|
1988
|
+
} else {
|
|
1989
|
+
listener.call(thisArg, event);
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1971
1992
|
const {
|
|
1972
1993
|
tokenChars: tokenChars$1
|
|
1973
1994
|
} = validation.exports;
|
package/dist/main.js
CHANGED
|
@@ -18458,7 +18458,12 @@ const applyPackageSpecifierResolution = (specifier, resolutionContext) => {
|
|
|
18458
18458
|
if (browserFieldResolution) {
|
|
18459
18459
|
return browserFieldResolution;
|
|
18460
18460
|
}
|
|
18461
|
-
|
|
18461
|
+
const packageResolution = applyPackageResolve(specifier, resolutionContext);
|
|
18462
|
+
const search = new URL(specifier, "file://").search;
|
|
18463
|
+
if (search) {
|
|
18464
|
+
packageResolution.url = `${packageResolution.url}${search}`;
|
|
18465
|
+
}
|
|
18466
|
+
return packageResolution;
|
|
18462
18467
|
}
|
|
18463
18468
|
};
|
|
18464
18469
|
const applyBrowserFieldResolution = (specifier, resolutionContext) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "29.8.
|
|
3
|
+
"version": "29.8.2",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
"@c88/v8-coverage": "0.1.1",
|
|
68
68
|
"@financial-times/polyfill-useragent-normaliser": "1.10.2",
|
|
69
69
|
"@jsenv/abort": "4.2.4",
|
|
70
|
-
"@jsenv/ast": "1.4.
|
|
71
|
-
"@jsenv/babel-plugins": "1.0.
|
|
70
|
+
"@jsenv/ast": "1.4.5",
|
|
71
|
+
"@jsenv/babel-plugins": "1.0.10",
|
|
72
72
|
"@jsenv/filesystem": "4.1.6",
|
|
73
73
|
"@jsenv/importmap": "1.2.1",
|
|
74
74
|
"@jsenv/integrity": "0.0.1",
|
|
75
75
|
"@jsenv/log": "3.3.1",
|
|
76
|
-
"@jsenv/node-esm-resolution": "0.
|
|
77
|
-
"@jsenv/server": "14.1.
|
|
76
|
+
"@jsenv/node-esm-resolution": "1.0.0",
|
|
77
|
+
"@jsenv/server": "14.1.10",
|
|
78
78
|
"@jsenv/sourcemap": "1.0.7",
|
|
79
79
|
"@jsenv/uneval": "1.6.0",
|
|
80
80
|
"@jsenv/url-meta": "7.0.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"istanbul-reports": "3.1.5",
|
|
91
91
|
"launch-editor": "2.6.0",
|
|
92
92
|
"pidtree": "0.6.0",
|
|
93
|
-
"rollup": "3.
|
|
93
|
+
"rollup": "3.3.0",
|
|
94
94
|
"string-width": "5.1.2",
|
|
95
95
|
"strip-ansi": "7.0.1",
|
|
96
96
|
"terser": "5.15.1",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"@jsenv/https-local": "3.0.1",
|
|
107
107
|
"@jsenv/package-workspace": "0.5.0",
|
|
108
108
|
"@jsenv/performance-impact": "3.0.1",
|
|
109
|
-
"eslint": "8.
|
|
109
|
+
"eslint": "8.27.0",
|
|
110
110
|
"eslint-plugin-html": "7.1.0",
|
|
111
111
|
"eslint-plugin-import": "2.26.0",
|
|
112
112
|
"eslint-plugin-react": "7.31.10",
|