angular/tools/npm-patches/@bazel+jasmine+5.8.1.patch
Alan Agius 0ee0f780e4 build: update dependency jasmine to v5 (#51820)
The patch is to fix upstream bug in `@bazel/jasmine`. See: bazelbuild/rules_nodejs#3691

PR Close #51820
2023-09-19 18:40:16 +02:00

13 lines
No EOL
736 B
Diff

diff --git a/node_modules/@bazel/jasmine/jasmine_runner.js b/node_modules/@bazel/jasmine/jasmine_runner.js
index 097eb92..bd55c2d 100755
--- a/node_modules/@bazel/jasmine/jasmine_runner.js
+++ b/node_modules/@bazel/jasmine/jasmine_runner.js
@@ -147,7 +147,7 @@ async function main(args) {
// TODO(6.0): remove support for deprecated versions of Jasmine that use the old API &
// remember to update the `peerDependencies` as well.
// Jasmine versions prior to 4.0.0 should use the old API.
- if (jrunner.coreVersion().charAt(0) !== '4') {
+ if (+jrunner.coreVersion().charAt(0) < 4) {
console.warn(`DEPRECATED: Support for Jasmine versions prior to '4.0.x' is deprecated in '@bazel/jasmine'.`);
// Old Jasmine API.