Skip to content

chore(deps): upgrade @pkcprotocol/pkc-js 0.0.83 -> 0.0.85 - #135

Merged
Rinse12 merged 1 commit into
masterfrom
chore/upgrade-pkc-js-0.0.85
Aug 21, 2026
Merged

chore(deps): upgrade @pkcprotocol/pkc-js 0.0.83 -> 0.0.85#135
Rinse12 merged 1 commit into
masterfrom
chore/upgrade-pkc-js-0.0.85

Conversation

@Rinse12

@Rinse12 Rinse12 commented Aug 21, 2026

Copy link
Copy Markdown
Member

Closes #134

What

Bumps @pkcprotocol/pkc-js from 0.0.83 to 0.0.85 (latest on npm). Lockfile diff touches only pkc-js itself — no transitive dependency changes.

Upstream changes

v0.0.84

v0.0.85

The one source change

0.0.85 validates settings.challenges[] against each challenge file's optionInputs on the edit, community-creation and start paths. That surfaced a genuinely invalid config in test/cli/mintpass-integration.test.ts, which configured the challenge with no options at all:

challenges: [{ name: "@bitsocial/mintpass-challenge" }]

@bitsocial/mintpass-challenge declares chainTicker, contractAddress and requiredTokenType as required: true. In pkc-js, required means present in settings and default in optionInputs is a UI hint that core never applies (runtime/node/community/challenges/validate-challenge-settings.js), so edit() now throws ERR_CHALLENGE_REQUIRED_OPTION_MISSING, aggregated into ERR_CHALLENGE_SETTINGS_VALIDATION_FAILED_FOR_CHALLENGES.

Fixed by passing the three options explicitly. The values are the package's own runtime fallbacks (dist/mintpass.js:435 destructures chainTicker = "base", requiredTokenType = "0", and falls back to DEFAULT_CONTRACTS[chainTicker] for the address), so challenge behaviour is unchanged — the test was relying on those fallbacks implicitly and now states them.

No other call site is affected: the remaining challenges used in tests (question, test-challenge, captcha-canvas-v3) either declare no required optionInputs or already pass their options.

Operational note for existing communities

Worth knowing before this ships to a live daemon: any community whose persisted challenge config has a typo'd/undeclared option key, a missing required option, or an undeclared publicOptions entry will now emit one error event per invalid challenge on every start, carrying {challengeIndex, challengeName, communityAddress}. The community still starts — a persisted bad config never takes startup down — but the errors are new and will look like a regression to whoever sees them first. A subsequent community edit on such a community will throw until the config is corrected.

Verification

  • npm run build && npm run build:test — clean
  • npm run test:cli — 43 files, 341 passed, 1 skipped, 0 failed

Summary by CodeRabbit

  • Updates
    • Updated the PKC protocol integration to a newer version.
    • Improved mint pass challenge configuration with explicit blockchain, contract, and token type settings.

0.0.85 validates settings.challenges against each challenge file's
optionInputs. @bitsocial/mintpass-challenge marks chainTicker,
contractAddress and requiredTokenType as required, and `default` in
optionInputs is a UI hint that core never applies, so the mintpass
integration test's option-less config is now rejected on edit(). Pass
the three options explicitly, using the package's own runtime fallbacks
so challenge behaviour is unchanged.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2d90d65a-4d38-4368-bcb2-d514b3af36ce

📥 Commits

Reviewing files that changed from the base of the PR and between 5810493 and f4eeb66.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json
  • test/cli/mintpass-integration.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates @pkcprotocol/pkc-js from 0.0.83 to 0.0.85. The mintpass integration test now supplies explicit chain, contract, and token type options.

Changes

Mintpass dependency update

Layer / File(s) Summary
Dependency and challenge configuration
package.json, test/cli/mintpass-integration.test.ts
The PKC dependency now uses version 0.0.85. The mintpass challenge configuration includes explicit chainTicker, contractAddress, and requiredTokenType options.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to f4eeb

The dependency upgrade is covered by clean builds and 341 passing CLI tests, but existing communities with invalid persisted challenge settings may now log errors on each start and require correction before edits succeed. This is a bounded runtime concern that warrants owner awareness, while the PR remains mergeable with follow-up.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The dependency update and challenge test adjustment match issue #134, but package-lock.json regeneration cannot be verified because the file was excluded. Include package-lock.json in the review or provide evidence that it was regenerated with @pkcprotocol/pkc-js 0.0.85.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the dependency upgrade shown in the changeset.
Out of Scope Changes check ✅ Passed The package update and mintpass integration test changes directly support the linked issue objectives and show no unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/upgrade-pkc-js-0.0.85

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

package.json

Oops! Something went wrong! :(

ESLint: 8.27.0

Error: ESLint configuration in --config » eslint-config-oclif is invalid:

  • Unexpected top-level property "__esModule".

Referenced from: /.eslintrc
at ConfigValidator.validateConfigSchema (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2156:19)
at ConfigArrayFactory._normalizeConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2998:19)
at ConfigArrayFactory._loadConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2963:21)
at ConfigArrayFactory._loadExtendedShareableConfig (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3264:21)
at ConfigArrayFactory._loadExtends (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3135:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3074:25)
at _normalizeObjectConfigDataBody.next ()
at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3019:20)
at _normalizeObjectConfigData.next ()
at ConfigArrayFactory.loadFile (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2829:16)

test/cli/mintpass-integration.test.ts

ESLint skipped: the matched ESLint configuration already failed (config-incompatibility).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Rinse12
Rinse12 merged commit 0f6ef94 into master Aug 21, 2026
4 checks passed
@Rinse12
Rinse12 deleted the chore/upgrade-pkc-js-0.0.85 branch August 21, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(deps): upgrade @pkcprotocol/pkc-js 0.0.83 -> 0.0.85

1 participant