@rindo/core 3.0.0-rc.0 → 3.0.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.
@@ -1,5 +1,5 @@
1
1
  import type { ConfigFlags } from '../cli/config-flags';
2
- import type { PrerenderUrlResults } from '../internal';
2
+ import type { PrerenderUrlResults, PrintLine } from '../internal';
3
3
  import type { JsonDocs } from './rindo-public-docs';
4
4
  export * from './rindo-public-docs';
5
5
  /**
@@ -151,7 +151,7 @@ export interface RindoConfig {
151
151
  * type of CSS properties and values are assigned before and after hydrating. This config
152
152
  * can also be used to not include the hydrated flag at all by setting it to `null`.
153
153
  */
154
- hydratedFlag?: HydratedFlag;
154
+ hydratedFlag?: HydratedFlag | null;
155
155
  /**
156
156
  * Family prefers to hide all components prior to hydration with a style tag appended
157
157
  * to the head of the document containing some `visibility: hidden;` css rules.
@@ -382,7 +382,7 @@ type RequireFields<T, K extends keyof T> = T & {
382
382
  /**
383
383
  * Fields in {@link Config} to make required for {@link ValidatedConfig}
384
384
  */
385
- type StrictConfigFields = 'flags' | 'logger' | 'outputTargets' | 'rootDir' | 'sys' | 'testing';
385
+ type StrictConfigFields = 'flags' | 'hydratedFlag' | 'logger' | 'outputTargets' | 'packageJsonFilePath' | 'rootDir' | 'sys' | 'testing';
386
386
  /**
387
387
  * A version of {@link Config} that makes certain fields required. This type represents a valid configuration entity.
388
388
  * When a configuration is received by the user, it is a bag of unverified data. In order to make stricter guarantees
@@ -2067,24 +2067,18 @@ export interface LoadConfigResults {
2067
2067
  };
2068
2068
  }
2069
2069
  export interface Diagnostic {
2070
- level: 'error' | 'warn' | 'info' | 'log' | 'debug';
2071
- type: string;
2070
+ absFilePath?: string | undefined;
2071
+ code?: string;
2072
+ columnNumber?: number | undefined;
2073
+ debugText?: string;
2072
2074
  header?: string;
2073
2075
  language?: string;
2076
+ level: 'error' | 'warn' | 'info' | 'log' | 'debug';
2077
+ lineNumber?: number | undefined;
2078
+ lines: PrintLine[];
2074
2079
  messageText: string;
2075
- debugText?: string;
2076
- code?: string;
2077
- absFilePath?: string;
2078
- relFilePath?: string;
2079
- lineNumber?: number;
2080
- columnNumber?: number;
2081
- lines?: {
2082
- lineIndex: number;
2083
- lineNumber: number;
2084
- text?: string;
2085
- errorCharStart: number;
2086
- errorLength?: number;
2087
- }[];
2080
+ relFilePath?: string | undefined;
2081
+ type: string;
2088
2082
  }
2089
2083
  export interface CacheStorage {
2090
2084
  get(key: string): Promise<any>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal/testing",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.0.0",
4
4
  "description": "Rindo internal testing platform to be imported by the Rindo Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Mock Doc (CommonJS) v3.0.0-rc.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Mock Doc (CommonJS) v3.0.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  var mockDoc = (function(exports) {
5
5
  'use strict';
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Mock Doc v3.0.0-rc.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Mock Doc v3.0.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  const CONTENT_REF_ID = 'r';
5
5
  const ORG_LOCATION_ID = 'o';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/mock-doc",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.0.0",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.0.0",
4
4
  "license": "MIT",
5
5
  "main": "./internal/rindo-core/index.cjs",
6
6
  "module": "./internal/rindo-core/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/screenshot",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.0.0",
4
4
  "description": "Rindo Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
package/sys/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Node System v3.0.0-rc.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Node System v3.0.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  function _interopDefaultLegacy(e) {
5
5
  return e && "object" == typeof e && "default" in e ? e : {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/sys/node",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.0.0",
4
4
  "description": "Rindo Node System.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Node System Worker v3.0.0-rc.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Node System Worker v3.0.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  function _interopNamespace(e) {
5
5
  if (e && e.__esModule) return e;
package/testing/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Testing v3.0.0-rc.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Testing v3.0.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  function _lazyRequire(e) {
5
5
  return new Proxy({}, {
@@ -124,51 +124,54 @@ function getCompilerOptions(e) {
124
124
  if (!t) return null;
125
125
  const r = rindo_js.ts.readConfigFile(t, rindo_js.ts.sys.readFile);
126
126
  if (r.error) throw new Error(formatDiagnostic((e => {
127
- const t = {
128
- level: "warn",
129
- type: "typescript",
130
- language: "typescript",
131
- header: "TypeScript",
127
+ var t;
128
+ const r = {
129
+ absFilePath: void 0,
132
130
  code: e.code.toString(),
131
+ columnNumber: void 0,
132
+ header: "TypeScript",
133
+ language: "typescript",
134
+ level: "warn",
135
+ lineNumber: void 0,
136
+ lines: [],
133
137
  messageText: flattenDiagnosticMessageText(e, e.messageText),
134
- relFilePath: null,
135
- absFilePath: null,
136
- lines: []
138
+ relFilePath: void 0,
139
+ type: "typescript"
137
140
  };
138
- if (1 === e.category && (t.level = "error"), e.file) {
139
- t.absFilePath = e.file.fileName;
140
- const s = "string" != typeof (r = e.file.text) ? [] : (r = r.replace(/\\r/g, "\n")).split("\n"), n = e.file.getLineAndCharacterOfPosition(e.start), o = {
141
- lineIndex: n.line,
142
- lineNumber: n.line + 1,
143
- text: s[n.line],
144
- errorCharStart: n.character,
145
- errorLength: Math.max(e.length, 1)
141
+ if (1 === e.category && (r.level = "error"), e.file && "number" == typeof e.start) {
142
+ r.absFilePath = e.file.fileName;
143
+ const n = "string" != typeof (s = e.file.text) ? [] : (s = s.replace(/\\r/g, "\n")).split("\n"), o = e.file.getLineAndCharacterOfPosition(e.start), i = {
144
+ lineIndex: o.line,
145
+ lineNumber: o.line + 1,
146
+ text: n[o.line],
147
+ errorCharStart: o.character,
148
+ errorLength: Math.max(null !== (t = e.length) && void 0 !== t ? t : 0, 1)
146
149
  };
147
- if (t.lineNumber = o.lineNumber, t.columnNumber = o.errorCharStart + 1, t.lines.push(o),
148
- 0 === o.errorLength && o.errorCharStart > 0 && (o.errorLength = 1, o.errorCharStart--),
149
- o.lineIndex > 0) {
150
+ if (r.lineNumber = i.lineNumber, r.columnNumber = i.errorCharStart + 1, r.lines.push(i),
151
+ 0 === i.errorLength && i.errorCharStart > 0 && (i.errorLength = 1, i.errorCharStart--),
152
+ i.lineIndex > 0) {
150
153
  const e = {
151
- lineIndex: o.lineIndex - 1,
152
- lineNumber: o.lineNumber - 1,
153
- text: s[o.lineIndex - 1],
154
+ lineIndex: i.lineIndex - 1,
155
+ lineNumber: i.lineNumber - 1,
156
+ text: n[i.lineIndex - 1],
154
157
  errorCharStart: -1,
155
158
  errorLength: -1
156
159
  };
157
- t.lines.unshift(e);
160
+ r.lines.unshift(e);
158
161
  }
159
- if (o.lineIndex + 1 < s.length) {
162
+ if (i.lineIndex + 1 < n.length) {
160
163
  const e = {
161
- lineIndex: o.lineIndex + 1,
162
- lineNumber: o.lineNumber + 1,
163
- text: s[o.lineIndex + 1],
164
+ lineIndex: i.lineIndex + 1,
165
+ lineNumber: i.lineNumber + 1,
166
+ text: n[i.lineIndex + 1],
164
167
  errorCharStart: -1,
165
168
  errorLength: -1
166
169
  };
167
- t.lines.push(e);
170
+ r.lines.push(e);
168
171
  }
169
172
  }
170
- var r;
171
- return t;
173
+ var s;
174
+ return r;
172
175
  })(r.error)));
173
176
  const s = rindo_js.ts.parseJsonConfigFileContent(r.config, rindo_js.ts.sys, e, void 0, t);
174
177
  return _tsCompilerOptions = s.options, _tsCompilerOptions;
@@ -3148,7 +3151,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
3148
3151
  d("/");
3149
3152
  const D = {
3150
3153
  name: "in-memory",
3151
- version: "3.0.0-rc.0",
3154
+ version: "3.0.0",
3152
3155
  events: a,
3153
3156
  access: async e => u(e),
3154
3157
  accessSync: u,
@@ -4023,13 +4026,15 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
4023
4026
  ...e
4024
4027
  }), exports.mockValidatedConfig = function mockValidatedConfig(e = {}) {
4025
4028
  var t;
4026
- const r = mockConfig(e);
4029
+ const r = mockConfig(e), s = path__default.default.resolve("/");
4027
4030
  return {
4028
4031
  ...r,
4029
4032
  flags: createConfigFlags(),
4033
+ hydratedFlag: null,
4030
4034
  logger: mockLogger(),
4031
4035
  outputTargets: null !== (t = r.outputTargets) && void 0 !== t ? t : [],
4032
- rootDir: path__default.default.resolve("/"),
4036
+ packageJsonFilePath: path__default.default.join(s, "package.json"),
4037
+ rootDir: s,
4033
4038
  sys: createTestingSystem(),
4034
4039
  testing: {},
4035
4040
  ...e
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/testing",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.0.0",
4
4
  "description": "Rindo testing suite.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",