-
-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Stimulus] Create NPM Package for @symfony/stimulus-bundle to Decouple from PHP Components #2575
Labels
Comments
Say we do publish on npm the LiveComponent javascript part. Next release we have a new feature that does work with JS and PHP. How would you enforce both vendors/symfony/ux-live-component and nodes_modules/vendor/symfony.. are in sync ? (genuine question) |
Maybe we can hook on |
This was referenced Feb 23, 2025
Kocal
added a commit
that referenced
this issue
Feb 28, 2025
…PM (Kocal) This PR was squashed before being merged into the 2.x branch. Discussion ---------- Normalize package.json files, to prepare publication on NPM | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> This is a first iteration for #2575: rework our `package.json` files in order to make them more "friendly" and work on npm. Next steps: 1. Add some verifications, to ensure PHP and JS versions of a same package are identical (and so 100% compatible) 2. See how we can deploy JS packages when creating a new UX releases. I'm thinking about a full automated process using the CI with a workflow listening on tag creation, which will be responsible to upgrade the `version` from `package.json` files, commit, push, and publish to npm) 3. Check if we need to manually create the packages on npm before trying to publishing them Commits ------- 87bc2b8 Set Map/assets/packages.json private 68a0e8a Remove tree from repository URL in each package.json bea8d4e Add README.md file for each UX packages assets 7162520 Add LICENSE file for each UX packages assets 4de9061 Normalize package.json files, to prepare publication on NPM
Kocal
added a commit
that referenced
this issue
Mar 1, 2025
…tallation and recommended alternatives. (Kocal) This PR was squashed before being merged into the 2.x branch. Discussion ---------- Document `src/**/assets/README.md` files about direct installation and recommended alternatives. | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Follow #2595, related to #2575 Commits ------- 9a4acb1 [CI] Do not run `test` workflow if only `src/**/*.md` files have been modified d49923b Document `src/**/assets/README.md` files about direct installation and recommended alternatives.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description:
Currently, certain JavaScript bundles, such as @symfony/stimulus-bundle, are being installed from the vendor package instead of an NPM package. This is evident in the package.json file where the dependency is specified as:
Problem
This approach creates a tight coupling between the JavaScript and PHP components, making it difficult to manage and install JavaScript dependencies independently. For instance, in a CI environment, this setup requires the installation of PHP components via Composer to install the JavaScript packages, which is not ideal for running tests with Playwright or other JavaScript-focused tasks.
Request
Could you please create an NPM package for @symfony/stimulus-bundle (and potentially other relevant bundles) to allow for independent installation via NPM? This would streamline the setup process, especially in CI environments, and decouple the JavaScript dependencies from the PHP components.
Use Case Example
For example, when setting up a CI pipeline to run Playwright tests, it would be beneficial to install the necessary JavaScript packages directly via NPM without needing to install the PHP components through Composer.
If this issue is already documented and I missed the information, I apologize for the oversight. Thank you for considering this enhancement!
The text was updated successfully, but these errors were encountered: