@rindo/core 2.17.4 → 2.18.0

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.
Files changed (63) hide show
  1. package/cli/index.cjs +26 -16
  2. package/cli/index.js +26 -16
  3. package/cli/package.json +1 -1
  4. package/compiler/lib.dom.d.ts +620 -89
  5. package/compiler/lib.dom.iterable.d.ts +27 -3
  6. package/compiler/lib.es2015.core.d.ts +3 -3
  7. package/compiler/lib.es2015.iterable.d.ts +2 -1
  8. package/compiler/lib.es2015.reflect.d.ts +1 -1
  9. package/compiler/lib.es2020.bigint.d.ts +7 -5
  10. package/compiler/lib.es2020.d.ts +2 -0
  11. package/compiler/lib.es2020.date.d.ts +44 -0
  12. package/compiler/lib.es2020.intl.d.ts +51 -11
  13. package/compiler/lib.es2020.number.d.ts +30 -0
  14. package/compiler/lib.es2021.intl.d.ts +106 -4
  15. package/compiler/lib.es2022.array.d.ts +123 -0
  16. package/compiler/lib.es2022.d.ts +26 -0
  17. package/compiler/lib.es2022.error.d.ts +75 -0
  18. package/compiler/lib.es2022.full.d.ts +25 -0
  19. package/compiler/lib.es2022.intl.d.ts +111 -0
  20. package/compiler/lib.es2022.object.d.ts +28 -0
  21. package/compiler/lib.es2022.string.d.ts +27 -0
  22. package/compiler/lib.es5.d.ts +25 -19
  23. package/compiler/lib.esnext.d.ts +1 -1
  24. package/compiler/lib.esnext.intl.d.ts +4 -1
  25. package/compiler/lib.webworker.d.ts +236 -40
  26. package/compiler/lib.webworker.iterable.d.ts +10 -3
  27. package/compiler/package.json +1 -1
  28. package/compiler/rindo.js +607 -212
  29. package/compiler/rindo.min.js +2 -2
  30. package/compiler/sys/in-memory-fs.d.ts +218 -0
  31. package/dependencies.json +10 -1
  32. package/dev-server/client/index.js +1 -1
  33. package/dev-server/client/package.json +1 -1
  34. package/dev-server/connector.html +2 -2
  35. package/dev-server/index.js +1 -1
  36. package/dev-server/package.json +1 -1
  37. package/dev-server/server-process.js +12 -12
  38. package/internal/app-data/package.json +1 -1
  39. package/internal/client/css-shim.js +1 -1
  40. package/internal/client/dom.js +1 -1
  41. package/internal/client/index.js +337 -157
  42. package/internal/client/package.json +1 -1
  43. package/internal/client/patch-browser.js +1 -1
  44. package/internal/client/patch-esm.js +1 -1
  45. package/internal/client/shadow-css.js +1 -1
  46. package/internal/hydrate/package.json +1 -1
  47. package/internal/package.json +1 -1
  48. package/internal/rindo-private.d.ts +2 -106
  49. package/internal/rindo-public-compiler.d.ts +42 -8
  50. package/internal/testing/package.json +1 -1
  51. package/mock-doc/index.cjs +77 -61
  52. package/mock-doc/index.d.ts +13 -12
  53. package/mock-doc/index.js +77 -61
  54. package/mock-doc/package.json +1 -1
  55. package/package.json +2 -4
  56. package/screenshot/index.js +10 -10
  57. package/screenshot/package.json +1 -1
  58. package/sys/node/index.js +1 -1
  59. package/sys/node/package.json +1 -1
  60. package/sys/node/worker.js +1 -1
  61. package/testing/index.js +780 -794
  62. package/testing/package.json +1 -1
  63. package/testing/testing-utils.d.ts +5 -4
package/cli/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo CLI (CommonJS) v2.17.4 | MIT Licensed | https://rindojs.web.app
2
+ Rindo CLI (CommonJS) v2.18.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  'use strict';
5
5
 
