Releases: customerio/ciolabs
@ciolabs/framecast@0.2.0
Minor Changes
- #46
aabf68dThanks @avigoldman! - AddqueueMessagesoption towaitForReady()and publicclearQueue()method. WhenqueueMessages: true,broadcast()calls are automatically queued until the handshake completes, then flushed. On timeout, queued messages are discarded.
@ciolabs/framecast@0.1.0
Minor Changes
- #44
9d76ad4Thanks @avigoldman! - AddsignalReady()andwaitForReady()methods for built-in iframe ready handshake support. This removes the need for consumers to build their own ready handshake pattern when using srcdoc iframes.
@ciolabs/html-mod@1.0.1
Patch Changes
- #41
c19865bThanks @avigoldman! - Update README to reflect that the auto-flush implementation is now the default. Remove outdatedflush()andisFlushed()docs, add element reference stability examples, and add migration notes for users upgrading from older versions.
@ciolabs/html-process-conditional-comments@0.0.4
Patch Changes
-
#39
f240699Thanks @avigoldman! - Bundle ranges-apply into CJS distranges-applyand its dependencies (ranges-merge,tiny-invariant) are ESM-only packages. Without bundling them, CJS consumers (like server-procedures in parcel) can'trequire()the ciolabs packages. AddednoExternalto tsup configs to inline these deps into the dist output.
@ciolabs/html-process-conditional-comments@0.0.3
Patch Changes
-
#37
246e876Thanks @avigoldman! - Fix formatting parity with parcel-standalone's email-prettyReplaced
MagicStringwithranges-applyin bothhtml-preserve-comment-whitespaceandhtml-email-formatterto match the string manipulation approach used by parcel-standalone.ranges-applycollects all edits as range tuples and applies them atomically, correctly handling overlapping and adjacent whitespace regions between nearby HTML comments.MagicStringcould produce unexpected results in these cases.Pinned
js-beautifyto~1.13.4to match the version used by parcel-standalone. The newerjs-beautify@1.15.xchanged how inline content with HTML comments is formatted, which caused whitespace around conditional comments to be collapsed instead of preserved.Formatting differences
Whitespace around conditional comments is now preserved:
Before (with
js-beautify@1.15.x+MagicString):<!-- Input --> <div><!--[if MAC]> hello <![endif]--></div> <!-- Output — whitespace collapsed --> <div><!--[if MAC]> hello <![endif]--></div>
After (with
js-beautify@1.13.x+ranges-apply):<!-- Input --> <div><!--[if MAC]> hello <![endif]--></div> <!-- Output — whitespace preserved --> <div><!--[if MAC]> hello <![endif]--></div>
Multi-line conditional comments and complex documents are unaffected — the alignment and indentation behavior remains the same:
<!-- Input --> <html style=""> <body class=""> <!--[if mso]><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td style="background-color: rgb(255, 255, 255);"><![endif]--> <!--[if mso]></td></tr></table><![endif]--> </body> </html> <!-- Output (same before and after) --> <html style=""> <body class=""> <!--[if mso]><table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td style="background-color: rgb(255, 255, 255);"><![endif]--> <!--[if mso]></td> </tr> </table><![endif]--> </body> </html>
@ciolabs/html-preserve-comment-whitespace@0.0.3
Patch Changes
-
#39
f240699Thanks @avigoldman! - Bundle ranges-apply into CJS distranges-applyand its dependencies (ranges-merge,tiny-invariant) are ESM-only packages. Without bundling them, CJS consumers (like server-procedures in parcel) can'trequire()the ciolabs packages. AddednoExternalto tsup configs to inline these deps into the dist output.
@ciolabs/html-preserve-comment-whitespace@0.0.2
Patch Changes
-
#37
246e876Thanks @avigoldman! - Fix formatting parity with parcel-standalone's email-prettyReplaced
MagicStringwithranges-applyin bothhtml-preserve-comment-whitespaceandhtml-email-formatterto match the string manipulation approach used by parcel-standalone.ranges-applycollects all edits as range tuples and applies them atomically, correctly handling overlapping and adjacent whitespace regions between nearby HTML comments.MagicStringcould produce unexpected results in these cases.Pinned
js-beautifyto~1.13.4to match the version used by parcel-standalone. The newerjs-beautify@1.15.xchanged how inline content with HTML comments is formatted, which caused whitespace around conditional comments to be collapsed instead of preserved.Formatting differences
Whitespace around conditional comments is now preserved:
Before (with
js-beautify@1.15.x+MagicString):<!-- Input --> <div><!--[if MAC]> hello <![endif]--></div> <!-- Output — whitespace collapsed --> <div><!--[if MAC]> hello <![endif]--></div>
After (with
js-beautify@1.13.x+ranges-apply):<!-- Input --> <div><!--[if MAC]> hello <![endif]--></div> <!-- Output — whitespace preserved --> <div><!--[if MAC]> hello <![endif]--></div>
Multi-line conditional comments and complex documents are unaffected — the alignment and indentation behavior remains the same:
<!-- Input --> <html style=""> <body class=""> <!--[if mso]><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td style="background-color: rgb(255, 255, 255);"><![endif]--> <!--[if mso]></td></tr></table><![endif]--> </body> </html> <!-- Output (same before and after) --> <html style=""> <body class=""> <!--[if mso]><table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td style="background-color: rgb(255, 255, 255);"><![endif]--> <!--[if mso]></td> </tr> </table><![endif]--> </body> </html>
@ciolabs/html-mod@1.0.0
Major Changes
-
#35
4e6a04aThanks @avigoldman! - Promote experimental auto-flush implementation to be the default.Breaking changes
flush()andisFlushed()removed — the AST is always kept in sync automatically__ensureFlushed()removed__flushedproperty removedgenerateMap()/generateDecodedMap()removed (source map generation via MagicString)trim(charType)/trimStart(charType)/trimEnd(charType)no longer accept a char type parameter__s(MagicString instance) no longer exists — use__sourceand__overwrite()insteadremoveAttribute()now cleans up extra whitespace instead of leaving gapsmagic-stringis no longer a dependency
Migration
If you were importing from
@ciolabs/html-mod/experimental, you can now import from@ciolabs/html-moddirectly. The./experimentalexport still works but is deprecated.
@ciolabs/html-email-formatter@0.0.5
Patch Changes
-
#39
f240699Thanks @avigoldman! - Bundle ranges-apply into CJS distranges-applyand its dependencies (ranges-merge,tiny-invariant) are ESM-only packages. Without bundling them, CJS consumers (like server-procedures in parcel) can'trequire()the ciolabs packages. AddednoExternalto tsup configs to inline these deps into the dist output. -
Updated dependencies [
f240699]:- @ciolabs/html-preserve-comment-whitespace@0.0.3
@ciolabs/html-email-formatter@0.0.4
Patch Changes
-
#37
246e876Thanks @avigoldman! - Fix formatting parity with parcel-standalone's email-prettyReplaced
MagicStringwithranges-applyin bothhtml-preserve-comment-whitespaceandhtml-email-formatterto match the string manipulation approach used by parcel-standalone.ranges-applycollects all edits as range tuples and applies them atomically, correctly handling overlapping and adjacent whitespace regions between nearby HTML comments.MagicStringcould produce unexpected results in these cases.Pinned
js-beautifyto~1.13.4to match the version used by parcel-standalone. The newerjs-beautify@1.15.xchanged how inline content with HTML comments is formatted, which caused whitespace around conditional comments to be collapsed instead of preserved.Formatting differences
Whitespace around conditional comments is now preserved:
Before (with
js-beautify@1.15.x+MagicString):<!-- Input --> <div><!--[if MAC]> hello <![endif]--></div> <!-- Output — whitespace collapsed --> <div><!--[if MAC]> hello <![endif]--></div>
After (with
js-beautify@1.13.x+ranges-apply):<!-- Input --> <div><!--[if MAC]> hello <![endif]--></div> <!-- Output — whitespace preserved --> <div><!--[if MAC]> hello <![endif]--></div>
Multi-line conditional comments and complex documents are unaffected — the alignment and indentation behavior remains the same:
<!-- Input --> <html style=""> <body class=""> <!--[if mso]><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td style="background-color: rgb(255, 255, 255);"><![endif]--> <!--[if mso]></td></tr></table><![endif]--> </body> </html> <!-- Output (same before and after) --> <html style=""> <body class=""> <!--[if mso]><table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td style="background-color: rgb(255, 255, 255);"><![endif]--> <!--[if mso]></td> </tr> </table><![endif]--> </body> </html>
-
Updated dependencies [
246e876]:- @ciolabs/html-preserve-comment-whitespace@0.0.2