Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit 1e53e7f

Browse files
Adding support for Stimulus 2.0
1 parent e38e7f0 commit 1e53e7f

File tree

4 files changed

+43
-28
lines changed

4 files changed

+43
-28
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [2.0.0] - 2020-12-05
10+
11+
### Added
12+
13+
- Support for Stimulus 2.0
14+
15+
### Changed
16+
17+
- **Breaking** Using the new `targets` syntax.
18+
19+
```diff
20+
- <strong data-target="character-counter.counter"></strong>
21+
+ <strong data-character-counter-target="counter"></strong>
22+
```
23+
924
## [1.0.0] - 2020-11-03
1025

1126
### Added

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
129129
<section class="mt-16">
130130
<div data-controller="character-counter">
131131
<textarea
132-
data-target="character-counter.input"
132+
data-character-counter-target="input"
133133
class="shadow-sm appearance-none border w-full py-2 px-3 rounded-l-md text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
134134
placeholder="What's happening?"
135135
></textarea>
136136

137137
<p class="mt-2 text-md text-gray-800">
138-
There are <strong data-target="character-counter.counter"></strong> characters in this textarea.
138+
There are <strong data-character-counter-target="counter"></strong> characters in this textarea.
139139
</p>
140140
</div>
141141
</section>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
"@snowpack/plugin-babel": "2.1.4",
5555
"prettier-standard": "16.4.1",
5656
"snowpack": "2.16.1",
57-
"stimulus": "^1.1.1"
57+
"stimulus": "^2.0.0"
5858
},
5959
"peerDependencies": {
60-
"stimulus": "^1.1.1"
60+
"stimulus": "^2.0.0"
6161
}
6262
}

yarn.lock

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,29 +1729,29 @@
17291729
execa "^4.0.3"
17301730
npm-run-path "^4.0.1"
17311731

1732-
"@stimulus/core@^1.1.1":
1733-
version "1.1.1"
1734-
resolved "https://registry.yarnpkg.com/@stimulus/core/-/core-1.1.1.tgz#42b0cfe5b73ca492f41de64b77a03980bae92c82"
1735-
integrity sha512-PVJv7IpuQx0MVPCBblXc6O2zbCmU8dlxXNH4bC9KK6LsvGaE+PCXXrXQfXUwAsse1/CmRu/iQG7Ov58himjiGg==
1732+
"@stimulus/core@^2.0.0":
1733+
version "2.0.0"
1734+
resolved "https://registry.yarnpkg.com/@stimulus/core/-/core-2.0.0.tgz#140c85318d6a8a8210c0faf182223b8459348877"
1735+
integrity sha512-ff70GafKtzc8zQ1/cG+UvL06GcifPWovf2wBEdjLMh9xO2GOYURO3y2RYgzIGYUIBefQwyfX2CLfJdZFJrEPTw==
17361736
dependencies:
1737-
"@stimulus/mutation-observers" "^1.1.1"
1737+
"@stimulus/mutation-observers" "^2.0.0"
17381738

1739-
"@stimulus/multimap@^1.1.1":
1740-
version "1.1.1"
1741-
resolved "https://registry.yarnpkg.com/@stimulus/multimap/-/multimap-1.1.1.tgz#b95e3fd607345ab36e5d5b55486ee1a12d56b331"
1742-
integrity sha512-26R1fI3a8uUj0WlMmta4qcfIQGlagegdP4PTz6lz852q/dXlG6r+uPS/bx+H8GtfyS+OOXVr3SkZ0Zg0iRqRfQ==
1739+
"@stimulus/multimap@^2.0.0":
1740+
version "2.0.0"
1741+
resolved "https://registry.yarnpkg.com/@stimulus/multimap/-/multimap-2.0.0.tgz#420cfa096ed6538df4a91dbd2b2842c1779952b2"
1742+
integrity sha512-pMBCewkZCFVB3e5mEMoyO9+9aKzHDITmf3OnPun51YWxlcPdHcwbjqm1ylK63fsoduIE+RowBpFwFqd3poEz4w==
17431743

