Skip to content

Webpacker: Do not override the application's package.json#8094

Merged
leio10 merged 5 commits intodecidim:developfrom
mainio:feature/webpacker-npm-dependencies
Jun 8, 2021
Merged

Webpacker: Do not override the application's package.json#8094
leio10 merged 5 commits intodecidim:developfrom
mainio:feature/webpacker-npm-dependencies

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen commented Jun 2, 2021

🎩 What? Why?

Follow up for #8066 (see the related discussion in that issue).

This proposes a solution for the package.json override in the webpacker installation task (decidim:webpacker:install).

This is not ideal because it is very slow as it clones the whole Decidim git repository to node_modules.

This is, however, how it should be solved. What needs to be done after:

  • Create a new NPM package that ships with the dependencies listed in Decidim's package.json
  • Mark the devDependencies correctly to that file as all the dependencies are now listed within dependencies. The devDependencies are those NPM packages that are not necessarily relevant for the Decidim application (jest related, etc. see Configure webpacker additional paths and entry points programmatically #8066 (comment))
  • Release that package to NPM, e.g. with name @decidim/essentials
  • Replace the line system! "npm i decidim/decidim#develop" with system! "npm i @decidim/essentials"

📌 Related Issues

Testing

Run the development app with the webpack-dev-server.

📋 Checklist

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

@ahukkanen ahukkanen force-pushed the feature/webpacker-npm-dependencies branch from d223c39 to c7ae786 Compare June 4, 2021 19:35
@leio10 leio10 merged commit 357d481 into decidim:develop Jun 8, 2021
@ahukkanen ahukkanen deleted the feature/webpacker-npm-dependencies branch June 8, 2021 13:23
@andreslucena andreslucena added type: internal PRs that aren't necessary to add to the CHANGELOG for implementers and removed type: enhancement target: developer-experience labels Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: internal PRs that aren't necessary to add to the CHANGELOG for implementers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants