Skip to content

chore(core): add resolver options - #37

Merged
userquin merged 1 commit into
mainfrom
userquin/add-resolver-options
Oct 24, 2026
Merged

userquin merged 1 commit into
mainfrom
userquin/add-resolver-options

Conversation

@userquin

@userquin userquin commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Description

This PR adds a new ResolverOptions at core config module: this PR fix the lint script for missing entries at resolvePwaConfiguration jsdocs

Linked Issues

Additional Context

Summary by CodeRabbit

  • Documentation
    • Clarified the rules used to identify service workers that may need special handling, including TypeScript-based workers and workers outside the public directory.
  • Developer Experience
    • Added a named, exported type for resolver options, making the configuration signature clearer for TypeScript users. The callback’s support for asynchronous results is now explicit in that type.

@github-actions github-actions Bot added the pkg: core Changes affecting the core package label Oct 24, 2026
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8d76ddba-b41c-40d9-b3af-f41eb575a81c
Commits

Reviewing files that changed from the base of the PR and between 0e30660 and f506e93.

Files selected for processing: 1
  • packages/core/src/config.ts

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

Walkthrough

The change exports ResolverOptions, documents the isWrongInjectManifest callback’s expected results, and updates resolvePwaConfiguration to use the named interface. The interface fields and callback type remain unchanged.

Changes: Resolver options API

Layer / File(s) Summary
Define and document resolver options
packages/core/src/config.ts
The exported ResolverOptions interface defines the resolver options. The function documentation describes the callback’s expected results, and resolvePwaConfiguration uses the interface.

Priority: Low

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

Change: Other

Possibly related PRs

  • vite-pwa/unplugin-pwa#34: Adds documentation for resolvePwaConfiguration, which this change extends with callback rules and the exported options interface.
Merge Risk: Minimal · up to f506e

The resolver behavior and options shape are unchanged. The documentation could be clearer, but the change is ready to merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: adding resolver options to the core package. It follows the conventional commit format.
Description check Passed The description explains that ResolverOptions was added and connects the change to the resolvePwaConfiguration JSDoc lint issue. The Linked Issues and Additional Context sections are empty, but th…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains that ResolverOptions was added and connects the change to the resolvePwaConfiguration JSDoc lint issue. The Linked Issues and Additional Context sections are empty, but these are non-critical omissions.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 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.

packages/core/src/config.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@unplugin-pwa/core@37
pnpm add https://pkg.pr.new/@unplugin-pwa/inspector@37
pnpm add https://pkg.pr.new/@unplugin-pwa/types@37
pnpm add https://pkg.pr.new/@unplugin-pwa/vite@37

commit: f506e93

@userquin
userquin merged commit 05e6a2f into main Oct 24, 2026
11 checks passed
@userquin
userquin deleted the userquin/add-resolver-options branch October 24, 2026 16:21
@github-actions github-actions Bot mentioned this pull request Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: core Changes affecting the core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant