@rindo/core 2.18.0 → 2.22.3

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 (96) hide show
  1. package/cli/config-flags.d.ts +33 -21
  2. package/cli/index.cjs +670 -388
  3. package/cli/index.d.ts +3 -0
  4. package/cli/index.js +670 -388
  5. package/cli/package.json +1 -1
  6. package/compiler/lib.dom.d.ts +434 -251
  7. package/compiler/lib.dom.iterable.d.ts +7 -13
  8. package/compiler/lib.es2015.collection.d.ts +62 -1
  9. package/compiler/lib.es2015.promise.d.ts +9 -4
  10. package/compiler/lib.es2015.proxy.d.ts +91 -2
  11. package/compiler/lib.es2015.reflect.d.ts +25 -2
  12. package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
  13. package/compiler/lib.es2017.intl.d.ts +16 -1
  14. package/compiler/lib.es2019.d.ts +1 -0
  15. package/compiler/lib.es2019.intl.d.ts +25 -0
  16. package/compiler/lib.es2020.intl.d.ts +31 -6
  17. package/compiler/lib.es2021.intl.d.ts +11 -3
  18. package/compiler/lib.es2022.d.ts +1 -0
  19. package/compiler/lib.es2022.error.d.ts +2 -2
  20. package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
  21. package/compiler/lib.es5.d.ts +39 -14
  22. package/compiler/lib.esnext.intl.d.ts +5 -1
  23. package/compiler/lib.webworker.d.ts +318 -55
  24. package/compiler/lib.webworker.iterable.d.ts +11 -3
  25. package/compiler/package.json +1 -1
  26. package/compiler/rindo.d.ts +3 -25
  27. package/compiler/rindo.js +53912 -51834
  28. package/compiler/rindo.min.js +2 -2
  29. package/compiler/sys/in-memory-fs.d.ts +3 -3
  30. package/compiler/transpile.d.ts +32 -0
  31. package/dependencies.json +3 -1
  32. package/dev-server/client/app-error.d.ts +1 -1
  33. package/dev-server/client/index.d.ts +2 -2
  34. package/dev-server/client/index.js +241 -241
  35. package/dev-server/client/package.json +1 -1
  36. package/dev-server/connector.html +3 -3
  37. package/dev-server/index.d.ts +1 -1
  38. package/dev-server/index.js +2 -2
  39. package/dev-server/open-in-editor-api.js +1 -1
  40. package/dev-server/package.json +1 -1
  41. package/dev-server/server-process.js +1182 -1148
  42. package/dev-server/ws.js +1 -1
  43. package/internal/app-data/package.json +1 -1
  44. package/internal/client/css-shim.js +2 -2
  45. package/internal/client/dom.js +1 -1
  46. package/internal/client/index.js +800 -673
  47. package/internal/client/package.json +1 -1
  48. package/internal/client/patch-browser.js +19 -1
  49. package/internal/client/patch-esm.js +1 -1
  50. package/internal/client/polyfills/css-shim.js +1 -1
  51. package/internal/client/shadow-css.js +1 -1
  52. package/internal/hydrate/index.js +154 -143
  53. package/internal/hydrate/package.json +1 -1
  54. package/internal/hydrate/runner.d.ts +1 -1
  55. package/internal/hydrate/runner.js +106 -106
  56. package/internal/package.json +1 -1
  57. package/internal/rindo-core/index.d.ts +9 -10
  58. package/internal/rindo-private.d.ts +149 -80
  59. package/internal/rindo-public-compiler.d.ts +68 -32
  60. package/internal/rindo-public-docs.d.ts +24 -0
  61. package/internal/rindo-public-runtime.d.ts +79 -7
  62. package/internal/testing/index.js +187 -175
  63. package/internal/testing/package.json +1 -1
  64. package/mock-doc/index.cjs +905 -896
  65. package/mock-doc/index.d.ts +2 -2
  66. package/mock-doc/index.js +905 -896
  67. package/mock-doc/package.json +1 -1
  68. package/package.json +48 -57
  69. package/readme.md +44 -31
  70. package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
  71. package/screenshot/index.d.ts +1 -1
  72. package/screenshot/index.js +3 -3
  73. package/screenshot/package.json +1 -1
  74. package/screenshot/pixel-match.js +983 -849
  75. package/sys/node/autoprefixer.js +2 -2
  76. package/sys/node/glob.js +1 -1
  77. package/sys/node/index.d.ts +4 -0
  78. package/sys/node/index.js +407 -418
  79. package/sys/node/package.json +1 -1
  80. package/sys/node/prompts.js +1 -1
  81. package/sys/node/worker.js +1 -1
  82. package/testing/index.d.ts +6 -6
  83. package/testing/index.js +1136 -1277
  84. package/testing/jest/jest-config.d.ts +1 -1
  85. package/testing/jest/jest-preprocessor.d.ts +3 -3
  86. package/testing/jest/jest-serializer.d.ts +1 -2
  87. package/testing/matchers/index.d.ts +3 -3
  88. package/testing/mock-fetch.d.ts +1 -1
  89. package/testing/mocks.d.ts +2 -2
  90. package/testing/package.json +1 -1
  91. package/testing/puppeteer/puppeteer-declarations.d.ts +5 -5
  92. package/testing/puppeteer/puppeteer-element.d.ts +2 -2
  93. package/testing/puppeteer/puppeteer-events.d.ts +1 -1
  94. package/testing/testing-logger.d.ts +1 -1
  95. package/testing/testing-utils.d.ts +1 -1
  96. package/testing/testing.d.ts +1 -1