@@ -223,18 +223,18 @@ const getEncodedRootLength = (path) => {
223
223
  return 0;
224
224
  const ch0 = path.charCodeAt(0);
225
225
  // POSIX or UNC
226
- if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) {
226
+ if (ch0 === 47 /* CharacterCodes.slash */ || ch0 === 92 /* CharacterCodes.backslash */) {
227
227
  if (path.charCodeAt(1) !== ch0)
228
228
  return 1; // POSIX: "/" (or non-normalized "\")
229
- const p1 = path.indexOf(ch0 === 47 /* slash */ ? '/' : altDirectorySeparator, 2);
229
+ const p1 = path.indexOf(ch0 === 47 /* CharacterCodes.slash */ ? '/' : altDirectorySeparator, 2);
230
230
  if (p1 < 0)
231
231
  return path.length; // UNC: "//server" or "\\server"
232
232
  return p1 + 1; // UNC: "//server/" or "\\server\"
233
233
  }
234
234
  // DOS
235
- if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) {
235
+ if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* CharacterCodes.colon */) {
236
236
  const ch2 = path.charCodeAt(2);
237
- if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */)
237
+ if (ch2 === 47 /* CharacterCodes.slash */ || ch2 === 92 /* CharacterCodes.backslash */)
238
238
  return 3; // DOS: "c:/" or "c:\"
239
239
  if (path.length === 2)
240
240
  return 2; // DOS: "c:" (but not "c:d")
