Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.
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: 0 additions & 2 deletions projects/rulesets-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"@useoptic/json-pointer-helpers": "workspace:*",
"@useoptic/openapi-utilities": "workspace:*",
"ajv": "^8.6.0",
"lodash.pick": "^4.4.0",
"node-fetch": "^2.6.7",
"semver": "^7.5.4"
},
Expand All @@ -37,7 +36,6 @@
"@types/babel__core": "^7",
"@types/babel__preset-env": "^7",
"@types/json-stable-stringify": "^1.0.33",
"@types/lodash.pick": "^4",
"@types/node": "^18.0.0",
"babel-jest": "^29.3.1",
"jest": "^29.3.1",
Expand Down
22 changes: 12 additions & 10 deletions projects/rulesets-base/src/rule-runner/assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
Severity,
UserError,
} from '@useoptic/openapi-utilities';
import pick from 'lodash.pick';
import { RuleError } from '../errors';
import {
RegisterAssertion,
Expand Down Expand Up @@ -50,16 +49,19 @@ export type AssertionResult =
};

const sanitizeFact = (fact: IFact): IFact =>
pick(fact, 'value', 'location') as IFact;
({
value: fact.value,
location: fact.location,
}) as IFact;

const sanitizeChange = (change: IChange): IChange =>
pick(
change,
'changeType',
'added',
'removed',
'changed',
'location'
) as IChange;
({
changeType: change.changeType,
added: change.added,
removed: change.removed,
changed: change.changed,
location: change.location,
}) as IChange;

class AssertionRunner<T extends AssertionType> implements Assertions<T> {
private requirementAssertions: Assertion<T>[];
Expand Down
9 changes: 0 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3877,14 +3877,12 @@ __metadata:
"@types/babel__core": "npm:^7"
"@types/babel__preset-env": "npm:^7"
"@types/json-stable-stringify": "npm:^1.0.33"
"@types/lodash.pick": "npm:^4"
"@types/node": "npm:^18.0.0"
"@useoptic/json-pointer-helpers": "workspace:*"
"@useoptic/openapi-utilities": "workspace:*"
ajv: "npm:^8.6.0"
babel-jest: "npm:^29.3.1"
jest: "npm:^29.3.1"
lodash.pick: "npm:^4.4.0"
node-fetch: "npm:^2.6.7"
semver: "npm:^7.5.4"
ts-jest: "npm:^29.0.3"
Expand Down Expand Up @@ -8335,13 +8333,6 @@ __metadata:
languageName: node
linkType: hard

"lodash.pick@npm:^4.4.0":
version: 4.4.0
resolution: "lodash.pick@npm:4.4.0"
checksum: 10c0/a04c460b95d1aaa44e9513d1dacf72ea74d838da843e45831de9de64c303f13cdde1859702a6f4dcef417816898ffd47c6ae0614c957ac70245bed2809b8d2e2
languageName: node
linkType: hard

"lodash.set@npm:^4.3.2":
version: 4.3.2
resolution: "lodash.set@npm:4.3.2"
Expand Down
Loading