Skip to content
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

html-formatter: reclassify webpack-bundled dependencies to be dev dependencies #1308

Merged
merged 7 commits into from Feb 7, 2021

Conversation

davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Jan 14, 2021

Summary

Change dependencies that are wrapped into the webpack bundle to be devDependencies, to reduce unnecessary dependency footprint of cucumber-js and projects which consume it.

Motivation and Context

Because cucumber-js depends on @cucumber/html-formatter, it brings any dependencies with it. Currently that includes several cucumber packages plus react and react-dom which isn't necessary since these are inlined into the JS bundle by webpack so we don't need them when we're using the already-built package. It's also confusing for users and the extend dependency tree can cause other issues. See:

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • The change has been ported to Java.
  • The change has been ported to Ruby.
  • The change has been ported to JavaScript.
  • The change has been ported to Go.
  • The change has been ported to .NET.
  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have updated the CHANGELOG accordingly.

@davidjgoss davidjgoss marked this pull request as draft January 23, 2021 15:24
@davidjgoss
Copy link
Contributor Author

davidjgoss commented Jan 25, 2021

Almost missed the runtime import of CSS from @cucumber/react in https://github.com/cucumber/cucumber/blob/master/html-formatter/javascript/src/cli-main.ts#L33

To address, we'll either have webpack handle bundling the CSS, or maybe just create a copy of that file as part of this package's build.

@davidjgoss davidjgoss marked this pull request as ready for review January 28, 2021 10:55
@aslakhellesoy aslakhellesoy merged commit 5aa0a4a into master Feb 7, 2021
@aslakhellesoy aslakhellesoy deleted the html-formatter-devdependencies branch February 7, 2021 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants