Skip to content

fix: correct worker file position#658

Merged
Mister-Hope merged 3 commits intomainfrom
worker-file
Apr 1, 2026
Merged

fix: correct worker file position#658
Mister-Hope merged 3 commits intomainfrom
worker-file

Conversation

@Mister-Hope
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 07:33
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 1, 2026

Pull Request Test Coverage Report for Build 23839173097

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 71.151%

Totals Coverage Status
Change from base Build 23796421232: 0.0%
Covered Lines: 1566
Relevant Lines: 2020

💛 - Coveralls

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts @vuepress/plugin-slimsearch’s worker build/layout so the generated worker script is sourced from the correct location, and consolidates shared result/worker typings into src/shared to avoid client/worker duplication.

Changes:

  • Update worker build entries/paths (split dev vs build worker) and update node-side WORKER_FILE accordingly.
  • Move/search worker utility code into src/worker/utils and update imports/tests.
  • Consolidate shared result/worker types into src/shared and update client/worker type imports.

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
plugins/search/plugin-slimsearch/tsdown.config.ts Adjusts tsdown entries to build worker artifacts in the intended locations.
plugins/search/plugin-slimsearch/tests/getMatchedContent.spec.ts Updates test import path to the new worker utils location.
plugins/search/plugin-slimsearch/src/worker/utils/index.ts Adds a barrel export for worker utility functions.
plugins/search/plugin-slimsearch/src/worker/utils/getSuggestions.ts Switches to shared type imports for worker options/items.
plugins/search/plugin-slimsearch/src/worker/utils/getSearchResults.ts Switches to shared type imports for search result typing.
plugins/search/plugin-slimsearch/src/worker/utils/getMatchedContent.ts Switches to shared type imports for Word.
plugins/search/plugin-slimsearch/src/worker/dev.ts Points dev worker to new utils barrel + shared typings.
plugins/search/plugin-slimsearch/src/worker/build.ts Points build worker to new utils barrel + shared typings.
plugins/search/plugin-slimsearch/src/shared/worker.ts Fixes IndexItem import to local shared module.
plugins/search/plugin-slimsearch/src/shared/result.ts Introduces shared result/word/match typings.
plugins/search/plugin-slimsearch/src/shared/index.ts Re-exports new shared result/worker types.
plugins/search/plugin-slimsearch/src/node/utils.ts Updates WORKER_FILE to the new built worker path.
plugins/search/plugin-slimsearch/src/client/utils/getResultPath.ts Switches MatchedItem typing import to shared types.
plugins/search/plugin-slimsearch/src/client/utils/createSearchWorker.ts Updates dev worker URL and migrates query/result typings to shared types.
plugins/search/plugin-slimsearch/src/client/typings/index.ts Removes client typings barrel (types now come from shared).
plugins/search/plugin-slimsearch/src/client/helpers/search.ts Switches SearchResult/WorkerSearchOptions typing import to shared types.
plugins/search/plugin-slimsearch/src/client/composables/useResults.ts Switches SearchResult typing import to shared types.
plugins/search/plugin-slimsearch/src/client/composables/useResultHistory.ts Switches MatchedItem/Word typing import to shared types.
plugins/search/plugin-slimsearch/src/client/components/SearchResult.ts Switches MatchedItem/Word typing import to shared types.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Mister-Hope Mister-Hope merged commit dfcad1d into main Apr 1, 2026
29 checks passed
@Mister-Hope Mister-Hope deleted the worker-file branch April 1, 2026 09:14
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.

3 participants