webpack 5.84.0 → 5.84.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of webpack might be problematic. Click here for more details.

@@ -3956,6 +3956,7 @@ class JavascriptParser extends Parser {
3956
3956
  .call(expr, commentsStartPos);
3957
3957
  if (typeof result === "boolean") return result;
3958
3958
  switch (expr.type) {
3959
+ // TODO handle more cases
3959
3960
  case "ClassDeclaration":
3960
3961
  case "ClassExpression": {
3961
3962
  if (expr.body.type !== "ClassBody") return false;
@@ -3996,7 +3997,10 @@ class JavascriptParser extends Parser {
3996
3997
  case "FunctionDeclaration":
3997
3998
  case "FunctionExpression":
3998
3999
  case "ArrowFunctionExpression":
4000
+ case "ThisExpression":
3999
4001
  case "Literal":
4002
+ case "TemplateLiteral":
4003
+ case "Identifier":
4000
4004
  case "PrivateIdentifier":
4001
4005
  return true;
4002
4006
 
@@ -4012,6 +4016,12 @@ class JavascriptParser extends Parser {
4012
4016
  this.isPure(expr.alternate, expr.consequent.range[1])
4013
4017
  );
4014
4018
 
4019
+ case "LogicalExpression":
4020
+ return (
4021
+ this.isPure(expr.left, commentsStartPos) &&
4022
+ this.isPure(expr.right, expr.left.range[1])
4023
+ );
4024
+
4015
4025
  case "SequenceExpression":
4016
4026
  return expr.expressions.every(expr => {
4017
4027
  const pureFlag = this.isPure(expr, commentsStartPos);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "5.84.0",
3
+ "version": "5.84.1",
4
4
  "author": "Tobias Koppers @sokra",
5
5
  "description": "Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
6
6
  "license": "MIT",