Skip to content

chore(sv): replace tiny-glob with fs.readdirSync - #1311

Merged
manuel3108 merged 3 commits into
sveltejs:version-1from
sacrosanctic:no-tiny-glob
Sep 4, 2026
Merged

chore(sv): replace tiny-glob with fs.readdirSync#1311
manuel3108 merged 3 commits into
sveltejs:version-1from
sacrosanctic:no-tiny-glob

Conversation

@sacrosanctic

@sacrosanctic sacrosanctic commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Closes #

Description

Removes a devDependency.

Checklist

  • Update snapshots (if applicable)
  • Add a changeset (if applicable)
  • Allow maintainers to edit this PR
  • I care about what I'm doing, no matter the tool I use (Notepad, Sublime, VSCode, AI...)

Summary by CodeRabbit

  • Bug Fixes

    • Improved template discovery during builds, including nested template files.
    • Maintained consistent ordering of discovered templates.
  • Chores

    • Removed an unnecessary development dependency.
    • Simplified internal file-matching configuration without changing behavior.

@pkg-svelte-dev

pkg-svelte-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown

Install the latest version of sv from da78f32:

pnx https://pkg.svelte.dev/sv/c/da78f324b37e24db586cf0ba83b2e0b1b509b473 create

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/cli/pr/1311

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: da78f32

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sv Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 2, 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: Advanced

Run ID: 54cd1428-f204-4641-ad51-0d209ee1ff7f

📥 Commits

Reviewing files that changed from the base of the PR and between 08b3fc3 and da78f32.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • .changeset/shaggy-dragons-thank.md
  • packages/sv/package.json
  • packages/sv/src/create/scripts/build-templates.js
  • packages/sv/src/migrate/migrations/tests.spec.ts
💤 Files with no reviewable changes (1)
  • packages/sv/package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The PR replaces tiny-glob with recursive fs.readdirSync traversal for template discovery, removes the dependency, adds patch-release metadata, and reformats two migration glob calls without behavior changes.

Changes

Template discovery updates

Layer / File(s) Summary
Recursive template discovery
packages/sv/src/create/scripts/build-templates.js, packages/sv/package.json, .changeset/shaggy-dragons-thank.md
Template, shared-file, and Vite-template discovery now use recursive filesystem traversal with file filtering, relative paths, and sorting. The tiny-glob dependency is removed, and a patch changeset is added.
Migration glob formatting
packages/sv/src/migrate/migrations/tests.spec.ts
Two fs.globSync calls use single-line options without behavior changes.

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

Merge Risk: ⚪ Minimal · up to da78f

This PR replaces development-time template discovery with synchronous filesystem traversal and removes an unused development dependency. The change is localized and no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: jycouet

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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 main change: replacing tiny-glob with Node.js fs.readdirSync in sv.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 …
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: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@sacrosanctic sacrosanctic changed the title chore(sv): replace tiny-glob with fs.readdirSync` chore(sv): replace tiny-glob with fs.readdirSync Sep 2, 2026
@manuel3108 manuel3108 added the needs-addon-integration-tests Run the addon integration test suite label Sep 4, 2026
@manuel3108
manuel3108 merged commit 6fe97e2 into sveltejs:version-1 Sep 4, 2026
15 of 16 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 4, 2026
@sacrosanctic
sacrosanctic deleted the no-tiny-glob branch September 5, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-addon-integration-tests Run the addon integration test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants