#1057707 eslint is incompatible with node-ajv >= 8

#1057707#5
Date:
2023-12-07 11:43:35 UTC
From:
To:
Hi,

eslint depends on node-ajv 6 and is incompatible with node-ajv 8
(available in exeprimental branch). All is in lib/shared/ajv.js:

 - eslint requires 'ajv/lib/refs/json-schema-draft-04.json' which is no
   more available
 - eslint tries to set `ajv._opts.defaultMeta` which is
   `ajv.opts.defaultMeta` in node-ajv 8.

Changing "ajv/lib/refs/json-schema-draft-04.json" to
"ajv/lib/refs/json-schema-draft-06.json" doesn't work. I tried this
patch which looks to work but 27 tests fail (not the good error string).
It uses default ajv schemas.

Help needed here ;-)
--- a/lib/shared/ajv.js
+++ b/lib/shared/ajv.js
@@ -8,8 +8,7 @@
 // Requirements
 //------------------------------------------------------------------------------

#1057707#10
Date:
2023-12-07 11:52:16 UTC
From:
To:
Le jeu. 7 déc. 2023 à 12:45, Yadd <yadd@debian.org> a écrit :


I suppose you tried
https://github.com/eslint/eslint/pull/13911/commits
?

#1057707#15
Date:
2023-12-07 13:37:31 UTC
From:
To:
Control: tags -1 + patch

Thanks a lot Jérémy! Based on your suggestion, I succeed to build a patch.

@Jonas, do you agree if I push this to experimental ?

Best regards,
Yadd

#1057707#22
Date:
2023-12-07 23:59:23 UTC
From:
To:
Quoting Yadd (2023-12-07 14:37:31)

If it succeeds the testsuite then by all means, go for it.

But if not, then instead please let's look in more detail at the
options, to avoid complicating matters for this delicate beast.

 - Jonas

#1057707#27
Date:
2023-12-08 02:55:11 UTC
From:
To:
Hi,

sure, all test passed now. Only error strings had to be updated

Cheers,
Yadd

#1057707#32
Date:
2023-12-08 19:23:52 UTC
From:
To:
Quoting Yadd (2023-12-08 03:55:11)

Great! Thanks a lot for working on this.

 - Jonas