Skip to content

refactor: PR 199#200

Merged
lihbr merged 1 commit into
lh/fix-slice-library-pullfrom
aa/fix-slice-library-pull-edits
Jun 23, 2026
Merged

refactor: PR 199#200
lihbr merged 1 commit into
lh/fix-slice-library-pullfrom
aa/fix-slice-library-pull-edits

Conversation

@angeloashmore

@angeloashmore angeloashmore commented Jun 23, 2026

Copy link
Copy Markdown
Member

Resolves:

Description

Refactors #199 to follow code practices from the rest of the project, like preferring URLs over string paths.

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1


Note

Low Risk
Changes are confined to integration-test utilities and matchers; the only behavioral shift is stricter config reads and slice discovery by id, which may surface mis-located slices more accurately in tests.

Overview
Test helpers now resolve slice library locations as URLs via getSliceLibraries (replacing string-based getSliceLibraryPaths), with library paths read from prismic.config.json through a shared getConfig helper and defaulting to slices/ when none are configured.

writeLocalSlice / readLocalSlices build paths relative to each library URL instead of joining string segments under the project root.

The toContainSlice matcher locates slices by globbing */model.json across libraries and matching model.id, then checks the parent library’s index.js and index.jsx next to that model—rather than assuming a PascalCase folder name and a single {library}/index.js path.

Reviewed by Cursor Bugbot for commit ac7ff7c. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

@angeloashmore angeloashmore marked this pull request as ready for review June 23, 2026 20:53

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ac7ff7c. Configure here.

Comment thread test/setup.ts
Comment thread test/it.ts
@lihbr lihbr merged commit 20bbcef into lh/fix-slice-library-pull Jun 23, 2026
16 checks passed
@lihbr lihbr deleted the aa/fix-slice-library-pull-edits branch June 23, 2026 22:26
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.

2 participants