Skip to content

Commit

Permalink
Version Packages (#197)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Oct 10, 2024
1 parent 37c5947 commit 792273e
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 127 deletions.
17 changes: 0 additions & 17 deletions .changeset/chilly-wombats-attend.md

This file was deleted.

40 changes: 0 additions & 40 deletions .changeset/famous-hairs-vanish.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fifty-starfishes-yell.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/funny-pants-camp.md

This file was deleted.

16 changes: 0 additions & 16 deletions .changeset/happy-toes-wash.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/khaki-coins-care.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/odd-camels-report.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/shaggy-paws-report.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sour-beds-rush.md

This file was deleted.

18 changes: 0 additions & 18 deletions .changeset/three-colts-sniff.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/three-countries-rhyme.md

This file was deleted.

93 changes: 93 additions & 0 deletions packages/renoun/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,98 @@
# renoun

## 5.3.0

### Minor Changes

- 6a74c71: Deprecates the `collection` utility in favor of using the `Collection` class directly:

```diff
-- import { collection } from 'renoun/collections'
++ import { Collection } from 'renoun/collections'

-- export const PostsCollection = collection({
++ export const PostsCollection = new Collection({
filePattern: 'posts/*.mdx',
baseDirectory: 'posts',
basePath: 'posts',
})
```

- ad250de: Introduces a new `CompositeCollection` class. This allows grouping a set of collections to treat them as a single collection:

```tsx
import { Collection, CompositeCollection } from 'renoun/collections'

const CollectionsCollection = new Collection({
filePattern: 'src/collections/index.tsx',
baseDirectory: 'collections',
})

const ComponentsCollection = new Collection({
filePattern: 'src/components/**/*.{ts,tsx}',
baseDirectory: 'components',
})

const AllCollections = new CompositeCollection(
CollectionsCollection,
ComponentsCollection
)
```

When getting a source from a composite collection, the `<FileSystemSource>.getSiblings` method will account for all collections in the composite collection:

```tsx
const source = AllCollections.getSource('collections/index')!

const [previousSource, nextSource] = await source.getSiblings()
```

A new `<Collection>.hasSource` type guard is also available to help constrain the type of the source when working with composite collections:

```tsx
if (ComponentsCollection.hasSource(nextSource)) {
// nextSource is now typed as a ComponentsCollection source
}
```

- f499a2b: Adds support to `<ExportSource>.getType()` for capturing API references that use index types.
- 8822ce6: Adds an initial highlight animation of all symbols when the pointer enters the `CodeBlock`.
- fc1e9a6: Adds support for passing a file path to the `APIReference.source` prop:

```tsx
import { APIReference } from 'renoun/components'

export function FilePath() {
return (
<APIReference
source="./GitProvider.tsx"
workingDirectory={import.meta.url}
/>
)
}
```

### Patch Changes

- 53ad975: Moves image mask to code element when using `CodeBlock.focusedLines` prop to prevent dimming the border and copy button.
- c35be54: Fixes CLI errors not bubbling correctly during local development.
- 508d086: This update resolves several issues with API references, particularly recursion bugs in the internal `resolveType` utility. The key changes involve an updated algorithm for computing component types, which affects the following case:

- Named functions with a capitalized first letter and a single non-object argument are now interpreted as components when they should be functions. This is an unintended behavior change and will be corrected in an upcoming update.

### Type References

Type references are now split into two maps that serve the following use cases:

- **Prevent Infinite Recursion**: A map of type references is maintained during type iteration of the root type to prevent infinite recursion.
- **Optimized Type Handling for Exported Declarations**:
- Adds an explicit map for tracking exported declarations to avoid type duplication.
- Improves performance and establishes a link between types.

- a8b77df: Updates `renoun/assets` with the latest logos.
- fc2cc02: Allows `CodeInline` to stretch by anchoring the `CopyButton` to the end.
- 2e75254: Adds better error messaging with actions to take when `CodeBlock` or `CodeInline` has diagnostic errors.

## 5.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/renoun/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "renoun",
"version": "5.2.0",
"version": "5.3.0",
"description": "The Content & Documentation SDK for React",
"author": "Travis Arnold",
"license": "AGPL-3.0-or-later",
Expand Down

0 comments on commit 792273e

Please sign in to comment.