Skip to content
This repository was archived by the owner on Jul 5, 2025. It is now read-only.

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented Jul 2, 2025

I don't think there is any interest in maintaining it anymore. Because of Jest and Babel, installing @symfony/stimulus-testing installs ~500 subdependencies, which is totally unacceptable, since the added-value of this package is only these two functions:

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:

Enregistrement.de.l.ecran.2025-07-02.a.18.00.30.mov

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

@Kocal Kocal force-pushed the deprecate-the-package branch from 3c9c8bb to 07d2209 Compare July 2, 2025 16:08
@stof
Copy link
Member

stof commented Jul 2, 2025

I did not even knew this package exist.

Copy link
Member

@stof stof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also run npm deprecate to mark it as deprecated in the npm registry.

Copy link
Member

@smnandre smnandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work on the why/how 🙇

@Kocal Kocal merged commit 17420a4 into symfony:main Jul 5, 2025
2 checks passed
@Kocal Kocal deleted the deprecate-the-package branch July 5, 2025 11:41
@Kocal
Copy link
Member Author

Kocal commented Jul 5, 2025

The package has been successfully deprecated on npm and github.
FYI, the number of downloads per week dropped to ~5.6k for the last full week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants