Remove npm decidim packages with dependencies from other decidim packages#8330
Remove npm decidim packages with dependencies from other decidim packages#8330
Conversation
|
As the exception was with the file
|
e9db86e to
2f4884b
Compare
| prod: local_npm_dependencies_list(package_json["dependencies"]), | ||
| dev: local_npm_dependencies_list(package_json["devDependencies"]), | ||
| peer: local_npm_dependencies_list(package_json["peerDependencies"]), | ||
| optional: local_npm_dependencies_list(package_json["optionalDependencies"]) |
There was a problem hiding this comment.
@leio10 If you do it this way, you can skip the :peer and :optional categories here.
Peer dependencies are used for NPM dependencies such as eslint/stylelint configs to mark the version of the host package they are compatible with.
Optional dependencies could be used e.g. in a situation where you add additional non-necessary functionality to a package, e.g. a package that exports data to CSV, you could add also XLSX format as optional dependency (and functionality available only when the optional dependency is met). Currently there are no optional dependencies within the Decidim's own NPM packages.
Decidim's root package.json does not define either of these and never will. These categories are meant for NPM packages that are pushed to a package repository.
And they should not be added to the application's package.json either.
So, these two lines can be removed.
79a63f6 to
9b3831c
Compare
Rails installs webpacker when creating the app, so we were installing webpacker twice.
6d04111 to
9b674bc
Compare
dcde75d to
b75cb94
Compare
b75cb94 to
ce12acd
Compare
🎩 What? Why?
When using decidim npm packages from the npm repository, the installation fails to detect all the dependencies, because the packages
allanddevuse relative paths to refer to the other packages.This PR removes the
allpackage and adds the dependencies to the needed packages directly in the application.📌 Related Issues
Link your PR to an issue
Testing
Describe the best way to test or validate your PR.
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots
Please add screenshots of the changes you're proposing
