achilles 1.1.2 → 1.1.3
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +4 -5
- data/app/javascript/achilles/components/components_class_mapper.js +1 -1
- data/app/javascript/achilles/components/components_registry.js +1 -1
- data/docs/releases/v1.1.3.md +14 -0
- data/docs/upgrading.md +1 -0
- data/lib/achilles/version.rb +1 -1
- metadata +3 -4
- data/docs/core-js-gaps.md +0 -26
- data/docs/v1-roadmap.md +0 -68
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ffeb9aa323be59b9a1f276b8ceb3b881747733d6e5b10ceee31149df2b49d3e8
|
|
4
|
+
data.tar.gz: 9e0e0112177262df5c1cd7aaa5d76774d7e0b85b0b483c7d083a65d006f277d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f608ad668694d5067147da2087e07bc2ebeeb66a936cab3b267b8ebc7aaeaa9241f22f69997c7a5c9fd04fe5a0d58662b0c533afd8e6de70ec56cbbc6f9be911
|
|
7
|
+
data.tar.gz: 6bf2ecabb1506a16c888e2d2d3fb28d9d7a2ad43af0d2fa72b558e1f00f13ac08c1e1a0528206163a4996b6e094bfa6f2888e26f4e697fcac631c2c42302607f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -8,10 +8,9 @@ Achilles scans the page for elements with `data-component-class`, instantiates
|
|
|
8
8
|
the matching JavaScript class, and calls `setup` and `teardown` as Turbo renders
|
|
9
9
|
new pages or new component markup is inserted.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
[1.1.2](docs/releases/v1.1.2.md) release notes.
|
|
11
|
+
Use Achilles `1.1.3` for current applications. If you are upgrading an existing
|
|
12
|
+
app, see the [upgrade index](docs/upgrading.md) and the
|
|
13
|
+
[1.1.3 release notes](docs/releases/v1.1.3.md).
|
|
15
14
|
|
|
16
15
|
## Why Achilles?
|
|
17
16
|
|
|
@@ -281,7 +280,7 @@ If no timezone is present, Achilles falls back to `Etc/UTC`.
|
|
|
281
280
|
Applications upgrading to `1.1.0` should read the
|
|
282
281
|
[1.1.0 upgrade guide](docs/upgrading-to-1.1.0.md). The complete upgrade index
|
|
283
282
|
lives in [docs/upgrading.md](docs/upgrading.md), and the current release note is
|
|
284
|
-
available at [docs/releases/v1.1.
|
|
283
|
+
available at [docs/releases/v1.1.3.md](docs/releases/v1.1.3.md).
|
|
285
284
|
|
|
286
285
|
## Upgrading From 0.1.3
|
|
287
286
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Single Responsibility: Contains the list of all view components so it can be instantiated
|
|
2
2
|
class ComponentsClassMapper {
|
|
3
|
-
_componentsClassMapper =
|
|
3
|
+
_componentsClassMapper = Object.create(null);
|
|
4
4
|
|
|
5
5
|
addComponentClass(key, klass) {
|
|
6
6
|
this._componentsClassMapper[key] = klass;
|
|
@@ -2,7 +2,7 @@ import { AppConstants } from "achilles/application/app_constants";
|
|
|
2
2
|
|
|
3
3
|
// Contains all the registered components in a page at the current moment
|
|
4
4
|
class ComponentsRegistry {
|
|
5
|
-
_registeredComponents =
|
|
5
|
+
_registeredComponents = Object.create(null);
|
|
6
6
|
strictLifecycleErrors = false;
|
|
7
7
|
|
|
8
8
|
matchingElementsForId(id) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Achilles 1.1.3
|
|
2
|
+
|
|
3
|
+
Achilles now looks up component class names and IDs only among registered
|
|
4
|
+
entries. This fixes lookups when a class name or ID matches a built-in
|
|
5
|
+
JavaScript object property.
|
|
6
|
+
|
|
7
|
+
## Upgrading
|
|
8
|
+
|
|
9
|
+
Update the Achilles gem to `1.1.3` and keep your existing component markup and
|
|
10
|
+
registration code. If you are upgrading from a version earlier than `1.1.0`,
|
|
11
|
+
start with the [1.1.0 upgrade guide](../upgrading-to-1.1.0.md).
|
|
12
|
+
|
|
13
|
+
- [Changelog](../../CHANGELOG.md)
|
|
14
|
+
- [Upgrade index](../upgrading.md)
|
data/docs/upgrading.md
CHANGED
data/lib/achilles/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: achilles
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jey Geethan
|
|
@@ -87,15 +87,14 @@ files:
|
|
|
87
87
|
- app/views/layouts/achilles/application.html.erb
|
|
88
88
|
- config/importmap.rb
|
|
89
89
|
- config/routes.rb
|
|
90
|
-
- docs/core-js-gaps.md
|
|
91
90
|
- docs/migrating-from-0.1.3-to-v1.md
|
|
92
91
|
- docs/release-checklist.md
|
|
93
92
|
- docs/releases/v1.1.0.md
|
|
94
93
|
- docs/releases/v1.1.1.md
|
|
95
94
|
- docs/releases/v1.1.2.md
|
|
95
|
+
- docs/releases/v1.1.3.md
|
|
96
96
|
- docs/upgrading-to-1.1.0.md
|
|
97
97
|
- docs/upgrading.md
|
|
98
|
-
- docs/v1-roadmap.md
|
|
99
98
|
- lib/achilles.rb
|
|
100
99
|
- lib/achilles/engine.rb
|
|
101
100
|
- lib/achilles/version.rb
|
|
@@ -121,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
121
120
|
- !ruby/object:Gem::Version
|
|
122
121
|
version: '0'
|
|
123
122
|
requirements: []
|
|
124
|
-
rubygems_version:
|
|
123
|
+
rubygems_version: 3.6.9
|
|
125
124
|
specification_version: 4
|
|
126
125
|
summary: JavaScript component lifecycle for Rails and Turbo apps
|
|
127
126
|
test_files: []
|
data/docs/core-js-gaps.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Core JavaScript Gaps
|
|
2
|
-
|
|
3
|
-
This is the current improvement backlog for Achilles core JavaScript. API
|
|
4
|
-
reference docs should wait until the structure settles.
|
|
5
|
-
|
|
6
|
-
## Completed
|
|
7
|
-
|
|
8
|
-
- Added an explicit `Application#start` and `Application#stop` lifecycle.
|
|
9
|
-
- Made Turbo event listeners removable.
|
|
10
|
-
- Validated that component roots have non-empty ids before registration.
|
|
11
|
-
- Changed teardown order so child components tear down before parent components.
|
|
12
|
-
- Deleted deregistered registry entries instead of leaving `null` tombstones.
|
|
13
|
-
- Batched mutation observer setup work with a microtask debounce.
|
|
14
|
-
- Replaced one-way lifecycle flags with a `mounted` state while keeping
|
|
15
|
-
`setupExecuted` and `teardownExecuted` as compatibility aliases.
|
|
16
|
-
- Added tests for missing ids, duplicate starts, listener cleanup,
|
|
17
|
-
child-before-parent teardown, dynamic insertion batching, deregistration, and
|
|
18
|
-
remounting a reused component instance.
|
|
19
|
-
- Chose a DOM ancestry model for nested components under the single synthetic
|
|
20
|
-
`Page` root.
|
|
21
|
-
- Split JavaScript tests by parser, registry, application, Turbo hooks, and
|
|
22
|
-
component base responsibility.
|
|
23
|
-
- Added package/file-list regression coverage for the gemspec.
|
|
24
|
-
- Added opt-in strict lifecycle error handling for tests and development.
|
|
25
|
-
|
|
26
|
-
## Remaining Priority Gaps
|
data/docs/v1-roadmap.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Achilles v1 Roadmap
|
|
2
|
-
|
|
3
|
-
This document tracks the work needed before publishing Achilles `1.0.0`.
|
|
4
|
-
The goal is a stable open source release that is safe to evaluate in real Rails
|
|
5
|
-
applications, even if it intentionally removes legacy behavior from the `0.x`
|
|
6
|
-
line.
|
|
7
|
-
|
|
8
|
-
## Product Direction
|
|
9
|
-
|
|
10
|
-
Achilles is a small JavaScript lifecycle layer for Rails + Turbo applications.
|
|
11
|
-
It gives teams explicit component classes mapped to DOM nodes without requiring
|
|
12
|
-
Stimulus controller conventions or a JavaScript build step.
|
|
13
|
-
|
|
14
|
-
## v1 Public API
|
|
15
|
-
|
|
16
|
-
The v1 API should be small and documented:
|
|
17
|
-
|
|
18
|
-
- `Application`
|
|
19
|
-
- `ComponentBase`
|
|
20
|
-
- `ComponentsClassMapper`
|
|
21
|
-
- DOM discovery through `data-component-class`
|
|
22
|
-
- component root lookup through `rootElement()`
|
|
23
|
-
- `rootNode()` as an alias for `rootElement()`
|
|
24
|
-
- CSS selector lookup through `rootElementSelector()`
|
|
25
|
-
- lifecycle hooks: `setup()` and `teardown()`
|
|
26
|
-
- Turbo integration through `turbo:load` and `turbo:before-render`
|
|
27
|
-
|
|
28
|
-
## Planned Breaking Changes
|
|
29
|
-
|
|
30
|
-
- Make `rootElement()` return the component's DOM element.
|
|
31
|
-
- Keep `rootNode()` as an alias for `rootElement()`.
|
|
32
|
-
- Remove the jQuery return behavior from `rootElement()`.
|
|
33
|
-
- Keep Achilles internals independent from jQuery.
|
|
34
|
-
- Require every component root to have a unique `id`.
|
|
35
|
-
- Treat setup and teardown as idempotent lifecycle operations managed by
|
|
36
|
-
Achilles.
|
|
37
|
-
|
|
38
|
-
## Release Gates
|
|
39
|
-
|
|
40
|
-
Do not publish `1.0.0` until these are true:
|
|
41
|
-
|
|
42
|
-
- Rails test suite passes.
|
|
43
|
-
- JavaScript lifecycle tests cover parser, registry, Turbo hooks, root lookup,
|
|
44
|
-
setup idempotence, teardown idempotence, missing elements, and dynamic DOM
|
|
45
|
-
insertion.
|
|
46
|
-
- Dummy app asset precompile passes.
|
|
47
|
-
- README includes install, usage, lifecycle, dynamic DOM, migration, and API
|
|
48
|
-
reference sections.
|
|
49
|
-
- `CHANGELOG.md` documents all breaking changes from `0.1.3`.
|
|
50
|
-
- CI runs tests on supported Ruby and Rails versions.
|
|
51
|
-
- At least one real application has tested the release candidate.
|
|
52
|
-
|
|
53
|
-
## Release Plan
|
|
54
|
-
|
|
55
|
-
1. Publish a compatibility release in the `0.x` line with dependency and
|
|
56
|
-
lifecycle fixes.
|
|
57
|
-
2. Create a `v1.0.0.rc1` prerelease after the v1 API and tests are complete.
|
|
58
|
-
3. Test `v1.0.0.rc1` in existing applications.
|
|
59
|
-
4. Publish `1.0.0` only after the migration guide and real-app testing are done.
|
|
60
|
-
|
|
61
|
-
Follow the [release checklist](release-checklist.md) when building and testing
|
|
62
|
-
release candidates.
|
|
63
|
-
|
|
64
|
-
## Current Recommendation
|
|
65
|
-
|
|
66
|
-
Do not push `v1.0.0` yet. The project is ready for a compatibility release, but
|
|
67
|
-
`1.0.0` should wait for the final v1 API cleanup and real-application testing
|
|
68
|
-
through a release candidate.
|