This repository was archived by the owner on Jul 5, 2025. It is now read-only.
Commit 17420a4
committed
feature #10 Deprecate the package (Kocal)
This PR was merged into the main branch.
Discussion
----------
Deprecate the package
I don't think there is any interest in _maintaining_ it anymore. Because of Jest and Babel, installing ``@symfony`/stimulus-testing` installs [**~500 subdependencies**](https://npmgraph.js.org/?q=%40symfony%2Fstimulus-testing), which is totally unacceptable, since the added-value of this package is only these two functions:
```js
export function mountDOM(html = '') {
const div = document.createElement('div');
div.innerHTML = html;
document.body.appendChild(div);
return div;
}
export function clearDOM() {
document.body.innerHTML = '';
}
```
It's like a Composer package, but all its dependencies being shadowed and not removable by the final user.
Removing it from `@symfony`/ux, where we don't use Jest and Babel but Vitest, allowed us to remove ~400 useless Node.js dev dependencies: symfony/ux#2879
The package is still experimental, and I suggest to deprecate this package. I've added migration steps for people being stuck with it, even if I think we, Symfony, are maybe the only ones to use it:
https://github.com/user-attachments/assets/86a21c37-8560-43dc-bec9-0043875831ea
We can observe:
1. it always had ~1k downloads per week this last year,
2. more recently we had ~21k downloads per week, and I believe that's correlated to my last two-months work on UX
3. and since a few days, it started to drop again (currently at 8k downloads for the last full week), when I removed it from UX
Commits
-------
07d2209 Deprecate the package1 file changed
+43
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
3 | 46 | | |
4 | 47 | | |
5 | 48 | | |
| |||
0 commit comments