Skip to content

Fix warnings and verbose output when starting Webpack Dev Server #1018

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

Merged
merged 6 commits into from
May 23, 2024

Conversation

floehopper
Copy link
Contributor

@floehopper floehopper commented May 22, 2024

@floehopper floehopper temporarily deployed to previews/fix-warnings-and-verbose-output May 22, 2024 16:03 — with GitHub Actions Inactive
Copy link

Copy link

conorriches
conorriches previously approved these changes May 23, 2024
We were seeing multiple warnings when the app started up and therefore
also when running the Cypress specs in CI. The warnings were like this:

    Replace fill-available to stretch, because spec had been changed

The change from using "fill-available" to "stretch" in various CSS
dimension-related properties seems to have been a change to the CSS spec
a long time ago and I'm _fairly_ confident all browsers have supported
it for some time. Useful references:

* https://developer.mozilla.org/en-US/docs/Web/CSS/block-size
* https://developer.mozilla.org/en-US/docs/Web/CSS/width#browser_compatibility
* https://caniuse.com/?search=width%3A%20fill-available
* https://caniuse.com/?search=width%3A%20stretch

I've just done a global search & replace "fill-available" -> "stretch"
in this commit and this seems to fix the warnings and it doesn't seem to
have broken anything.
Previously we were seeing the following deprecation warning when running
the app and thus also when running the Cypress specs in CI:

    Using 'compiler' as the first argument is deprecated. Please use
    'options' as the first argument and 'compiler' as the second argument.

Reversing the arguments as per this migration guide [1] seems to fix the
warning.

[1]: https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md#deprecations
Previously we were seeing the following deprecation warning when running
the app and thus also when running the Cypress specs in CI:

    `listen` method is deprecated in favor of async `start` or
    `startCallback` methods

Following this migration guide [1] seems to fix the warning.

[1]: https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md#deprecations
I'm not convinced that we need to see these stats every time we start
the dev server, especially when we're running both the app and the web
component container,  and they make it harder to see if any important
warnings are being displayed.
I followed the instructions in the warning to run `npx
update-browserslist-db@latest` and saw the following output:

    Browserslist: caniuse-lite is outdated. Please run:
      npx update-browserslist-db@latest
      Why you should do it regularly: https://github.com/browserslist/update-db#readme
    Latest version:     1.0.30001618
    Updating caniuse-lite version
    $ yarn up -R caniuse-lite
    caniuse-lite has been successfully updated

    No target browser changes
Copy link

Copy link

@chrisroos chrisroos left a comment

Choose a reason for hiding this comment

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

I've not tested any of this locally but the commit notes/diffs all make sense to me 👍

@floehopper floehopper merged commit 9849c74 into main May 23, 2024
8 checks passed
@floehopper floehopper deleted the fix-warnings-and-verbose-output branch May 23, 2024 13:35
@floehopper floehopper mentioned this pull request Jun 3, 2024
floehopper added a commit that referenced this pull request Jun 4, 2024
### Added

- Add `project_name_editable` attribute to web component (#1009)
- Fires custom event when the theme changes (#1015)
- Add `output_only` attribute to web component (#1019 & originally #782)
- Add `assets_identifier` attribute to web component (#1019 & originally
#901)
- Enhance `code` attribute on web component to override project main
component content (#1019 & originally #901)
- Add `runCode`, `stopCode` & `rerunCode` methods to web component
(#1019 & originally #899)
- Send error details in "editor-runCompleted" event (#1019 & originally
#915)
- Return error details to web component (#1019 & originally #915)
- Add `output_panels` attribute to web component (#1019 & originally
#909)

### Changed

- Remove unused `/embedded/projects/:identifier` route (#1013)

### Fixed

- Remove unused `REACT_APP_LOGIN_ENABLED` env var (#1006)
- Fix infinite remix loop when `BYPASS_AUTH` set in `editor-api` (#1007)
- Fixes for docker-compose.yml (#1008)
- Fix deprecation warnings in GitHub Actions (#1011)
- Removed unused `isEmbedded` param from `useProject` call in
`EmbeddedViewer` (#1016)
- Improvements to Cypress specs in CI (#1017)
- Fix warnings and verbose output when starting Webpack Dev Server
(#1018)
- Add e2e spec for project remix behaviour in web component (#1020)
- Fix initial value of `user` in `WebComponentLoader` (#1021)
- Make `authKey` in e2e web component spec more realistic (#1022)
- Remove unused `ComponentStore` (#1023)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants