Skip to content

[pull] master from webpack-contrib:master #7

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 24 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f27fba2
chore: upgrade dependencies to the latest version (#245)
ersachin3112 Oct 19, 2023
9da53f1
chore: update dependencies to the latest version (#249)
ersachin3112 Dec 1, 2023
4ea9d35
chore: update github action/setup-node (#250)
ersachin3112 Dec 3, 2023
96a5625
chore: update dependencies to latest version (#251)
ersachin3112 Jan 4, 2024
f7f74c0
chore!: minimum supported Node.js version is `18.12.0` (#252)
snitin315 Jan 17, 2024
ec4103e
chore(release): 6.0.0
alexander-akait Jan 17, 2024
579aa4d
chore: update dependency-review-action to the latest version (#253)
ersachin3112 Feb 3, 2024
afcd292
chore: update dependencies to latest version (#254)
ersachin3112 Feb 20, 2024
2ce7dc0
test: layer at-rule (#255)
alexander-akait Feb 27, 2024
791cbb3
chore: update codecov-action to v4 (#256)
ersachin3112 Mar 2, 2024
b51683a
chore: upgrade dependencies to latest version (#257)
ersachin3112 Mar 4, 2024
3111cd4
docs: fix cssnano optimisations link broken (#260)
stu01509 Apr 3, 2024
56e12ad
chore: update dependencies to the latest version (#261)
ersachin3112 Apr 8, 2024
40207eb
docs: fix link to cssnano (#262)
inokawa Apr 22, 2024
d53e25a
chore: update dependencies to latest version (#264)
ersachin3112 May 7, 2024
a252ce9
feat: update cssnano to 7.0 (#263)
ludofischer May 7, 2024
1c57d88
chore(release): 7.0.0
alexander-akait May 7, 2024
dc928f5
ci: use node v22 (#265)
ersachin3112 May 7, 2024
95b53cb
chore: upgrade dependencies to latest version (#266)
ersachin3112 Jun 4, 2024
a6ea77f
docs: update github syntax of warning (#267)
ersachin3112 Jun 10, 2024
dc24a75
chore: update dependencies to latest version (#269)
ersachin3112 Jul 10, 2024
e088048
chore: update husky hooks (#270)
ersachin3112 Jul 31, 2024
c3e7eb1
chore: upgrade dependencies to the latest version (#271)
ersachin3112 Aug 5, 2024
72fcb6c
chore(deps-dev): bump webpack from 5.93.0 to 5.94.0 (#272)
dependabot[bot] Sep 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: "Dependency Review"
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
13 changes: 7 additions & 6 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Expand All @@ -57,16 +57,17 @@ jobs:
- name: Security audit
run: npm run security

- name: Check commit message
uses: wagoid/commitlint-github-action@v5
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

test:
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
webpack-version: [latest]

runs-on: ${{ matrix.os }}
Expand All @@ -83,7 +84,7 @@ jobs:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Expand All @@ -99,6 +100,6 @@ jobs:
run: npm run test:coverage -- --ci

- name: Submit coverage data to codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ coverage
logs
*.log
npm-debug.log*
.cspellcache
.eslintcache
/coverage
/dist
Expand Down
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

5 changes: 1 addition & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
commitlint --edit $1
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
lint-staged
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [7.0.0](https://github.com/webpack-contrib/css-minimizer-webpack-plugin/compare/v6.0.0...v7.0.0) (2024-05-07)


### ⚠ BREAKING CHANGES

* update cssnano to 7.0 ([#263](https://github.com/webpack-contrib/css-minimizer-webpack-plugin/issues/263)) ([a252ce9](https://github.com/webpack-contrib/css-minimizer-webpack-plugin/commit/a252ce91aad42181af0e4c71f1a00990c1efeeeb))

## [6.0.0](https://github.com/webpack-contrib/css-minimizer-webpack-plugin/compare/v5.0.1...v6.0.0) (2024-01-17)


### ⚠ BREAKING CHANGES

* minimum supported Node.js version is `18.12.0` ([#252](https://github.com/webpack-contrib/css-minimizer-webpack-plugin/issues/252)) ([f7f74c0](https://github.com/webpack-contrib/css-minimizer-webpack-plugin/commit/f7f74c02c8a53e517d9942807c198d1daff0c4b5))

### [5.0.1](https://github.com/webpack-contrib/css-minimizer-webpack-plugin/compare/v5.0.0...v5.0.1) (2023-06-13)


Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# css-minimizer-webpack-plugin

This plugin uses [cssnano](https://cssnano.co) to optimize and minify your CSS.
This plugin uses [cssnano](https://cssnano.github.io/cssnano/) to optimize and minify your CSS.

Just like [optimize-css-assets-webpack-plugin](https://github.com/NMFR/optimize-css-assets-webpack-plugin) but more accurate with source maps and assets using query string, allows caching and works in parallel mode.

Expand Down Expand Up @@ -98,15 +98,15 @@ If you use your own `minify` function please read the `minify` section for handl

## Options

| Name | Type | Default | Description |
| :-----------------------------------------: | :--------------------------------------------: | :--------------------------------: | :-------------------------------------------------------------------------------- |
| **[`test`](#test)** | `String\|RegExp\|Array<String\|RegExp>` | `/\.css(\?.*)?$/i` | Test to match files against. |
| **[`include`](#include)** | `String\|RegExp\|Array<String\|RegExp>` | `undefined` | Files to include. |
| **[`exclude`](#exclude)** | `String\|RegExp\|Array<String\|RegExp>` | `undefined` | Files to exclude. |
| **[`parallel`](#parallel)** | `Boolean\|Number` | `true` | Enable/disable multi-process parallel running. |
| **[`minify`](#minify)** | `Function\|Array<Function>` | `CssMinimizerPlugin.cssnanoMinify` | Allows to override default minify function. |
| **[`minimizerOptions`](#minimizeroptions)** | `Object\|Array<Object>` | `{ preset: 'default' }` | Cssnano optimisations [options](https://cssnano.co/docs/what-are-optimisations/). |
| **[`warningsFilter`](#warningsfilter)** | `Function<(warning, file, source) -> Boolean>` | `() => true` | Allow to filter css-minimizer warnings. |
| Name | Type | Default | Description |
| :-----------------------------------------: | :--------------------------------------------: | :--------------------------------: | :----------------------------------------------------------------------------------------------- |
| **[`test`](#test)** | `String\|RegExp\|Array<String\|RegExp>` | `/\.css(\?.*)?$/i` | Test to match files against. |
| **[`include`](#include)** | `String\|RegExp\|Array<String\|RegExp>` | `undefined` | Files to include. |
| **[`exclude`](#exclude)** | `String\|RegExp\|Array<String\|RegExp>` | `undefined` | Files to exclude. |
| **[`parallel`](#parallel)** | `Boolean\|Number` | `true` | Enable/disable multi-process parallel running. |
| **[`minify`](#minify)** | `Function\|Array<Function>` | `CssMinimizerPlugin.cssnanoMinify` | Allows to override default minify function. |
| **[`minimizerOptions`](#minimizeroptions)** | `Object\|Array<Object>` | `{ preset: 'default' }` | Cssnano optimisations [options](https://cssnano.github.io/cssnano/docs/what-are-optimisations/). |
| **[`warningsFilter`](#warningsfilter)** | `Function<(warning, file, source) -> Boolean>` | `() => true` | Allow to filter css-minimizer warnings. |

### `test`

Expand Down Expand Up @@ -238,7 +238,7 @@ Possible options:
- `CssMinimizerPlugin.lightningCssMinify` (previously`CssMinimizerPlugin.parcelCssMinify`, the package was renamed, but we keep it for backward compatibility)
- `async (data, inputMap, minimizerOptions) => {return {code: "a{color: red}", map: "...", warnings: [], errors: []}}`

> **Warning**
> [!WARNING]
>
> **Always use `require` inside `minify` function when `parallel` option enabled**.

Expand Down Expand Up @@ -362,7 +362,7 @@ Default: `{ from: assetName }`
Allows filtering options [`processoptions`](https://postcss.org/api/#processoptions) for the cssnano.
The `parser`,` stringifier` and `syntax` can be either a function or a string indicating the module that will be imported.

> **Warning**
> [!WARNING]
>
> **If a function is passed, the `parallel` option must be disabled.**.

Expand Down Expand Up @@ -411,7 +411,7 @@ Default: `() => true`
Allow filtering css-minimizer warnings (By default [cssnano](https://github.com/cssnano/cssnano)).
Return `true` to keep the warning, a falsy value (`false`/`null`/`undefined`) otherwise.

> **Warning**
> [!WARNING]
>
> The `source` argument will contain `undefined` if you don't use source maps.

Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = (api) => {
"@babel/preset-env",
{
targets: {
node: "14.15.0",
node: "18.12.0",
},
},
],
Expand Down
5 changes: 4 additions & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
"*": ["prettier --write --ignore-unknown", "cspell --no-must-find-files"],
"*": [
"prettier --cache --write --ignore-unknown",
"cspell --cache --no-must-find-files",
],
"*.js": ["eslint --cache --fix"],
};
Loading
Loading