Update dependency hyperscript.org to v0.9.93 - #139
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.9.12→0.9.93Release Notes
bigskysoftware/_hyperscript (hyperscript.org)
v0.9.93Compare Source
Bugfixes and follow-ups from the 0.9.90/0.9.91 release:
Fixes
fetchno longer swallows a trailingasconversion when the URL is a template string, quoted string, or variable - the conversion now applies to the response, not the URL (e.g.fetch/x?q=${y}as JSON)htmx.processis a function)endFeatures
whereclause now allowed directly after aninexpressioneventsourcesendsAccept: text/event-streamforStreamconversionsv0.9.92Compare Source
v0.9.91Compare Source
Bugfixes from the 0.9.90 release:
on resize from window/on resize from document— non-Element targets now fall through to the nativeresizeevent instead of using aResizeObserverfor <duration>modifier no longer consumes a following for-in loop${}template expressions hanging the playground iframe due to leftover debug loggingnpx hyperscript.org --validate(and thebun/denoplatform scripts) crashing withERR_MODULE_NOT_FOUND. (#667)v0.9.90Compare Source
Hoooooo doggie, it's been a year of on and off work, and we finally had some time to focus on hyperscript!
This is a major change/upgrade, including restructuring the entire codebase to be much more understandable by my students
as well as anyone else interested in the langauge.
Here we go...
Breaking Changes
dist/ext/-dist/hdb.js→dist/ext/hdb.js, same for socket, template, worker, eventsource, tailwinddist/_hyperscript.jsis now IIFE (was UMD) - still works with plain<script>tags, no change needed for most usersdist/_hyperscript.esm.js- use this forimportstatementsprocessNode()deprecated - useprocess()instead (alias still works)as JSONis nowJSON.parse- replaceas JSONwithas JSONStringif you were using it to stringifyValues:JSONandValues:Formremoved - useas Values | JSONStringandas Values | FormEncodeddefaultuses nullish check instead of truthy - no longer overwrites0andfalsego to url ...deprecated - usego to /pathorgo to "url"insteadgo to the top of ...scroll form deprecated - usescroll to the top of ...insteadasynckeyword removed - had opposite meaning from JavaScript'sasync, was confusing/* */block comments removed - enables patterns like/api/*in expressions; use--or//line comments insteadtransitionrequires*style refs -transition width→transition *width;transition element #foo→transition #foo'sfetchthrows on non-2xx responses by default - adddo not throwor useas Responseto restore old behavior[@attr]bracket-style attribute access deprecated - use@attrinsteadNew Features
live,when ... changes,bindfeatures for automatic dependency tracking and UI updatesrendercommand with<template>elements,${}interpolation,#for/#if/#else/#endcontrol flowmorphcommand by @Latent22 - DOM morphing (idiomorph-based) that preserves focus, scroll, form state<template component="name">^name) - scoped to the element, inherited by descendantsopen/closecommands - dialogs, details, popovers, fullscreenfocus/blurcommands - set or remove keyboard focusempty/clearcommand - smart clearing of elements, inputs, forms, arrays, sets, mapsresetcommand - restore form or input to its default valueswapcommand - exchange values of two assignable expressionsselectcommand - select text content of inputs/textareasask/answercommands - prompt(), alert(), confirm() wrappersspeakcommand - text-to-speech via Web Speech APIbreakpointcommand in core - pauses in browser DevTools without needing hdb extensiontoggle betweenattributes -toggle between [@data-state='active'] and [@data-state='inactive']toggle <target> between <val1>, <val2> and <valN>- cycle any writable value through N values:toggle *display of #panel between 'none' and 'flex',toggle $mode between 'edit', 'preview' and 'publish'where,sorted by,mapped to,split by,joined byclipboardandselectionmagic symbolson resizesynthetic event (via ResizeObserver)on first clickmodifier - fires event handler only onceview transitioncommand - wrap DOM updates in the View Transitions APIinterceptfeature - service worker DSL for caching strategies and offline support--validateCLI tool -npx hyperscript.org --validatescans HTML files for parse errorshyperscript-maxbundle -dist/_hyperscript-max.jsincludes core + all extensions in a single filehtmx:after:processevent in addition tohtmx:loadprocess()detects when_=attribute changed (via script hash) and reinitializes automaticallycleanup()API -_hyperscript.cleanup(elt)removes all event listeners, disconnects observers, clears timers, recursively cleans children. Called automatically before reinitialization.hyperscript:before:init,hyperscript:after:init,hyperscript:before:cleanup,hyperscript:after:cleanupfired per element.before:initis cancelable viapreventDefault().data-hyperscript-poweredattribute - set on all initialized elements for fast querying and morph compatibilityconfig.logAll- whentrue, logs all hyperscript events to console (matches htmx'slogAll)|:#myForm as Values | JSONStringas JSONparses a JSON string,as JSONStringstringifies,as FormEncodedURL-encodeswhenclause onremoveandhidecommands (async-safe, matchingadd/show)scroll tocommand for scrolling elements into view (replaces scroll form ofgo)repeat ... until x endandrepeat ... while x endbottom-tested loopsignoring casemodifier on comparisonsbetweencomparison -if x is between 1 and 10starts with/ends withcomparisonsput null into @attrremoves the attribute#id,.class,<query/>) are writable via.replaceWith()setsupports array concatenation -set arr to arr + [1, 2]and/orwith proper async promise handlingllms-full.txt- LLM-friendly documentation endpoint at/llms-full.txtnode-hyperscript.js,deno-hyperscript.js,bun-hyperscript.jsfor running.hsfiles outside the browserInternal
Bug Fixes
AttributeRefnot stripping single-quoted valuesElementCollection.idgetter callingclassNameas a methodadd,remove,togglenot working with ElementCollections as targetsrepeaterroring onundefinediterator (now skips gracefully)v0.9.14Compare Source
and/orexpressionsappendcommand handles DOM elements properly~) in query selectors$=selectors-10px)v0.9.13Compare Source
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.