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

Update dependency style-loader to v4 (staging) - autoclosed #1296

Closed
wants to merge 4 commits into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 2, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
style-loader ^2.0.0 -> ^4.0.0 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

webpack-contrib/style-loader (style-loader)

v4.0.0

Compare Source

⚠ BREAKING CHANGES
  • minimum supported webpack version is 5.27.0
  • minimum support Node.js version is 18.12.0
  • the insert option can only be a selector or the path to the module

Migration:

Before:

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.css$/i,
        use: [
          {
            loader: "style-loader",
            options: {
              injectType: "styleTag",
              styleTagTransform: function (css, style) {
                // Do something ...
                style.innerHTML = `${css}.modify{}\n`;

                document.head.appendChild(style);
              },
            },
          },
          "css-loader",
        ],
      },
    ],
  },
};

After:

insert-function.js

function insert(css, style) {
  var parent = options.target || document.head;

  parent.appendChild(element);
}

module.exports = insert;

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.css$/i,
        use: [
          {
            loader: "style-loader",
            options: {
              insert: require.resolve("./insert.js"),
            },
          },
          "css-loader",
        ],
      },
    ],
  },
};
  • the styleTagTransform option can only be the path to the module

Migration:

Before:

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.css$/i,
        use: [
          {
            loader: "style-loader",
            options: {
              injectType: "styleTag",
              styleTagTransform: function (css, style) {
                // Do something ...
                style.innerHTML = `${css}.modify{}\n`;

                document.head.appendChild(style);
              },
            },
          },
          "css-loader",
        ],
      },
    ],
  },
};

After:

style-tag-transform-function.js

function styleTagTransform(css, style) {
  // Do something ...
  style.innerHTML = `${css}.modify{}\n`;

  document.head.appendChild(style);
}

module.exports = styleTagTransform;

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.css$/i,
        use: [
          {
            loader: "style-loader",
            options: {
              styleTagTransform: require.resolve("./style-tag-transform-function.js"),
            },
          },
          "css-loader",
        ],
      },
    ],
  },
};
Bug Fixes
3.3.3 (2023-05-19)
Bug Fixes
3.3.2 (2023-03-13)
Bug Fixes
3.3.1 (2021-10-21)
Bug Fixes

v3.3.4

Compare Source

3.3.4 (2024-01-09)
Bug Fixes

v3.3.3

Compare Source

v3.3.2

Compare Source

v3.3.1

Compare Source

v3.3.0

Compare Source

Features
  • added support for supports(), layer() and media from @import at-rules (b9a600c)
  • allow to pass options to insert function through style.use() (#​535) (f8ef63b)
3.2.1 (2021-07-20)
Bug Fixes
  • added the styletagtransform option when it is a module to addBuildDependency (#​528) (270513f)

v3.2.1

Compare Source

v3.2.0

Compare Source

Features
Bug Fixes
  • added the insert option when it is a module to addBuildDependency (#​527) (3963c0b)

v3.1.0

Compare Source

Features
  • allow to specify the insert option from file, we strongly recommend do it, using the insert option from file will reduce your bundle size, example (#​521) (56fc8f0)
  • allow to specify the styleTagTransform option from file, we strongly recommend do it, using the styleTagTransform option from file will reduce your bundle size, example
Bug Fixes

v3.0.0

Compare Source

⚠ BREAKING CHANGES
  • minimum supported Node.js version is 12.13.0
  • minimum supported webpack version is 5.0.0
  • the modules.namedExport option was removed, you don't need it anymore, because we respect the modules.namedExport option from css-loader (we just reexport all from css-loader), just remove it
  • the styleTag value of the injectType (default value) option earlier uses singleton style tag by default for IE8-IE9 due limitations (more information), in this release we have disabled this behavior, because these versions of IE are outdated, if you don't support these browsers this change does not affect you, if you require to support IE8-IE9, you can return old behaviour by setting autoStyleTag value for the injectType option (do the same for lazyStyleTag, i.e. change it to lazyAutoStyleTag)
Features
  • added autoStyleTag and lazyAutoStyleTag values for the injectType option for compatibility of work modern and IE8-IE9 browsers
  • added styleTagTransform option for custom processing style tags (useful if you need ponyfill CSS custom properties for IE8-IE10)
  • reduce size of generated code
  • reduce deps

Configuration

📅 Schedule: Branch creation - "before 4am on Monday" in timezone Europe/London, Automerge - "after 10am every weekday,before 4pm every weekday" in timezone Europe/London.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from d5965b9 to d0a83d3 Compare July 2, 2024 11:49
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from d0a83d3 to 686989c Compare July 2, 2024 13:17
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 686989c to fae3e18 Compare July 2, 2024 13:28
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from fae3e18 to 81df61a Compare July 2, 2024 13:38
@DrizzlyOwl DrizzlyOwl added dependencies Pull requests that update a dependency file major labels Jul 2, 2024
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 81df61a to 7d74518 Compare July 2, 2024 13:56
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 7d74518 to a9396ac Compare July 2, 2024 14:04
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from a9396ac to 86a2c3c Compare July 2, 2024 14:13
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 86a2c3c to 75edf77 Compare July 2, 2024 14:20
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 75edf77 to 6f710cb Compare July 2, 2024 14:27
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 6f710cb to 2824230 Compare July 2, 2024 14:33
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 2824230 to 87f82c6 Compare July 2, 2024 15:34
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 87f82c6 to fd43b6b Compare July 2, 2024 15:52
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from fd43b6b to 81d155d Compare July 3, 2024 09:27
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 81d155d to 4c17ac2 Compare July 3, 2024 12:30
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 0dff61d to 3e0a509 Compare July 31, 2024 09:35
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 3e0a509 to 21aaf7a Compare August 2, 2024 09:42
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 21aaf7a to ae2dfe4 Compare August 2, 2024 11:12
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from ae2dfe4 to 4cd3f2a Compare August 2, 2024 16:23
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 4cd3f2a to 264ab9e Compare August 7, 2024 09:33
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 264ab9e to 8311c45 Compare August 7, 2024 10:14
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 8311c45 to 7c084f7 Compare August 7, 2024 11:10
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 7c084f7 to 233a47c Compare August 7, 2024 11:15
DrizzlyOwl and others added 2 commits August 8, 2024 17:06
* Tweaks to release pipeline (#1332)

* Set environment based on different push events (#1330)

* Fix: Forgot to define the branch variable (#1331)

* Set error message on failure

* Fix tag name syntax

* Check source branches have hotfix or feature prefixes (#1334)

* Open dependencies against main and staging (#1335)
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 233a47c to bfbdabd Compare August 8, 2024 16:13
@renovate renovate bot changed the title Update dependency style-loader to v4 Update dependency style-loader to v4 (main) Aug 8, 2024
Copy link

sonarqubecloud bot commented Aug 8, 2024

@renovate renovate bot changed the title Update dependency style-loader to v4 (main) Update dependency style-loader to v4 (staging) Aug 8, 2024
@renovate renovate bot changed the base branch from main to staging August 8, 2024 16:17
@renovate renovate bot changed the title Update dependency style-loader to v4 (staging) Update dependency style-loader to v4 (staging) - autoclosed Aug 8, 2024
@renovate renovate bot closed this Aug 8, 2024
@renovate renovate bot deleted the renovate/style-loader-4.x branch August 8, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant