Backward compatibility is broken, today "ajv-merge-patch" v5.0.1 is not working with "ajv"v6.12.3"
node_modules/ajv/lib/keyword.js:30 throw new Error('Keyword ' + keyword + ' is not a valid identifier'); ^
It’s related witth this changes
I have the same problem; I'm using the latest version of fastify and added ajv-merge-patch as a plugin. When I revert back to 4.0.1 I have no problem.
I have the same problem; I'm using the latest version of fastify and added ajv-merge-patch as a plugin. When I revert back to 4.0.1 I have no problem.
My fix for this problem is
const addKeyword = ajv.addKeyword; ajv.addKeyword = (k, definition) => { if (typeof k === 'object') { const keyword = k.keyword; delete k.keyword; addKeyword.call(ajv, keyword, k); return; } addKeyword.call(ajv, k, definition); }