Skip to content

chore(Dom2Image): bump version 10.0.1#709

Merged
ArgoZhang merged 2 commits intomasterfrom
dev-dom2image
Nov 19, 2025
Merged

chore(Dom2Image): bump version 10.0.1#709
ArgoZhang merged 2 commits intomasterfrom
dev-dom2image

Conversation

@ArgoZhang
Copy link
Member

Link issues

fixes #708

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Copilot AI review requested due to automatic review settings November 19, 2025 06:21
@bb-auto bb-auto bot added the chore label Nov 19, 2025
@bb-auto bb-auto bot added this to the v9.2.0 milestone Nov 19, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @ArgoZhang, your pull request is larger than the review limit of 150000 diff characters

@ArgoZhang ArgoZhang merged commit e2f3a63 into master Nov 19, 2025
3 checks passed
@ArgoZhang ArgoZhang deleted the dev-dom2image branch November 19, 2025 06:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR bumps the version of BootstrapBlazor.Dom2Image from 10.0.0 to 10.0.1, replacing the minified snapdom library with its unminified source version.

Key Changes

  • Version incremented from 10.0.0 to 10.0.1 in the project file
  • Replaced minified library (snapdom.min.mjs) with unminified source (snapdom.mjs, 5257 lines)
  • Updated import statement to reference the unminified version

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 6 comments.

File Description
BootstrapBlazor.Dom2Image.csproj Version bumped to 10.0.1
wwwroot/dom2image.js Import changed from minified to unminified snapdom library
wwwroot/lib/snapdom.mjs New unminified SnapDOM v2.0.0 library added (5257 lines)
wwwroot/lib/snapdom.min.mjs Minified version removed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -1,4 +1,4 @@
import { snapdom } from './lib/snapdom.min.mjs'
import { snapdom } from './lib/snapdom.mjs'
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The import statement is now pointing to the unminified version snapdom.mjs instead of snapdom.min.mjs. This will significantly increase the bundle size and impact load performance. For production use, it's recommended to use the minified version unless debugging is specifically needed.

Consider either:

  1. Reverting to ./lib/snapdom.min.mjs for production builds
  2. Using conditional imports based on build configuration (debug vs release)
Suggested change
import { snapdom } from './lib/snapdom.mjs'
import { snapdom } from './lib/snapdom.min.mjs'

Copilot uses AI. Check for mistakes.
try {
const required = collectUsedFontVariants(root);
const usedCodepoints = collectUsedCodepoints(root);
const safari = typeof isSafari === "function" ? isSafari() : !!isSafari;
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

This guard always evaluates to true.

Suggested change
const safari = typeof isSafari === "function" ? isSafari() : !!isSafari;
const safari = isSafari();

Copilot uses AI. Check for mistakes.
const cs = getComputedStyle(el);
if (cs.display === "list-item" && isLi(el)) {
const p = el.parentElement;
let idx = 1;
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The initial value of idx is unused, since it is always overwritten.

Suggested change
let idx = 1;
let idx;

Copilot uses AI. Check for mistakes.
};
const optW = coerceNum(state.options.width);
const optH = coerceNum(state.options.height);
let w = w0, h = h0;
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The initial value of w is unused, since it is always overwritten.

Suggested change
let w = w0, h = h0;
let w, h;

Copilot uses AI. Check for mistakes.
};
const optW = coerceNum(state.options.width);
const optH = coerceNum(state.options.height);
let w = w0, h = h0;
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The initial value of h is unused, since it is always overwritten.

Suggested change
let w = w0, h = h0;
let w, h;

Copilot uses AI. Check for mistakes.
console.warn("inlineExternal defs or symbol failed:", e);
}
try {
clone = await deepClone(element, sessionCache, options, element);
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

Superfluous argument passed to function deepClone.

Suggested change
clone = await deepClone(element, sessionCache, options, element);
clone = await deepClone(element, sessionCache, options);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(Dom2Image): bump version 10.0.1

1 participant