@@ -1,5 +1,5 @@
1
- import type * as d from '@rindo/core/internal';
2
1
  import type { Config } from '@jest/types';
2
+ import type * as d from '@rindo/core/internal';
3
3
  /**
4
4
  * Builds the `argv` to be used when programmatically invoking the Jest CLI
5
5
  * @param config the Rindo config to use while generating Jest CLI arguments
@@ -1,12 +1,12 @@
1
- declare type Jest26CacheKeyOptions = {
1
+ type Jest26CacheKeyOptions = {
2
2
  instrument: boolean;
3
3
  rootDir: string;
4
4
  };
5
- declare type Jest26Config = {
5
+ type Jest26Config = {
6
6
  instrument: boolean;
7
7
  rootDir: string;
8
8
  };
9
- declare type Jest27TransformOptions = {
9
+ type Jest27TransformOptions = {
10
10
  config: Jest26Config;
11
11
  };
12
12
  export declare const jestPreprocessor: {
@@ -1,5 +1,4 @@
1
- import { MockNode } from '@rindo/core/mock-doc';
2
1
  export declare const HtmlSerializer: {
3
- print: (val: HTMLElement | MockNode) => string;
2
+ print: (val: unknown) => string;
4
3
  test: (val: any) => boolean;
5
4
  };
@@ -1,9 +1,9 @@
1
1
  import { toEqualAttribute, toEqualAttributes, toHaveAttribute } from './attributes';
2
- import { toHaveReceivedEvent, toHaveReceivedEventDetail, toHaveReceivedEventTimes, toHaveFirstReceivedEventDetail, toHaveNthReceivedEventDetail } from './events';
3
- import { toEqualHtml, toEqualLightHtml } from './html';
4
- import { toEqualText } from './text';
5
2
  import { toHaveClass, toHaveClasses, toMatchClasses } from './class-list';
3
+ import { toHaveFirstReceivedEventDetail, toHaveNthReceivedEventDetail, toHaveReceivedEvent, toHaveReceivedEventDetail, toHaveReceivedEventTimes } from './events';
4
+ import { toEqualHtml, toEqualLightHtml } from './html';
6
5
  import { toMatchScreenshot } from './screenshot';
6
+ import { toEqualText } from './text';
7
7
  export declare const expectExtend: {
8
8
  toEqualAttribute: typeof toEqualAttribute;
9
9
  toEqualAttributes: typeof toEqualAttributes;
@@ -8,4 +8,4 @@ export declare const mockFetch: {
8
8
  reject(rsp?: MockResponse, url?: string): void;
9
9
  reset: typeof mockFetchReset;
10
10
  };
11
- export { MockHeaders, MockRequest, MockRequestInit, MockRequestInfo, MockResponse, MockResponseInit, } from '../mock-doc';
11
+ export { MockHeaders, MockRequest, MockRequestInfo, MockRequestInit, MockResponse, MockResponseInit, } from '../mock-doc';
@@ -1,6 +1,6 @@
1
- import type { BuildCtx, Cache, CompilerCtx, Config, LoadConfigInit, ValidatedConfig, Module, UnvalidatedConfig } from '@rindo/core/internal';
2
- import { TestingSystem } from './testing-sys';
1
+ import type { BuildCtx, Cache, CompilerCtx, Config, LoadConfigInit, Module, UnvalidatedConfig, ValidatedConfig } from '@rindo/core/internal';
3
2
  import { TestingLogger } from './testing-logger';
3
+ import { TestingSystem } from './testing-sys';
4
4
  /**
5
5
  * Creates a mock instance of an internal, validated Rindo configuration object
6
6
  * the caller
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/testing",
3
- "version": "2.18.0",
3
+ "version": "2.22.3",
4
4
  "description": "Rindo testing suite.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -7,7 +7,7 @@ import type { ClickOptions, HTTPResponse as PuppeteerHTTPResponse, Page, Screens
7
7
  * migrate to a newer minor version of Rindo without requiring a Puppeteer upgrade/major version of Rindo. This type
8
8
  * should be removed as a part of the Rindo 3.0 release.
9
9
  */
10
- export declare type HTTPResponse = PuppeteerHTTPResponse;
10
+ export type HTTPResponse = PuppeteerHTTPResponse;
11
11
  /**
12
12
  * These types help with declaration merging as a part of Rindo's migration from Puppeteer v5.4.3 to v10.0.0. In
13
13
  * v10.0.0, `WaitForOptions` is a renamed version of `NavigationOptions` from v5.4.3, who has had its type hierarchy
@@ -31,7 +31,7 @@ declare module 'puppeteer' {
31
31
  * This type was once exported by Puppeteer, but has since moved to an object literal in (Puppeteer’s) native types.
32
32
  * Re-create it here as a named type to use across multiple Rindo-related testing files.
33
33
  */
