Skip to content
Closed
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
252 changes: 83 additions & 169 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"tar": "7.5.9",
"pbkdf2": "^3.1.3",
"elliptic": "6.6.1",
"bn.js": "4.12.0",
"bn.js": "5.2.3",
"fast-json-patch": "^3.1.1",
"diff@^4.0.1": "4.0.4",
"diff@^5.1.0": "5.2.2",
Expand Down Expand Up @@ -121,7 +121,9 @@
"tmp": "^0.2.4",
"js-yaml": "^4.1.1",
"micromatch": "^4.0.8",
"lodash": "^4.17.23"
"lodash": "^4.17.23",
"ajv": ">=8.18.0",
"minimatch": ">=10.2.1"
Comment on lines +125 to +126

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's understand the repository structure
find . -name "package.json" -type f | head -20

Repository: dashpay/platform

Length of output: 825


🏁 Script executed:

# Find all workspace packages and their minimatch/ajv dependencies
echo "=== Workspace structure ==="
ls -la packages/

Repository: dashpay/platform

Length of output: 3617


🏁 Script executed:

echo "=== Searching for minimatch dependencies in workspace packages ==="
rg -n '"minimatch"' packages/*/package.json

echo ""
echo "=== Searching for ajv dependencies in workspace packages ==="
rg -n '"ajv"' packages/*/package.json

Repository: dashpay/platform

Length of output: 349


🏁 Script executed:

# Also check the root package.json for context
echo "=== Root package.json lines around 125-126 ==="
sed -n '120,135p' package.json

Repository: dashpay/platform

Length of output: 366


🏁 Script executed:

echo "=== Searching for eslint, mocha, glob, rimraf in all package.json files ==="
rg -n '"(eslint|mocha|glob|rimraf)"' packages/*/package.json package.json

Repository: dashpay/platform

Length of output: 3209


🏁 Script executed:

# Check yarn.lock for actual resolutions of ajv and minimatch
echo "=== Checking yarn.lock for ajv resolutions ==="
grep -A3 '"ajv"@' yarn.lock | head -50

echo ""
echo "=== Checking yarn.lock for minimatch resolutions ==="
grep -A3 '"minimatch"@' yarn.lock | head -50

Repository: dashpay/platform

Length of output: 160


🏁 Script executed:

# Check if yarn.lock exists
ls -lah yarn.lock 2>/dev/null || echo "yarn.lock not found in root"

# Try searching with different pattern
if [ -f yarn.lock ]; then
  echo "=== All ajv entries in yarn.lock ==="
  grep "^ajv@" yarn.lock | head -10
  
  echo ""
  echo "=== All minimatch entries in yarn.lock ==="
  grep "^minimatch@" yarn.lock | head -10
fi

Repository: dashpay/platform

Length of output: 199


🏁 Script executed:

# Let's also check what versions of ESLint and Mocha expect
# by looking at their package definitions to understand minimatch dependency chain
echo "=== Looking for minimatch in node_modules or checking popular package versions ==="

# Search for references to minimatch in package.json files
rg 'minimatch' packages/*/package.json package.json

# Check if there's a pnpm or npm lockfile
ls -lah package-lock.json pnpm-lock.yaml 2>/dev/null || echo "No npm/pnpm lockfile found"

Repository: dashpay/platform

Length of output: 210


🏁 Script executed:

# Try different patterns for yarn.lock entries
echo "=== Searching yarn.lock for ajv entries ==="
grep 'ajv' yarn.lock | head -20

echo ""
echo "=== Searching yarn.lock for minimatch entries ==="
grep 'minimatch' yarn.lock | head -20

Repository: dashpay/platform

Length of output: 1234


🏁 Script executed:

# Also check the structure of yarn.lock to understand the format
echo "=== First 100 lines of yarn.lock to understand format ==="
head -100 yarn.lock

Repository: dashpay/platform

Length of output: 3721


🏁 Script executed:

# Find which packages require ajv@^6.12.4 in yarn.lock
echo "=== Finding packages that require ajv@^6.12.4 ==="
grep -B5 'ajv: "npm:\^6.12.4"' yarn.lock | head -30

echo ""
echo "=== Finding packages that require minimatch@^3 or @^5 ==="
grep -B3 'minimatch: "npm:\^3.1.2"' yarn.lock | head -20
echo ""
grep -B3 'minimatch: "npm:\^5.0' yarn.lock | head -20

Repository: dashpay/platform

Length of output: 1210


🏁 Script executed:

# Check if there's a test command and if we can see test results
echo "=== Checking package.json for test/lint scripts ==="
grep -A2 '"test"\|"lint"' package.json | head -20

Repository: dashpay/platform

Length of output: 554


🏁 Script executed:

# Check if any workspace package uses ajv@6 APIs that changed in v8
echo "=== Searching for ajv usage in workspace packages (looking for v6 APIs) ==="
rg -l 'ajv' packages/*/src packages/*/lib --type=js --type=ts 2>/dev/null | head -10

# Check specifically in the packages that declare ajv@8.6.0
echo ""
echo "=== Checking wasm-dpp for ajv usage ==="
find packages/wasm-dpp -name "*.ts" -o -name "*.js" | xargs grep -l 'ajv' 2>/dev/null | head -5

Repository: dashpay/platform

Length of output: 320


🏁 Script executed:

# Verify the root config context - is this a monorepo management issue?
echo "=== Checking root package.json structure ==="
cat package.json | grep -A5 -B5 '"workspaces"'

Repository: dashpay/platform

Length of output: 383


🏁 Script executed:

# Check the ajv usage in dapi validator
echo "=== packages/dapi/lib/utils/Validator.js ==="
head -50 packages/dapi/lib/utils/Validator.js

echo ""
echo "=== packages/dashmate/src/config/Config.js ajv usage ==="
grep -n -A5 -B5 'ajv' packages/dashmate/src/config/Config.js | head -40

Repository: dashpay/platform

Length of output: 2035


🏁 Script executed:

# Verify the actual resolution override in root package.json context
echo "=== Full resolutions section of root package.json ==="
sed -n '/^  "resolutions":/,/^  },$/p' package.json

Repository: dashpay/platform

Length of output: 1458


ESLint will receive an incompatible version of ajv due to unresolvable transitive dependency conflict.

The root resolution "ajv": ">=8.18.0" forces v8.18.0 globally, but ESLint 9.18.0 depends on @eslint/eslintrc@^3.3.1, which requires ajv@^6.12.4. Since v6 and v8 are incompatible major versions with differing APIs, Yarn Berry's global resolution will break ESLint's internal dependency requirements.

Similarly, "minimatch": ">=10.2.1" forces v10 globally, but ESLint's transitive dependencies (@eslint/object-schema, resolve) require minimatch@^3.1.2 and @^5.0.0 respectively. These version conflicts will cause silent redirection of all minimatch requests to v10.

Workspace packages (dapi, dashmate, wasm-dpp) declare direct dependencies on ajv@^8.6.0 and use v8-specific APIs (.compile(), ajv/dist/2020), confirming they expect v8. However, the transitive ajv@^6.12.4 requirement from ESLint cannot be satisfied by v8.18.0, causing incompatibility at runtime.

Confirm that ESLint and other dev tools function correctly with these resolutions, as the version conflicts indicated above will prevent satisfying their true dependency constraints.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 125 - 126, The root-level pins for "ajv":
">=8.18.0" and "minimatch": ">=10.2.1" cause unresolvable transitive conflicts
with ESLint/@eslint/eslintrc (which requires ajv@^6.12.4) and other packages
that expect older minimatch; remove these global constraints from package.json
and instead declare the correct versions where needed: keep ajv@^8.x as a direct
dependency in the workspace packages that use v8 (dapi, dashmate, wasm-dpp) and
allow ESLint to use its bundled ajv@6 by not forcing a global resolution;
likewise, remove the global minimatch override and let dependent packages
resolve their compatible minimatch versions or upgrade ESLint/deps to versions
compatible with minimatch v10 if you intend to standardize on v10; after making
these changes, run an install and verify ESLint and the workspace packages
(dapi, dashmate, wasm-dpp) build and lint correctly.

},
"dependencies": {
"dompurify": "^3.2.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/dashmate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"qs": "^6.14.2",
"rxjs": "^6.6.7",
"semver": "^7.5.3",
"systeminformation": "^5.27.14",
"systeminformation": "^5.30.8",
"table": "^6.8.1",
"tar": "7.5.9",
"wrap-ansi": "^7.0.0"
Expand Down
143 changes: 28 additions & 115 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2459,22 +2459,6 @@ __metadata:
languageName: node
linkType: hard

"@isaacs/balanced-match@npm:^4.0.1":
version: 4.0.1
resolution: "@isaacs/balanced-match@npm:4.0.1"
checksum: 10/102fbc6d2c0d5edf8f6dbf2b3feb21695a21bc850f11bc47c4f06aa83bd8884fde3fe9d6d797d619901d96865fdcb4569ac2a54c937992c48885c5e3d9967fe8
languageName: node
linkType: hard

"@isaacs/brace-expansion@npm:^5.0.0":
version: 5.0.0
resolution: "@isaacs/brace-expansion@npm:5.0.0"
dependencies:
"@isaacs/balanced-match": "npm:^4.0.1"
checksum: 10/cf3b7f206aff12128214a1df764ac8cdbc517c110db85249b945282407e3dfc5c6e66286383a7c9391a059fc8e6e6a8ca82262fc9d2590bd615376141fbebd2d
languageName: node
linkType: hard

"@isaacs/cliui@npm:^8.0.2":
version: 8.0.2
resolution: "@isaacs/cliui@npm:8.0.2"
Expand Down Expand Up @@ -4783,27 +4767,15 @@ __metadata:
languageName: node
linkType: hard

"ajv@npm:^6.12.4":
version: 6.12.6
resolution: "ajv@npm:6.12.6"
"ajv@npm:>=8.18.0":
version: 8.18.0
resolution: "ajv@npm:8.18.0"
dependencies:
fast-deep-equal: "npm:^3.1.1"
fast-json-stable-stringify: "npm:^2.0.0"
json-schema-traverse: "npm:^0.4.1"
uri-js: "npm:^4.2.2"
checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c
languageName: node
linkType: hard

"ajv@npm:^8.0.0, ajv@npm:^8.0.1, ajv@npm:^8.6.0, ajv@npm:^8.9.0":
version: 8.12.0
resolution: "ajv@npm:8.12.0"
dependencies:
fast-deep-equal: "npm:^3.1.1"
fast-deep-equal: "npm:^3.1.3"
fast-uri: "npm:^3.0.1"
json-schema-traverse: "npm:^1.0.0"
require-from-string: "npm:^2.0.2"
uri-js: "npm:^4.2.2"
checksum: 10/b406f3b79b5756ac53bfe2c20852471b08e122bc1ee4cde08ae4d6a800574d9cd78d60c81c69c63ff81e4da7cd0b638fafbb2303ae580d49cf1600b9059efb85
checksum: 10/bfed9de827a2b27c6d4084324eda76a4e32bdde27410b3e9b81d06e6f8f5c78370fc6b93fe1d869f1939ff1d7c4ae8896960995acb8425e3e9288c8884247c48
languageName: node
linkType: hard

Expand Down Expand Up @@ -5584,10 +5556,10 @@ __metadata:
languageName: node
linkType: hard

"bn.js@npm:4.12.0":
version: 4.12.0
resolution: "bn.js@npm:4.12.0"
checksum: 10/10f8db196d3da5adfc3207d35d0a42aa29033eb33685f20ba2c36cadfe2de63dad05df0a20ab5aae01b418d1c4b3d4d205273085262fa020d17e93ff32b67527
"bn.js@npm:5.2.3":
version: 5.2.3
resolution: "bn.js@npm:5.2.3"
checksum: 10/dfb3927e0d531e6ec4f191597ce6f7f7665310c356fef5f968ada676b8058027f959af42eaa37b5f5c63617e819d3741813025ab15dd71a90f2e74698df0b58e
languageName: node
linkType: hard

Expand Down Expand Up @@ -7278,7 +7250,7 @@ __metadata:
semver: "npm:^7.5.3"
sinon: "npm:^17.0.1"
sinon-chai: "npm:^3.7.0"
systeminformation: "npm:^5.27.14"
systeminformation: "npm:^5.30.8"
table: "npm:^6.8.1"
tar: "npm:7.5.9"
wrap-ansi: "npm:^7.0.0"
Expand Down Expand Up @@ -8975,7 +8947,7 @@ __metadata:
languageName: node
linkType: hard

"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3":
"fast-deep-equal@npm:^3.1.3":
version: 3.1.3
resolution: "fast-deep-equal@npm:3.1.3"
checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d
Expand Down Expand Up @@ -9022,13 +8994,6 @@ __metadata:
languageName: node
linkType: hard

"fast-json-stable-stringify@npm:^2.0.0":
version: 2.1.0
resolution: "fast-json-stable-stringify@npm:2.1.0"
checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e
languageName: node
linkType: hard

"fast-levenshtein@npm:^2.0.6, fast-levenshtein@npm:~2.0.6":
version: 2.0.6
resolution: "fast-levenshtein@npm:2.0.6"
Expand All @@ -9052,6 +9017,13 @@ __metadata:
languageName: node
linkType: hard

"fast-uri@npm:^3.0.1":
version: 3.1.0
resolution: "fast-uri@npm:3.1.0"
checksum: 10/818b2c96dc913bcf8511d844c3d2420e2c70b325c0653633f51821e4e29013c2015387944435cd0ef5322c36c9beecc31e44f71b257aeb8e0b333c1d62bb17c2
languageName: node
linkType: hard

"fastest-levenshtein@npm:^1.0.12, fastest-levenshtein@npm:^1.0.7":
version: 1.0.12
resolution: "fastest-levenshtein@npm:1.0.12"
Expand Down Expand Up @@ -11609,13 +11581,6 @@ __metadata:
languageName: node
linkType: hard

"json-schema-traverse@npm:^0.4.1":
version: 0.4.1
resolution: "json-schema-traverse@npm:0.4.1"
checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b
languageName: node
linkType: hard

"json-schema-traverse@npm:^1.0.0":
version: 1.0.0
resolution: "json-schema-traverse@npm:1.0.0"
Expand Down Expand Up @@ -12677,48 +12642,12 @@ __metadata:
languageName: node
linkType: hard

"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2":
version: 3.1.2
resolution: "minimatch@npm:3.1.2"
dependencies:
brace-expansion: "npm:^1.1.7"
checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634
languageName: node
linkType: hard

"minimatch@npm:^5.0.0, minimatch@npm:^5.0.1, minimatch@npm:^5.1.6":
version: 5.1.6
resolution: "minimatch@npm:5.1.6"
dependencies:
brace-expansion: "npm:^2.0.1"
checksum: 10/126b36485b821daf96d33b5c821dac600cc1ab36c87e7a532594f9b1652b1fa89a1eebcaad4dff17c764dce1a7ac1531327f190fed5f97d8f6e5f889c116c429
languageName: node
linkType: hard

"minimatch@npm:^7.2.0":
version: 7.4.6
resolution: "minimatch@npm:7.4.6"
dependencies:
brace-expansion: "npm:^2.0.1"
checksum: 10/0046ba1161ac6414bde1b07c440792ebcdb2ed93e6714c85c73974332b709b7e692801550bc9da22028a8613407b3f13861e17dd0dd44f4babdeacd44950430b
languageName: node
linkType: hard

"minimatch@npm:^9.0.0, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4, minimatch@npm:^9.0.5":
version: 9.0.5
resolution: "minimatch@npm:9.0.5"
dependencies:
brace-expansion: "npm:^2.0.1"
checksum: 10/dd6a8927b063aca6d910b119e1f2df6d2ce7d36eab91de83167dd136bb85e1ebff97b0d3de1cb08bd1f7e018ca170b4962479fefab5b2a69e2ae12cb2edc8348
languageName: node
linkType: hard

"minimatch@npm:^9.0.3 || ^10.0.1":
version: 10.1.1
resolution: "minimatch@npm:10.1.1"
"minimatch@npm:>=10.2.1":
version: 10.2.2
resolution: "minimatch@npm:10.2.2"
dependencies:
"@isaacs/brace-expansion": "npm:^5.0.0"
checksum: 10/110f38921ea527022e90f7a5f43721838ac740d0a0c26881c03b57c261354fb9a0430e40b2c56dfcea2ef3c773768f27210d1106f1f2be19cde3eea93f26f45e
brace-expansion: "npm:^5.0.2"
checksum: 10/e135be7b502ac97c02bcee42ccc1c55dc26dbac036c0f4acde69e42fe339d7fb53fae711e57b3546cb533426382ea492c73a073c7f78832e0453d120d48dd015
languageName: node
linkType: hard

Expand Down Expand Up @@ -14733,13 +14662,6 @@ __metadata:
languageName: node
linkType: hard

"punycode@npm:^2.1.0":
version: 2.1.1
resolution: "punycode@npm:2.1.1"
checksum: 10/939daa010c2cacebdb060c40ecb52fef0a739324a66f7fffe0f94353a1ee83e3b455e9032054c4a0c4977b0a28e27086f2171c392832b59a01bd948fd8e20914
languageName: node
linkType: hard

"q@npm:^1.5.1":
version: 1.5.1
resolution: "q@npm:1.5.1"
Expand Down Expand Up @@ -16804,12 +16726,12 @@ __metadata:
languageName: node
linkType: hard

"systeminformation@npm:^5.27.14":
version: 5.27.14
resolution: "systeminformation@npm:5.27.14"
"systeminformation@npm:^5.30.8":
version: 5.31.1
resolution: "systeminformation@npm:5.31.1"
bin:
systeminformation: lib/cli.js
checksum: 10/bf8194000e1a4af47acf16a9bc41b715dbd6bde15cb09dc52626f8c8d77ebc1c62b939343ae153b7cbc08486c5d841128019bfe4e5d71c42c14e1089a32c97a1
checksum: 10/1fff0b2827f7de2ec5379385c9bb12896db92186ee1d721cb08791ae7277a02f39fb8f3060df47312b70fe88c5b91a70726e7265ca8e5bab1f87780fb2acb991
conditions: (os=darwin | os=linux | os=win32 | os=freebsd | os=openbsd | os=netbsd | os=sunos | os=android)
languageName: node
linkType: hard
Expand Down Expand Up @@ -17930,15 +17852,6 @@ __metadata:
languageName: node
linkType: hard

"uri-js@npm:^4.2.2":
version: 4.4.1
resolution: "uri-js@npm:4.4.1"
dependencies:
punycode: "npm:^2.1.0"
checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb
languageName: node
linkType: hard

"url@npm:0.10.3":
version: 0.10.3
resolution: "url@npm:0.10.3"
Expand Down
Loading