@@ -256,7 +256,7 @@ const getEncodedRootLength = (path) => {
256
256
  isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {
257
257
  const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
258
258
  if (volumeSeparatorEnd !== -1) {
259
- if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) {
259
+ if (path.charCodeAt(volumeSeparatorEnd) === 47 /* CharacterCodes.slash */) {
260
260
  // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/"
261
261
  return ~(volumeSeparatorEnd + 1);
262
262
  }
@@ -274,15 +274,15 @@ const getEncodedRootLength = (path) => {
274
274
  // relative
275
275
  return 0;
276
276
  };
277
- const isVolumeCharacter = (charCode) => (charCode >= 97 /* a */ && charCode <= 122 /* z */) ||
278
- (charCode >= 65 /* A */ && charCode <= 90 /* Z */);
277
+ const isVolumeCharacter = (charCode) => (charCode >= 97 /* CharacterCodes.a */ && charCode <= 122 /* CharacterCodes.z */) ||
278
+ (charCode >= 65 /* CharacterCodes.A */ && charCode <= 90 /* CharacterCodes.Z */);
279
279
  const getFileUrlVolumeSeparatorEnd = (url, start) => {
280
280
  const ch0 = url.charCodeAt(start);
281
- if (ch0 === 58 /* colon */)
281
+ if (ch0 === 58 /* CharacterCodes.colon */)
282
282
  return start + 1;
283
- if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) {
283
+ if (ch0 === 37 /* CharacterCodes.percent */ && url.charCodeAt(start + 1) === 51 /* CharacterCodes._3 */) {
284
284
  const ch2 = url.charCodeAt(start + 2);
285
- if (ch2 === 97 /* a */ || ch2 === 65 /* A */)
285
+ if (ch2 === 97 /* CharacterCodes.a */ || ch2 === 65 /* CharacterCodes.A */)
286
286
  return start + 3;
287
287
  }
288
288
  return -1;
@@ -829,7 +829,7 @@ LOG_LEVELS.includes(maybeLogLevel);
829
829
  const dependencies = [
830
830
  {
831
831
  name: "@rindo/core",
832
- version: "2.17.4",
832
+ version: "2.18.0",
833
833
  main: "compiler/rindo.js",
834
834
  resources: [
835
835
  "package.json",
@@ -871,8 +871,10 @@ const dependencies = [
871
871
  "compiler/lib.es2019.symbol.d.ts",
872
872
  "compiler/lib.es2020.bigint.d.ts",
873
873
  "compiler/lib.es2020.d.ts",
874
+ "compiler/lib.es2020.date.d.ts",
874
875
  "compiler/lib.es2020.full.d.ts",
875
876
  "compiler/lib.es2020.intl.d.ts",
877
+ "compiler/lib.es2020.number.d.ts",
876
878
  "compiler/lib.es2020.promise.d.ts",
877
879
  "compiler/lib.es2020.sharedmemory.d.ts",
878
880
  "compiler/lib.es2020.string.d.ts",
@@ -883,6 +885,13 @@ const dependencies = [
883
885
  "compiler/lib.es2021.promise.d.ts",
884
886
  "compiler/lib.es2021.string.d.ts",
885
887
  "compiler/lib.es2021.weakref.d.ts",
888
+ "compiler/lib.es2022.array.d.ts",
889
+ "compiler/lib.es2022.d.ts",
890
+ "compiler/lib.es2022.error.d.ts",
891
+ "compiler/lib.es2022.full.d.ts",
892
+ "compiler/lib.es2022.intl.d.ts",
893
+ "compiler/lib.es2022.object.d.ts",
894
+ "compiler/lib.es2022.string.d.ts",
886
895
  "compiler/lib.es5.d.ts",
887
896
  "compiler/lib.es6.d.ts",
888
897
  "compiler/lib.esnext.d.ts",
@@ -932,7 +941,7 @@ const dependencies = [
932
941
  },
933
942
  {
934
943
  name: "typescript",
935
- version: "4.5.4",
944
+ version: "4.7.4",
936
945
  main: "lib/typescript.js"
937
946
  }
938
947
  ];
@@ -2266,15 +2275,16 @@ const run = async (init) => {
2266
2275
  * @public
2267
2276
  */
2268
2277
  const runTask = async (coreCompiler, config, task, sys) => {
2269
- var _a, _b, _c, _d, _e;
2278
+ var _a, _b, _c, _d, _e, _f;
2270
2279
  const logger = (_a = config.logger) !== null && _a !== void 0 ? _a : createLogger();
2271
2280
  const strictConfig = {
2272
2281
  ...config,
2273
2282
  flags: createConfigFlags((_b = config.flags) !== null && _b !== void 0 ? _b : { task }),
2274
2283
  logger,
2275
2284
  outputTargets: (_c = config.outputTargets) !== null && _c !== void 0 ? _c : [],
2276
- sys: (_d = sys !== null && sys !== void 0 ? sys : config.sys) !== null && _d !== void 0 ? _d : coreCompiler.createSystem({ logger }),
2277
- testing: (_e = config.testing) !== null && _e !== void 0 ? _e : {},
2285
+ rootDir: (_d = config.rootDir) !== null && _d !== void 0 ? _d : '/',
2286
+ sys: (_e = sys !== null && sys !== void 0 ? sys : config.sys) !== null && _e !== void 0 ? _e : coreCompiler.createSystem({ logger }),
2287
+ testing: (_f = config.testing) !== null && _f !== void 0 ? _f : {},
2278
2288
  };
2279
2289
  switch (task) {
2280
2290
  case 'build':
package/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo CLI v2.17.4 | MIT Licensed | https://rindojs.web.app
2
+ Rindo CLI v2.18.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  /**
5
5
  * This sets the log level hierarchy for our terminal logger, ranging from
@@ -199,18 +199,18 @@ const getEncodedRootLength = (path) => {
199
199
  return 0;
200
200
  const ch0 = path.charCodeAt(0);
201
201
  // POSIX or UNC
202
- if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) {
202
+ if (ch0 === 47 /* CharacterCodes.slash */ || ch0 === 92 /* CharacterCodes.backslash */) {
203
203
  if (path.charCodeAt(1) !== ch0)
204
204
  return 1; // POSIX: "/" (or non-normalized "\")
205
- const p1 = path.indexOf(ch0 === 47 /* slash */ ? '/' : altDirectorySeparator, 2);
205
+ const p1 = path.indexOf(ch0 === 47 /* CharacterCodes.slash */ ? '/' : altDirectorySeparator, 2);
206
206
  if (p1 < 0)
207
207
  return path.length; // UNC: "//server" or "\\server"
208
208
  return p1 + 1; // UNC: "//server/" or "\\server\"
209
209
  }
210
210
  // DOS
211
- if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) {
211
+ if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* CharacterCodes.colon */) {
212
212
  const ch2 = path.charCodeAt(2);
213
- if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */)
213
+ if (ch2 === 47 /* CharacterCodes.slash */ || ch2 === 92 /* CharacterCodes.backslash */)
214
214
  return 3; // DOS: "c:/" or "c:\"
215
215
  if (path.length === 2)
216
216
  return 2; // DOS: "c:" (but not "c:d")
@@ -232,7 +232,7 @@ const getEncodedRootLength = (path) => {
232
232
  isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {
233
233
  const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
234
234
  if (volumeSeparatorEnd !== -1) {
235
- if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) {
235
+ if (path.charCodeAt(volumeSeparatorEnd) === 47 /* CharacterCodes.slash */) {
236
236
  // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/"
237
237
  return ~(volumeSeparatorEnd + 1);
238
238
  }
@@ -250,15 +250,15 @@ const getEncodedRootLength = (path) => {
250
250
  // relative
251
251
  return 0;
252
252
  };
253
- const isVolumeCharacter = (charCode) => (charCode >= 97 /* a */ && charCode <= 122 /* z */) ||
254
- (charCode >= 65 /* A */ && charCode <= 90 /* Z */);
253
+ const isVolumeCharacter = (charCode) => (charCode >= 97 /* CharacterCodes.a */ && charCode <= 122 /* CharacterCodes.z */) ||
254
+ (charCode >= 65 /* CharacterCodes.A */ && charCode <= 90 /* CharacterCodes.Z */);
255
255
  const getFileUrlVolumeSeparatorEnd = (url, start) => {
256
256
  const ch0 = url.charCodeAt(start);
257
- if (ch0 === 58 /* colon */)
257
+ if (ch0 === 58 /* CharacterCodes.colon */)
258
258
  return start + 1;
259
- if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) {
259
+ if (ch0 === 37 /* CharacterCodes.percent */ && url.charCodeAt(start + 1) === 51 /* CharacterCodes._3 */) {
260
260
  const ch2 = url.charCodeAt(start + 2);
261
- if (ch2 === 97 /* a */ || ch2 === 65 /* A */)
261
+ if (ch2 === 97 /* CharacterCodes.a */ || ch2 === 65 /* CharacterCodes.A */)
262
262
  return start + 3;
263
263
  }
264
264
  return -1;
@@ -805,7 +805,7 @@ LOG_LEVELS.includes(maybeLogLevel);
805
805
  const dependencies = [
806
806
  {
807
807
  name: "@rindo/core",
808
- version: "2.17.4",
808
+ version: "2.18.0",
809
809
  main: "compiler/rindo.js",
810
810
  resources: [
811
811
  "package.json",
@@ -847,8 +847,10 @@ const dependencies = [
847
847
  "compiler/lib.es2019.symbol.d.ts",
848
848
  "compiler/lib.es2020.bigint.d.ts",
849
849
  "compiler/lib.es2020.d.ts",
850
+ "compiler/lib.es2020.date.d.ts",
850
851
  "compiler/lib.es2020.full.d.ts",
851
852
  "compiler/lib.es2020.intl.d.ts",
853
+ "compiler/lib.es2020.number.d.ts",
852
854
  "compiler/lib.es2020.promise.d.ts",
853
855
  "compiler/lib.es2020.sharedmemory.d.ts",
854
856
  "compiler/lib.es2020.string.d.ts",
@@ -859,6 +861,13 @@ const dependencies = [
859
861
  "compiler/lib.es2021.promise.d.ts",
860
862
  "compiler/lib.es2021.string.d.ts",
861
863
  "compiler/lib.es2021.weakref.d.ts",
864
+ "compiler/lib.es2022.array.d.ts",
865
+ "compiler/lib.es2022.d.ts",
866
+ "compiler/lib.es2022.error.d.ts",
867
+ "compiler/lib.es2022.full.d.ts",
868
+ "compiler/lib.es2022.intl.d.ts",
869
+ "compiler/lib.es2022.object.d.ts",
870
+ "compiler/lib.es2022.string.d.ts",
862
871
  "compiler/lib.es5.d.ts",
863
872
  "compiler/lib.es6.d.ts",
864
873
  "compiler/lib.esnext.d.ts",
@@ -908,7 +917,7 @@ const dependencies = [
908
917
  },
909
918
  {
910
919
  name: "typescript",
911
- version: "4.5.4",
920
+ version: "4.7.4",
912
921
  main: "lib/typescript.js"
913
922
  }
914
923
  ];
@@ -2242,15 +2251,16 @@ const run = async (init) => {
2242
2251
  * @public
2243
2252
  */
2244
2253
  const runTask = async (coreCompiler, config, task, sys) => {
2245
- var _a, _b, _c, _d, _e;
2254
+ var _a, _b, _c, _d, _e, _f;
2246
2255
  const logger = (_a = config.logger) !== null && _a !== void 0 ? _a : createLogger();
2247
2256
  const strictConfig = {
2248
2257
  ...config,
2249
2258
  flags: createConfigFlags((_b = config.flags) !== null && _b !== void 0 ? _b : { task }),
2250
2259
  logger,
2251
2260
  outputTargets: (_c = config.outputTargets) !== null && _c !== void 0 ? _c : [],
2252
- sys: (_d = sys !== null && sys !== void 0 ? sys : config.sys) !== null && _d !== void 0 ? _d : coreCompiler.createSystem({ logger }),
2253
- testing: (_e = config.testing) !== null && _e !== void 0 ? _e : {},
2261
+ rootDir: (_d = config.rootDir) !== null && _d !== void 0 ? _d : '/',
2262
+ sys: (_e = sys !== null && sys !== void 0 ? sys : config.sys) !== null && _e !== void 0 ? _e : coreCompiler.createSystem({ logger }),
2263
+ testing: (_f = config.testing) !== null && _f !== void 0 ? _f : {},
2254
2264
  };
2255
2265
  switch (task) {
2256
2266
  case 'build':
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/cli",
3
- "version": "2.17.4",
3
+ "version": "2.18.0",
4
4
  "description": "Rindo CLI.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",