34
- export declare type PageCloseOptions = {
34
+ export type PageCloseOptions = {
35
35
  runBeforeUnload?: boolean;
36
36
  };
37
37
  export interface NewE2EPageOptions extends WaitForOptions {
@@ -40,8 +40,8 @@ export interface NewE2EPageOptions extends WaitForOptions {
40
40
  failOnConsoleError?: boolean;
41
41
  failOnNetworkError?: boolean;
42
42
  }
43
- declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
44
- declare type PuppeteerPage = Omit<Page, 'bringToFront' | 'browser' | 'screenshot' | 'emulate' | 'emulateMedia' | 'frames' | 'goBack' | 'goForward' | 'isClosed' | 'mainFrame' | 'pdf' | 'reload' | 'target' | 'title' | 'viewport' | 'waitForNavigation' | 'screenshot' | 'workers' | 'addListener' | 'prependListener' | 'prependOnceListener' | 'removeAllListeners' | 'setMaxListeners' | 'getMaxListeners' | 'listeners' | 'rawListeners' | 'emit' | 'eventNames' | 'listenerCount' | '$x' | 'waitForXPath'>;
43
+ type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
44
+ type PuppeteerPage = Omit<Page, 'bringToFront' | 'browser' | 'screenshot' | 'emulate' | 'emulateMedia' | 'frames' | 'goBack' | 'goForward' | 'isClosed' | 'mainFrame' | 'pdf' | 'reload' | 'target' | 'title' | 'viewport' | 'waitForNavigation' | 'screenshot' | 'workers' | 'addListener' | 'prependListener' | 'prependOnceListener' | 'removeAllListeners' | 'setMaxListeners' | 'getMaxListeners' | 'listeners' | 'rawListeners' | 'emit' | 'eventNames' | 'listenerCount' | '$x' | 'waitForXPath'>;
45
45
  export interface PageDiagnostic {
46
46
  type: 'error' | 'pageerror' | 'requestfailed';
47
47
  message?: string;
@@ -401,7 +401,7 @@ export interface E2EElementInternal extends E2EElement {
401
401
  e2eRunActions(): Promise<unknown>;
402
402
  e2eSync(): Promise<void>;
403
403
  }
404
- export declare type FindSelector = string | FindSelectorOptions;
404
+ export type FindSelector = string | FindSelectorOptions;
405
405
  export interface FindSelectorOptions {
406
406
  /**
407
407
  * Finds an element with text content matching this
@@ -1,8 +1,8 @@
1
1
  import type { EventInitDict } from '@rindo/core/internal';
2
- import type * as pd from './puppeteer-declarations';
2
+ import { MockHTMLElement } from '@rindo/core/mock-doc';
3
3
  import type * as puppeteer from 'puppeteer';
4
+ import type * as pd from './puppeteer-declarations';
4
5
  import { EventSpy } from './puppeteer-events';
5
- import { MockHTMLElement } from '@rindo/core/mock-doc';
6
6
  export declare class E2EElement extends MockHTMLElement implements pd.E2EElementInternal {
7
7
  private _page;
8
8
  private _elmHandle;
@@ -1,6 +1,6 @@
1
1
  import type { SerializedEvent } from '@rindo/core/internal';
2
- import type * as pd from './puppeteer-declarations';
3
2
  import type * as puppeteer from 'puppeteer';
3
+ import type * as pd from './puppeteer-declarations';
4
4
  export declare function initPageEvents(page: pd.E2EPageInternal): Promise<void>;
5
5
  export declare function waitForEvent(page: pd.E2EPageInternal, eventName: string, elementHandle: puppeteer.ElementHandle): Promise<any>;
6
6
  export declare class EventSpy implements EventSpy {
@@ -1,4 +1,4 @@
1
- import type { Diagnostic, Logger, LogLevel, LoggerTimeSpan } from '@rindo/core/internal';
1
+ import type { Diagnostic, Logger, LoggerTimeSpan, LogLevel } from '@rindo/core/internal';
2
2
  export declare class TestingLogger implements Logger {
3
3
  private isEnabled;
4
4
  setLevel(_level: LogLevel): void;
@@ -65,7 +65,7 @@ interface ConsoleMocker {
65
65
  * as its argument and returns a `Promise`, the value of which is returns by `withSilentWarn`
66
66
  * as well.
67
67
  */
68
- declare type SilentWarnFunc<T> = (mock: jest.Mock<typeof console.warn>) => Promise<T>;
68
+ type SilentWarnFunc<T> = (mock: jest.Mock<typeof console.warn>) => Promise<T>;
69
69
  /**
70
70
  * Wrap a single callback with a silent `console.warn`. The callback passed in
71
71
  * receives the mocking function as an argument, so you can easily make assertions
@@ -1,2 +1,2 @@
1
- import type { ValidatedConfig, Testing } from '@rindo/core/internal';
1
+ import type { Testing, ValidatedConfig } from '@rindo/core/internal';
2
2
  export declare const createTesting: (config: ValidatedConfig) => Promise<Testing>;