Skip to content

Update css-loader, less-loader, style-loader dependencies and configuration#8875

Merged
dennisoelkers merged 29 commits intomasterfrom
update-loaders
Feb 5, 2021
Merged

Update css-loader, less-loader, style-loader dependencies and configuration#8875
dennisoelkers merged 29 commits intomasterfrom
update-loaders

Conversation

@Gaya
Copy link
Copy Markdown
Contributor

@Gaya Gaya commented Aug 27, 2020

Dependency updates to css-loader, less-loader, and style-loader to support new versions and APIs.

Description

Updates loaders to latest dependencies and changes the configuration needed in webpack's config.

Updates method of importing lazy css instead of style/useable as per described here: https://github.com/webpack-contrib/style-loader#lazystyletag

Removes icon font from Bootstrap config giving trouble.

Replaced insertAt config to match new API.

This Requires plugins to also follow the new method of importing lazy CSS

Motivation and Context

The loaders were at old versions and needed to be updated.

How Has This Been Tested?

  • If building the project through graylog-project yarn build still works (also includes changes to plugin lazy importing)
  • Tested by going to the pages where the components live and see if they don't break.

Types of changes

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

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

/jenkins-pr-deps Graylog2/graylog-plugin-collector#159,Graylog2/graylog-plugin-enterprise#1745

@Gaya Gaya requested a review from dennisoelkers August 27, 2020 06:24
@Gaya Gaya marked this pull request as ready for review August 27, 2020 06:24
@Gaya Gaya requested a review from kyleknighted August 27, 2020 06:25
@Gaya
Copy link
Copy Markdown
Contributor Author

Gaya commented Aug 31, 2020

Couple of things still failing. Seems like the tests are not working with the lazy loading at the moment. I'll take a look at what's going on later.

@Gaya
Copy link
Copy Markdown
Contributor Author

Gaya commented Aug 31, 2020

@dennisoelkers @kyleknighted I got it working, however it will fail on the plugins that still use the current way of lazy loading. There was a trick to include the other two PRs, right?

@Gaya
Copy link
Copy Markdown
Contributor Author

Gaya commented Feb 1, 2021

@dennisoelkers @kyleknighted this PR seems to be in order now. We'd need to merge the two other PRs of the plugins too once we merge this one.

Copy link
Copy Markdown
Member

@dennisoelkers dennisoelkers left a comment

Choose a reason for hiding this comment

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

Looks good, works fine, great work! 🎉

@dennisoelkers dennisoelkers merged commit 1a44cce into master Feb 5, 2021
@dennisoelkers dennisoelkers deleted the update-loaders branch February 5, 2021 09:33
dennisoelkers added a commit that referenced this pull request Feb 8, 2021
* Use jest plugin for ESLint. (#10018)

* Improving typing of field type properties. (#10015)

* Update css-loader, less-loader, style-loader dependencies and configuration (#8875)

* updated dependencies

* fix import style

* fix less and style loader options

* remove icon font path

* ability to load eot

* add lazy loading capability

* support leaflet lazy

* use new style of importing lazy

* fix insertAt definitions

* add comment why

* ignore lazy loading files for normal css

* update how to import modules

* update importstyle leaflet

* update import style editwidget

* updated lock file

* fix webpack config for leaflet

* fix lazy loading in jest

* fix linting

* add no-alert exception to ignore

* fix flow module mapping

* update style-loader to latest

* update css-loader

* fix lazy loading jest module

* update requires to import

* set css module class transformation to be global

* Fixing loading spinner gap between icon and text (#10025)

* Fixing linter hints related to importing `URLUtils`/`FormsUtils`. (#10021)

* Import `URLUtils` properly.

* Using correct ESLint rule to disable for TS.

* Avoid calling hook conditionally.

* Avoid calling hook conditionally.

* Fixing linter hints.

* Removing unused import.

* Fixing default import of `FormsUtils`.

* Making `no-unused-vars` consistent for TS.

* Import CSS modules as global to prevent rewriting classnames (#10026)

* import css modules as global

* revert to using css options generate

* Add highlight creation form

* Add highlighting condition

* Implement conditional highlighting rules

* Move Highlighting Form to a modal

* Add validation for required fields

* Add condition to the backend

* Make rule editiable and fix some styling issues

* Fix test and create a new one

* Add minimal tests for HighlightForm

* Fix linter warning

* Introduce a enum for the condition

* Add missing license

* Fix highlighting aggregation fields (count())

* Make the tests better than before

- sort our fields
- use update action from store
- make update action usable

* Fix typescript and linter

* Fix test fallout after updateing update store function

* Add expect as expected from lint

* Add description about rule order

* Fix wrong initize value

* Choose random color when creating new HighlightingRule

Co-authored-by: Dennis Oelkers <dennis@graylog.com>
Co-authored-by: Gaya Kessler <gaya@theclevernode.com>
Co-authored-by: Linus Pahl <linus@graylog.com>
dennisoelkers pushed a commit that referenced this pull request Feb 9, 2021
…ration (#8875)

* updated dependencies

* fix import style

* fix less and style loader options

* remove icon font path

* ability to load eot

* add lazy loading capability

* support leaflet lazy

* use new style of importing lazy

* fix insertAt definitions

* add comment why

* ignore lazy loading files for normal css

* update how to import modules

* update importstyle leaflet

* update import style editwidget

* updated lock file

* fix webpack config for leaflet

* fix lazy loading in jest

* fix linting

* add no-alert exception to ignore

* fix flow module mapping

* update style-loader to latest

* update css-loader

* fix lazy loading jest module

* update requires to import

* set css module class transformation to be global
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.

2 participants