Skip to content

Commit

Permalink
chore(deps): bump jsonpath-plus from 7.2.0 to 10.0.4 (#4380)
Browse files Browse the repository at this point in the history
Closes #4379
  • Loading branch information
char0n authored Oct 18, 2024
1 parent fcad409 commit fe3d2e5
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 6 deletions.
49 changes: 44 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/apidom-json-path/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@swagger-api/apidom-core": "^1.0.0-alpha.9",
"@swagger-api/apidom-error": "^1.0.0-alpha.9",
"@swagger-api/apidom-json-pointer": "^1.0.0-alpha.9",
"jsonpath-plus": "^7.2.0"
"jsonpath-plus": "^10.0.6"
},
"files": [
"cjs/",
Expand Down
2 changes: 2 additions & 0 deletions packages/apidom-json-path/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import './polyfills';

export { default as EvaluationJsonPathError } from './errors/EvaluationJsonPathError';
export type { EvaluationJsonPathErrorOptions } from './errors/EvaluationJsonPathError';
export { default as MultiEvaluationJsonPathError } from './errors/MultiEvaluationJsonPathError';
Expand Down
18 changes: 18 additions & 0 deletions packages/apidom-json-path/src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// @ts-ignore
import hasOwnPonyfill from 'core-js-pure/actual/object/has-own';
// @ts-ignore
import replaceAllPonyfill from 'core-js-pure/actual/string/replace-all';

/**
* These polyfills do maintain compatibility with Node.js >= 12.20.0
*/

if (!Object.hasOwn) {
Object.hasOwn = hasOwnPonyfill;
}
if (!String.prototype.replaceAll) {
// eslint-disable-next-line no-extend-native
String.prototype.replaceAll = function replaceAll(search, replacement) {
return replaceAllPonyfill(this, search, replacement);
};
}

0 comments on commit fe3d2e5

Please sign in to comment.