html-validate 9.0.0-rc.1 → 9.0.0-rc.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/cjs/core-nodejs.js +83 -12
- package/dist/cjs/core-nodejs.js.map +1 -1
- package/dist/cjs/core.js +136 -28
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/tsdoc-metadata.json +1 -1
- package/dist/es/core-nodejs.js +84 -13
- package/dist/es/core-nodejs.js.map +1 -1
- package/dist/es/core.js +136 -29
- package/dist/es/core.js.map +1 -1
- package/dist/es/html-validate.js +1 -1
- package/dist/es/matchers-jestonly.js +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/browser.d.ts +38 -8
- package/dist/types/index.d.ts +45 -11
- package/package.json +10 -10
package/dist/es/html-validate.js
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import kleur from 'kleur';
|
|
4
4
|
import minimist from 'minimist';
|
|
5
|
-
import {
|
|
5
|
+
import { O as name, v as version, o as SchemaValidationError, U as UserError, Q as bugs } from './core.js';
|
|
6
6
|
import { M as Mode, m as modeToFlag, C as CLI, l as lint, i as init, p as printConfig, d as dump, h as handleSchemaValidationError } from './cli.js';
|
|
7
7
|
import 'ajv';
|
|
8
8
|
import './elements.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import kleur from 'kleur';
|
|
2
2
|
import { toMatchSnapshot, toMatchInlineSnapshot } from 'jest-snapshot';
|
|
3
|
-
import {
|
|
3
|
+
import { L as codeframe } from './core.js';
|
|
4
4
|
import { g as getResults } from './matchers.js';
|
|
5
5
|
import { d as diverge, i as isThenable } from './matcher-utils.js';
|
|
6
6
|
|
package/dist/tsdoc-metadata.json
CHANGED
package/dist/types/browser.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ export declare class Config {
|
|
|
196
196
|
/**
|
|
197
197
|
* Create configuration from object.
|
|
198
198
|
*/
|
|
199
|
-
static fromObject(resolvers: Resolver | Resolver[], options: ConfigData, filename?: string | null): Config
|
|
199
|
+
static fromObject(resolvers: Resolver | Resolver[], options: ConfigData, filename?: string | null): Config | Promise<Config>;
|
|
200
200
|
/* Excluded from this release type: fromFile */
|
|
201
201
|
/* Excluded from this release type: validate */
|
|
202
202
|
/**
|
|
@@ -227,6 +227,7 @@ export declare class Config {
|
|
|
227
227
|
*/
|
|
228
228
|
merge(resolvers: Resolver[], rhs: Config): Config;
|
|
229
229
|
private extendConfig;
|
|
230
|
+
private extendConfigAsync;
|
|
230
231
|
/* Excluded from this release type: getMetaTable */
|
|
231
232
|
/* Excluded from this release type: get */
|
|
232
233
|
/* Excluded from this release type: getRules */
|
|
@@ -344,9 +345,31 @@ export declare class ConfigError extends UserError {
|
|
|
344
345
|
* @public
|
|
345
346
|
*/
|
|
346
347
|
export declare abstract class ConfigLoader {
|
|
348
|
+
private _globalConfig;
|
|
349
|
+
private _configData;
|
|
347
350
|
protected readonly resolvers: Resolver[];
|
|
348
|
-
|
|
349
|
-
|
|
351
|
+
/**
|
|
352
|
+
* Create a new ConfigLoader.
|
|
353
|
+
*
|
|
354
|
+
* @param resolvers - Sorted list of resolvers to use (in order).
|
|
355
|
+
* @param configData - Default configuration (which all configurations will inherit from).
|
|
356
|
+
*/
|
|
357
|
+
constructor(resolvers: Resolver[], configData?: ConfigData);
|
|
358
|
+
/* Excluded from this release type: setConfigData */
|
|
359
|
+
/**
|
|
360
|
+
* Get the global configuration.
|
|
361
|
+
*
|
|
362
|
+
* @returns A promise resolving to the global configuration.
|
|
363
|
+
*/
|
|
364
|
+
protected getGlobalConfig(): Config | Promise<Config>;
|
|
365
|
+
/**
|
|
366
|
+
* Get the global configuration.
|
|
367
|
+
*
|
|
368
|
+
* The synchronous version does not support async resolvers.
|
|
369
|
+
*
|
|
370
|
+
* @returns The global configuration.
|
|
371
|
+
*/
|
|
372
|
+
protected getGlobalConfigSync(): Config;
|
|
350
373
|
/**
|
|
351
374
|
* Get configuration for given handle.
|
|
352
375
|
*
|
|
@@ -371,10 +394,16 @@ export declare abstract class ConfigLoader {
|
|
|
371
394
|
/**
|
|
372
395
|
* Default configuration used when no explicit configuration is passed to constructor.
|
|
373
396
|
*/
|
|
374
|
-
protected abstract defaultConfig(): Config
|
|
397
|
+
protected abstract defaultConfig(): Config | Promise<Config>;
|
|
375
398
|
protected empty(): Config;
|
|
376
|
-
|
|
377
|
-
|
|
399
|
+
/**
|
|
400
|
+
* Load configuration from object.
|
|
401
|
+
*/
|
|
402
|
+
protected loadFromObject(options: ConfigData, filename?: string | null): Config | Promise<Config>;
|
|
403
|
+
/**
|
|
404
|
+
* Load configuration from filename.
|
|
405
|
+
*/
|
|
406
|
+
protected loadFromFile(filename: string): Config | Promise<Config>;
|
|
378
407
|
}
|
|
379
408
|
|
|
380
409
|
/* Excluded from this release type: configPresets */
|
|
@@ -2498,9 +2527,10 @@ export declare class StaticConfigLoader extends ConfigLoader {
|
|
|
2498
2527
|
* @param config - New configuration to use.
|
|
2499
2528
|
*/
|
|
2500
2529
|
setConfig(config: ConfigData): void;
|
|
2501
|
-
getConfigFor(_handle: string, configOverride?: ConfigData): ResolvedConfig
|
|
2530
|
+
getConfigFor(_handle: string, configOverride?: ConfigData): ResolvedConfig | Promise<ResolvedConfig>;
|
|
2502
2531
|
flushCache(): void;
|
|
2503
|
-
protected defaultConfig(): Config
|
|
2532
|
+
protected defaultConfig(): Config | Promise<Config>;
|
|
2533
|
+
private _resolveConfig;
|
|
2504
2534
|
}
|
|
2505
2535
|
|
|
2506
2536
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -292,7 +292,7 @@ export declare class Config {
|
|
|
292
292
|
/**
|
|
293
293
|
* Create configuration from object.
|
|
294
294
|
*/
|
|
295
|
-
static fromObject(resolvers: Resolver | Resolver[], options: ConfigData, filename?: string | null): Config
|
|
295
|
+
static fromObject(resolvers: Resolver | Resolver[], options: ConfigData, filename?: string | null): Config | Promise<Config>;
|
|
296
296
|
/* Excluded from this release type: fromFile */
|
|
297
297
|
/* Excluded from this release type: validate */
|
|
298
298
|
/**
|
|
@@ -323,6 +323,7 @@ export declare class Config {
|
|
|
323
323
|
*/
|
|
324
324
|
merge(resolvers: Resolver[], rhs: Config): Config;
|
|
325
325
|
private extendConfig;
|
|
326
|
+
private extendConfigAsync;
|
|
326
327
|
/* Excluded from this release type: getMetaTable */
|
|
327
328
|
/* Excluded from this release type: get */
|
|
328
329
|
/* Excluded from this release type: getRules */
|
|
@@ -440,9 +441,31 @@ export declare class ConfigError extends UserError {
|
|
|
440
441
|
* @public
|
|
441
442
|
*/
|
|
442
443
|
export declare abstract class ConfigLoader {
|
|
444
|
+
private _globalConfig;
|
|
445
|
+
private _configData;
|
|
443
446
|
protected readonly resolvers: Resolver[];
|
|
444
|
-
|
|
445
|
-
|
|
447
|
+
/**
|
|
448
|
+
* Create a new ConfigLoader.
|
|
449
|
+
*
|
|
450
|
+
* @param resolvers - Sorted list of resolvers to use (in order).
|
|
451
|
+
* @param configData - Default configuration (which all configurations will inherit from).
|
|
452
|
+
*/
|
|
453
|
+
constructor(resolvers: Resolver[], configData?: ConfigData);
|
|
454
|
+
/* Excluded from this release type: setConfigData */
|
|
455
|
+
/**
|
|
456
|
+
* Get the global configuration.
|
|
457
|
+
*
|
|
458
|
+
* @returns A promise resolving to the global configuration.
|
|
459
|
+
*/
|
|
460
|
+
protected getGlobalConfig(): Config | Promise<Config>;
|
|
461
|
+
/**
|
|
462
|
+
* Get the global configuration.
|
|
463
|
+
*
|
|
464
|
+
* The synchronous version does not support async resolvers.
|
|
465
|
+
*
|
|
466
|
+
* @returns The global configuration.
|
|
467
|
+
*/
|
|
468
|
+
protected getGlobalConfigSync(): Config;
|
|
446
469
|
/**
|
|
447
470
|
* Get configuration for given handle.
|
|
448
471
|
*
|
|
@@ -467,10 +490,16 @@ export declare abstract class ConfigLoader {
|
|
|
467
490
|
/**
|
|
468
491
|
* Default configuration used when no explicit configuration is passed to constructor.
|
|
469
492
|
*/
|
|
470
|
-
protected abstract defaultConfig(): Config
|
|
493
|
+
protected abstract defaultConfig(): Config | Promise<Config>;
|
|
471
494
|
protected empty(): Config;
|
|
472
|
-
|
|
473
|
-
|
|
495
|
+
/**
|
|
496
|
+
* Load configuration from object.
|
|
497
|
+
*/
|
|
498
|
+
protected loadFromObject(options: ConfigData, filename?: string | null): Config | Promise<Config>;
|
|
499
|
+
/**
|
|
500
|
+
* Load configuration from filename.
|
|
501
|
+
*/
|
|
502
|
+
protected loadFromFile(filename: string): Config | Promise<Config>;
|
|
474
503
|
}
|
|
475
504
|
|
|
476
505
|
/* Excluded from this release type: configPresets */
|
|
@@ -901,7 +930,7 @@ export declare class FileSystemConfigLoader extends ConfigLoader {
|
|
|
901
930
|
* @param filename - Filename to get configuration for.
|
|
902
931
|
* @param configOverride - Configuration to merge final result with.
|
|
903
932
|
*/
|
|
904
|
-
getConfigFor(filename: string, configOverride?: ConfigData): ResolvedConfig
|
|
933
|
+
getConfigFor(filename: string, configOverride?: ConfigData): ResolvedConfig | Promise<ResolvedConfig>;
|
|
905
934
|
/**
|
|
906
935
|
* Flush configuration cache.
|
|
907
936
|
*
|
|
@@ -914,9 +943,13 @@ export declare class FileSystemConfigLoader extends ConfigLoader {
|
|
|
914
943
|
* This configuration is not merged with global configuration and may return
|
|
915
944
|
* `null` if no configuration files are found.
|
|
916
945
|
*/
|
|
917
|
-
fromFilename(filename: string): Config | null;
|
|
946
|
+
fromFilename(filename: string): Config | Promise<Config | null> | null;
|
|
947
|
+
/* Excluded from this release type: fromFilenameAsync */
|
|
948
|
+
private _mergeSync;
|
|
949
|
+
private _resolveSync;
|
|
950
|
+
private _resolveAsync;
|
|
918
951
|
/* Excluded from this release type: _getInternalCache */
|
|
919
|
-
protected defaultConfig(): Config
|
|
952
|
+
protected defaultConfig(): Config | Promise<Config>;
|
|
920
953
|
}
|
|
921
954
|
|
|
922
955
|
/**
|
|
@@ -2748,9 +2781,10 @@ export declare class StaticConfigLoader extends ConfigLoader {
|
|
|
2748
2781
|
* @param config - New configuration to use.
|
|
2749
2782
|
*/
|
|
2750
2783
|
setConfig(config: ConfigData): void;
|
|
2751
|
-
getConfigFor(_handle: string, configOverride?: ConfigData): ResolvedConfig
|
|
2784
|
+
getConfigFor(_handle: string, configOverride?: ConfigData): ResolvedConfig | Promise<ResolvedConfig>;
|
|
2752
2785
|
flushCache(): void;
|
|
2753
|
-
protected defaultConfig(): Config
|
|
2786
|
+
protected defaultConfig(): Config | Promise<Config>;
|
|
2787
|
+
private _resolveConfig;
|
|
2754
2788
|
}
|
|
2755
2789
|
|
|
2756
2790
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-validate",
|
|
3
|
-
"version": "9.0.0-rc.
|
|
3
|
+
"version": "9.0.0-rc.2",
|
|
4
4
|
"description": "Offline html5 validator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"html",
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
"@html-validate/jest-config": "3.10.0",
|
|
216
216
|
"@html-validate/prettier-config": "2.5.5",
|
|
217
217
|
"@html-validate/release-scripts": "6.6.0",
|
|
218
|
-
"@microsoft/api-extractor": "7.47.
|
|
218
|
+
"@microsoft/api-extractor": "7.47.9",
|
|
219
219
|
"@rollup/plugin-commonjs": "26.0.1",
|
|
220
220
|
"@rollup/plugin-json": "6.1.0",
|
|
221
221
|
"@rollup/plugin-node-resolve": "15.2.3",
|
|
@@ -223,29 +223,29 @@
|
|
|
223
223
|
"@rollup/plugin-virtual": "3.0.2",
|
|
224
224
|
"@types/babar": "0.2.4",
|
|
225
225
|
"@types/babel__code-frame": "7.0.6",
|
|
226
|
-
"@types/jest": "29.5.
|
|
226
|
+
"@types/jest": "29.5.13",
|
|
227
227
|
"@types/minimist": "1.2.5",
|
|
228
228
|
"@types/node": "16.18.108",
|
|
229
229
|
"@types/prompts": "2.4.9",
|
|
230
230
|
"@types/semver": "7.5.8",
|
|
231
231
|
"@types/stream-buffers": "3.0.7",
|
|
232
232
|
"babar": "0.2.3",
|
|
233
|
-
"husky": "9.1.
|
|
233
|
+
"husky": "9.1.6",
|
|
234
234
|
"is-ci": "3.0.1",
|
|
235
235
|
"jest": "29.7.0",
|
|
236
236
|
"jest-diff": "29.7.0",
|
|
237
237
|
"jest-environment-jsdom": "29.7.0",
|
|
238
238
|
"jest-snapshot": "29.7.0",
|
|
239
239
|
"jsdom": "25.0.0",
|
|
240
|
-
"memfs": "4.
|
|
241
|
-
"npm-pkg-lint": "3.
|
|
242
|
-
"npm-run-all2": "6.2.
|
|
243
|
-
"rollup": "4.
|
|
240
|
+
"memfs": "4.12.0",
|
|
241
|
+
"npm-pkg-lint": "3.9.0",
|
|
242
|
+
"npm-run-all2": "6.2.3",
|
|
243
|
+
"rollup": "4.22.2",
|
|
244
244
|
"rollup-plugin-esbuild": "6.1.1",
|
|
245
245
|
"stream-buffers": "3.0.3",
|
|
246
246
|
"ts-jest": "29.2.5",
|
|
247
|
-
"typescript": "5.
|
|
248
|
-
"vite": "4.5.
|
|
247
|
+
"typescript": "5.6.2",
|
|
248
|
+
"vite": "4.5.5"
|
|
249
249
|
},
|
|
250
250
|
"peerDependencies": {
|
|
251
251
|
"jest": "^27.1 || ^28.1.3 || ^29.0.3",
|