repo
stringlengths
5
53
pr_number
int32
1
321k
task_type
stringclasses
2 values
issue_text
stringlengths
0
81.2k
pr_title
stringlengths
1
319
pr_body
stringlengths
0
105k
base_sha
stringlengths
40
40
head_sha
stringlengths
40
40
gold_diff
stringlengths
0
202M
changed_files
listlengths
0
100
review_threads
listlengths
0
100
test_patch
stringlengths
0
23.4M
merged
bool
1 class
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
Another candidate for `objectish`.
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "Another candidate for `objectish`.", "path": "src/Assert.php", "hunk": "@@ -1502,14 +1675,16 @@ public static function propertyNotExists(mixed $classOrObject, mixed $property,\n *\n * @throws InvalidArgumentException\n */\n- public static function methodExists(mixed $clas...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
Also `objectish`.
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "Also `objectish`.", "path": "src/Assert.php", "hunk": "@@ -1520,14 +1695,16 @@ public static function methodExists(mixed $classOrObject, mixed $method, string\n *\n * @throws InvalidArgumentException\n */\n- public static function methodNotExists(mixed $classOrObject, mix...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
Based on this, the return would be `array|Countable`.
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "Based on this, the return would be `array|Countable`.", "path": "src/Assert.php", "hunk": "@@ -1573,20 +1758,22 @@ public static function keyNotExists(mixed $array, string|int $key, string $messa\n *\n * @throws InvalidArgumentException\n */\n- public static function vali...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
Return `array|Countable` ?
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "Return `array|Countable` ?", "path": "src/Assert.php", "hunk": "@@ -1600,12 +1787,14 @@ public static function count(mixed $array, mixed $number, string $message = ''):\n \\count($array)\n )\n );\n+\n+ return $array;\n }\n \n /**\n * ...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
Again, `array|Countable`?
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "Again, `array|Countable`?", "path": "src/Assert.php", "hunk": "@@ -1617,12 +1806,14 @@ public static function minCount(mixed $array, mixed $min, string $message = ''):\n $min\n ));\n }\n+\n+ return $array;\n }\n \n /**\n * @throws Inv...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
Ditto.
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "Ditto.", "path": "src/Assert.php", "hunk": "@@ -1634,12 +1825,14 @@ public static function maxCount(mixed $array, mixed $max, string $message = ''):\n $max\n ));\n }\n+\n+ return $array;\n }\n \n /**\n * @throws InvalidArgumentExcepti...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
This would be `: array` for sure.
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "This would be `: array` for sure.", "path": "src/Assert.php", "hunk": "@@ -1664,13 +1859,15 @@ public static function countBetween(mixed $array, mixed $min, mixed $max, string\n *\n * @throws InvalidArgumentException\n */\n- public static function isList(mixed $array, str...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
Again, `array`.
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "Again, `array`.", "path": "src/Assert.php", "hunk": "@@ -1680,10 +1877,12 @@ public static function isList(mixed $array, string $message = ''): void\n *\n * @throws InvalidArgumentException\n */\n- public static function isNonEmptyList(mixed $array, string $message = ''):...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
Since we are now targeting PHP 8.x, we should probably use `string $class = Throwable::class`.
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "Since we are now targeting PHP 8.x, we should probably use `string $class = Throwable::class`.", "path": "src/Assert.php", "hunk": "@@ -1747,14 +1950,16 @@ public static function uuid(mixed $value, string $message = ''): void\n static::valueToString($value)\n ))...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
```suggestion if (!\is_object($value) && !\is_string($value)) { ```
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "```suggestion\n if (!\\is_object($value) && !\\is_string($value)) {\n```", "path": "src/Assert.php", "hunk": "@@ -205,14 +230,44 @@ public static function scalar(mixed $value, string $message = ''): void\n *\n * @throws InvalidArgumentException\n */\n- public stati...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
```suggestion if (\is_string($value) && !\class_exists($value)) { ```
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "```suggestion\n if (\\is_string($value) && !\\class_exists($value)) {\n```", "path": "src/Assert.php", "hunk": "@@ -205,14 +230,44 @@ public static function scalar(mixed $value, string $message = ''): void\n *\n * @throws InvalidArgumentException\n */\n- public sta...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
With `@template` in place, we don't need to duplicate as `@psalm-template`.
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "With `@template` in place, we don't need to duplicate as `@psalm-template`.", "path": "src/Assert.php", "hunk": "@@ -318,29 +385,35 @@ public static function isCountable(mixed $value, string $message = ''): void\n *\n * @throws InvalidArgumentException\n */\n- public stat...
true
webmozarts/assert
324
comment_to_fix
Add return $value for all Assert assertions.
`objectish` for `$classOrObject` ?
3c24b82b1991b85b180c98e39e4ad781b2347a44
707f181a76812c9dff65ca298fe33defc999ae12
diff --git a/src/Assert.php b/src/Assert.php index 98241292..9b15c62d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -17,7 +17,6 @@ use Countable; use DateTime; use DateTimeImmutable; -use Exception; use Throwable; use Traversable; @@ -39,7 +38,7 @@ class Assert * * @throws InvalidArgumentExcept...
[ "src/Assert.php" ]
[ { "comment": "`objectish` for `$classOrObject` ?", "path": "src/Assert.php", "hunk": "@@ -1466,14 +1708,16 @@ public static function implementsInterface(mixed $value, mixed $interface, strin\n *\n * @throws InvalidArgumentException\n */\n- public static function propertyExists(mixed $c...
true
webmozarts/assert
314
issue_to_patch
Add missing return type annotations
Added missing return types to make static analysis tools happy.
190f0e154d3e70d76560c93e03e3e0f7ac4095ca
21a31185c2af773b0381fc09a167a22fd4b6b823
diff --git a/src/Assert.php b/src/Assert.php index f02b8c9f..0cefda75 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -42,6 +42,8 @@ class Assert * @param mixed $value * @param string $message * + * @return void + * * @throws InvalidArgumentException */ public static func...
[ "src/Assert.php" ]
[]
true
webmozarts/assert
319
issue_to_patch
Bump symfony/process from 7.1.5 to 7.3.4 in /tools/php-cs-fixer
Bumps [symfony/process](https://github.com/symfony/process) from 7.1.5 to 7.3.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/symfony/process/releases">symfony/process's releases</a>.</em></p> <blockquote> <h2>v7.3.4</h2> <p><strong>Changelog</strong> (<a href="https://gith...
3760384d1c2d2eb4ab18fc261e3d7f98bae13ed3
154d5d5b5273ea90bc03913b36b14e5fbb80d6e8
diff --git a/tools/php-cs-fixer/composer.lock b/tools/php-cs-fixer/composer.lock index ff8ffe2b..83733baf 100644 --- a/tools/php-cs-fixer/composer.lock +++ b/tools/php-cs-fixer/composer.lock @@ -2091,16 +2091,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.31.0", ...
[ "tools/php-cs-fixer/composer.lock" ]
[]
true
webmozarts/assert
318
issue_to_patch
Test against php 8.5
190f0e154d3e70d76560c93e03e3e0f7ac4095ca
020cc999337e650cd2a1f1bd85343771e1a75756
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ad86ccee..8dc891d6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -64,6 +64,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" steps: - name: Checkout @@ -93,6 +94,8 @@ j...
[ ".github/workflows/ci.yaml" ]
[]
true
webmozarts/assert
279
issue_to_patch
Test against php 8.2
11cb2199493b2f8a3b53e7f19068fc6aac760991
a22a59d979890ab0832d2547cdea8c0a98b673fa
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c3b6d823..cb56557f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -87,6 +87,7 @@ jobs: - "7.4" - "8.0" - "8.1" + - "8.2" steps:...
[ ".github/workflows/ci.yaml" ]
[]
true
webmozarts/assert
272
issue_to_patch
Add 1.11.0 to the changelog
af18046f792086b41073783f092521b96ecf377d
57b5ba85fd2ea1f57686557170ad681acae652c7
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8629248b..56c8011d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ Changelog ## UNRELEASED +## 1.11.0 + +### Added + +* Added explicit (non magic) `allNullOr*` methods, with `@psalm-assert` annotations, for better Psalm support. + +### Changed + +* Trait...
[ "CHANGELOG.md" ]
[]
true
webmozarts/assert
264
issue_to_patch
Fix lessThan test fails in a different time zone
Hello, I have a little issue with your library. I couldn't run all the tests successfully from the first time. One of the tests from testConvertValuesToStrings fails with an error: `Failed asserting that exception message 'Expected a value less than DateTime: "1999-01-01T00:00:00+03:00". Got: DateTime: "2020-01-...
b65e17cf6a028d36b0f5ccf5f66f7c56c005dc01
51aa033e605ec494a9b480c6f7df4beca876dccb
[ "tests/AssertTest.php" ]
[]
diff --git a/tests/AssertTest.php b/tests/AssertTest.php index c92b5802..9565909a 100644 --- a/tests/AssertTest.php +++ b/tests/AssertTest.php @@ -718,7 +718,7 @@ public function getStringConversions() array('eq', array(new ArrayIterator(array()), new stdClass()), 'Expected a value equal to stdClass. Got: ...
true
webmozarts/assert
309
issue_to_patch
docs: Fix typo
f23349fa116314ad78d0cfb51228c43793860857
fbb50993ff4b32035e628af76c424cccd8ccacbe
diff --git a/CHANGELOG.md b/CHANGELOG.md index ae72d080..7544e1b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ Changelog ### Fixed -- Corrected messages and typos in arious assertions +- Corrected messages and typos in various assertions ## 1.11.0
[ "CHANGELOG.md" ]
[]
true
webmozarts/assert
292
issue_to_patch
Add support for enums in error message ## Context In many projects, I use an assertion about an object property value. The error message in not explicit about why the assertion failed. I think it would be a nice feature to handle enum name in the error message. ```php $foo = new Foo(BarEnum::Bar); Assert::same($foo-...
Add support for enums in error message
Attempt to resolve https://github.com/webmozarts/assert/issues/289
c4c6fb89b02e3b63e7c7022c63409aff79a3aab8
137f51bf14dd1bb8310452995db6b99b59e378a5
diff --git a/src/Assert.php b/src/Assert.php index b962e3e2..f02b8c9f 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -2087,6 +2087,10 @@ protected static function valueToString($value) return \get_class($value).': '.self::valueToString($value->format('c')); } + if (\funct...
[ "src/Assert.php", "tests/AssertTest.php", "tests/DummyEnum.php" ]
[ { "comment": "Other tests are using `PHP_VERSION_ID` for comparison and skip the test if necessary. Wouldn't that be simpler and more consistent?", "path": "tests/AssertTest.php", "hunk": "@@ -833,6 +833,20 @@ public function testResourceOfTypeCustomMessage(): void\n \n Assert::resource(null, 'c...
diff --git a/tests/AssertTest.php b/tests/AssertTest.php index ef9b6be6..87a1bb17 100644 --- a/tests/AssertTest.php +++ b/tests/AssertTest.php @@ -833,6 +833,22 @@ public function testResourceOfTypeCustomMessage(): void Assert::resource(null, 'curl', 'I want a resource of type %2$s. Got: %s'); } + + ...
true
webmozarts/assert
292
comment_to_fix
Add support for enums in error message
Other tests are using `PHP_VERSION_ID` for comparison and skip the test if necessary. Wouldn't that be simpler and more consistent?
c4c6fb89b02e3b63e7c7022c63409aff79a3aab8
137f51bf14dd1bb8310452995db6b99b59e378a5
diff --git a/tests/AssertTest.php b/tests/AssertTest.php index ef9b6be6..87a1bb17 100644 --- a/tests/AssertTest.php +++ b/tests/AssertTest.php @@ -833,6 +833,22 @@ public function testResourceOfTypeCustomMessage(): void Assert::resource(null, 'curl', 'I want a resource of type %2$s. Got: %s'); } + + ...
[ "tests/AssertTest.php" ]
[ { "comment": "Other tests are using `PHP_VERSION_ID` for comparison and skip the test if necessary. Wouldn't that be simpler and more consistent?", "path": "tests/AssertTest.php", "hunk": "@@ -833,6 +833,20 @@ public function testResourceOfTypeCustomMessage(): void\n \n Assert::resource(null, 'c...
true
webmozarts/assert
277
issue_to_patch
Fix `implementsInterface()` PHPDoc
`class_implements` accepts either an object or a class-string, but the PHPDoc for the assert function is wrong and limits its functionality to a class-string only. I'm not entirely sure if this was on purpose, the README just mentions "Check that a class implements an interface", but it would work with either an instan...
3a544a36d5688912ce35a26fed5a7bd10f27115b
ad981271cff3b1f9940a0b3a9287c8a16e3a5c0b
diff --git a/src/Assert.php b/src/Assert.php index 3faececd..b962e3e2 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -1609,7 +1609,7 @@ public static function interfaceExists($value, $message = '') * * @psalm-param class-string<ExpectedType> $interface * - * @psalm-assert class-string<Expecte...
[ "src/Assert.php", "src/Mixin.php", "tests/AssertTest.php", "tests/static-analysis/assert-implementsInterface.php" ]
[ { "comment": "The `$interface` cannot be an object, because `in_array` will fail. Only the `$value` can be an object.", "path": "src/Assert.php", "hunk": "@@ -1566,8 +1566,8 @@ public static function interfaceExists($value, $message = '')\n /**\n * @psalm-pure\n * @psalm-template ExpectedT...
diff --git a/tests/AssertTest.php b/tests/AssertTest.php index b95eba1c..ef9b6be6 100644 --- a/tests/AssertTest.php +++ b/tests/AssertTest.php @@ -14,6 +14,7 @@ use ArrayIterator; use ArrayObject; use DateTime; +use DateTimeImmutable; use Error; use Exception; use LogicException; @@ -447,6 +448,10 @@ public funct...
true
webmozarts/assert
277
comment_to_fix
Fix `implementsInterface()` PHPDoc
The `$interface` cannot be an object, because `in_array` will fail. Only the `$value` can be an object.
3a544a36d5688912ce35a26fed5a7bd10f27115b
ad981271cff3b1f9940a0b3a9287c8a16e3a5c0b
diff --git a/src/Assert.php b/src/Assert.php index 3faececd..b962e3e2 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -1609,7 +1609,7 @@ public static function interfaceExists($value, $message = '') * * @psalm-param class-string<ExpectedType> $interface * - * @psalm-assert class-string<Expecte...
[ "src/Assert.php" ]
[ { "comment": "The `$interface` cannot be an object, because `in_array` will fail. Only the `$value` can be an object.", "path": "src/Assert.php", "hunk": "@@ -1566,8 +1566,8 @@ public static function interfaceExists($value, $message = '')\n /**\n * @psalm-pure\n * @psalm-template ExpectedT...
true
webmozarts/assert
303
issue_to_patch
Add `@psalm-pure` to the `typeToString` method
When extending the `Assert` class it can be difficult to keep custom methods pure, especially when opting for the use of the `Assert::typeToString` method. This results in the following Psalm error at the call to the `typetoString` method: ``` ImpureMethodCall: Cannot call an impure method from a pure context ``` ...
306905c60267167fbdf54c0bbfdd089127ea55ca
25d8efc0e0c0cd9479e3036dfb9691c592b21bb7
diff --git a/src/Assert.php b/src/Assert.php index 7058112d..3faececd 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -2102,6 +2102,8 @@ protected static function valueToString($value) } /** + * @psalm-pure + * * @param mixed $value * * @return string
[ "src/Assert.php" ]
[]
true
webmozarts/assert
300
issue_to_patch
Fix error on `resource` assertion if message has a second placeholder
Prior to this change code such as `Assert::resource(null, 'stream', 'Got: %s, type: %s')` would fail as the second placeholder was only passed into `sprintf()` if the value supplied is a resource. Test I've added without the code change fails with: ``` 1) Webmozart\Assert\Tests\AssertTest::testResourceOfTypeCustomMes...
11d902c2917dca1a0aef3d4e4695dff150992ad6
73bfe48a015b309efe2c83f28f4477d688e15c8e
diff --git a/src/Assert.php b/src/Assert.php index cbf8ed8f..7058112d 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -266,7 +266,8 @@ public static function resource($value, $type = null, $message = '') if (!\is_resource($value)) { static::reportInvalidArgument(\sprintf( $mes...
[ "src/Assert.php", "tests/AssertTest.php" ]
[]
diff --git a/tests/AssertTest.php b/tests/AssertTest.php index f094d791..b95eba1c 100644 --- a/tests/AssertTest.php +++ b/tests/AssertTest.php @@ -820,6 +820,14 @@ public function testIsAOfExceptionMessages(array $args, string $exceptionMessage call_user_func_array(array('Webmozart\Assert\Assert', 'isAOf'), ...
true
webmozarts/assert
298
issue_to_patch
Fix typo
11cb2199493b2f8a3b53e7f19068fc6aac760991
bad38cd0726e2103d6d45f6844e52a6016ff5155
diff --git a/src/Mixin.php b/src/Mixin.php index 0f0a75e3..5670e2ad 100644 --- a/src/Mixin.php +++ b/src/Mixin.php @@ -8,7 +8,7 @@ use Throwable; /** - * This trait provides nurllOr*, all* and allNullOr* variants of assertion base methods. + * This trait provides nullOr*, all* and allNullOr* variants of assertion b...
[ "src/Mixin.php" ]
[]
true
webmozarts/assert
285
issue_to_patch
Optimize isList
This is a follow up to the discussion from #247. During normal usage, I noticed this function is very inefficient. It doesn't use the built-in function `array_is_list` and the polyfil is very inefficient for most cases. Yes, the current implementation is very efficient for true lists, but has very bad performance with...
3148f0bfe30d369fbff65fe4daba184fe2cf8679
7aa5653eed42b07ccb8ea478cee0e71179932afe
diff --git a/src/Assert.php b/src/Assert.php index a4274200..cbf8ed8f 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -1875,17 +1875,25 @@ public static function isList($array, $message = '') ); } - if ($array === \array_values($array)) { - return; - } - - $ne...
[ "src/Assert.php" ]
[ { "comment": "Try running `composer run cs-fix` ", "path": "src/Assert.php", "hunk": "@@ -1875,17 +1875,24 @@ public static function isList($array, $message = '')\n );\n }\n \n- if ($array === \\array_values($array)) {\n- return;\n- }\n-\n- $nextKey = ...
true
webmozarts/assert
291
issue_to_patch
Separate file/directory/exists assertions
There is no need to use `file_exists` before using `is_file` and `is_dir`, this makes for confusing errors. For instance, if you call `Assert::directory('invalid/path')` then the reported error will be: ``` The file "invalid/path" does not exist. ``` Additionally, the messages for these assertions were either t...
8164e8e99d26ceef6f9d2a3887448e0ed972eb2a
2db2941b5e51f96f0aa225549175761c927ea5e3
diff --git a/src/Assert.php b/src/Assert.php index 70a29c40..a4274200 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -1467,11 +1467,9 @@ public static function lengthBetween($value, $min, $max, $message = '') */ public static function fileExists($value, $message = '') { - static::string($val...
[ "src/Assert.php" ]
[ { "comment": "This is technically incorrect, since `file_exists` is equivalent to:\r\n\r\n```php\r\nreturn is_file($path) || is_dir($path);\r\n```", "path": "src/Assert.php", "hunk": "@@ -1426,11 +1426,9 @@ public static function lengthBetween($value, $min, $max, $message = '')\n */\n public st...
true
webmozarts/assert
273
issue_to_patch
Fix minor typos
I noticed `ext-cytpe` typo, so let my IDE show me other typos.
11cb2199493b2f8a3b53e7f19068fc6aac760991
63acdfbfa2958e275e9091f366f27f924eee5008
diff --git a/CHANGELOG.md b/CHANGELOG.md index 56c8011d..7789d827 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Changelog ### Added -* Added explicit (non magic) `allNullOr*` methods, with `@psalm-assert` annotations, for better Psalm support. +* Added explicit (non-magic) `allNullOr*` methods, with...
[ "CHANGELOG.md", "README.md", "bin/src/MixinGenerator.php", "src/Mixin.php" ]
[]
true
webmozarts/assert
287
issue_to_patch
Update ci.yaml replacing GitHub Actions V2 (Deprecated) for V3
This updates to GitHub Action V3 as the V2 is deprecated. This resolves some of the warnings shown at the bottom of https://github.com/webmozarts/assert/actions/runs/3333136431 (and other Actions runs) ## Additional context https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-no...
11cb2199493b2f8a3b53e7f19068fc6aac760991
a3a95c6a76f2a685b918e1ed27410d4701e92c31
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c3b6d823..5b0e3580 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,7 +19,7 @@ jobs: steps: - name: "Checkout" - uses: "actions/checkout@v2.3.4" + uses: "actions/...
[ ".github/workflows/ci.yaml" ]
[]
true
webpack/webpack
21,181
issue_to_patch
perf: speed up CSS and HTML parsing and code generation
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
0bf661bdcda622ab1af49e906b25a80248d645d4
48b56c5c489d14ee2efdd31454c88b4233c84bef
diff --git a/lib/css/CssGenerator.js b/lib/css/CssGenerator.js index 775c171f0a1..e08d8733779 100644 --- a/lib/css/CssGenerator.js +++ b/lib/css/CssGenerator.js @@ -38,6 +38,11 @@ const { walkFullHashPlaceholders } = require("../util/publicPathPlaceholder"); +// `<module-type>` always has a `<basic>/<sub>` shape, ...
[ "lib/css/CssGenerator.js", "lib/css/CssModule.js", "lib/css/CssParser.js", "lib/css/syntax.js", "lib/dependencies/CssIcssExportDependency.js", "lib/dependencies/CssUrlDependency.js", "lib/dependencies/HtmlInlineStyleDependency.js", "lib/dependencies/HtmlScriptSrcDependency.js", "lib/html/HtmlGenerat...
[]
diff --git a/test/configCases/html/script-src-sibling-attrs/entry.js b/test/configCases/html/script-src-sibling-attrs/entry.js new file mode 100644 index 00000000000..4fe51c72d64 --- /dev/null +++ b/test/configCases/html/script-src-sibling-attrs/entry.js @@ -0,0 +1,1 @@ +import "./style.css"; diff --git a/test/configCa...
true
webpack/webpack
21,180
issue_to_patch
perf: reduce allocations and speed up codegen hot paths for harmony/commonjs dependencies
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
0bf661bdcda622ab1af49e906b25a80248d645d4
feba07484e05e672150d6a6812fe3c6da0c5fad5
diff --git a/.changeset/harmony-commonjs-dependency-allocations.md b/.changeset/harmony-commonjs-dependency-allocations.md new file mode 100644 index 00000000000..de7dea19290 --- /dev/null +++ b/.changeset/harmony-commonjs-dependency-allocations.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Reduce allocations on ha...
[ ".changeset/harmony-commonjs-dependency-allocations.md", "lib/ExportsInfo.js", "lib/Template.js", "lib/dependencies/HarmonyExportInitFragment.js", "lib/dependencies/HarmonyImportDependencyParserPlugin.js", "lib/dependencies/processExportInfo.js", "lib/util/chainedImports.js", "lib/util/property.js" ]
[]
true
webpack/webpack
21,174
issue_to_patch
refactor: generalize SourceProcessor and adopt it for HTML modules
**Summary** Moves the CSS-only `SourceProcessor` visitor coordinator to `lib/util/SourceProcessor.js`, parameterized by a language grammar, adds an HTML grammar + `NodeType` to `lib/html/syntax.js`, and switches `HtmlParser` from its hand-rolled recursive walk to the same Babel-style visitor machinery `CssParser` us...
2a74860a566e0f61fcd69eff2d20688f76844137
a90589f945ed38cbb3ff1eb43f2b863b66264a93
diff --git a/lib/css/syntax.js b/lib/css/syntax.js index b109a27ba90..5df37f54723 100644 --- a/lib/css/syntax.js +++ b/lib/css/syntax.js @@ -6,6 +6,7 @@ "use strict"; const LocConverter = require("../util/LocConverter"); +const GenericSourceProcessor = require("../util/SourceProcessor"); const { makeCacheable } = ...
[ "lib/css/syntax.js", "lib/html/HtmlParser.js", "lib/html/syntax.js", "lib/util/SourceProcessor.js", "lib/util/magicComment.js", "test/HtmlParser.unittest.js", "test/buildHtmlAst.unittest.js", "test/html5lib.spectest.js", "test/magicComment.unittest.js" ]
[]
diff --git a/test/HtmlParser.unittest.js b/test/HtmlParser.unittest.js index db1e93983b7..eceec52001d 100644 --- a/test/HtmlParser.unittest.js +++ b/test/HtmlParser.unittest.js @@ -17,6 +17,7 @@ const HtmlParser = require("../lib/html/HtmlParser"); const buildHtmlAst = /** @type {MockedBuildHtmlAst} */ ( require(".....
true
webpack/webpack
21,175
issue_to_patch
perf: build the binary deserialize dispatch table once instead of per call
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
2a74860a566e0f61fcd69eff2d20688f76844137
10cf8319b8c19787077dc4fb064821e32dd5e02a
diff --git a/.changeset/binary-middleware-dispatch-table.md b/.changeset/binary-middleware-dispatch-table.md new file mode 100644 index 00000000000..030eaf3b4fb --- /dev/null +++ b/.changeset/binary-middleware-dispatch-table.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Reuse the binary deserialize dispatch table t...
[ ".changeset/binary-middleware-dispatch-table.md", "lib/serialization/BinaryMiddleware.js", "test/BinaryMiddleware.unittest.js" ]
[]
diff --git a/test/BinaryMiddleware.unittest.js b/test/BinaryMiddleware.unittest.js index 4f1d93be973..13c4a91f175 100644 --- a/test/BinaryMiddleware.unittest.js +++ b/test/BinaryMiddleware.unittest.js @@ -114,6 +114,140 @@ describe("BinaryMiddleware", () => { cont([5.5], 20) ]; + describe("bigints", () => { + c...
true
webpack/webpack
21,173
issue_to_patch
perf: extend avoidEntryIife no-parse fast path to multi-entry chunks
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
2a74860a566e0f61fcd69eff2d20688f76844137
c86c2b38c87121e2ed9ac5f204c6187c2a2c06f3
diff --git a/.changeset/avoid-entry-iife-multi-entry-fast-path.md b/.changeset/avoid-entry-iife-multi-entry-fast-path.md new file mode 100644 index 00000000000..dd1aa004344 --- /dev/null +++ b/.changeset/avoid-entry-iife-multi-entry-fast-path.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Extend the avoidEntryIife n...
[ ".changeset/avoid-entry-iife-multi-entry-fast-path.md", "lib/Module.js", "lib/javascript/JavascriptModulesPlugin.js", "lib/optimize/ConcatenatedModule.js", "test/configCases/module/iife-multiple-concatenated-entries-collision/first-dep.js", "test/configCases/module/iife-multiple-concatenated-entries-colli...
[]
diff --git a/test/configCases/module/iife-multiple-concatenated-entries-collision/first-dep.js b/test/configCases/module/iife-multiple-concatenated-entries-collision/first-dep.js new file mode 100644 index 00000000000..16e0fee3912 --- /dev/null +++ b/test/configCases/module/iife-multiple-concatenated-entries-collision/...
true
webpack/webpack
21,172
issue_to_patch
refactor: type buildInfo and buildMeta per module type
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Splits the monolithic `KnownBuildInfo`/`KnownBuildMeta` typedefs into common properties on `Module` plus module-type-specific typedefs (`JavascriptBuildInfo`/`JavascriptBuildMeta`,...
5f01ae568f5fa6a41a7b83752742b8d9f4f81db5
c49bc9c42045978e767655ba1f6375a52288f494
diff --git a/.changeset/buildinfo-buildmeta-per-module-types.md b/.changeset/buildinfo-buildmeta-per-module-types.md new file mode 100644 index 00000000000..0591cb7ce14 --- /dev/null +++ b/.changeset/buildinfo-buildmeta-per-module-types.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Type `buildInfo` and `buildMeta` ...
[ ".changeset/buildinfo-buildmeta-per-module-types.md", "lib/APIPlugin.js", "lib/ChunkGraph.js", "lib/ContextModule.js", "lib/DefinePlugin.js", "lib/ExternalModule.js", "lib/HotModuleReplacementPlugin.js", "lib/JavascriptMetaInfoPlugin.js", "lib/Module.js", "lib/NormalModule.js", "lib/asset/AssetG...
[]
true
webpack/webpack
21,171
issue_to_patch
perf: pack ExportInfo inline-exports flags into a bitfield
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
5f01ae568f5fa6a41a7b83752742b8d9f4f81db5
2e5c4e6a2c6594c703a2b40f1f596231e1d97701
diff --git a/.changeset/export-info-inline-flags.md b/.changeset/export-info-inline-flags.md new file mode 100644 index 00000000000..291ec83d561 --- /dev/null +++ b/.changeset/export-info-inline-flags.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Reduce ExportInfo memory and cache size for inline-exports metadata. ...
[ ".changeset/export-info-inline-flags.md", "lib/ExportsInfo.js", "types.d.ts" ]
[]
true
webpack/webpack
21,150
issue_to_patch
fix(html): decode HTML entities in extracted attribute URLs
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Attribute values like `<img src="a&amp;b.png">` were resolved with the entity left raw (`a&amp;b.png`), so the file failed to resolve. This decodes the extracted URL via the ex...
6e529712741639e4142e0efdf52645f4a51a8913
7ba60c2dfb0ed3b2fb3c00f59edabb2873d3f5d0
[ "test/configCases/html/entity-decode/__snapshots__/ConfigCacheTest.snap", "test/configCases/html/entity-decode/__snapshots__/ConfigTest.snap", "test/configCases/html/entity-decode/img&x.png", "test/configCases/html/entity-decode/index.js", "test/configCases/html/entity-decode/page.html", "test/configCases...
[ { "comment": "Let's use snapshots testing here", "path": "test/configCases/html/entity-decode/index.js", "hunk": "@@ -0,0 +1,12 @@\n+const fs = require(\"fs\");\n+const path = require(\"path\");\n+\n+require(\"./page.html\");\n+\n+it(\"decodes HTML entities in an extracted attribute URL\", () => {\n+\tc...
diff --git a/test/configCases/html/entity-decode/__snapshots__/ConfigCacheTest.snap b/test/configCases/html/entity-decode/__snapshots__/ConfigCacheTest.snap new file mode 100644 index 00000000000..8194ba8d0e6 --- /dev/null +++ b/test/configCases/html/entity-decode/__snapshots__/ConfigCacheTest.snap @@ -0,0 +1,11 @@ +//...
true
webpack/webpack
21,170
issue_to_patch
fix: merge inner modules' top level declarations in concatenated modules
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
6e529712741639e4142e0efdf52645f4a51a8913
b78b8d71a7cdcf95bff514cffb294137678357c9
diff --git a/.changeset/concat-top-level-declarations.md b/.changeset/concat-top-level-declarations.md new file mode 100644 index 00000000000..95c980d3d36 --- /dev/null +++ b/.changeset/concat-top-level-declarations.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Fix merging of inner modules' top-level declarations i...
[ ".changeset/concat-top-level-declarations.md", "lib/optimize/ConcatenatedModule.js", "test/configCases/concatenate-modules/top-level-declarations-library-conflict/index.js", "test/configCases/concatenate-modules/top-level-declarations-library-conflict/module.js", "test/configCases/concatenate-modules/top-le...
[]
diff --git a/test/configCases/concatenate-modules/top-level-declarations-library-conflict/index.js b/test/configCases/concatenate-modules/top-level-declarations-library-conflict/index.js new file mode 100644 index 00000000000..37abc78979f --- /dev/null +++ b/test/configCases/concatenate-modules/top-level-declarations-l...
true
webpack/webpack
21,168
issue_to_patch
refactor: consolidate HTML/CSS tokenizer modules into syntax.js
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
6e529712741639e4142e0efdf52645f4a51a8913
a08bbdcddd799c9942631f82aaeeca6d8fc44acc
diff --git a/TESTING_DOCS.md b/TESTING_DOCS.md index badf47cebf5..b8efdb19279 100644 --- a/TESTING_DOCS.md +++ b/TESTING_DOCS.md @@ -66,12 +66,12 @@ This document explains the structure of the `test/` directory in the Webpack pro ### 12b. `html5lib-tests/` -- **Purpose**: WHATWG html5lib-tests tokenizer conformanc...
[ "TESTING_DOCS.md", "lib/css/CssParser.js", "lib/css/syntax.js", "lib/dependencies/CssIcssExportDependency.js", "lib/html/HtmlParser.js", "lib/html/buildHtmlAst.js", "lib/html/syntax.js", "test/HtmlParser.unittest.js", "test/buildHtmlAst.unittest.js", "test/cssIdentifier.unittest.js", "test/helpe...
[]
diff --git a/test/HtmlParser.unittest.js b/test/HtmlParser.unittest.js index d8f1070dff1..db1e93983b7 100644 --- a/test/HtmlParser.unittest.js +++ b/test/HtmlParser.unittest.js @@ -2,9 +2,12 @@ const path = require("path"); -jest.mock("../lib/html/buildHtmlAst", () => jest.fn()); +jest.mock("../lib/html/syntax", (...
true
webpack/webpack
21,167
issue_to_patch
perf: release inner-graph state, fast-path inlined-export checks and skip inlined entry re-parse
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Profiling a 7k-module three.js production build against v5.107.2 showed regressed memory (+34 MB retained heap) and large per-build costs: inner-graph state was retained for the wh...
6e529712741639e4142e0efdf52645f4a51a8913
187d2fd7cd7660de2da47cc1314928764b5bc0ce
diff --git a/.changeset/avoid-entry-iife-fast-path.md b/.changeset/avoid-entry-iife-fast-path.md new file mode 100644 index 00000000000..c8793bacf02 --- /dev/null +++ b/.changeset/avoid-entry-iife-fast-path.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Skip re-parsing the inlined entry module when no renaming is ne...
[ ".changeset/avoid-entry-iife-fast-path.md", ".changeset/concatenate-hash-micro-opts.md", ".changeset/inner-graph-release-and-inline-fast-paths.md", "lib/ExportsInfo.js", "lib/dependencies/HarmonyImportSpecifierDependency.js", "lib/javascript/JavascriptModulesPlugin.js", "lib/optimize/ConcatenatedModule....
[]
true
webpack/webpack
21,166
issue_to_patch
perf: derive block modules from the first extracted runtime in buildChunkGraph
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
30b18a6574116238dad9433dbca0eddc7dd9ef49
b602979866cf0b7368f89a0be3b0a9504a5de61e
diff --git a/.changeset/share-block-modules-across-runtimes.md b/.changeset/share-block-modules-across-runtimes.md new file mode 100644 index 00000000000..87c35e5d70b --- /dev/null +++ b/.changeset/share-block-modules-across-runtimes.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Speed up buildChunkGraph by deriving...
[ ".changeset/share-block-modules-across-runtimes.md", "lib/buildChunkGraph.js" ]
[]
true
webpack/webpack
21,159
issue_to_patch
fix: expand HTML parser tag and attribute coverage
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
bbb8c3f9a74bbfc3529f7684e1cc31bf3708a8f9
d4a816e2fc0903210c85965af73377648974b6ee
diff --git a/.changeset/html-parser-coverage-and-entities.md b/.changeset/html-parser-coverage-and-entities.md new file mode 100644 index 00000000000..3c066d43c09 --- /dev/null +++ b/.changeset/html-parser-coverage-and-entities.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Expand HTML parser tag/attribute coverage ...
[ ".changeset/html-parser-coverage-and-entities.md", "cspell.json", "lib/dependencies/HtmlInlineStyleDependency.js", "lib/html/HtmlParser.js", "lib/html/buildHtmlAst.js", "lib/html/walkHtmlTokens.js", "test/buildHtmlAst.unittest.js", "test/configCases/html/entities/__snapshots__/ConfigCacheTest.snap", ...
[]
diff --git a/test/buildHtmlAst.unittest.js b/test/buildHtmlAst.unittest.js index a2135f7ccbb..5336660efe2 100644 --- a/test/buildHtmlAst.unittest.js +++ b/test/buildHtmlAst.unittest.js @@ -203,6 +203,15 @@ describe("buildHtmlAst", () => { ).toBe(NS_SVG); }); + it("should not resolve prototype-named SVG tags and ...
true
webpack/webpack
21,164
issue_to_patch
refactor: create dedicated module classes per module type
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
30b18a6574116238dad9433dbca0eddc7dd9ef49
bf97859d021c54c81c6fcb1a86f0ebdafdc1518b
diff --git a/.changeset/dedicated-module-classes.md b/.changeset/dedicated-module-classes.md new file mode 100644 index 00000000000..8f1257aa131 --- /dev/null +++ b/.changeset/dedicated-module-classes.md @@ -0,0 +1,5 @@ +--- +"webpack": minor +--- + +Add dedicated module classes for all built-in module types. diff --gi...
[ ".changeset/dedicated-module-classes.md", "lib/NormalModule.js", "lib/asset/AssetModule.js", "lib/asset/AssetModulesPlugin.js", "lib/html/HtmlModule.js", "lib/html/HtmlModulesPlugin.js", "lib/javascript/JavascriptModule.js", "lib/javascript/JavascriptModulesPlugin.js", "lib/json/JsonModule.js", "l...
[]
diff --git a/test/configCases/module-classes/asset-side-effect-free/file.png b/test/configCases/module-classes/asset-side-effect-free/file.png new file mode 100644 index 00000000000..08cd6f2bfd1 Binary files /dev/null and b/test/configCases/module-classes/asset-side-effect-free/file.png differ diff --git a/test/configC...
true
webpack/webpack
21,136
issue_to_patch
feat: skip dead dependencies guarded by inlined constants
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-...
bbb8c3f9a74bbfc3529f7684e1cc31bf3708a8f9
a68f3afef7fc829884b9aa02f0c038fa291e091d
diff --git a/.changeset/cross-module-dead-branch-skipping.md b/.changeset/cross-module-dead-branch-skipping.md new file mode 100644 index 00000000000..356f11abdb6 --- /dev/null +++ b/.changeset/cross-module-dead-branch-skipping.md @@ -0,0 +1,5 @@ +--- +"webpack": minor +--- + +Skip import specifiers, `require()` and `i...
[ ".changeset/cross-module-dead-branch-skipping.md", "cspell.json", "lib/dependencies/CommonJsImportsParserPlugin.js", "lib/dependencies/CommonJsRequireDependency.js", "lib/dependencies/HarmonyImportDependencyParserPlugin.js", "lib/dependencies/HarmonyImportGuard.js", "lib/dependencies/HarmonyImportSpecif...
[ { "comment": "## Useless conditional\n\nThis use of variable 'isDEV' always evaluates to false.\n\n---\n\nTo fix the useless-conditional warning without changing runtime behavior, replace the ternary expression on line 19 with its always-selected branch (<code>LIVE</code>). This preserves the existing assertion...
diff --git a/test/AppendOnlyStackedSet.unittest.js b/test/AppendOnlyStackedSet.unittest.js deleted file mode 100644 index 6b05b5225b8..00000000000 --- a/test/AppendOnlyStackedSet.unittest.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -const AppendOnlyStackedSet = require("../lib/util/AppendOnlyStackedSet"); - -des...
true
webpack/webpack
21,136
comment_to_fix
feat: skip dead dependencies guarded by inlined constants
## Useless conditional This use of variable 'isDEV' always evaluates to false. --- To fix the useless-conditional warning without changing runtime behavior, replace the ternary expression on line 19 with its always-selected branch (<code>LIVE</code>). This preserves the existing assertion (<code>"LIVE_VALUE"</code>)...
bbb8c3f9a74bbfc3529f7684e1cc31bf3708a8f9
a68f3afef7fc829884b9aa02f0c038fa291e091d
diff --git a/test/configCases/inline-exports/cross-module-dead-branch/index.js b/test/configCases/inline-exports/cross-module-dead-branch/index.js new file mode 100644 index 00000000000..bb9eafb861f --- /dev/null +++ b/test/configCases/inline-exports/cross-module-dead-branch/index.js @@ -0,0 +1,217 @@ +import { isDEV, ...
[ "test/configCases/inline-exports/cross-module-dead-branch/index.js" ]
[ { "comment": "## Useless conditional\n\nThis use of variable 'isDEV' always evaluates to false.\n\n---\n\nTo fix the useless-conditional warning without changing runtime behavior, replace the ternary expression on line 19 with its always-selected branch (<code>LIVE</code>). This preserves the existing assertion...
true
webpack/webpack
21,136
comment_to_fix
feat: skip dead dependencies guarded by inlined constants
## Useless conditional This expression always evaluates to false. --- General fix approach: replace conditionals that are provably constant with an equivalent expression that preserves behavior but avoids an always-true/always-false boolean pattern that static analysis flags.</p> <p>Best targeted fix here: in <code>...
bbb8c3f9a74bbfc3529f7684e1cc31bf3708a8f9
a68f3afef7fc829884b9aa02f0c038fa291e091d
diff --git a/test/configCases/inline-exports/cross-module-dead-branch/index.js b/test/configCases/inline-exports/cross-module-dead-branch/index.js new file mode 100644 index 00000000000..bb9eafb861f --- /dev/null +++ b/test/configCases/inline-exports/cross-module-dead-branch/index.js @@ -0,0 +1,217 @@ +import { isDEV, ...
[ "test/configCases/inline-exports/cross-module-dead-branch/index.js" ]
[ { "comment": "## Useless conditional\n\nThis expression always evaluates to false.\n\n---\n\nGeneral fix approach: replace conditionals that are provably constant with an equivalent expression that preserves behavior but avoids an always-true/always-false boolean pattern that static analysis flags.</p>\n<p>Best...
true
webpack/webpack
21,136
comment_to_fix
feat: skip dead dependencies guarded by inlined constants
## Useless conditional This use of variable 'isDEV' always evaluates to false. --- General fix: remove condition parts that are provably constant in the current context so the conditional reflects only meaningful logic.</p> <p>Best fix here: in <code>test/configCases/inline-exports/cross-module-dead-branch/index.js<...
bbb8c3f9a74bbfc3529f7684e1cc31bf3708a8f9
a68f3afef7fc829884b9aa02f0c038fa291e091d
diff --git a/test/configCases/inline-exports/cross-module-dead-branch/index.js b/test/configCases/inline-exports/cross-module-dead-branch/index.js new file mode 100644 index 00000000000..bb9eafb861f --- /dev/null +++ b/test/configCases/inline-exports/cross-module-dead-branch/index.js @@ -0,0 +1,217 @@ +import { isDEV, ...
[ "test/configCases/inline-exports/cross-module-dead-branch/index.js" ]
[ { "comment": "## Useless conditional\n\nThis use of variable 'isDEV' always evaluates to false.\n\n---\n\nGeneral fix: remove condition parts that are provably constant in the current context so the conditional reflects only meaningful logic.</p>\n<p>Best fix here: in <code>test/configCases/inline-exports/cross...
true
webpack/webpack
21,136
comment_to_fix
feat: skip dead dependencies guarded by inlined constants
## Useless conditional This use of variable 'isDEV' always evaluates to false. --- To fix this, simplify the line-44 condition by removing the always-false <code>isDEV</code> operand from the <code>||</code> expression.</p> <p>Best single change (no functional change):</p> <ul> <li>In <code>test/configCases/inline-e...
bbb8c3f9a74bbfc3529f7684e1cc31bf3708a8f9
a68f3afef7fc829884b9aa02f0c038fa291e091d
diff --git a/test/configCases/inline-exports/cross-module-dead-branch/index.js b/test/configCases/inline-exports/cross-module-dead-branch/index.js new file mode 100644 index 00000000000..bb9eafb861f --- /dev/null +++ b/test/configCases/inline-exports/cross-module-dead-branch/index.js @@ -0,0 +1,217 @@ +import { isDEV, ...
[ "test/configCases/inline-exports/cross-module-dead-branch/index.js" ]
[ { "comment": "## Useless conditional\n\nThis use of variable 'isDEV' always evaluates to false.\n\n---\n\nTo fix this, simplify the line-44 condition by removing the always-false <code>isDEV</code> operand from the <code>||</code> expression.</p>\n<p>Best single change (no functional change):</p>\n<ul>\n<li>In ...
true
webpack/webpack
21,136
comment_to_fix
feat: skip dead dependencies guarded by inlined constants
## Useless conditional This use of variable 'nothing' always evaluates to false. --- General fix: remove nullish-coalescing (or other conditional logic) when one operand is statically known to make the expression redundant.</p> <p>Best fix here (no behavior change): in <code>test/configCases/inline-exports/cross-mod...
bbb8c3f9a74bbfc3529f7684e1cc31bf3708a8f9
a68f3afef7fc829884b9aa02f0c038fa291e091d
diff --git a/test/configCases/inline-exports/cross-module-dead-branch/index.js b/test/configCases/inline-exports/cross-module-dead-branch/index.js new file mode 100644 index 00000000000..bb9eafb861f --- /dev/null +++ b/test/configCases/inline-exports/cross-module-dead-branch/index.js @@ -0,0 +1,217 @@ +import { isDEV, ...
[ "test/configCases/inline-exports/cross-module-dead-branch/index.js" ]
[ { "comment": "## Useless conditional\n\nThis use of variable 'nothing' always evaluates to false.\n\n---\n\nGeneral fix: remove nullish-coalescing (or other conditional logic) when one operand is statically known to make the expression redundant.</p>\n<p>Best fix here (no behavior change): in <code>test/configC...
true
webpack/webpack
21,149
issue_to_patch
refactor: simplify star-reexport passthrough skipping
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** **What kind of change does this PR introduce?** Follow-up to the `export *` passthrough skipping in `SideEffectsFlagPlugin`: replaces the special handled single-star chain...
7bf5a726d7a25bb0d2c8edda2fbef9e98d28fd2f
f1e77faa6d2f435b3fe8257e24783d35629a0321
diff --git a/lib/ExportsInfo.js b/lib/ExportsInfo.js index 0500fb48d76..0ce1292d089 100644 --- a/lib/ExportsInfo.js +++ b/lib/ExportsInfo.js @@ -1609,7 +1609,7 @@ class ExportInfo { * Move the target forward as long resolveTargetFilter is fulfilled * @param {ModuleGraph} moduleGraph the module graph * @param {...
[ "lib/ExportsInfo.js", "lib/optimize/SideEffectsFlagPlugin.js", "test/configCases/side-effects/star-reexport-fan-out-skip/index.js", "test/configCases/side-effects/star-reexport-fan-out-skip/node_modules/lib/a.js", "test/configCases/side-effects/star-reexport-fan-out-skip/node_modules/lib/b-1.js", "test/co...
[]
diff --git a/test/configCases/side-effects/star-reexport-fan-out-skip/index.js b/test/configCases/side-effects/star-reexport-fan-out-skip/index.js new file mode 100644 index 00000000000..d8c2da328e6 --- /dev/null +++ b/test/configCases/side-effects/star-reexport-fan-out-skip/index.js @@ -0,0 +1,30 @@ +import * as ns fr...
true
webpack/webpack
21,160
issue_to_patch
chore(deps): bump codecov/codecov-action from 6.0.1 to 7.0.0 in the dependencies group
Bumps the dependencies group with 1 update: [codecov/codecov-action](https://github.com/codecov/codecov-action). Updates `codecov/codecov-action` from 6.0.1 to 7.0.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/codecov/codecov-action/releases">codecov/codecov-action's rele...
bbb8c3f9a74bbfc3529f7684e1cc31bf3708a8f9
c827ac2b4e8ad903b6d1bf3e84fa4395fb947ab0
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cca47ca3a14..a589c42e768 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -161,7 +161,7 @@ jobs: - run: yarn cover:unit --ci --cacheDirectory .jest-cache - name: Codecov - uses: codecov/codecov-a...
[ ".github/workflows/test.yml" ]
[]
true
webpack/webpack
21,158
issue_to_patch
test: remove stale snapshot
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-...
7bf5a726d7a25bb0d2c8edda2fbef9e98d28fd2f
af26b175150343cd28fd9a5e452ba03283aca97e
[ "test/configCases/inline-exports/basic/__snapshots__/errors.snap" ]
[]
diff --git a/test/configCases/inline-exports/basic/__snapshots__/errors.snap b/test/configCases/inline-exports/basic/__snapshots__/errors.snap deleted file mode 100644 index 6a933e6941c..00000000000 --- a/test/configCases/inline-exports/basic/__snapshots__/errors.snap +++ /dev/null @@ -1,19 +0,0 @@ -// Jest Snapshot v1...
true
webpack/webpack
21,157
issue_to_patch
feat: resolve url() inside HTML style attributes via CSS parser `as` option
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** webpack's experimental HTML support didn't resolve `url()` (nor `image-set()` / `@import`) references inside inline `style="..."` attributes — the value was emitted verbatim, so re...
7bf5a726d7a25bb0d2c8edda2fbef9e98d28fd2f
5486f0523ba451512bad0f377784c3052ee2b940
diff --git a/.changeset/css-parser-as-block-contents.md b/.changeset/css-parser-as-block-contents.md new file mode 100644 index 00000000000..6218d470a8a --- /dev/null +++ b/.changeset/css-parser-as-block-contents.md @@ -0,0 +1,5 @@ +--- +"webpack": minor +--- + +Add CSS parser `as` option and resolve `url()` inside HTM...
[ ".changeset/css-parser-as-block-contents.md", "declarations/WebpackOptions.d.ts", "lib/config/defaults.js", "lib/css/CssGenerator.js", "lib/css/CssParser.js", "lib/css/walkCssTokens.js", "lib/dependencies/HtmlInlineStyleDependency.js", "lib/html/HtmlParser.js", "schemas/WebpackOptions.check.js", "...
[]
diff --git a/test/Defaults.unittest.js b/test/Defaults.unittest.js index 5d91c8e0dfa..fa313b96ffe 100644 --- a/test/Defaults.unittest.js +++ b/test/Defaults.unittest.js @@ -2365,7 +2365,7 @@ describe("snapshots", () => { + "fullySpecified": true, + }, + }, - @@ ... @@ +...
true
webpack/webpack
21,155
issue_to_patch
feat: support [uniqueName] and [uniquename] placeholders in template paths
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
7bf5a726d7a25bb0d2c8edda2fbef9e98d28fd2f
27e7944db449d1be787b67182459b9d87c1a1426
diff --git a/.changeset/uniquename-placeholder.md b/.changeset/uniquename-placeholder.md new file mode 100644 index 00000000000..7cb8978f819 --- /dev/null +++ b/.changeset/uniquename-placeholder.md @@ -0,0 +1,5 @@ +--- +"webpack": minor +--- + +Support `[uniqueName]` and its `[uniquename]` alias in template paths. diff...
[ ".changeset/uniquename-placeholder.md", "cspell.json", "lib/Compilation.js", "lib/TemplatedPathPlugin.js", "lib/dependencies/CssIcssExportDependency.js", "test/TemplatedPathPlugin.unittest.js", "test/configCases/css/local-ident-name/__snapshots__/ConfigCacheTest.snap", "test/configCases/css/local-iden...
[]
diff --git a/test/TemplatedPathPlugin.unittest.js b/test/TemplatedPathPlugin.unittest.js index 9fa16d914e2..c5cbbc45bcc 100644 --- a/test/TemplatedPathPlugin.unittest.js +++ b/test/TemplatedPathPlugin.unittest.js @@ -94,6 +94,15 @@ describe("TemplatedPathPlugin.interpolate", () => { ).toBe("_"); }); + it("interp...
true
webpack/webpack
21,156
issue_to_patch
chore: remove resolved TODO comments
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
7bf5a726d7a25bb0d2c8edda2fbef9e98d28fd2f
09041af56084b4616a66f9744c997eb58c942207
diff --git a/lib/html/HtmlParser.js b/lib/html/HtmlParser.js index 04a1ab55714..26725cc1c95 100644 --- a/lib/html/HtmlParser.js +++ b/lib/html/HtmlParser.js @@ -481,8 +481,6 @@ const META = new Map([ "msapplication-wide310x150logo", "msapplication-square310x310logo", "msapplication-config", - // TODO Do w...
[ "lib/html/HtmlParser.js", "lib/javascript/JavascriptParser.js", "lib/util/createHash.js", "lib/wasm-sync/WebAssemblyParser.js" ]
[]
true
webpack/webpack
21,154
issue_to_patch
perf: skip dependency error/warning reporting for unchanged modules on rebuilds
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
0afe2924ec50e1408d1c0eb6b7d9c9f60e840e82
723466fa75343cfadf3e93c23aa7c4af00cd2fc9
diff --git a/.changeset/skip-dependency-report-unchanged-modules.md b/.changeset/skip-dependency-report-unchanged-modules.md new file mode 100644 index 00000000000..5dca0b8cfaa --- /dev/null +++ b/.changeset/skip-dependency-report-unchanged-modules.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Skip dependency error...
[ ".changeset/skip-dependency-report-unchanged-modules.md", "lib/Compilation.js", "test/watchCases/warnings/dependency-warnings-unchanged-modules/0/dyn.js", "test/watchCases/warnings/dependency-warnings-unchanged-modules/0/index.js", "test/watchCases/warnings/dependency-warnings-unchanged-modules/0/module.js"...
[]
diff --git a/test/watchCases/warnings/dependency-warnings-unchanged-modules/0/dyn.js b/test/watchCases/warnings/dependency-warnings-unchanged-modules/0/dyn.js new file mode 100644 index 00000000000..f808c5a2982 --- /dev/null +++ b/test/watchCases/warnings/dependency-warnings-unchanged-modules/0/dyn.js @@ -0,0 +1,3 @@ +...
true
webpack/webpack
21,151
issue_to_patch
perf: avoid the entry IIFE for multiple inlined entry modules
**Summary** When more than one entry module is inlined into a chunk, each was always wrapped in an IIFE to isolate it from the others — the `// TODO check globals and top-level declarations of other entries and chunk modules` in `JavascriptModulesPlugin`. Under `optimization.avoidEntryIife`, this extends the existing ...
4d366acc6916ac5f4156308f521ccf23cb4fd236
392d13b88b000d38456a3774cd787f14bec9b287
diff --git a/.changeset/multiple-inlined-entries-no-iife.md b/.changeset/multiple-inlined-entries-no-iife.md new file mode 100644 index 00000000000..d248664a450 --- /dev/null +++ b/.changeset/multiple-inlined-entries-no-iife.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Avoid the entry IIFE for multiple inlined ent...
[ ".changeset/multiple-inlined-entries-no-iife.md", "lib/javascript/JavascriptModulesPlugin.js", "test/configCases/module/iife-multiple-entry-modules-library/first.js", "test/configCases/module/iife-multiple-entry-modules-library/second.js", "test/configCases/module/iife-multiple-entry-modules-library/test.co...
[]
diff --git a/test/configCases/module/iife-multiple-entry-modules-library/first.js b/test/configCases/module/iife-multiple-entry-modules-library/first.js new file mode 100644 index 00000000000..ef60bf856fa --- /dev/null +++ b/test/configCases/module/iife-multiple-entry-modules-library/first.js @@ -0,0 +1,8 @@ +var resul...
true
webpack/webpack
21,152
issue_to_patch
perf(html): reduce allocations and speed up the experimental HTML parser
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Behavior-preserving allocation- and CPU-focused optimizations to the experimental HTML parser (the `walkHtmlTokens` tokenizer and the `buildHtmlAst` tree builder). The changes: rep...
9bd0b918a8421ee8d04d12e6a0a5022add04d2ea
81e37d6dfd1d1462f85491b51d2788f67c33d456
diff --git a/.changeset/html-parser-end-tag-allocations.md b/.changeset/html-parser-end-tag-allocations.md new file mode 100644 index 00000000000..bd4ec86f29b --- /dev/null +++ b/.changeset/html-parser-end-tag-allocations.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Speed up and reduce allocations in the experimen...
[ ".changeset/html-parser-end-tag-allocations.md", "lib/html/buildHtmlAst.js", "lib/html/walkHtmlTokens.js" ]
[]
true
webpack/webpack
21,146
issue_to_patch
refactor(ConcatenatedModule): replace stale codegen-cache TODO with rationale
**Summary** Replaces a stale `// TODO cache codeGeneration results` in `ConcatenatedModule` with a comment explaining why that cache would be useless: `Compilation` groups a module's runtimes by hash and already memoizes the outer `codeGeneration` per `(module, runtime)`, so the inner per-module `codeGeneration` call ...
87394de1d382a3e780da8752f8ff7c5427393dc9
c423aad409765258ee85429e153c423197cde98e
diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index edd621897e3..805c8a710af 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -2246,7 +2246,8 @@ ${defineGetters}` usedNames ); - // TODO cache codeGeneration results + //...
[ "lib/optimize/ConcatenatedModule.js" ]
[]
true
webpack/webpack
21,148
issue_to_patch
test(SideEffectsFlagPlugin): cover multi-star and mixed barrel passthrough
Multi-star (`export * from a; export * from b`) and mixed (`export *` + named) barrels are merge points: named imports already resolve per-name onto the real modules and single-star sub-chains collapse, while the barrel itself is retained for namespace imports. Add regression tests for both cases and replace the stale ...
87394de1d382a3e780da8752f8ff7c5427393dc9
7802f8170d25122df41fd7b665f8a398ef947a78
diff --git a/lib/optimize/SideEffectsFlagPlugin.js b/lib/optimize/SideEffectsFlagPlugin.js index 008f06417ca..1ea14b632e5 100644 --- a/lib/optimize/SideEffectsFlagPlugin.js +++ b/lib/optimize/SideEffectsFlagPlugin.js @@ -533,7 +533,9 @@ class SideEffectsFlagPlugin { if (connection.originModule !== null) { ...
[ "lib/optimize/SideEffectsFlagPlugin.js", "test/configCases/side-effects/star-reexport-passthrough-skip-mixed/index.js", "test/configCases/side-effects/star-reexport-passthrough-skip-mixed/node_modules/lib/a.js", "test/configCases/side-effects/star-reexport-passthrough-skip-mixed/node_modules/lib/c.js", "tes...
[]
diff --git a/test/configCases/side-effects/star-reexport-passthrough-skip-mixed/index.js b/test/configCases/side-effects/star-reexport-passthrough-skip-mixed/index.js new file mode 100644 index 00000000000..be8e5564cd5 --- /dev/null +++ b/test/configCases/side-effects/star-reexport-passthrough-skip-mixed/index.js @@ -0...
true
webpack/webpack
21,147
issue_to_patch
refactor: strict types for the test suite
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Enables strict type-checking for the test files (`test/*.{unittest,basictest,test,longtest}.js` and `test/helpers/**`) and annotates them so `tsc -p tsconfig.types.test.json` passe...
87394de1d382a3e780da8752f8ff7c5427393dc9
155a60a982f39e2c7d7719ba7bc8867e0c33281c
diff --git a/declarations.d.ts b/declarations.d.ts index d616bbaadc2..edf785792ca 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -3,6 +3,7 @@ type EXPECTED_FUNCTION = Function; type EXPECTED_OBJECT = object; declare module "*.json"; +declare module "rimraf"; // Deprecated NodeJS API usages in webpack ...
[ "declarations.d.ts", "declarations.test.d.ts", "test/BannerPlugin.test.js", "test/BinaryMiddleware.unittest.js", "test/BuildDependencies.longtest.js", "test/ChangesAndRemovals.test.js", "test/Chunk.unittest.js", "test/Cli.basictest.js", "test/Compiler-caching.test.js", "test/Compiler-filesystem-ca...
[ { "comment": "## Expression has no effect\n\nThis expression has no effect.\n\n---\n\nTo fix this without changing test intent, keep the computed member expression but use its value in a harmless way.<br>\nBest single change in <code>test/JavascriptParser.unittest.js</code> is:</p>\n<ul>\n<li>Replace the standa...
diff --git a/declarations.test.d.ts b/declarations.test.d.ts index 621b1831f2c..12bc7ad4de5 100644 --- a/declarations.test.d.ts +++ b/declarations.test.d.ts @@ -1,8 +1,15 @@ declare module "*.json"; +// optional peer of webpack-cli, not installed +declare module "webpack-dev-server"; + type Env = Record<string, any...
true
webpack/webpack
21,147
comment_to_fix
refactor: strict types for the test suite
## Expression has no effect This expression has no effect. --- To fix this without changing test intent, keep the computed member expression but use its value in a harmless way.<br> Best single change in <code>test/JavascriptParser.unittest.js</code> is:</p> <ul> <li>Replace the standalone no-op line: <ul> <li><code...
87394de1d382a3e780da8752f8ff7c5427393dc9
155a60a982f39e2c7d7719ba7bc8867e0c33281c
diff --git a/test/JavascriptParser.unittest.js b/test/JavascriptParser.unittest.js index 31a8411f44d..a129d5dc444 100644 --- a/test/JavascriptParser.unittest.js +++ b/test/JavascriptParser.unittest.js @@ -7,9 +7,14 @@ const BasicEvaluatedExpression = require("../lib/javascript/BasicEvaluatedExpres const JavascriptPars...
[ "test/JavascriptParser.unittest.js" ]
[ { "comment": "## Expression has no effect\n\nThis expression has no effect.\n\n---\n\nTo fix this without changing test intent, keep the computed member expression but use its value in a harmless way.<br>\nBest single change in <code>test/JavascriptParser.unittest.js</code> is:</p>\n<ul>\n<li>Replace the standa...
true
webpack/webpack
21,128
issue_to_patch
Introduce a new option for workers chunks' filenames <!-- Please don't delete this template or we'll close your issue --> ## Feature request <!-- Issues that contain questions or support requests will be closed. --> <!-- Before creating an issue please make sure you are using the latest version of webpack. --> ...
feat: add output.workerChunkFilename to set the worker chunk filename template
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Adds `output.workerChunkFilename` so the filename template of worker chunks can be set independently of `output.chunkFilename`/`output.filename`. `WorkerPlugin` applies it to t...
d39efba2ed8a819020cc585fcba171c96e6acd67
a629385f729371128009316352ddb9a91c14bda7
diff --git a/.changeset/worker-chunk-filename.md b/.changeset/worker-chunk-filename.md new file mode 100644 index 00000000000..739817ffaf3 --- /dev/null +++ b/.changeset/worker-chunk-filename.md @@ -0,0 +1,5 @@ +--- +"webpack": minor +--- + +Add `output.workerChunkFilename` and `entry.worker` for worker chunk filenames...
[ ".changeset/worker-chunk-filename.md", "declarations/WebpackOptions.d.ts", "lib/EntryOptionPlugin.js", "lib/RuntimePlugin.js", "lib/config/defaults.js", "lib/config/normalization.js", "lib/dependencies/ImportParserPlugin.js", "lib/dependencies/WorkerPlugin.js", "lib/javascript/JavascriptModulesPlugi...
[]
diff --git a/test/Defaults.unittest.js b/test/Defaults.unittest.js index 15fedd1e5fe..016acbd29ac 100644 --- a/test/Defaults.unittest.js +++ b/test/Defaults.unittest.js @@ -460,6 +460,7 @@ describe("snapshots", () => { "uniqueName": "webpack", "wasmLoading": "fetch", "webassemblyModuleFilename": "[...
true
webpack/webpack
21,142
issue_to_patch
fix: apply global `overrideStrict` for ContextModule
**Summary** **What kind of change does this PR introduce?** Fixes https://github.com/webpack/webpack/pull/19327. **Did you add tests for your changes?** Yes **Does this PR introduce a breaking change?** No **If relevant, what needs to be documented once your ce you already documented?** n/a ...
f9bb186c675797257b65ab7849a23c5996e7a86f
df1f80a7cb5bc37b29ed05bf451ec4b76a300bc9
diff --git a/lib/ContextModule.js b/lib/ContextModule.js index 68ec98cb81a..5c1a18bee73 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -464,9 +464,18 @@ class ContextModule extends Module { exportsType: "default", defaultObject: "redirect-warn" }; + + // Respect the global module parser `ov...
[ "lib/ContextModule.js", "test/configCases/parsing/override-strict-context-module/strict.js", "test/configCases/parsing/override-strict-context-module/sub/a.js", "test/configCases/parsing/override-strict-context-module/webpack.config.js" ]
[]
diff --git a/test/configCases/parsing/override-strict-context-module/strict.js b/test/configCases/parsing/override-strict-context-module/strict.js new file mode 100644 index 00000000000..958e17fd2f6 --- /dev/null +++ b/test/configCases/parsing/override-strict-context-module/strict.js @@ -0,0 +1,16 @@ +import fs from "f...
true
webpack/webpack
21,144
issue_to_patch
Export of CJS require("file.json") has broken in 5.107.1 ### Have you used AI? None ### Bug Description ``` export const data = require("./data.json"); ``` in production build since 5.107.1 this exports empty object. ### Link to Minimal Reproduction and step to reproduce https://github.com/Knagis/webpack-json-r...
fix: keep full exports when a require() binding is re-exported
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Fixes #21135. A `const NAME = require(LITERAL)` binding only tracked member accesses (`NAME.x`) and value reads of `NAME` to compute its referenced exports. When `NAME` was re-expo...
fa28e4a9a3ae2eb67f09e628e75ba4f7052f5ec6
bbfeddce2f5907a90fe2ab924b40dd4561f9d491
diff --git a/.changeset/reexport-require-binding.md b/.changeset/reexport-require-binding.md new file mode 100644 index 00000000000..3628d8816fd --- /dev/null +++ b/.changeset/reexport-require-binding.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Keep the full exports object when a `require()` binding is re-exporte...
[ ".changeset/reexport-require-binding.md", "lib/dependencies/CommonJsImportsParserPlugin.js", "test/cases/cjs-tree-shaking/reexport-require-binding/index.js", "test/cases/cjs-tree-shaking/reexport-require-binding/module.js", "test/cases/cjs-tree-shaking/reexport-require-binding/partial.js", "test/cases/cjs...
[]
diff --git a/test/cases/cjs-tree-shaking/reexport-require-binding/index.js b/test/cases/cjs-tree-shaking/reexport-require-binding/index.js new file mode 100644 index 00000000000..e785f3f94c1 --- /dev/null +++ b/test/cases/cjs-tree-shaking/reexport-require-binding/index.js @@ -0,0 +1,22 @@ +import { ns as whole } from "...
true
webpack/webpack
21,143
issue_to_patch
Add types to HMR runtime templates and drop @ts-nocheck
Type the two HMR runtime template functions with JSDoc and remove their // @ts-nocheck pragmas. Strip JSDoc comments in Template.getFunctionContent so the type annotations are never emitted into the bundled runtime.
f9bb186c675797257b65ab7849a23c5996e7a86f
2fdaba64ff53594a69b34562f1f5d900bd3b1f4e
diff --git a/lib/Template.js b/lib/Template.js index e171e216c69..3c71f6af6c0 100644 --- a/lib/Template.js +++ b/lib/Template.js @@ -34,6 +34,10 @@ const NUMBER_OF_IDENTIFIER_START_CHARS = DELTA_A_TO_Z * 2 + 2; // a-z A-Z _ $ const NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = NUMBER_OF_IDENTIFIER_START_CHARS + 10; // a...
[ "lib/Template.js", "lib/hmr/HotModuleReplacement.runtime.js", "lib/hmr/JavascriptHotModuleReplacement.runtime.js", "test/Template.unittest.js" ]
[ { "comment": "## Invocation of non-function\n\nCallee is not a function: it has type undefined.\n\n---\n\n<p>Use a guaranteed-safe own-property check at the flagged call site instead of directly invoking <code>$hasOwnProperty$</code>.</p>\n<p>Best fix in this file/region:</p>\n<ul>\n<li>In <code>lib/hmr/Javascr...
diff --git a/test/Template.unittest.js b/test/Template.unittest.js index 78eeae4b52e..dccc8ed3faa 100644 --- a/test/Template.unittest.js +++ b/test/Template.unittest.js @@ -24,4 +24,22 @@ describe("Template", () => { "path-to-sdfas-sadfome$$-js" ); }); + + it("should strip JSDoc types from runtime function con...
true
webpack/webpack
21,140
issue_to_patch
perf(ChunkGraph): track ownership of module runtime requirements instead of cloning
Store the runtime requirements Set by reference when ownership is not transferred and copy lazily (copy-on-write) only if a later merge needs to mutate a shared Set, avoiding an eager clone on the cached rebuild path.
996ce20f82edbb516542df6894768fc172282905
7364a3a8479919779d91f86c48f922abdaf19a7c
diff --git a/.changeset/chunk-graph-runtime-requirements-ownership.md b/.changeset/chunk-graph-runtime-requirements-ownership.md new file mode 100644 index 00000000000..1c14d5ffbdc --- /dev/null +++ b/.changeset/chunk-graph-runtime-requirements-ownership.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Avoid copying m...
[ ".changeset/chunk-graph-runtime-requirements-ownership.md", "lib/ChunkGraph.js" ]
[]
true
webpack/webpack
21,139
issue_to_patch
perf(javascript): reduce JavascriptParser walk-path allocations
Cut per-node allocations on the JavascriptParser walk hot path: - replace the four memoize(() => arr.reverse()) member-info getters with a single-closure lazyReverse helper (one closure instead of two each); - hoist isSimpleFunction out of walkCallExpression so no closure is allocated per call expression, and repla...
996ce20f82edbb516542df6894768fc172282905
0b826b49a027bee2e3e1fadbadbf890105b21507
diff --git a/.changeset/javascript-parser-walk-allocations.md b/.changeset/javascript-parser-walk-allocations.md new file mode 100644 index 00000000000..50f7f3f1395 --- /dev/null +++ b/.changeset/javascript-parser-walk-allocations.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Reduce JavascriptParser allocations on ...
[ ".changeset/javascript-parser-walk-allocations.md", "lib/javascript/JavascriptParser.js", "types.d.ts" ]
[]
true
webpack/webpack
21,138
issue_to_patch
refactor(css): declutter CssParser — extract handlers, dedupe helpers, hoist pure functions
- Move the four large inline visitor blocks (@import, @value, composes:, url()) out of the visitor map into named functions. - Collapse the duplicated webpackIgnore / loc-extraction code into `webpackIgnored`, `setDepLoc` and `rangeLoc` helpers. - Hoist the pure helpers (nextNonWhitespace, parseValueAtRuleParams, ...
cd459310f1e2eb3117068b6a37bf854651418934
ab6d1f665a42e58b17454b33278c8f26dfefda0d
diff --git a/lib/css/CssParser.js b/lib/css/CssParser.js index c880758728a..52b6bdbccaf 100644 --- a/lib/css/CssParser.js +++ b/lib/css/CssParser.js @@ -59,6 +59,8 @@ const { /** @typedef {[number, number]} Range */ /** @typedef {{ line: number, column: number }} Position */ +/** @typedef {{ from: string, items: ({...
[ "lib/css/CssParser.js", "types.d.ts" ]
[]
true
webpack/webpack
21,103
issue_to_patch
test: try to stable memory benchmark / 2
**Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any other information related to changes. --> <!-- In addition to that please answer these questions: --> **What kind o...
e861a84bd174444a38138e7771c49c45f97946d3
086788c7234a9770376ecc3d357dc36b933d581a
[ "test/BenchmarkTestCases.benchmark.mjs" ]
[ { "comment": "## Useless assignment to local variable\n\nThe value assigned to fn here is unused.\n\n---\n\n<p>The best fix is to remove the useless assignment to <code>fn</code> while preserving all existing behavior.</p>\n<ul>\n<li>**General approach:** delete assignments to locals that are never subsequently...
diff --git a/test/BenchmarkTestCases.benchmark.mjs b/test/BenchmarkTestCases.benchmark.mjs index 2cce7ea463e..130dfba4f52 100644 --- a/test/BenchmarkTestCases.benchmark.mjs +++ b/test/BenchmarkTestCases.benchmark.mjs @@ -532,6 +532,10 @@ const withCodSpeed = async (bench) => { const rawAdd = bench.add; const uriM...
true
webpack/webpack
21,134
issue_to_patch
refactor: add per-walk cycle state through side-effects walker
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** **What kind of change does this PR introduce?** The side-effects walker remembers whether it has seen a cycle so it knows when a result is safe to cache. Now the flag lives ...
cd459310f1e2eb3117068b6a37bf854651418934
a8b01ab0d9e4e782f40f9353109a2ef1e323346a
diff --git a/lib/NormalModule.js b/lib/NormalModule.js index 407599fde0c..987d7325771 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -174,9 +174,10 @@ const SIDE_EFFECTS_RECURSION_LIMIT = 2000; * behavior. * @param {NormalModule} rootMod the module to walk * @param {ModuleGraph} moduleGraph the mod...
[ "lib/NormalModule.js" ]
[]
true
webpack/webpack
21,133
issue_to_patch
refactor: scope CJS require-binding WeakMap per-parser
**Summary** **What kind of change does this PR introduce?** `requireBindingData` is keyed by AST `CallExpression` nodes and only ever written/read within a single module parse, so it's now created per-parser inside `apply()` and passes it into `createRequireCallHandler`, instead of holding WeakMap itself for the ...
cd459310f1e2eb3117068b6a37bf854651418934
b5d516d3c30af27b7ad873b8bd99637e6da66708
diff --git a/lib/dependencies/CommonJsImportsParserPlugin.js b/lib/dependencies/CommonJsImportsParserPlugin.js index 4e6bff683e4..e488873088e 100644 --- a/lib/dependencies/CommonJsImportsParserPlugin.js +++ b/lib/dependencies/CommonJsImportsParserPlugin.js @@ -53,13 +53,10 @@ const RequireResolveHeaderDependency = requ...
[ "lib/dependencies/CommonJsImportsParserPlugin.js" ]
[]
true
webpack/webpack
21,132
issue_to_patch
refactor: unify const binding tracking via tag system
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Tag all top-level const bindings with `CONST_BINDING_TAG` (renamed from `INLINED_CONST_TAG`) instead of collecting names into a separate `constBindings` Set on `buildInfo`. This re...
871e391a35c35f3d6a8ddc548c1f21ba986f3a26
45ae8de223f69fe09daf2d242e1aefa83f6e5503
diff --git a/lib/Module.js b/lib/Module.js index 0a8920b5314..67a56fff973 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -212,7 +212,6 @@ const makeSerializable = require("./util/makeSerializable"); * @property {Set<string>=} topLevelDeclarations top level declaration names * @property {Set<string>=} pureFunctio...
[ "lib/Module.js", "lib/dependencies/HarmonyExportDependencyParserPlugin.js", "lib/dependencies/HarmonyExportSpecifierDependency.js", "lib/optimize/ConstValueParserPlugin.js", "lib/optimize/InlineExports.js", "types.d.ts" ]
[]
true
webpack/webpack
21,131
issue_to_patch
fix: force-load a module's new owning chunk when its only loaded chunk leaves a runtime during HMR
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Resolves the long-standing TODO in `lib/HotModuleReplacementPlugin.js` ("force load one of the chunks which contains the module"). In a multi-runtime build, when a module's only lo...
cd459310f1e2eb3117068b6a37bf854651418934
121d02108cca16274edb1aa2a066c07e8dca5629
diff --git a/.changeset/hmr-force-load-migrated-chunk.md b/.changeset/hmr-force-load-migrated-chunk.md new file mode 100644 index 00000000000..63cbc0f2412 --- /dev/null +++ b/.changeset/hmr-force-load-migrated-chunk.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Force-load a module's new owning chunk during HMR when...
[ ".changeset/hmr-force-load-migrated-chunk.md", "lib/HotModuleReplacementPlugin.js", "lib/hmr/HotModuleReplacement.runtime.js", "lib/hmr/JavascriptHotModuleReplacement.runtime.js", "test/HotModuleReplacementPlugin.test.js", "test/hotCases/chunks/force-load-migrated-chunk/index.js", "test/hotCases/chunks/...
[ { "comment": "## Property access on null or undefined\n\nThe base expression of this property access is always undefined.\n\n---\n\nTo fix this safely, keep the existing flow but guard the indirect call by first reading the handler and checking it is a function. This prevents property-access/call-on-undefined e...
diff --git a/test/HotModuleReplacementPlugin.test.js b/test/HotModuleReplacementPlugin.test.js index 315c47d1a5b..aeae659bb07 100644 --- a/test/HotModuleReplacementPlugin.test.js +++ b/test/HotModuleReplacementPlugin.test.js @@ -327,4 +327,300 @@ describe("HotModuleReplacementPlugin", () => { }); }); }); + + /...
true
webpack/webpack
21,137
issue_to_patch
perf(ExportsInfo): resolve nested export paths without per-level slicing
Rewrite getUsedName (the "improve this" TODO), getUsed, isExportProvided, getNestedExportsInfo and getReadOnlyExportInfoRecursive as single-pass iterative walks. The recursive versions allocated a `name.slice(1)` plus spread per nesting level (O(depth^2) arrays); the iterative versions build one result array, cutting a...
cd459310f1e2eb3117068b6a37bf854651418934
b6caa5a8563992239dd734f6a634aa6c906897cc
diff --git a/.changeset/exports-info-used-name-walk.md b/.changeset/exports-info-used-name-walk.md new file mode 100644 index 00000000000..6deaa01da53 --- /dev/null +++ b/.changeset/exports-info-used-name-walk.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Resolve nested exports info paths iteratively to cut per-lev...
[ ".changeset/exports-info-used-name-walk.md", "lib/ExportsInfo.js", "test/configCases/optimization/nested-exports-info-path/data.json", "test/configCases/optimization/nested-exports-info-path/index.js", "test/configCases/optimization/nested-exports-info-path/module.js", "test/configCases/optimization/neste...
[]
diff --git a/test/configCases/optimization/nested-exports-info-path/data.json b/test/configCases/optimization/nested-exports-info-path/data.json new file mode 100644 index 00000000000..4738650c7f8 --- /dev/null +++ b/test/configCases/optimization/nested-exports-info-path/data.json @@ -0,0 +1,9 @@ +{ + "used": { + "dee...
true
webpack/webpack
21,129
issue_to_patch
feat: support CommonJS reexports via Object.defineProperty descriptors
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** The `Object.defineProperty` branch of `CommonJsExportRequireDependency` was an unimplemented `throw new Error("TODO")`, so `Object.defineProperty(exports, name, { value: require("....
d39efba2ed8a819020cc585fcba171c96e6acd67
10e06899097bc2176366b66764cf21d0ad95615f
diff --git a/.changeset/cjs-define-property-reexport.md b/.changeset/cjs-define-property-reexport.md new file mode 100644 index 00000000000..c5527d1b9f2 --- /dev/null +++ b/.changeset/cjs-define-property-reexport.md @@ -0,0 +1,5 @@ +--- +"webpack": minor +--- + +Support CommonJS reexports via `Object.defineProperty` va...
[ ".changeset/cjs-define-property-reexport.md", "lib/dependencies/CommonJsExportRequireDependency.js", "lib/dependencies/CommonJsExportsParserPlugin.js", "test/cases/cjs-tree-shaking/reexports-define-property/add-to-counter.js", "test/cases/cjs-tree-shaking/reexports-define-property/counter.js", "test/cases...
[]
diff --git a/test/cases/cjs-tree-shaking/reexports-define-property/add-to-counter.js b/test/cases/cjs-tree-shaking/reexports-define-property/add-to-counter.js new file mode 100644 index 00000000000..d4e43695db0 --- /dev/null +++ b/test/cases/cjs-tree-shaking/reexports-define-property/add-to-counter.js @@ -0,0 +1,5 @@ +...
true
webpack/webpack
21,130
issue_to_patch
perf(html): speed up the experimental HTML parser and reduce its memory usage
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
d39efba2ed8a819020cc585fcba171c96e6acd67
3af9ea18f973e6ddc3932c35d0d95e5785e839ea
diff --git a/.changeset/html-parser-perf.md b/.changeset/html-parser-perf.md new file mode 100644 index 00000000000..21985e5acde --- /dev/null +++ b/.changeset/html-parser-perf.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Speed up the experimental HTML parser and reduce its memory usage. diff --git a/lib/html/buil...
[ ".changeset/html-parser-perf.md", "lib/html/buildHtmlAst.js", "lib/html/walkHtmlTokens.js" ]
[]
true
webpack/webpack
21,126
issue_to_patch
test: cover deep CJS star-reexport tree-shaking
Chained `module.exports = require(...)` star-reexports already propagate usage and provided-exports info down to the original module through the per-export from/export target resolved in FlagDependencyExportsPlugin, so unused exports are tree-shaken across the chain. Add regression tests for multi-level chains, single-...
5e599a1f0b2c6dd41e52889b314251e4dcadc92b
6a484b09c6656ddedd264745bad2aa0efe887a42
diff --git a/lib/dependencies/CommonJsExportRequireDependency.js b/lib/dependencies/CommonJsExportRequireDependency.js index f1237e451cd..cf41f698fcc 100644 --- a/lib/dependencies/CommonJsExportRequireDependency.js +++ b/lib/dependencies/CommonJsExportRequireDependency.js @@ -250,7 +250,6 @@ class CommonJsExportRequire...
[ "lib/dependencies/CommonJsExportRequireDependency.js", "test/cases/cjs-tree-shaking/deep-reexports/a-l2.js", "test/cases/cjs-tree-shaking/deep-reexports/a-l3.js", "test/cases/cjs-tree-shaking/deep-reexports/a-l4.js", "test/cases/cjs-tree-shaking/deep-reexports/a-src.js", "test/cases/cjs-tree-shaking/deep-...
[]
diff --git a/test/cases/cjs-tree-shaking/deep-reexports/a-l2.js b/test/cases/cjs-tree-shaking/deep-reexports/a-l2.js new file mode 100644 index 00000000000..8458ca9eb39 --- /dev/null +++ b/test/cases/cjs-tree-shaking/deep-reexports/a-l2.js @@ -0,0 +1,1 @@ +module.exports = require("./a-src"); diff --git a/test/cases/cj...
true
webpack/webpack
21,113
issue_to_patch
test: stabilize codecov/changes for HttpUriPlugin network-failure path
The error callback in resolveContent is only hit when an HTTP resolution fails, which depends on network/timing in CI. Its coverage flipped between runs and tripped codecov/changes on unrelated PRs (e.g. #21111). Mark it with istanbul ignore so the check only fails on real regressions. https://claude.ai/code/session_0...
e861a84bd174444a38138e7771c49c45f97946d3
6f1f17b3443e5c0ab5ef5e6f452960093302f257
diff --git a/codecov.yml b/codecov.yml index a00fb761757..daab661d4f1 100644 --- a/codecov.yml +++ b/codecov.yml @@ -23,6 +23,7 @@ coverage: flags: - unit - integration + informational: true ignore: - "**/*.runtime.js" - "schemas/**/*" diff --git a/lib/Compilation.js b/lib/C...
[ "codecov.yml", "lib/Compilation.js", "test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/http_localhost_9990/LICENSE_5eadbdf8cd603158a410", "test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/http_localhost_9990/LICENSE_f068767443fd21394e3f", "test/configCases/asset-m...
[ { "comment": "## CodeQL / Uncontrolled data used in path expression\n\nThis path depends on a [user-provided value](1).\n\n[Show more details](https://github.com/webpack/webpack/security/code-scanning/20)", "path": "test/configCases/asset-modules/http-url/server/index.js", "hunk": "@@ -10,14 +11,21 @@\n...
diff --git a/test/configCases/asset-modules/http-url/frozen-verify.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_LICENSE_f7b7574d117107faabca b/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/http_localhost_9990/LICENSE_5eadbdf8cd603158a410 similarity index 94% rename fro...
true
webpack/webpack
21,116
issue_to_patch
Rebuild experimental HTML parser on the WHATWG tree-construction algorithm
Replace the simplified tree builder in lib/html/buildHtmlAst.js with a spec-conformant implementation of the WHATWG tree-construction stage (insertion modes, foreign content, foster parenting, active formatting reconstruction, and the full adoption agency algorithm). This resolves the buildHtmlAst.js TODO where the ado...
e861a84bd174444a38138e7771c49c45f97946d3
3e5f7bed4c73b9ffc37e455b90ceb4f7f1064b20
diff --git a/lib/html/HtmlParser.js b/lib/html/HtmlParser.js index d1207754c67..04a1ab55714 100644 --- a/lib/html/HtmlParser.js +++ b/lib/html/HtmlParser.js @@ -1151,6 +1151,10 @@ class HtmlParser extends Parser { const sourceItem = tagSources[attr.name]; if (!sourceItem) continue; + // Attributes on ado...
[ "lib/html/HtmlParser.js", "lib/html/buildHtmlAst.js", "lib/html/walkHtmlTokens.js", "package.json", "test/HtmlParser.unittest.js", "test/buildHtmlAst.unittest.js", "test/cssParsing-webpack.spectest.js", "test/html5lib-webpack.spectest.js", "test/html5lib.spectest.js" ]
[]
diff --git a/test/HtmlParser.unittest.js b/test/HtmlParser.unittest.js index f1c63c132c6..d82779c35db 100644 --- a/test/HtmlParser.unittest.js +++ b/test/HtmlParser.unittest.js @@ -6,9 +6,57 @@ jest.mock("../lib/html/buildHtmlAst", () => jest.fn()); const HtmlInlineScriptDependency = require("../lib/dependencies/Htm...
true
webpack/webpack
21,121
issue_to_patch
Potential fix for code scanning alert no. 30: Workflow does not contain permissions
Potential fix for [https://github.com/webpack/webpack/security/code-scanning/30](https://github.com/webpack/webpack/security/code-scanning/30) Add an explicit `permissions` block with least privilege to the workflow. For this workflow, `gh release view` and `actions/checkout` only require read access to repository c...
1c36fd645ebcbe6ca79551ceec5558c49891ef22
73e36f1cbc44528f36b8507fde37d110d78c05fc
diff --git a/.github/workflows/release-announcement.yml b/.github/workflows/release-announcement.yml index f77557da50e..d4460bdc373 100644 --- a/.github/workflows/release-announcement.yml +++ b/.github/workflows/release-announcement.yml @@ -6,6 +6,9 @@ on: workflow_dispatch: workflow_call: +permissions: + cont...
[ ".github/workflows/release-announcement.yml" ]
[]
true
webpack/webpack
21,123
issue_to_patch
[5.107.1 regression] CommonJS tree-shaking drops exports used through a `const X = require(...)` binding declared at the bottom of the file ## Bug report **What is the current behavior?** Since webpack **5.107.1**, CommonJS tree-shaking (introduced in #21003, "tree-shake CommonJS exports through `const NAME = requir...
fix: CJS tree-shaking drops exports accessed before deferred require
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Closes #21122. The `const NAME = require(LITERAL)` binding optimization (#21003) missed member accesses appearing lexically before the declaration (e.g. inside hoisted function bod...
1c36fd645ebcbe6ca79551ceec5558c49891ef22
e1de782930cbacddaced7408870938815ccbf883
diff --git a/.changeset/fix-cjs-deferred-require-tree-shaking.md b/.changeset/fix-cjs-deferred-require-tree-shaking.md new file mode 100644 index 00000000000..b2edf982fb3 --- /dev/null +++ b/.changeset/fix-cjs-deferred-require-tree-shaking.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +CommonJS tree-shaking no longe...
[ ".changeset/fix-cjs-deferred-require-tree-shaking.md", "lib/dependencies/CommonJsImportsParserPlugin.js", "test/cases/cjs-tree-shaking/require-member-access-deferred/impl.js", "test/cases/cjs-tree-shaking/require-member-access-deferred/index.js", "test/cases/cjs-tree-shaking/require-member-access-deferred/t...
[]
diff --git a/test/cases/cjs-tree-shaking/require-member-access-deferred/impl.js b/test/cases/cjs-tree-shaking/require-member-access-deferred/impl.js new file mode 100644 index 00000000000..7f502a66108 --- /dev/null +++ b/test/cases/cjs-tree-shaking/require-member-access-deferred/impl.js @@ -0,0 +1,8 @@ +// Simulates wh...
true
webpack/webpack
21,114
issue_to_patch
perf(css): reduce CSS build time and memory usage
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> <!-- Try to link to an open issue for more information. --> <!-- Any ...
e861a84bd174444a38138e7771c49c45f97946d3
cc23edb2449922fc3f0a2ad0ec537e52cc8bc529
diff --git a/.changeset/css-perf.md b/.changeset/css-perf.md new file mode 100644 index 00000000000..4df0baea841 --- /dev/null +++ b/.changeset/css-perf.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Reduce CSS build time and memory usage. Per-export CSS dependencies are consolidated into one dependency per module, ...
[ ".changeset/css-perf.md", "lib/Compilation.js", "lib/ModuleGraph.js", "lib/TemplatedPathPlugin.js", "lib/css/CssGenerator.js", "lib/css/CssParser.js", "lib/dependencies/CssIcssExportDependency.js", "lib/util/WeakTupleMap.js", "test/CssIcssExportDependency.unittest.js", "test/TemplatedPathPlugin.un...
[]
diff --git a/test/CssIcssExportDependency.unittest.js b/test/CssIcssExportDependency.unittest.js new file mode 100644 index 00000000000..78e15e81ba6 --- /dev/null +++ b/test/CssIcssExportDependency.unittest.js @@ -0,0 +1,175 @@ +"use strict"; + +const Dependency = require("../lib/Dependency"); +const CssIcssExportDepen...
true
webpack/webpack
21,115
issue_to_patch
perf(ModuleConcatenationPlugin): cache root chunks and per-module runtimes
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Module concatenation re-derived per-module data on hot paths: it re-materialized the root module's chunk list for every candidate check, and re-merged each module's chunk-runtime o...
e861a84bd174444a38138e7771c49c45f97946d3
c7cd8e7b5511526fde7a46b3df956f6ceee00b81
diff --git a/.changeset/module-concatenation-runtime-cache.md b/.changeset/module-concatenation-runtime-cache.md new file mode 100644 index 00000000000..1de7fcf34be --- /dev/null +++ b/.changeset/module-concatenation-runtime-cache.md @@ -0,0 +1,5 @@ +--- +"webpack": patch +--- + +Speed up module concatenation by cachin...
[ ".changeset/module-concatenation-runtime-cache.md", "lib/optimize/ConcatenatedModule.js", "lib/optimize/ModuleConcatenationPlugin.js", "types.d.ts" ]
[]
true
webpack/webpack
21,110
issue_to_patch
fix: stabilize warning/error snapshots and fix big-assets test case
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Summary** Update stale `warnings.snap` for the `big-assets` test case after #21053 renamed `terser-webpack-plugin` to `minimizer-webpack-plugin`. CI never caught this because `big-assets` is...
e861a84bd174444a38138e7771c49c45f97946d3
467aea730e5689ebf173386c40305d99a25323b9
[ "test/cases/chunks/statical-dynamic-import-destructuring/__snapshots__/warnings.snap", "test/cases/chunks/statical-dynamic-import-then-destructuring/__snapshots__/warnings.snap", "test/cases/chunks/statical-dynamic-import-then/__snapshots__/warnings.snap", "test/cases/chunks/statical-dynamic-import/__snapshot...
[]
diff --git a/test/cases/chunks/statical-dynamic-import-destructuring/__snapshots__/warnings.snap b/test/cases/chunks/statical-dynamic-import-destructuring/__snapshots__/warnings.snap index 2f74ec24d68..1165ae881fa 100644 --- a/test/cases/chunks/statical-dynamic-import-destructuring/__snapshots__/warnings.snap +++ b/tes...
true
webtorrent/webtorrent
3,072
issue_to_patch
chore(deps): update semantic-release monorepo to v25.0.5
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [semantic-release](https://redirect.github.com/semantic-release/semantic-release) | [`25.0.4` → `25.0.5`](https://renov...
516005aaa1134361bd99f2fd5718b60183a3c3ad
ec4e6bacae77c336a91eafac50f1557cb9415b29
diff --git a/package.json b/package.json index ee9481739a..6ec35c90b0 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "path-esm": "^1.0.0", "querystring": "^0.2.1", "run-series": "1.1.9", - "semantic-release": "25.0.4", + "semantic-release": "25.0.5", "serve-static": "2.2.1", ...
[ "package.json" ]
[]
true
webtorrent/webtorrent
3,070
issue_to_patch
chore(deps): update semantic-release monorepo to v25.0.4
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [semantic-release](https://redirect.github.com/semantic-release/semantic-release) | [`25.0.3` → `25.0.4`](https://renov...
d11d987c5c7e4048c63b18f6859136f3dab47b70
6f2daf51b350af19883737a67f376ca4520d3cc3
diff --git a/package.json b/package.json index 3823d9624b..ee9481739a 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "path-esm": "^1.0.0", "querystring": "^0.2.1", "run-series": "1.1.9", - "semantic-release": "25.0.3", + "semantic-release": "25.0.4", "serve-static": "2.2.1", ...
[ "package.json" ]
[]
true
webtorrent/webtorrent
3,071
issue_to_patch
chore(deps): update dependency tape to ^5.10.0
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [tape](https://redirect.github.com/tape-testing/tape) | [`^5.9.0` → `^5.10.0`](https://renovatebot.com/diffs/npm/tape/5...
d3455f95f1eee9b383b6de3062c451f10ce118d5
0a50b0af0d81f21ba19488d9aec476f8ecb94e6a
diff --git a/package.json b/package.json index 3233e909cd..3823d9624b 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "stream-browserify": "^3.0.0", "tap-parser": "^18.3.4", "tap-spec": "^5.0.0", - "tape": "^5.9.0", + "tape": "^5.10.0", "terser-webpack-plugin": "^5.6.1", ...
[ "package.json" ]
[]
true
webtorrent/webtorrent
3,054
issue_to_patch
chore(deps): update dependency webpack to ^5.107.2
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [webpack](https://redirect.github.com/webpack/webpack) | [`^5.107.1` → `^5.107.2`](https://renovatebot.com/diffs/npm/we...
519703b604c77fc30eb791c6cd0fde0240e35914
ec27bc62ed958d0f152108ed6c79f7eedbaa9a2a
diff --git a/package.json b/package.json index 955a3aacd6..3233e909cd 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "tape": "^5.9.0", "terser-webpack-plugin": "^5.6.1", "timers-browserify": "^2.0.12", - "webpack": "^5.107.1", + "webpack": "^5.107.2", "webpack-cli": "^7.0.3",...
[ "package.json" ]
[]
true
webtorrent/webtorrent
3,065
issue_to_patch
chore(deps): update dependency webpack-cli to ^7.0.3
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [webpack-cli](https://redirect.github.com/webpack/webpack-cli/tree/main/packages/webpack-cli) ([source](https://redirec...
6f82ce1b149e023000e5ec8ee30fcdd2d8563701
5c45bf19a124a83ade847301b9fd53d83d8fa4ca
diff --git a/package.json b/package.json index 464a135dac..955a3aacd6 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "terser-webpack-plugin": "^5.6.1", "timers-browserify": "^2.0.12", "webpack": "^5.107.1", - "webpack-cli": "^7.0.2", + "webpack-cli": "^7.0.3", "webtorrent-fix...
[ "package.json" ]
[]
true
webtorrent/webtorrent
3,066
issue_to_patch
chore(deps): update dependency terser-webpack-plugin to ^5.6.1
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [terser-webpack-plugin](https://redirect.github.com/webpack/minimizer-webpack-plugin) | [`^5.6.0` → `^5.6.1`](https://r...
44f782d59056947bfd839b634fcfc989cb1b2d36
6a710e200d674bc99a3b46087f39f17a1143f348
diff --git a/package.json b/package.json index 18ac16844d..464a135dac 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "tap-parser": "^18.3.4", "tap-spec": "^5.0.0", "tape": "^5.9.0", - "terser-webpack-plugin": "^5.6.0", + "terser-webpack-plugin": "^5.6.1", "timers-browserify":...
[ "package.json" ]
[]
true
webtorrent/webtorrent
3,068
issue_to_patch
fix(perf): utpspeed
<!-- DO NOT POST LINKS OR REFERENCES TO COPYRIGHTED CONTENT IN YOUR ISSUE. --> **What is the purpose of this pull request? (put an "X" next to item)** [ ] Documentation update [x] Bug fix [ ] New feature [ ] Other, please explain: **What changes did you make? (Give an overview)** Speeds for utp dropped by ...
f122edf9f1ab94ffe17b392903654abfa4f81d2e
3b2ace02fce0e24662015caefe6b21ddddf7b8cd
diff --git a/lib/conn-pool.js b/lib/conn-pool.js index cf0374e414..5f04bcae86 100644 --- a/lib/conn-pool.js +++ b/lib/conn-pool.js @@ -66,6 +66,8 @@ export default class ConnPool { // Start uTP debug('creating utpServer in port %s', this.tcpServer.address().port) this.utpServer.listen(this.tc...
[ "lib/conn-pool.js" ]
[]
true
webtorrent/webtorrent
3,067
issue_to_patch
fix: server path2
<!-- DO NOT POST LINKS OR REFERENCES TO COPYRIGHTED CONTENT IN YOUR ISSUE. --> **What is the purpose of this pull request? (put an "X" next to item)** [ ] Documentation update [x] Bug fix [ ] New feature [ ] Other, please explain: **What changes did you make? (Give an overview)** fixes windows paths, and a...
11dac14a3933f05ce3ce06810f7c1084dad05614
6c9a6d7efec2b8212d0b539707c8a327e8e5776d
diff --git a/lib/file.js b/lib/file.js index a7aa0fc04d..09c43b55c4 100644 --- a/lib/file.js +++ b/lib/file.js @@ -172,7 +172,7 @@ export default class File extends EventEmitter { get streamURL () { if (!this._client._server) throw new Error('No server created') - return `${this._client._server.pathname}/$...
[ "lib/file.js", "test/node/server.js" ]
[]
diff --git a/test/node/server.js b/test/node/server.js index be0914827b..5933ddbe06 100644 --- a/test/node/server.js +++ b/test/node/server.js @@ -1,6 +1,8 @@ import fs from 'fs' import fixtures from 'webtorrent-fixtures' +import createTorrent from 'create-torrent' import get from 'simple-get' +import { Readable } f...
true
webtorrent/webtorrent
3,064
issue_to_patch
fix: http server encoding
<!-- DO NOT POST LINKS OR REFERENCES TO COPYRIGHTED CONTENT IN YOUR ISSUE. --> **What is the purpose of this pull request? (put an "X" next to item)** [ ] Documentation update [x] Bug fix [ ] New feature [ ] Other, please explain: **What changes did you make? (Give an overview)** this logic didn't work cor...
3dfb8eb21b823db1d61980eec9c85c4b61516e12
fca7bc4113aa80f901f4344034433501b210449d
diff --git a/lib/file.js b/lib/file.js index 65b14f8b25..a7aa0fc04d 100644 --- a/lib/file.js +++ b/lib/file.js @@ -172,7 +172,7 @@ export default class File extends EventEmitter { get streamURL () { if (!this._client._server) throw new Error('No server created') - return `${this._client._server.pathname}/$...
[ "lib/file.js", "lib/server.js" ]
[]
true
webtorrent/webtorrent
3,061
issue_to_patch
fix(deps): update dependency bittorrent-protocol to ^5.0.6
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [bittorrent-protocol](https://redirect.github.com/webtorrent/bittorrent-protocol) | [`^5.0.4` → `^5.0.6`](https://renov...
9b350cf0ce3c35e16f834f21c3305a3284419933
de6264162b436a8f1be9e71ad9ab04b80356ba14
diff --git a/package.json b/package.json index cad126c918..360a25ec87 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "addr-to-ip-port": "^2.0.0", "bitfield": "^5.0.1", "bittorrent-dht": "^11.0.12", - "bittorrent-protocol": "^5.0.4", + "bittorrent-protocol": "^5.0.6", "cache-chu...
[ "package.json" ]
[]
true
webtorrent/webtorrent
3,060
issue_to_patch
fix: pe tests
<!-- DO NOT POST LINKS OR REFERENCES TO COPYRIGHTED CONTENT IN YOUR ISSUE. --> **What is the purpose of this pull request? (put an "X" next to item)** [ ] Documentation update [x] Bug fix [ ] New feature [ ] Other, please explain: **What changes did you make? (Give an overview)** **Which issue (if any) d...
f7a0866748179d4d25770c3e0d1a5c993a41d150
6073674d423771a843563ede8242296115cee44e
[ "test/node/encryption.js" ]
[]
diff --git a/test/node/encryption.js b/test/node/encryption.js index 24a288c54a..cae4bdb03e 100644 --- a/test/node/encryption.js +++ b/test/node/encryption.js @@ -79,12 +79,12 @@ test('PE/MSE: encrypted seeder=1 accepts plain downloader=0', t => { runTransferTest(t, 1, 0, null) }) -test('PE/MSE: mixed secure: 1+2...
true
webtorrent/webtorrent
3,058
issue_to_patch
fix(deps): update dependency ut_pex to v5
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [ut_pex](https://redirect.github.com/webtorrent/ut_pex) | [`^4.0.4` → `^5.0.2`](https://renovatebot.com/diffs/npm/ut_pe...
2f925ae3b1081739dbf5a61ab4573150fe8ebb95
d87bad9b7d82069b9b33448c951457a558edee56
diff --git a/package.json b/package.json index b5f19dacea..d19db75ef0 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "uint8-util": "^2.2.6", "unordered-array-remove": "^1.0.2", "ut_metadata": "^5.0.1", - "ut_pex": "^4.0.4" + "ut_pex": "^5.0.2" }, "devDependencies": { "@ba...
[ "package.json" ]
[]
true
webtorrent/webtorrent
3,059
issue_to_patch
fix(deps): update dependency torrent-piece to ^4.0.1
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [torrent-piece](https://redirect.github.com/webtorrent/torrent-piece) | [`^4.0.0` → `^4.0.1`](https://renovatebot.com/d...
cd74611649c7cd11c2fb1f994f88ffc7b60ae244
ce347bb0493fbbfb629f5eee6a4198bd10473010
diff --git a/package.json b/package.json index 04b7417773..6c8524f556 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "streamx": "2.25.0", "throughput": "^1.0.2", "torrent-discovery": "^11.0.21", - "torrent-piece": "^4.0.0", + "torrent-piece": "^4.0.1", "uint8-util": "^2.2.6", ...
[ "package.json" ]
[]
true