souporserious / renoun

Documentation that matches the quality of your product.
https://renoun.dev
GNU Affero General Public License v3.0
420 stars 8 forks source link

simplify collection base directory #209

Closed souporserious closed 2 weeks ago

souporserious commented 2 weeks ago

Simplifies how baseDirectory works for Collection. This was from a legacy implementation that was not well thought out and caused confusion and subtle bugs. This change makes it more explicit and easier to understand.

Breaking Changes

The baseDirectory option for Collection is now required to be separate from filePattern:

import { Collection } from 'renoun/collections'

const components = new Collection({
--  filePattern: 'src/components/**/*.ts',
--  baseDirectory: 'components',
++  filePattern: '**/*.ts',
++  baseDirectory: 'src/components',
})
changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: fa67655f413a155e816d9c443c7f6e616fea6985

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

This PR includes changesets to release 1 package | Name | Type | | ------ | ----- | | renoun | Major |

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

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
renoun ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 6:58pm