@rindo/core 3.2.3-dev.1685596167.938c836 → 3.2.4
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/cli/index.cjs +11 -16
- package/cli/index.js +11 -16
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/rindo.js +2765 -2560
- package/compiler/rindo.min.js +2 -2
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/dev-server/ws.js +1 -1
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +1 -1
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +89 -38
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +34 -28
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/shadow-css.js +1 -2
- package/internal/package.json +1 -1
- package/internal/rindo-private.d.ts +14 -3
- package/internal/rindo-public-compiler.d.ts +11 -0
- package/internal/rindo-public-runtime.d.ts +1 -0
- package/internal/testing/index.js +19 -13
- package/internal/testing/package.json +1 -1
- package/internal/testing/shadow-css.js +1 -2
- package/mock-doc/index.cjs +2 -2
- package/mock-doc/index.js +2 -2
- package/mock-doc/package.json +1 -1
- package/package.json +7 -7
- package/screenshot/package.json +1 -1
- package/sys/node/autoprefixer.js +2 -2
- package/sys/node/glob.js +1 -1
- package/sys/node/graceful-fs.js +1 -1
- package/sys/node/index.js +290 -283
- package/sys/node/node-fetch.js +1 -4
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +46 -24
- package/testing/jest/jest-setup-test-framework.d.ts +8 -0
- package/testing/package.json +1 -1
- package/testing/reset-build-conditionals.d.ts +10 -0
- package/testing/spec-page.d.ts +5 -0
- package/cli/index.cjs.map +0 -1
- package/cli/index.js.map +0 -1
- package/compiler/rindo.js.map +0 -1
- package/sys/node/713.node-fetch.js +0 -452
package/sys/node/package.json
CHANGED
package/sys/node/worker.js
CHANGED
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Testing v3.2.
|
|
2
|
+
Rindo Testing v3.2.4 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
function _lazyRequire(e) {
|
|
5
5
|
return new Proxy({}, {
|
|
@@ -376,6 +376,12 @@ function resetBuildConditionals(e) {
|
|
|
376
376
|
e.scopedSlotTextContentFix = !1, e.slotChildNodesFix = !1;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
+
function removeDomNodes(e) {
|
|
380
|
+
var t, r;
|
|
381
|
+
null != e && ((null === (t = e.childNodes) || void 0 === t ? void 0 : t.length) || e.remove(),
|
|
382
|
+
null === (r = e.childNodes) || void 0 === r || r.forEach(removeDomNodes));
|
|
383
|
+
}
|
|
384
|
+
|
|
379
385
|
function assertPath(e) {
|
|
380
386
|
if ("string" != typeof e) throw new TypeError("Path must be a string. Received " + JSON.stringify(e));
|
|
381
387
|
}
|
|
@@ -946,7 +952,7 @@ function getAppUrl(e, t, r) {
|
|
|
946
952
|
|
|
947
953
|
var debug_1, constants$2, re_1, parseOptions_1, identifiers, semver, major_1, posix, pathBrowserify, caller, pathParse, parse, getNodeModulesDirs, nodeModulesPaths, normalizeOptions, slice, toStr, implementation, functionBind, src, isCoreModule, realpathFS$1, defaultIsFile$1, defaultIsDir$1, defaultRealpath, maybeRealpath, defaultReadPackage, getPackageCandidates$1, async, current, core, mod, core_1, isCore, realpathFS, defaultIsFile, defaultIsDir, defaultRealpathSync, maybeRealpathSync, defaultReadPackageSync, getPackageCandidates, sync, resolve;
|
|
948
954
|
|
|
949
|
-
const rindo_js = require("../compiler/rindo.js"), appData = _lazyRequire("@rindo/core/internal/app-data"), testing = _lazyRequire("@rindo/core/internal/testing"), index_cjs = _lazyRequire("../mock-doc/index.cjs"), path$2 = require("path"), crypto$3 = require("crypto"), os$2 = require("os"), process$3 = require("process"), fs$2 = require("fs"), index_js = _lazyRequire("../dev-server/index.js"), child_process$2 = require("child_process"), path__default = _interopDefaultLegacy(path$2), os__namespace = _interopNamespace(os$2), process__namespace = _interopNamespace(process$3), fs__default = _interopDefaultLegacy(fs$2), debug = ("object" == typeof process && process.env,
|
|
955
|
+
const require$$3 = require("util"), rindo_js = require("../compiler/rindo.js"), appData = _lazyRequire("@rindo/core/internal/app-data"), testing = _lazyRequire("@rindo/core/internal/testing"), index_cjs = _lazyRequire("../mock-doc/index.cjs"), path$2 = require("path"), crypto$3 = require("crypto"), os$2 = require("os"), process$3 = require("process"), fs$2 = require("fs"), index_js = _lazyRequire("../dev-server/index.js"), child_process$2 = require("child_process"), require$$3__default = _interopDefaultLegacy(require$$3), path__default = _interopDefaultLegacy(path$2), os__namespace = _interopNamespace(os$2), process__namespace = _interopNamespace(process$3), fs__default = _interopDefaultLegacy(fs$2), debug = ("object" == typeof process && process.env,
|
|
950
956
|
() => {});
|
|
951
957
|
|
|
952
958
|
debug_1 = debug;
|
|
@@ -954,10 +960,13 @@ debug_1 = debug;
|
|
|
954
960
|
const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
955
961
|
|
|
956
962
|
constants$2 = {
|
|
957
|
-
SEMVER_SPEC_VERSION: "2.0.0",
|
|
958
963
|
MAX_LENGTH: 256,
|
|
964
|
+
MAX_SAFE_COMPONENT_LENGTH: 16,
|
|
959
965
|
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
|
|
960
|
-
|
|
966
|
+
RELEASE_TYPES: [ "major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease" ],
|
|
967
|
+
SEMVER_SPEC_VERSION: "2.0.0",
|
|
968
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
|
969
|
+
FLAG_LOOSE: 2
|
|
961
970
|
}, re_1 = createCommonjsModule((function(e, t) {
|
|
962
971
|
const {MAX_SAFE_COMPONENT_LENGTH: r} = constants$2, s = (t = e.exports = {}).re = [], n = t.src = [], o = t.t = {};
|
|
963
972
|
let i = 0;
|
|
@@ -991,11 +1000,11 @@ constants$2 = {
|
|
|
991
1000
|
a("STAR", "(<|>)?=?\\s*\\*"), a("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), a("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
992
1001
|
}));
|
|
993
1002
|
|
|
994
|
-
const
|
|
995
|
-
|
|
996
|
-
parseOptions_1 = e => e ? "object" != typeof e ? {
|
|
1003
|
+
const looseOption = Object.freeze({
|
|
997
1004
|
loose: !0
|
|
998
|
-
}
|
|
1005
|
+
}), emptyOpts = Object.freeze({});
|
|
1006
|
+
|
|
1007
|
+
parseOptions_1 = e => e ? "object" != typeof e ? looseOption : e : emptyOpts;
|
|
999
1008
|
|
|
1000
1009
|
const numeric = /^[0-9]+$/, compareIdentifiers$1 = (e, t) => {
|
|
1001
1010
|
const r = numeric.test(e), s = numeric.test(t);
|
|
@@ -1014,7 +1023,7 @@ class SemVer {
|
|
|
1014
1023
|
if (r = parseOptions_1(r), e instanceof SemVer) {
|
|
1015
1024
|
if (e.loose === !!r.loose && e.includePrerelease === !!r.includePrerelease) return e;
|
|
1016
1025
|
e = e.version;
|
|
1017
|
-
} else if ("string" != typeof e) throw new TypeError(`Invalid Version: ${e}`);
|
|
1026
|
+
} else if ("string" != typeof e) throw new TypeError(`Invalid Version: ${require$$3__default.default.inspect(e)}`);
|
|
1018
1027
|
if (e.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
1019
1028
|
debug_1("SemVer", e, r), this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease;
|
|
1020
1029
|
const s = e.trim().match(r.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
@@ -1071,22 +1080,22 @@ class SemVer {
|
|
|
1071
1080
|
if (r !== s) return compareIdentifiers(r, s);
|
|
1072
1081
|
} while (++t);
|
|
1073
1082
|
}
|
|
1074
|
-
inc(e, t) {
|
|
1083
|
+
inc(e, t, r) {
|
|
1075
1084
|
switch (e) {
|
|
1076
1085
|
case "premajor":
|
|
1077
|
-
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", t);
|
|
1086
|
+
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", t, r);
|
|
1078
1087
|
break;
|
|
1079
1088
|
|
|
1080
1089
|
case "preminor":
|
|
1081
|
-
this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", t);
|
|
1090
|
+
this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", t, r);
|
|
1082
1091
|
break;
|
|
1083
1092
|
|
|
1084
1093
|
case "prepatch":
|
|
1085
|
-
this.prerelease.length = 0, this.inc("patch", t), this.inc("pre", t);
|
|
1094
|
+
this.prerelease.length = 0, this.inc("patch", t, r), this.inc("pre", t, r);
|
|
1086
1095
|
break;
|
|
1087
1096
|
|
|
1088
1097
|
case "prerelease":
|
|
1089
|
-
0 === this.prerelease.length && this.inc("patch", t), this.inc("pre", t);
|
|
1098
|
+
0 === this.prerelease.length && this.inc("patch", t, r), this.inc("pre", t, r);
|
|
1090
1099
|
break;
|
|
1091
1100
|
|
|
1092
1101
|
case "major":
|
|
@@ -1104,14 +1113,24 @@ class SemVer {
|
|
|
1104
1113
|
break;
|
|
1105
1114
|
|
|
1106
1115
|
case "pre":
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1116
|
+
{
|
|
1117
|
+
const e = Number(r) ? 1 : 0;
|
|
1118
|
+
if (!t && !1 === r) throw new Error("invalid increment argument: identifier is empty");
|
|
1119
|
+
if (0 === this.prerelease.length) this.prerelease = [ e ]; else {
|
|
1120
|
+
let s = this.prerelease.length;
|
|
1121
|
+
for (;--s >= 0; ) "number" == typeof this.prerelease[s] && (this.prerelease[s]++,
|
|
1122
|
+
s = -2);
|
|
1123
|
+
if (-1 === s) {
|
|
1124
|
+
if (t === this.prerelease.join(".") && !1 === r) throw new Error("invalid increment argument: identifier already exists");
|
|
1125
|
+
this.prerelease.push(e);
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
if (t) {
|
|
1129
|
+
let s = [ t, e ];
|
|
1130
|
+
!1 === r && (s = [ t ]), 0 === compareIdentifiers(this.prerelease[0], t) ? isNaN(this.prerelease[1]) && (this.prerelease = s) : this.prerelease = s;
|
|
1131
|
+
}
|
|
1132
|
+
break;
|
|
1112
1133
|
}
|
|
1113
|
-
t && (0 === compareIdentifiers(this.prerelease[0], t) ? isNaN(this.prerelease[1]) && (this.prerelease = [ t, 0 ]) : this.prerelease = [ t, 0 ]);
|
|
1114
|
-
break;
|
|
1115
1134
|
|
|
1116
1135
|
default:
|
|
1117
1136
|
throw new Error(`invalid increment argument: ${e}`);
|
|
@@ -1211,7 +1230,7 @@ const formatComponentRuntimeMembers = (e, t = !0) => ({
|
|
|
1211
1230
|
}
|
|
1212
1231
|
const r = e.indexOf("://");
|
|
1213
1232
|
if (-1 !== r) {
|
|
1214
|
-
const t = r +
|
|
1233
|
+
const t = r + 3, s = e.indexOf("/", t);
|
|
1215
1234
|
if (-1 !== s) {
|
|
1216
1235
|
const n = e.slice(0, r), o = e.slice(t, s);
|
|
1217
1236
|
if ("file" === n && ("" === o || "localhost" === o) && isVolumeCharacter(e.charCodeAt(s + 1))) {
|
|
@@ -3155,7 +3174,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3155
3174
|
d("/");
|
|
3156
3175
|
const D = {
|
|
3157
3176
|
name: "in-memory",
|
|
3158
|
-
version: "3.2.
|
|
3177
|
+
version: "3.2.4",
|
|
3159
3178
|
events: a,
|
|
3160
3179
|
access: async e => u(e),
|
|
3161
3180
|
accessSync: u,
|
|
@@ -3963,7 +3982,10 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3963
3982
|
testing.resetPlatform(), testing.setErrorHandler(void 0), resetBuildConditionals(appData.BUILD),
|
|
3964
3983
|
testing.modeResolutionChain.length = 0;
|
|
3965
3984
|
})), afterEach((async () => {
|
|
3966
|
-
|
|
3985
|
+
var e, t, r, s, n, o;
|
|
3986
|
+
global.__CLOSE_OPEN_PAGES__ && await global.__CLOSE_OPEN_PAGES__(), testing.stopAutoApplyChanges();
|
|
3987
|
+
const i = null === (n = null === (s = null === (r = null === (t = null === (e = global.window) || void 0 === e ? void 0 : e.document) || void 0 === t ? void 0 : t.childNodes) || void 0 === r ? void 0 : r[1]) || void 0 === s ? void 0 : s.childNodes) || void 0 === n ? void 0 : n.find((e => "BODY" === e.nodeName));
|
|
3988
|
+
null === (o = null == i ? void 0 : i.childNodes) || void 0 === o || o.forEach(removeDomNodes),
|
|
3967
3989
|
index_cjs.teardownGlobal(global), global.Context = {}, global.resourcesUrl = "/build";
|
|
3968
3990
|
}));
|
|
3969
3991
|
const t = jasmine.getEnv();
|
|
@@ -1 +1,9 @@
|
|
|
1
|
+
import { MockNode } from '@rindo/core/mock-doc';
|
|
1
2
|
export declare function jestSetupTestFramework(): void;
|
|
3
|
+
/**
|
|
4
|
+
* Recursively removes all child nodes of a passed node starting with the
|
|
5
|
+
* furthest descendant and then moving back up the DOM tree.
|
|
6
|
+
*
|
|
7
|
+
* @param node The mocked DOM node that will be removed from the DOM
|
|
8
|
+
*/
|
|
9
|
+
export declare function removeDomNodes(node: MockNode): void;
|
package/testing/package.json
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import type * as d from '@rindo/core/internal';
|
|
2
|
+
/**
|
|
3
|
+
* Reset build conditionals used for testing to a known "good state".
|
|
4
|
+
*
|
|
5
|
+
* This function does not return a value, but rather mutates its argument in place.
|
|
6
|
+
* Certain values are set to `true` or `false` for testing purpose (see this function's implementation for the full
|
|
7
|
+
* list). Build conditional options _not_ in that list that are set to `true` when this function is invoked will remain
|
|
8
|
+
* set to `true`.
|
|
9
|
+
*
|
|
10
|
+
* @param b the build conditionals to reset.
|
|
11
|
+
*/
|
|
2
12
|
export declare function resetBuildConditionals(b: d.BuildConditionals): void;
|
package/testing/spec-page.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { NewSpecPageOptions, SpecPage } from '@rindo/core/internal';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new spec page for unit testing
|
|
4
|
+
* @param opts the options to apply to the spec page that influence its configuration and operation
|
|
5
|
+
* @returns the created spec page
|
|
6
|
+
*/
|
|
2
7
|
export declare function newSpecPage(opts: NewSpecPageOptions): Promise<SpecPage>;
|