diff --git a/.changeset/mixed-ignored.md b/.changeset/mixed-ignored.md deleted file mode 100644 index 1a9c0fb..0000000 --- a/.changeset/mixed-ignored.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"watchpack": minor ---- - -feat: allow the `ignored` option to be a mixed array of glob strings and -`RegExp` instances, e.g. `ignored: ["**/.cache", /generated/]`. - -Previously an array was assumed to contain only glob strings, so passing a -`RegExp` inside it threw `TypeError: Expected a string`. This made it -awkward for frameworks to append their own glob ignores to a user-supplied -`RegExp` ignore, since the two could not be combined in one value. - -Glob strings in the array are still merged into a single `RegExp`; `RegExp` -items are tested as-is. Behaviour for string-only arrays, single strings, -single `RegExp`s and functions is unchanged. diff --git a/CHANGELOG.md b/CHANGELOG.md index 26e1ed6..927702b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # watchpack +## 2.6.0 + +### Minor Changes + +- feat: allow the `ignored` option to be a mixed array of glob strings and (by [@stormslowly](https://github.com/stormslowly) in [#336](https://github.com/webpack/watchpack/pull/336)) + `RegExp` instances, e.g. `ignored: ["**/.cache", /generated/]`. + + Previously an array was assumed to contain only glob strings, so passing a + `RegExp` inside it threw `TypeError: Expected a string`. This made it + awkward for frameworks to append their own glob ignores to a user-supplied + `RegExp` ignore, since the two could not be combined in one value. + + Glob strings in the array are still merged into a single `RegExp`; `RegExp` + items are tested as-is. Behaviour for string-only arrays, single strings, + single `RegExp`s and functions is unchanged. + ## 2.5.2 ### Patch Changes diff --git a/package.json b/package.json index a378fd5..7300d2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "watchpack", - "version": "2.5.2", + "version": "2.6.0", "description": "", "homepage": "https://github.com/webpack/watchpack", "bugs": {