Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion handwritten/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@opentelemetry/context-async-hooks": "^2.0.1",
"@opentelemetry/sdk-trace-node": "^2.0.1",
"@types/assert": "^1.5.11",
"@types/chai": "^4.3.20",
"@types/chai": "^5.0.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Upgrading to @types/chai v5 in a CommonJS project can lead to type mismatches and build failures, as Chai v5 is ESM-only. It is recommended to remain on the latest v4 types (^4.3.20) for compatibility with the current module system.

Suggested change
"@types/chai": "^5.0.0",
"@types/chai": "^4.3.20",

"@types/chai-as-promised": "^7.1.8",
"@types/duplexify": "^3.6.4",
"@types/extend": "^3.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-modelarmor/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"devDependencies": {
"c8": "^9.0.0",
"chai": "^4.2.0",
"chai": "^5.0.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Chai v5 is an ESM-only package and does not support require(). Since this package.json does not specify "type": "module", the project is treated as CommonJS by default, and upgrading to v5 will cause runtime errors in tests or samples using require('chai'). Additionally, mocha v8 (line 22) has limited support for ESM. It is recommended to use the latest v4 release (^4.5.0) to maintain compatibility while the project remains in CommonJS.

Suggested change
"chai": "^5.0.0",
"chai": "^4.5.0",

"mocha": "^8.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/google-cloud-webrisk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"google-gax": "^5.0.0"
},
"devDependencies": {
"@types/chai": "^4.2.7",
"@types/chai": "^5.0.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Upgrading to @types/chai v5 is incompatible with CommonJS projects, as these types are specifically tailored for the ESM-only version of Chai. Since this package is not configured as an ES module, it is recommended to use the latest v4 types (^4.3.20) to ensure compatibility with the runtime environment and avoid type mismatches.

Suggested change
"@types/chai": "^5.0.0",
"@types/chai": "^4.3.20",

"@types/mocha": "^10.0.10",
"@types/node": "^22.13.9",
"@types/sinon": "^17.0.4",
Expand Down
Loading