micra-rails 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7edc9ad1b18c34b676616edf2fb7069d709d9431ae952333f7466aa427d7ce1f
4
- data.tar.gz: e3ff36f687b9f081faf8d2660e4632c0ba3e6599bb77dce319f95a42a44f07c4
3
+ metadata.gz: 1f58daf8ac1f23f32624b162e64868da9f3c122e8c92831761299ca11d41a485
4
+ data.tar.gz: e2dfbaa47474ac136b434a076dad3bb7e0f90c915167f54787e183afcf7d5bad
5
5
  SHA512:
6
- metadata.gz: 5d7f7dd4129f3781d42b4e400f4037ea728d997a245b5db2a1b3460d09679c8c483b7ba9d329b46b8d55fe57f73a8ecb5204627e0ff678bf7a55ea97871234b0
7
- data.tar.gz: 359b1bc7b53699ac41e65623a08ec936d60a9f8093d6ceb8fe32ca3e1d684919258c3e13b2437e6adf0db7a797ed3e9f51b8baadfaf8eda70da810b4d1f22b69
6
+ metadata.gz: 57533e4cdaf05aaad5b2d2fa32f274325a8d415b9e9b0e94019ff3ee357ab53b7febdef6493ea129cbd6b45e902585995fd97504d6a36db952794ee8ebb8441b
7
+ data.tar.gz: d63c0ed8df3b4dbcc8c6b61d0f1e4987aef84d66477d396a26e9b12b5d72cb4753c6d58a8d0c6cc06052a0e5859686b334b74d440ce3cb41399d62adb84e0399
data/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.0] — 2026-06-26
4
+
5
+ - **Track Micra.js v2.7.0**, and pin the **`@2` major range** by default
6
+ (`micra.js@2/dist/micra.esm.js`) instead of a single patch version. Apps now pick
7
+ up Micra 2.x patches and minors automatically — no gem bump needed — and never
8
+ jump a breaking major. Re-pin a specific version in your `config/importmap.rb` if
9
+ you prefer it locked.
10
+ - Upstream since 2.3.0 adds `destroy()` + `autoCleanup()` (clean teardown for
11
+ islands swapped out by htmx/Turbo), plus fixes. See the upstream
12
+ [changelog](https://github.com/denisfl/micra.js/blob/master/CHANGELOG.md).
13
+ - No gem-side API changes — `micra_component`, `micra_includes`, and `micra_state`
14
+ work unchanged.
15
+ - Existing apps that ran `micra:install` keep the version their `config/importmap.rb`
16
+ already pins; re-pin to `@2` to opt into auto-updates.
17
+
18
+ ## [0.3.0] — 2026-05-30
19
+
20
+ - **Track Micra.js v2.3.0.** Default importmap pin now points at the
21
+ v2.3.0 ESM bundle (`micra.js@2.3.0/dist/micra.esm.js`). Upstream
22
+ brings a type-safe event bus via the augmentable `MicraEvents`
23
+ interface (declare your app's events once, `this.emit` /
24
+ `this.on` enforce payload types and arity at the call site) and a
25
+ positional-reuse diff for non-keyed `<template data-each>` lists —
26
+ re-renders no longer rebuild the entire list, retained rows keep
27
+ DOM identity and event listeners. See the upstream
28
+ [changelog](https://github.com/denisfl/micra.js/blob/master/CHANGELOG.md#230--2026-05-30)
29
+ for the full release notes.
30
+ - No gem-side API changes — existing `micra_component`, `micra_includes`,
31
+ and `micra_state` helpers work unchanged against the new release.
32
+ - Bumping is a pin-only change for most consumers; pre-existing apps
33
+ using `bin/importmap pin micra --download` should re-run that command
34
+ to pull the new vendor bundle.
35
+
3
36
  ## [0.2.0] — 2026-05-27
4
37
 
5
38
  - **Track Micra.js v2.2.0.** Default importmap pin now points at the
@@ -15,5 +48,6 @@
15
48
  - Generator: `rails g micra:install` pins micra.js via importmap and adds
16
49
  a `<%= micra_includes %>` line to the application layout.
17
50
 
51
+ [0.3.0]: https://github.com/denisfl/micra-rails/compare/v0.2.0...v0.3.0
18
52
  [0.2.0]: https://github.com/denisfl/micra-rails/compare/v0.1.0...v0.2.0
19
53
  [0.1.0]: https://github.com/denisfl/micra-rails/releases/tag/v0.1.0
data/README.md CHANGED
@@ -93,12 +93,15 @@ Pair Micra with **Turbo Streams** for the full Hotwire stack with reactivity.
93
93
 
94
94
  ## Production vs CDN
95
95
 
96
- By default, `micra-rails` pins to jsDelivr:
96
+ By default, `micra-rails` pins to jsDelivr at the `@2` major range, so you get
97
+ Micra 2.x patches and minors automatically (and never a breaking major):
97
98
 
98
99
  ```ruby
99
- pin "micra", to: "https://cdn.jsdelivr.net/npm/micra.js@2.2.0/dist/micra.esm.js"
100
+ pin "micra", to: "https://cdn.jsdelivr.net/npm/micra.js@2/dist/micra.esm.js"
100
101
  ```
101
102
 
103
+ Pin a specific version instead if you'd rather lock it.
104
+
102
105
  To self-host (no third-party CDN):
103
106
 
104
107
  ```bash
@@ -12,7 +12,7 @@ module Micra
12
12
  def pin_micra_in_importmap
13
13
  return unless File.exist?("config/importmap.rb")
14
14
 
15
- line = %(pin "micra", to: "https://cdn.jsdelivr.net/npm/micra.js@#{Micra::Rails::MICRA_JS_VERSION}/dist/micra.esm.js", preload: true\n)
15
+ line = %(pin "micra", to: "#{Micra::Rails::MICRA_JS_PIN}", preload: true\n)
16
16
 
17
17
  append_to_file "config/importmap.rb" do
18
18
  "\n# Micra.js — reactive UI directives (<5 KB gzip)\n#{line}"
@@ -2,11 +2,17 @@
2
2
 
3
3
  module Micra
4
4
  module Rails
5
- VERSION = "0.2.0"
5
+ VERSION = "0.4.0"
6
6
 
7
- # Tracks the Micra.js npm version we ship by default. The importmap pin
8
- # uses this value. Bump it together with VERSION when wrapping a new
9
- # upstream release.
10
- MICRA_JS_VERSION = "2.2.0"
7
+ # The upstream Micra.js release this gem is built and tested against. Bump it
8
+ # when wrapping a new upstream release.
9
+ MICRA_JS_VERSION = "2.7.0"
10
+
11
+ # The default importmap pin. It tracks the MAJOR range (e.g. `@2`), not a single
12
+ # patch — apps pick up Micra 2.x patches and minors automatically with no gem
13
+ # bump, and it won't jump a breaking major. Override by re-pinning a specific
14
+ # version in your own config/importmap.rb.
15
+ MICRA_JS_PIN =
16
+ "https://cdn.jsdelivr.net/npm/micra.js@#{MICRA_JS_VERSION.split(".").first}/dist/micra.esm.js"
11
17
  end
12
18
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: micra-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Fedosov-Ledovskikh
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-05-27 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -100,7 +99,6 @@ metadata:
100
99
  source_code_uri: https://github.com/denisfl/micra-rails
101
100
  changelog_uri: https://github.com/denisfl/micra-rails/blob/master/CHANGELOG.md
102
101
  rubygems_mfa_required: 'true'
103
- post_install_message:
104
102
  rdoc_options: []
105
103
  require_paths:
106
104
  - lib
@@ -115,8 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
113
  - !ruby/object:Gem::Version
116
114
  version: '0'
117
115
  requirements: []
118
- rubygems_version: 3.5.22
119
- signing_key:
116
+ rubygems_version: 3.6.9
120
117
  specification_version: 4
121
118
  summary: Rails integration for Micra.js — reactive UI in ~5 kB, no build step
122
119
  test_files: []