1744-
"@stimulus/mutation-observers@^1.1.1":
1745-
version "1.1.1"
1746-
resolved "https://registry.yarnpkg.com/@stimulus/mutation-observers/-/mutation-observers-1.1.1.tgz#0f6c6f081308427fed2a26360dda0c173b79cfc0"
1747-
integrity sha512-/zCnnw1KJlWO2mrx0yxYaRFZWMGnDMdOgSnI4hxDLxdWVuL2HMROU8FpHWVBLjKY3T9A+lGkcrmPGDHF3pfS9w==
1744+
"@stimulus/mutation-observers@^2.0.0":
1745+
version "2.0.0"
1746+
resolved "https://registry.yarnpkg.com/@stimulus/mutation-observers/-/mutation-observers-2.0.0.tgz#3dbe37453bda47a6c795a90204ee8d77a799fb87"
1747+
integrity sha512-kx4VAJdPhIGBQKGIoUDC2tupEKorG3A+ckc2b1UiwInKTMAC1axOHU8ebcwhaJIxRqIrs8//4SJo9YAAOx6FEg==
17481748
dependencies:
1749-
"@stimulus/multimap" "^1.1.1"
1749+
"@stimulus/multimap" "^2.0.0"
17501750

1751-
"@stimulus/webpack-helpers@^1.1.1":
1752-
version "1.1.1"
1753-
resolved "https://registry.yarnpkg.com/@stimulus/webpack-helpers/-/webpack-helpers-1.1.1.tgz#eff60cd4e58b921d1a2764dc5215f5141510f2c2"
1754-
integrity sha512-XOkqSw53N9072FLHvpLM25PIwy+ndkSSbnTtjKuyzsv8K5yfkFB2rv68jU1pzqYa9FZLcvZWP4yazC0V38dx9A==
1751+
"@stimulus/webpack-helpers@^2.0.0":
1752+
version "2.0.0"
1753+
resolved "https://registry.yarnpkg.com/@stimulus/webpack-helpers/-/webpack-helpers-2.0.0.tgz#54296d2a2dffd4f962d2e802d99a3fdd84b8845f"
1754+
integrity sha512-D6tJWsAC024MwGEIKlUVYU8Ln87mlrmiwHvYAjipg+s8H4eLxUMQ3PZkWyPevfipH+oR3leuHsjYsK1gN5ViQA==
17551755

17561756
"@szmarczak/http-timer@^1.1.2":
17571757
version "1.1.2"
@@ -5660,13 +5660,13 @@ state-toggle@^1.0.0:
56605660
resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.3.tgz#e123b16a88e143139b09c6852221bc9815917dfe"
56615661
integrity sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==
56625662

5663-
stimulus@^1.1.1:
5664-
version "1.1.1"
5665-
resolved "https://registry.yarnpkg.com/stimulus/-/stimulus-1.1.1.tgz#53c2fded6849e7b85eed3ed8dd76e33abd74bec5"
5666-
integrity sha512-R0mBqKp48YnRDZOxZ8hiOH4Ilph3Yj78CIFTBkCwyHs4iGCpe7xlEdQ7cjIxb+7qVCSxFKgxO+mAQbsNgt/5XQ==
5663+
stimulus@^2.0.0:
5664+
version "2.0.0"
5665+
resolved "https://registry.yarnpkg.com/stimulus/-/stimulus-2.0.0.tgz#713c8b91a72ef90914b90955f0e705f004403047"
5666+
integrity sha512-xipy7BS5TVpg4fX6S8LhrYZp7cmHGjmk09WSAiVx1gF5S5g43IWsuetfUhIk8HfHUG+4MQ9nY0FQz4dRFLs/8w==
56675667
dependencies:
5668-
"@stimulus/core" "^1.1.1"
5669-
"@stimulus/webpack-helpers" "^1.1.1"
5668+
"@stimulus/core" "^2.0.0"
5669+
"@stimulus/webpack-helpers" "^2.0.0"
56705670

56715671
string-argv@^0.3.0:
56725672
version "0.3.1"

0 commit comments

Comments
 (0)