Skip to content

Extend API to allow string-checking, improve link-checking, and optimize performance#1

Merged
j9t merged 17 commits into
mainfrom
minify-string
May 13, 2026
Merged

Extend API to allow string-checking, improve link-checking, and optimize performance#1
j9t merged 17 commits into
mainfrom
minify-string

Conversation

@j9t
Copy link
Copy Markdown
Owner

@j9t j9t commented May 13, 2026

Summary by CodeRabbit

  • New Features

    • Added string-based APIs for validating HTML, checking links, and minifying content; package version bumped to 1.3.0-beta
  • Enhancements

    • Link detection extended to unquoted attributes
    • Link-checking adds onStart/onProgress hooks; string inputs report zero file-count errors
    • Branding text normalized to "hihtml"
  • Performance Improvements

    • Parallel directory traversal, cached validator/minifier initialization, precompiled URL extraction, faster ignore-list checks
  • Documentation

    • README updated with examples/options for new string APIs
  • Tests

    • Added tests for string APIs, URL extraction, and minification behavior

Review Change Stack

j9t added 3 commits May 13, 2026 13:36
…ation

Introduce `checkCodeString`, `checkLinksString`, and `minifyString` to the API, enabling string-based pipelines for validation, link checking, and minification. Updated documentation, type definitions, and tests to support the new methods.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Enhanced link-checking functionality to detect URLs in unquoted attributes such as `href=https://example.com`. Updated regex, tests, and documentation to reflect this improvement.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Optimized directory traversal by parallelizing subdirectory handling. Cached HtmlValidate and HTML Minifier Next instances per preset to reduce redundant initialization. Enhanced link-checker performance with precompiled regexes and efficient ignore-list processing.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Release PR adding string-based programmatic APIs (checkCodeString, checkLinksString, minifyString), refining URL extraction and ignore-list preprocessing, caching HtmlValidate and minifier resolution per-preset, and parallelizing directory traversal.

Changes

String APIs and Core Optimizations

Layer / File(s) Summary
String-based code validation
src/adapters/check-code.js, src/index.d.ts, bin/hihtml.test.js, README.md
checkCodeString validates HTML strings by routing through checkCode with a synthetic file path; types, README docs, and tests verify result shape and ignore-list propagation.
String-based link checking with URL extraction improvements
src/adapters/check-links.js, src/index.d.ts, bin/hihtml.test.js, README.md
Module-level regexes and extractUrls strip comments/script/style, normalize URLs (skip malformed, strip fragments), and detect URLs in unquoted attributes; IgnoreList precomputes hostnames and URL prefixes; checkLinksString added and tests cover attribute forms and extraction edge cases.
String-based minification with per-preset caching
src/adapters/minify.js, src/index.d.ts, bin/hihtml.test.js, README.md
Added loadMinifier helper that caches dynamic import and preset resolution per preset; minifyString added and minify refactored to use the helper. Types, README, and tests added for string minification and options.
HtmlValidate per-preset caching
src/adapters/validate.js
Introduced validatorCache and getValidator(preset) that memoize HtmlValidate initialization promises; validate reuses cached validator instances.
Concurrent directory traversal
src/lib/files.js
walk() now batches recursive subdirectory calls into promises and awaits them with Promise.all, enabling concurrent traversal while keeping existing filtering logic.
Public exports and documentation
src/index.js, src/index.d.ts, src/index.types.ts, package.json, CHANGELOG.md, README.md, bin/hihtml.test.js, src/lib/config.js, src/lib/output.js
Entry points re-export the three new string APIs; type declarations renamed to Result*/HihtmlConfig and include string API signatures; README and CHANGELOG updated with examples and API docs; package version bumped to 1.3.0-beta and keywords updated; JSDoc parameter types updated to new Result* names; tests updated to import and exercise new functions.

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the three main objectives of the changeset: adding string-based API functions, improving link-checking with URL detection in unquoted attributes and ignore-list optimization, and implementing performance optimizations like parallel directory traversal and caching.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch minify-string

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/adapters/validate.js (2)

36-55: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Race condition in validator cache population.

When multiple validate() calls with the same preset execute concurrently before the cache is populated, each will trigger getValidator(preset) simultaneously. Since validatorCache.has(preset) returns false for all, each call will dynamically import html-validate, construct a new HtmlValidate instance, and race to store it in the cache. The last write wins, causing wasted initialization work and potentially leaving orphaned validator instances.

🔒 Proposed fix using promise caching

Cache the promise itself instead of the resolved validator to ensure only one initialization occurs per preset:

-/** `@type` {Map<string, import('html-validate').HtmlValidate>} */
+/** `@type` {Map<string, Promise<import('html-validate').HtmlValidate>>} */
 const validatorCache = new Map();

 /**
  * Return a cached HtmlValidate instance for the given preset, creating one if needed.
  * `@param` {string} preset
  * `@returns` {Promise<import('html-validate').HtmlValidate>}
  */
 async function getValidator(preset) {
-  if (validatorCache.has(preset)) return /** `@type` {import('html-validate').HtmlValidate} */ (validatorCache.get(preset));
+  if (validatorCache.has(preset)) return validatorCache.get(preset);
+
+  const promise = (async () => {
+    let HtmlValidate;
+    try {
+      ({ HtmlValidate } = await import('html-validate'));
+    } catch {
+      throw new Error('Could not load HTML-validate. Ensure it is installed and check for breaking API changes.');
+    }

-  let HtmlValidate;
-  try {
-    ({ HtmlValidate } = await import('html-validate'));
-  } catch {
-    throw new Error('Could not load HTML-validate. Ensure it is installed and check for breaking API changes.');
-  }
-
-  let validator;
-  try {
-    validator = new HtmlValidate({ extends: [`html-validate:${preset}`] });
-  } catch (err) {
-    throw new Error(`HTML-validate initialization failed—the package may have breaking changes: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
-  }
+    let validator;
+    try {
+      validator = new HtmlValidate({ extends: [`html-validate:${preset}`] });
+    } catch (err) {
+      throw new Error(`HTML-validate initialization failed—the package may have breaking changes: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
+    }
+    return validator;
+  })();

-  validatorCache.set(preset, validator);
-  return validator;
+  validatorCache.set(preset, promise);
+  return promise;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/adapters/validate.js` around lines 36 - 55, The validator cache has a
race because getValidator checks validatorCache.has(preset) and then performs
async initialization; change caching to store the initialization Promise itself
so concurrent callers share it: inside getValidator, when no cache entry exists,
create and set an init promise that imports 'html-validate', constructs new
HtmlValidate({ extends: [`html-validate:${preset}`] }) and resolves to the
instance, then await that cached promise and return the instance; ensure you
handle rejection by removing the cached promise on error (so future calls can
retry). Reference: getValidator, validatorCache, HtmlValidate.

81-81: ⚠️ Potential issue | 🟠 Major

Address thread safety of cached HtmlValidate instance in concurrent validation.

The cached HtmlValidate instance (line 65, reused at line 81) is shared across concurrent validator.validateString() calls within runWithConcurrency. The official html-validate documentation does not guarantee thread-safety or document whether validateString() is safe to call concurrently on the same instance. If the validator maintains mutable state during validation, concurrent calls can race and produce incorrect results.

Consider either: (a) creating one HtmlValidate instance per concurrent worker instead of caching a single shared instance, or (b) serializing access to the validator with an application-level mutex or queue.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/adapters/validate.js` at line 81, The cached HtmlValidate instance is
reused concurrently by runWithConcurrency causing potential race conditions when
calling validator.validateString; either instantiate a fresh HtmlValidate per
worker (move HtmlValidate creation into the function run by runWithConcurrency
so each concurrent task gets its own validator instance) or serialize calls to
validator.validateString by guarding that call with an application-level
mutex/semaphore/queue so only one validateString executes at a time; update the
code paths that reference the cached instance (the variable holding the
HtmlValidate and the validator.validateString invocation) to follow the chosen
approach.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 159-170: The checkLinks documentation is missing the callback
options present in the implementation; update the README `checkLinks` section so
it lists `options.onProgress` and `options.onStart` (same as `checkLinksString`)
with their brief descriptions ("Called after each URL is checked" and "Called
once with the total number of URLs to check") to match the `checkLinks`
implementation and ensure consistency with `checkLinksString`.

In `@src/adapters/check-links.js`:
- Around line 15-16: The RE_SRCSET regex currently allows mismatched quotes;
replace RE_SRCSET with a pattern that enforces matching quotes (e.g., use an
alternation that captures either double-quoted or single-quoted values) and
update the extraction logic that reads RE_SRCSET matches to check both capture
groups (the double-quote group and the single-quote group) when retrieving the
srcset value; specifically modify the symbol RE_SRCSET and the code that
iterates/execs its matches so it reads match[1] || match[2] instead of assuming
a single capture.

In `@src/adapters/validate.js`:
- Around line 28-29: The validatorCache Map is unbounded and can grow
indefinitely; replace it with or wrap it in an LRU-capable structure (e.g.,
implement a simple LRU by tracking usage order or use an LRU cache lib) and
enforce a MAX_VALIDATOR_CACHE_SIZE constant so that when adding a new
HtmlValidate instance via validatorCache (the Map currently declared as
validatorCache) you evict the least-recently-used entry once size >
MAX_VALIDATOR_CACHE_SIZE; update all places that read/write validatorCache to
mark entries as recently used (get/set) and ensure HtmlValidate instances are
properly disposed if needed, or alternatively add a clear documented note where
validatorCache is declared that it is intentionally unbounded for small fixed
preset sets.

In `@src/lib/files.js`:
- Around line 72-86: The parallelized walk() calls mutate the shared results
array concurrently causing a race; change walk to use a local array (e.g.,
localResults) for its own findings, push into that instead of the shared
results, and have walk return its localResults; in the caller where subdirs are
awaited, await Promise.all(subdirs) and concatenate/merge the returned arrays
into the shared results (or replace the shared results usage by collecting and
returning the aggregated array) so no concurrent push() happens on the same
array; update references to results and the walk() return type accordingly.

---

Outside diff comments:
In `@src/adapters/validate.js`:
- Around line 36-55: The validator cache has a race because getValidator checks
validatorCache.has(preset) and then performs async initialization; change
caching to store the initialization Promise itself so concurrent callers share
it: inside getValidator, when no cache entry exists, create and set an init
promise that imports 'html-validate', constructs new HtmlValidate({ extends:
[`html-validate:${preset}`] }) and resolves to the instance, then await that
cached promise and return the instance; ensure you handle rejection by removing
the cached promise on error (so future calls can retry). Reference:
getValidator, validatorCache, HtmlValidate.
- Line 81: The cached HtmlValidate instance is reused concurrently by
runWithConcurrency causing potential race conditions when calling
validator.validateString; either instantiate a fresh HtmlValidate per worker
(move HtmlValidate creation into the function run by runWithConcurrency so each
concurrent task gets its own validator instance) or serialize calls to
validator.validateString by guarding that call with an application-level
mutex/semaphore/queue so only one validateString executes at a time; update the
code paths that reference the cached instance (the variable holding the
HtmlValidate and the validator.validateString invocation) to follow the chosen
approach.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 44d64aa9-4b38-4ccb-863f-4d06827d0633

📥 Commits

Reviewing files that changed from the base of the PR and between 0b864ea and 1cd3e6a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • CHANGELOG.md
  • README.md
  • bin/hihtml.test.js
  • package.json
  • src/adapters/check-code.js
  • src/adapters/check-links.js
  • src/adapters/minify.js
  • src/adapters/validate.js
  • src/index.d.ts
  • src/index.js
  • src/index.types.ts
  • src/lib/files.js

Comment thread README.md
Comment thread src/adapters/check-links.js Outdated
Comment thread src/adapters/validate.js Outdated
Comment thread src/lib/files.js
j9t added 5 commits May 13, 2026 14:14
Updated validator caching to store promises, ensuring concurrent callers share initialization and preventing redundant instantiation. Added error handling to remove failed promises from the cache for consistency.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Updated the `RE_SRCSET` regex to handle alternatives with consistent capture groups. Adjusted the parsing logic to ensure compatibility with the updated regex, preventing potential parsing errors.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Added a comment explaining the unbounded nature of `validatorCache`, noting that it will only contain a small, fixed number of entries due to the limited set of presets exposed by `html-validate`. This enhances code readability and maintainability.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/adapters/check-links.js`:
- Around line 15-16: The attribute regexes RE_ATTR and RE_SRCSET don't allow
spaces around the '=' so attributes like `href = "..."` or `srcset = '...'` are
missed; update both patterns to permit optional whitespace by inserting \s*
between the attribute group and the '=' and also between '=' and the value
capture (i.e., change from (?:href|src|action)=... to
(?:href|src|action)\s*=\s*... and likewise for srcset) so the expressions match
attributes with or without spaces around '='.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f6b96888-5b1b-4555-b6e8-52e61573171f

📥 Commits

Reviewing files that changed from the base of the PR and between 1cd3e6a and 1b08432.

📒 Files selected for processing (4)
  • README.md
  • package.json
  • src/adapters/check-links.js
  • src/adapters/validate.js

Comment thread src/adapters/check-links.js Outdated
Updated the `RE_ATTR` and `RE_SRCSET` regexes to allow spaces around the `=` character for attributes like `href`, `src`, and `srcset`. Added corresponding test cases to ensure proper functionality and accuracy.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/adapters/check-links.js`:
- Around line 176-180: The ignore entries are stored verbatim so hostnames like
"EXAMPLE.COM" or values with surrounding whitespace won't match URL.hostname
(which is lowercased); update buildIgnoreList to normalize entries by trimming
whitespace and lowercasing hostnames and prefixes (and for prefixes also
normalize and possibly remove redundant trailing slashes) before putting them
into hostnames Set and prefixes array, and apply the same normalization in the
corresponding isIgnored/usage logic around the second block (lines 189-198) so
comparisons use the same trimmed, lowercased form.
- Around line 15-16: extractUrls currently uses RE_ATTR/RE_SRCSET to regex-scan
the raw HTML string (via matchAll), which picks up href/src/action inside
comments, <script> and <style> and causes false positives; update extractUrls to
parse the HTML into a DOM (or at minimum remove HTML comments and all
<script>/<style> content) before extracting attributes so only real markup nodes
are inspected; specifically, replace the raw-string matchAll approach in
extractUrls (and the logic around RE_ATTR/RE_SRCSET and the countChecked
handling in the block around lines 54–60) with a DOM traversal that reads
href/src/action/srcset attributes from element nodes (or strip
comments/scripts/styles first) and then parse srcset tokens, ensuring commented
or script/style text is ignored.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4331e872-38ad-408e-80e2-7df05308c5a4

📥 Commits

Reviewing files that changed from the base of the PR and between 1b08432 and ed56b7b.

📒 Files selected for processing (2)
  • bin/hihtml.test.js
  • src/adapters/check-links.js

Comment thread src/adapters/check-links.js
Comment thread src/adapters/check-links.js
j9t added 5 commits May 13, 2026 14:53
Updated URL extraction logic to disregard URLs inside HTML comments, `<script>` and `<style>` elements while still processing `<script src>`. Enhanced ignore list handling by normalizing entries for case-insensitivity and trimming trailing slashes. Added corresponding test cases to validate these improvements.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Renamed type definitions across adapters for clearer naming and alignment with the overall naming conventions. This refactor ensures consistency and improves code readability across the project.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/index.d.ts (1)

4-79: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add backward-compatible type aliases for renamed exports.

The public type exports have been renamed without compatibility aliases:

  • MessageValidation (was ValidationMessage)
  • ResultCodeValidation (was ValidationResult)
  • ResultCode (was CheckResult)
  • ResultLinks (was LinkCheckResult)
  • ResultMinification (was MinificationResult)
  • HihtmlConfig (was HiHTMLConfig)

Consumers importing the old names will experience breaking changes. Add type aliases for at least one release cycle to ease migration:

+// Backward-compatible aliases (deprecated)
+export type ValidationMessage = MessageValidation;
+export type ValidationResult = ResultCodeValidation;
+export type DeprecationResult = ResultCodeDeprecation;
+export type CheckResult = ResultCode;
+export type LinkCheckResult = ResultLinks;
+export type MinificationResult = ResultMinification;
+export type HiHTMLConfig = HihtmlConfig;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/index.d.ts` around lines 4 - 79, The public type names were renamed but
no backward-compatible aliases were provided; add exported type aliases in this
declaration file mapping the old names to the new ones (e.g. export type
ValidationMessage = MessageValidation; export type ValidationResult =
ResultCodeValidation; export type CheckResult = ResultCode; export type
LinkCheckResult = ResultLinks; export type MinificationResult =
ResultMinification; export type HiHTMLConfig = HihtmlConfig) so consumers
importing the legacy names continue to work for one release cycle—place these
aliases alongside the existing interfaces in src/index.d.ts.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/adapters/check-links.js`:
- Around line 185-200: The prefix matching in isIgnored is too broad because it
compares the full lowercased URL string with prefix strings using startsWith;
update isIgnored to parse the URL (new URL(urlLower)) and match prefixes against
the URL pathname for path-only prefixes (ensure prefixes that start with '/' are
normalized and compared to parsed.pathname) and for prefixes that include a
hostname/origin (e.g., "https://example.com/foo") compare against parsed.origin
+ parsed.pathname or parsed.href as appropriate; keep existing hostnames Set
handling unchanged and normalize trailing slashes before comparison to avoid
false matches like "example.com.evil" or "/docs2".

In `@src/adapters/minify.js`:
- Around line 29-46: The cache is populated only after the async import and
preset resolution in loadMinifier, allowing concurrent callers to duplicate
work; fix by storing a placeholder Promise result in minifierCache immediately
(e.g., set minifierCache.set(preset, initPromise) before awaiting
import('html-minifier-next')) so subsequent callers await the same Promise, and
then resolve that Promise with the final { htmlMinify, presetOptions } (using
the existing getPreset/htmlMinify logic) or replace the placeholder with the
resolved value to avoid duplicate initializations.

---

Outside diff comments:
In `@src/index.d.ts`:
- Around line 4-79: The public type names were renamed but no
backward-compatible aliases were provided; add exported type aliases in this
declaration file mapping the old names to the new ones (e.g. export type
ValidationMessage = MessageValidation; export type ValidationResult =
ResultCodeValidation; export type CheckResult = ResultCode; export type
LinkCheckResult = ResultLinks; export type MinificationResult =
ResultMinification; export type HiHTMLConfig = HihtmlConfig) so consumers
importing the legacy names continue to work for one release cycle—place these
aliases alongside the existing interfaces in src/index.d.ts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cda635d5-3db8-4c28-9329-4483839f004e

📥 Commits

Reviewing files that changed from the base of the PR and between 4eebbdd and ba68e25.

📒 Files selected for processing (12)
  • CHANGELOG.md
  • README.md
  • SECURITY.md
  • bin/hihtml.test.js
  • src/adapters/check-code.js
  • src/adapters/check-links.js
  • src/adapters/minify.js
  • src/adapters/validate.js
  • src/index.d.ts
  • src/index.types.ts
  • src/lib/config.js
  • src/lib/output.js

Comment thread src/adapters/check-links.js
Comment thread src/adapters/minify.js
j9t added 3 commits May 13, 2026 18:36
Updated `minifierCache` to store asynchronous promises for lazy initialization of minifiers. This improves efficiency and ensures proper async handling during minifier loading.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Updated the `isIgnored` function to enhance URL parsing and prefix matching by using `new URL` consistently. Fixed edge cases related to path handling, ensuring proper comparison for ignored URLs.

(This commit message was AI-generated.)

Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
@j9t j9t merged commit f5481f2 into main May 13, 2026
8 checks passed
@j9t j9t deleted the minify-string branch May 13, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant