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

chore: bump up style-loader version to v4 #6490

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 8, 2024

Mend Renovate

This PR contains the following updates:

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

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

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Apr 8, 2024
Copy link

nx-cloud bot commented Apr 8, 2024

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.37%. Comparing base (803b17a) to head (891ab6a).

Additional details and impacted files
@@            Coverage Diff             @@
##           canary    #6490      +/-   ##
==========================================
- Coverage   62.38%   62.37%   -0.01%     
==========================================
  Files         519      519              
  Lines       24023    24023              
  Branches     2268     2268              
==========================================
- Hits        14986    14985       -1     
- Misses       8771     8772       +1     
  Partials      266      266              
Flag Coverage Δ
server-test 73.93% <ø> (ø)
unittest 38.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

graphite-app bot commented Apr 9, 2024

Merge activity

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [style-loader](https://togithub.com/webpack-contrib/style-loader) | [`^3.3.4` -> `^4.0.0`](https://renovatebot.com/diffs/npm/style-loader/3.3.4/4.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/style-loader/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/style-loader/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/style-loader/3.3.4/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/style-loader/3.3.4/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>webpack-contrib/style-loader (style-loader)</summary>

### [`v4.0.0`](https://togithub.com/webpack-contrib/style-loader/blob/HEAD/CHANGELOG.md#400-2024-04-08)

[Compare Source](https://togithub.com/webpack-contrib/style-loader/compare/v3.3.4...v4.0.0)

##### ⚠ 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**

```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**

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

  parent.appendChild(element);
}

module.exports = insert;
```

**webpack.config.js**

```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**

```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**

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

  document.head.appendChild(style);
}

module.exports = styleTagTransform;
```

**webpack.config.js**

```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

-   css experiments logic ([#&#8203;617](https://togithub.com/webpack-contrib/style-loader/issues/617)) ([8b9fc97](https://togithub.com/webpack-contrib/style-loader/commit/8b9fc976628341d3e33b77b5eb4b6ebad009fd19))

##### [3.3.3](https://togithub.com/webpack-contrib/style-loader/compare/v3.3.2...v3.3.3) (2023-05-19)

##### Bug Fixes

-   compatibility with built-in CSS support ([#&#8203;605](https://togithub.com/webpack-contrib/style-loader/issues/605)) ([9636f58](https://togithub.com/webpack-contrib/style-loader/commit/9636f5805407734f587a87e69dd048e5cc7f1021))

##### [3.3.2](https://togithub.com/webpack-contrib/style-loader/compare/v3.3.1...v3.3.2) (2023-03-13)

##### Bug Fixes

-   noop in environment without DOM API ([#&#8203;597](https://togithub.com/webpack-contrib/style-loader/issues/597)) ([03d3df3](https://togithub.com/webpack-contrib/style-loader/commit/03d3df3c363484c18a1e9a5e468a7600ea1322f3))

##### [3.3.1](https://togithub.com/webpack-contrib/style-loader/compare/v3.3.0...v3.3.1) (2021-10-21)

##### Bug Fixes

-   small perf improvement ([#&#8203;544](https://togithub.com/webpack-contrib/style-loader/issues/544)) ([610524e](https://togithub.com/webpack-contrib/style-loader/commit/610524ef6266c27e147d3c0003e7825b08f17454))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **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.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
Copy link
Contributor Author

renovate bot commented Apr 9, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@graphite-app graphite-app bot merged commit 891ab6a into canary Apr 9, 2024
36 of 40 checks passed
@graphite-app graphite-app bot deleted the renovate/style-loader-4.x branch April 9, 2024 04:04
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 mod:dev
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant