Skip to content

Update dependencies#46

Merged
danielsitek merged 5 commits intomasterfrom
feature/ds-update-dependencies
Dec 5, 2025
Merged

Update dependencies#46
danielsitek merged 5 commits intomasterfrom
feature/ds-update-dependencies

Conversation

@danielsitek
Copy link
Copy Markdown
Owner

@danielsitek danielsitek commented Dec 5, 2025

This pull request updates dependencies, improves compatibility, and refines functionality in both the main project and the local test framework. The most important changes are grouped below:

Dependency and Compatibility Updates:

  • Updated html-minifier to html-minifier-next and changed all related imports and type definitions in package.json, src/minify/minifyContents.ts, and devDependencies to improve HTML minification performance and compatibility. [1] [2]
  • Upgraded multiple dev dependencies, including typescript (to v5.9.3 in the main project and v3.9.10 in the test framework), @types/node, and @types/twig for broader compatibility and improved type safety. Also raised the minimum required Node.js version to 18. [1] [2]

Functionality Improvements:

  • Refactored minifyHtml in src/minify/minifyContents.ts to be asynchronous and use the new minify API from html-minifier-next, ensuring better performance and future-proofing. [1] [2]
  • Enhanced the findAndRunTests function in the simple test framework to skip node_modules directories, preventing unnecessary traversal and speeding up test discovery.

Type Safety Enhancement:

  • Improved the type definition of iterateKeys in src/core/utils/iterateKeys.ts to ensure that only objects are accepted, increasing type safety and preventing runtime errors.

Summary by CodeRabbit

  • Chores
    • Updated dependencies: TypeScript to 5.9.3, Twig to 1.17.1, and type definitions across the project.
    • Increased minimum Node.js requirement to 18.0.0.
    • Replaced html-minifier with html-minifier-next for improved HTML processing.
    • Updated development dependencies in test framework.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 5, 2025

Walkthrough

This pull request updates development and production dependencies across the project, introduces a node_modules guard in the test framework's directory traversal, strengthens a generic type constraint, and migrates HTML minification from html-minifier to html-minifier-next with an async conversion.

Changes

Cohort / File(s) Summary
Local Framework Dependency Updates
local_modules/simple-test-framework/package.json
Updated dev dependencies: ts-node 10→10.9.2; typescript 3→3.9.10
Directory Traversal Optimization
local_modules/simple-test-framework/src/index.ts
Added guard to skip node_modules directories during recursive directory traversal in findAndRunTests
Project-wide Dependency and Engine Updates
package.json
Replaced html-minifier (4) with html-minifier-next (4.6.1); updated twig 1→1.17.1; updated type definitions (@types/html-minifier→@types/html-minifier-next 2.1.1, @types/node 14→24.10.1, @types/twig 1→1.12.17); upgraded TypeScript 3→5.9.3; updated node engines >=14.0.0→>=18.0.0
Type System Enhancement
src/core/utils/iterateKeys.ts
Strengthened generic type constraint: <T><T extends object>
HTML Minification Library Migration
src/minify/minifyContents.ts
Migrated from html-minifier to html-minifier-next; converted minifyHtml from synchronous to async function; added removeScriptTypeAttributes: false option; updated callers to await async minification

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Areas requiring attention:
    • package.json merge potential: verify no version conflicts and that node >=18.0.0 requirement aligns with CI/CD and deployment targets
    • src/minify/minifyContents.ts: confirm all callers properly await the now-asynchronous minifyHtml function and validate that removeScriptTypeAttributes: false preserves intended behavior
    • local_modules/simple-test-framework/src/index.ts: verify the node_modules guard doesn't unintentionally skip legitimate test directories

Poem

🐰 Dependencies leap, versions climb high,
node_modules bid farewell (goodbye!),
Types grow stronger with constraints refined,
HTML minifies async, a speedier find.
Hopping toward eighteen, the future's in sight! 🚀

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update dependencies' accurately reflects the primary focus of the changeset. Multiple dependency updates are the core changes across package.json files and related implementations.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/ds-update-dependencies

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: 0

🧹 Nitpick comments (2)
local_modules/simple-test-framework/package.json (1)

13-15: Dev TypeScript tooling bumps look fine

Updating ts-node and typescript here is reasonable for this local-only package; no issues from a code-review perspective. If you ever want to simplify tooling, you could align this package’s TypeScript version with the root one to avoid maintaining two versions, but that’s optional.

Please just confirm your test suite still runs cleanly with this combo in your local environment.

src/minify/minifyContents.ts (1)

20-22: Redundant await in return

Since minifyContents is already async and minifyHtml returns a Promise<string>, you can simplify this branch to return minifyHtml(contents); without changing behaviour.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 43fb349 and 1a5db76.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • local_modules/simple-test-framework/package.json (1 hunks)
  • local_modules/simple-test-framework/src/index.ts (1 hunks)
  • package.json (1 hunks)
  • src/core/utils/iterateKeys.ts (1 hunks)
  • src/minify/minifyContents.ts (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (4)
local_modules/simple-test-framework/src/index.ts (1)

125-127: node_modules guard in recursive test discovery looks good

Skipping node_modules during recursion is a solid safeguard and should noticeably improve performance and avoid spurious test files under dependencies.

src/minify/minifyContents.ts (1)

1-12: html-minifier-next migration and options look reasonable

The switch to html-minifier-next with an async minifyHtml wrapper and the current option set looks consistent. The explicit removeScriptTypeAttributes: false will preserve script type attributes, which may differ from prior defaults, so it’s worth confirming this matches the behaviour you expect.

Please double-check against the html-minifier-next docs/release notes that these options mirror (or intentionally adjust) your previous minification behaviour.

package.json (1)

58-60: Dependency and Node engine updates align with code changes

The move to html-minifier-next, the Twig and TypeScript/typing bumps, and raising engines.node to >=18.0.0 all look consistent with the rest of the PR (async minification, newer TS, etc.). No obvious issues from a code perspective.

Please run your test/build pipeline under Node 18+ to confirm there are no subtle behaviour changes from the new html-minifier-next, twig, or the updated @types/node/TypeScript combo.

Also applies to: 62-64, 66-66, 69-69

src/core/utils/iterateKeys.ts (1)

1-9: Stronger generic constraint is safe across all call sites

Confining T to extends object aligns the type system with the runtime assumption (Object.keys(data)) and improves compile-time safety. All call sites in the codebase already pass objects, so this is not a breaking change.

@danielsitek danielsitek merged commit 6fadcb1 into master Dec 5, 2025
11 checks passed
@danielsitek danielsitek deleted the feature/ds-update-dependencies branch December 5, 2025 10:24
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