Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-validate

Package Overview
Dependencies
Maintainers
1
Versions
265
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-validate - npm Package Versions

23
27

9.0.0-rc.6

Diff

ext
published 9.0.0-rc.4 •

ext
published 9.0.0-rc.3 •

Changelog

Source

9.0.0-rc.3 (2024-12-01)

⚠ BREAKING CHANGES

  • config: This change affects all users. The following deprecated configuration presets has been removed:
  • htmlvalidate:recommended
  • htmlvalidate:document
  • html-validate:a17y
  • deps: Requires NodeJS v18 or later.
  • api: The deprecated tag:open and tag:close events has been removed, use tag:begin and tag:end instead.
  • api: The Config.resolve() method can return a Promise if any underlying loader or resolver has returned a Promise.

It is recommended to assume it returns a Promise and always await the result:

-const resolved = config.resolve();
+const resolved = await config.resolve();

If you need synchronous code ensure the configuration, the loader and the resolver all returns synchronous results, e.g. the staticResolver with synchronous code.

  • api: The HtmlValidate.getConfigurationSchema() method is now async and returns a Promise. If you use this method you need to await the result:
-const schema = htmlvalidate.getConfigurationSchema();
+const schema = await htmlvalidate.getConfigurationSchema();
  • api: If you are writing your own transformers they may now optionally return a Promise. If you are using test-utils to write unit tests you must now resolve the promise.
 import { transformSource } from "html-validate/test-utils";

-const result = transformSource(transformer, source);
+const result = await transformSource(transformer, source);

This is no matter if your transformer is actually async or not.

  • api: The CLI.isIgnored(..) method has been removed from the public API. There is no replacement. If you need this method open an issue describing the use-case.
  • api: If you are using the CLI class most methods are now async and returns Promise. There is no synchronous version of these API calls.
  • api: Config.fromFile(..) and Config.fromObject(..) will return a Promise when used with an async loader or resolver.
  • api: ConfigLoader methods can optionally return a Promise for async operation. For most use-cases this will not require any changes.
  • api: The ConfigLoader.globalConfig property has been replaced with ConfigLoader.getGlobalConfig() (async) and ConfigLoader.getGlobalConfigSync() (sync).
  • api: The redundant and deprecated Config.init() method has been removed.

Remove any calls to the method:

 const config = Config.fromObject({ /* ... */ });
-config.init();

Features

  • api: CLI.isIgnored() made private (1fdcb25)
  • api: CLI methods async and return Promise (282049e)
  • api: Config.fromFile and Config.fromObject can return Promise (5e755d6)
  • api: Config.resolve() can return Promise (1e60c93)
  • api: ConfigLoaders can optionally return Promise for async operation (17dd44f)
  • api: HtmlValidate.getConfigurationSchema() returns promise (40f7d54)
  • api: new esmResolver using import(..) (ddde616)
  • api: remove deprecated Config.init() (19de98d)
  • api: remove deprecated tag:open and tag:close events (5400a7b)
  • api: replace ConfigLoader.globalConfig with ConfigLoader.getGlobalConfig() (7d740d6)
  • api: resolvers may optionally return Promise for async operation (9bd60b5)
  • api: transformers may optionally return Promise for async operation (f173c3f)
  • cli: use esmResolver (db36aa9)
  • config: remove deprecated configuration presets (bb37eab)
  • config: support .htmlvalidate.mjs configuration files (e148342)
  • deps: require node 18 or later (aaf93c9)

Bug Fixes

  • workaround rollup issue with import attributes (0eee05c)
ext
published 8.27.0 •

Changelog

Source

8.27.0 (2024-11-30)

Features

  • api: deprecate Config.init() (d4b5987)
  • config: lazy load transformers (d82bc57), closes #194
ext
published 8.26.0 •

Changelog

Source

8.26.0 (2024-11-26)

Features

  • better handling of mismatched/unclosed tags (489ccae), closes #272
ext
published 8.25.1 •

Changelog

Source

8.25.1 (2024-11-24)

Bug Fixes

  • fix dump tree output with nested elements (854c274)
ext
published 8.25.0 •

Changelog

Source

8.25.0 (2024-11-11)

Features

  • cli: add --preset to set preset when using cli (2ec038f), closes #269

Bug Fixes

  • properly close elements with optional end tag when implicit document element is used (bbe2a99), closes #268
  • types: narrow numeric rule severity to only 0, 1 and 2 (88cf8a2)
ext
published 8.24.2 •

Changelog

Source

8.24.2 (2024-10-16)

Bug Fixes

  • add default environment to package.json exports (a21a1ef), closes #265
ext
published 8.24.1 •

Changelog

Source

8.24.1 (2024-10-07)

Bug Fixes

  • dont validate quotes in dynamically added attributes (2125d86)
ext
published 8.24.0 •

Changelog

Source

8.24.0 (2024-09-24)

Features

  • new html-validate:browser configuration preset (f4e6f5b), closes #261
23
27
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc