Skip to content

fix(deps): update dependency htmx.org to v2 - autoclosed

Renovate Bot requested to merge renovate/htmx.org-2.x into main

This MR contains the following updates:

Package Change Age Adoption Passing Confidence
htmx.org (source) ^1.9.2 -> ^2.0.0 age adoption passing confidence

Release Notes

bigskysoftware/htmx (htmx.org)

v2.0.1

Compare Source

  • Make the /dist/htmx.esm.js file the main file in package.json to make installing htmx smoother
  • Update htmx.d.ts & include it in the distribution
  • A fix to avoid removing text-only templates on htmx cleanup
  • A fix for outerHTML swapping of the body tag
  • Many docs fixes

v2.0.0

Compare Source

  • Removed extensions and moved to their own repos linked off of https://extensions.htmx.org
  • The website now supports dark mode! (Thanks @​pokonski!)
  • The older, deprecated SSE & WS attributes were removed
  • Better support for Web Components & Shadow DOM
  • HTTP DELETE requests now use parameters, rather than form encoded bodies, for their payload (This is in accordance w/ the spec.)
  • Module support was split into different files:
  • We now provide specific files in /dist for the various JavaScript module styles:
    • ESM Modules: /dist/htmx.esm.js
    • AMD Modules: /dist/htmx.amd.js
    • CJS Modules: /dist/htmx.cjs.js
    • The /dist/htmx.js file continues to be browser-loadable
  • The hx-on attribute, with its special syntax, has been removed in favor of the less-hacky hx-on: syntax.
  • See the Upgrade Guide for more details on upgrade steps
  • The selectAndSwap() internal API method was replaced with the public (and much better) swap() method

v1.9.12

Compare Source

v1.9.11

Compare Source

  • Fix for new issue w/ web sockets & SSE on iOS 17.4 (thanks apple!)
  • Fix for double script execution issue when using template parsing
  • Fix TypeScript types file
  • Fix SSE Ext: reinstantiate EventSource listeners upon reconnection logic (#​2272)

v1.9.10

Compare Source

  • hx-on* attributes now support the form hx-on-, with a trailing dash, to better support template systems (such as EJS) that do not like double colons in HTML attributes.
  • Added an htmx.config.triggerSpecsCache configuration property that can be set to an object to cache the trigger spec parsing
  • Added a path-params.js extension for populating request paths with variable values
  • Many smaller bug fixes & improvements

v1.9.9

Compare Source

  • Allow CSS selectors with whitespace in attributes like hx-target by using parens or curly-braces
  • Properly allow users to override the Content-Type request header
  • Added the select option to htmx.ajax()
  • Fixed a race condition in readystate detection that lead to htmx not being initialized in some scenarios with 3rd party script loaders
  • Fixed a bug that caused relative resources to resolve against the wrong base URL when a new URL is pushed
  • Fixed a UI issue that could cause indicators to briefly flash

v1.9.8

Compare Source

  • Fixed a few npm & build related issues

v1.9.7

Compare Source

  • Fixed a bug where a button associated with a form that is swapped out of the DOM caused errors
  • The hx-target-error attribute was added to the response-targets extension, allowing you to capture all 400 & 500 responses with a single attribute
  • hx-on now properly supports multiple listeners
  • The hx-confirm prompt is now passed into custom confirmation handlers
  • next and previous are now valid extended CSS symbols in htmx
  • The htmx:beforeHistoryUpdate event was added
  • Properly ignore the dialog formmethod on buttons when resolving the HTTP method to use
  • Added a htmx.config.scrollIntoViewOnBoost option that may be set to false to disable scrolling the top of the body into view for boosted elements

v1.9.6

Compare Source

  • IE support has been restored (thank you @​telroshan!)
  • Introduced the hx-disabled-elt attribute to allow specifying elements to disable during a request
  • You can now explicitly decide to ignore title tags found in new content via the ignoreTitle option in hx-swap and the htmx.config.ignoreTitle configuration variable.
  • hx-swap modifiers may be used without explicitly specifying the swap mechanism
  • Arrays are now supported in the client-side-templates extension
  • XSLT support in the client-side-templates extension
  • Support preventDefault() in extension event handling
  • Allow the HX-Refresh header to apply even after an HX-Redirect has occurred
  • the formaction and formmethod attributes on buttons are now properly respected
  • hx-on can now handle events with dots in their name
  • htmx.ajax() now always returns a Promise
  • Handle leading style tag parsing more effectively

v1.9.5

Compare Source

  • Web sockets now properly pass the target id in the HEADERS struct
  • A very rare loading state bug was fixed (see https://github.com/bigskysoftware/htmx/commit/93bd81b6d003bb7bc445f10192bdb8089fa3495d)
  • hx-on will not evaluate if allowEval is set to false
  • You can disable the interpretation of script tags with the new htmx.config.allowScriptTags config variable
  • You can now disable htmx-based requests to non-origin hosts via the htmx.config.selfRequestsOnly config variable
  • The Security section has been expanded to help developers better understand how to properly secure their htmx-based applications.

v1.9.4

Compare Source

  • This is a bug-fix release for the most part, w/a heavy dose of @​telroshan
  • The HX-Trigger response header now supports comma separated event names
  • Submit buttons that use the form attribute now work correctly
  • The changed modifier now uses the triggering element, rather than the element the hx-trigger is defined on
  • hx-disable is now handled dynamically so it can be added and removed
  • IE11 compatibility restored! (maybe, hard to test)
  • Fixed bug with hx-on event handler cleanup
  • Many smaller bug fixes, typo fixes and general improvements

v1.9.3

Compare Source

  • The hx-on attribute has been deprecated (sorry) in favor of hx-on:<event name> attributes. See hx-on for more information.
  • We now have functioning CI using GitHub actions!
  • You can now configure if a type of HTTP request uses the body for parameters or not. In particular, the DELETE should use query parameters, according to the spec. htmx has used the body, instead. To avoid breaking code we are keeping this undefined behavior for now, but allowing people to fix it for their use cases by updating the htmx.config.methodsThatUseUrlParams config option. Thank you to Alex and Vincent for their feedback and work on this issue!
  • The this symbol is now available in event filter expressions, and refers to the element the hx-trigger is on
  • Fix bug where the htmx:afterSettle event was raised multiple times with oob swaps occurred
  • A large number of accessibility fixes were made in the docs (Thank you Denis & crew!)
  • Fixed bug w/ WebSocket extension initialization caused by "naked" hx-trigger feature
  • The HX-Reselect HTTP response header has been added to change the selection from the returned content
  • Many other smaller bug fixes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Merge request reports