Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency html-validate to v9 - autoclosed #262

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 23, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
html-validate (source) 8.29.0 -> 9.1.0 age adoption passing confidence

Release Notes

html-validate/html-validate (html-validate)

v9.1.0

Compare Source

Features
  • deps: update dependency ignore to v7 (43ae9ac)
Bug Fixes
  • use jest worker for toMatchCodeframe (3c29ad5)

v9.0.1

Compare Source

Bug Fixes
  • fix validateMultipleFiles incorrectly using sync API (0c26918)

v9.0.0

Compare Source

ESM support has finally landed in HTML-Validate V9!

  • Configuration files (using .htmlvalidate.mjs or when "type" is "module" in package.json).
  • Plugins, element metadata, shared configurations and transformers can be written natively in ESM.

This release is primarly breaking for API uses but some configuration changes might be required (see below).
For API users the TL;DR version is most functions can return a Promise so make sure to await it.

⚠ BREAKING CHANGES
  • meta: The deprecated metadata property expressions have been removed
    and can be replaced with callback functions. This gives greater control for the
    metadata author, provides better IDE support and is more reusable when querying
    the metadata directly.

  • api: Config.merge(..) will return a Promise when used with an
    async loader or resolver.

  • config: This change affects all users. The following deprecated
    configuration presets has been removed:

    • htmlvalidate:recommended
    • htmlvalidate:document
    • html-validate:a17y
  • cli: CLI uses ESM (with esmResolver). For most part this shouldn't
    affect anything but in some cases you might need slight configuration
    migration. See Migration Guide for details.

refactor(cli): use ESM in CLI

  • 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 (9e3679a)
  • api: CLI methods async and return Promise (677c73e)
  • api: Config.fromFile and Config.fromObject can return Promise (b126361)
  • api: Config.merge(..) can return Promise (cccb313)
  • api: Config.resolve() can return Promise (09159f3)
  • api: ConfigLoaders can optionally return Promise for async operation (6041581)
  • api: FileSystemConfigLoader uses esmResolver by default (dd4cfb1)
  • api: HtmlValidate.getConfigurationSchema() returns promise (f10ec1a)
  • api: allow transformers to return single source (fd126da)
  • api: new esmResolver using import(..) (available for both nodejs and browser) (81b4777), closes #​230
  • api: remove deprecated Config.init() (0bd8ab7)
  • api: remove deprecated tag:open and tag:close events (88ac65e)
  • api: replace ConfigLoader.globalConfig with ConfigLoader.getGlobalConfig() (a64935a)
  • api: resolvers may optionally return Promise for async operation (fe3c6a6)
  • api: transformers may optionally return Promise for async operation (823da19)
  • cli: cli uses esm (with esmResolver) (3e4759e)
  • config: remove deprecated configuration presets (dbf5cf4)
  • config: support .htmlvalidate.mjs configuration files (0ffd9b5), closes #​125
  • deps: require node 18 or later (d4f3bcb)
  • meta: remove deprecated property expressions (a77043c)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.54%. Comparing base (ea94829) to head (4ca0096).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #262   +/-   ##
=======================================
  Coverage   98.54%   98.54%           
=======================================
  Files           1        1           
  Lines         206      206           
=======================================
  Hits          203      203           
  Misses          3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate renovate bot force-pushed the renovate/html-validate-9.x branch 2 times, most recently from 1bf6b68 to f0b9e5a Compare December 23, 2024 20:38
@renovate renovate bot force-pushed the renovate/html-validate-9.x branch from f0b9e5a to 4ca0096 Compare December 26, 2024 00:34
@renovate renovate bot changed the title Update dependency html-validate to v9 Update dependency html-validate to v9 - autoclosed Dec 29, 2024
@renovate renovate bot closed this Dec 29, 2024
@renovate renovate bot deleted the renovate/html-validate-9.x branch December 29, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

0 participants