Skip to content

Commit

Permalink
Version Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 5, 2025
1 parent a8b321f commit 856dd12
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 151 deletions.
43 changes: 0 additions & 43 deletions .changeset/calm-sloths-wave.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/curvy-news-speak.md

This file was deleted.

22 changes: 0 additions & 22 deletions .changeset/fair-candles-grin.md

This file was deleted.

23 changes: 0 additions & 23 deletions .changeset/few-swans-call.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/moody-guests-drive.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/neat-shoes-yell.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/shaggy-scissors-whisper.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/silly-mice-fix.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/slimy-cheetahs-swim.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tiny-ears-whisper.md

This file was deleted.

14 changes: 0 additions & 14 deletions .changeset/witty-hounds-explode.md

This file was deleted.

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

## 8.0.0

### Major Changes

- 02facb1: Removes `renoun/collections` package export and all related types and utilities that were deprecated in [v7.8.0](https://github.com/souporserious/renoun/releases/tag/renoun%407.8.0).

### Breaking Changes

The `renoun/collections` package was removed. To upgrade, move to the `renoun/file-system` package and use the `Directory` class instead. In most cases, you can replace `Collection` with `Directory` and `CompositeCollection` with `EntryGroup`.

#### Before

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

const docs = new Collection({
filePattern: '*.mdx',
baseDirectory: 'docs',
})
const components = new Collection({
filePattern: '*.{ts,tsx}',
baseDirectory: 'src/components',
})
const compositeCollection = new CompositeCollection(docs, components)
```

#### After

```tsx
import { Directory, EntryGroup } from 'renoun/file-system'

const docs = new Directory({
path: 'docs',
include: '*.mdx',
})
const components = new Directory({
path: 'src/components',
include: '*.{ts,tsx}',
})
const entryGroup = new EntryGroup({
entries: [docs, components],
})
```

- eda5977: Removes all `*OrThrow` methods from `Directory` and `EntryGroup`. This also exports two new custom errors, `FileNotFoundError` and `FileExportNotFoundError` to handle missing files and exports.

### Breaking Changes

`Directory` and `EntryGroup` no longer have `*OrThrow` methods, use the respective methods instead. To get the same functionality as before, you can catch the error and handle it accordingly:

```ts
import { Directory } from 'renoun/file-system'

const posts = new Directory({ path: 'posts' })

posts.getFile('hello-world', 'mdx').catch((error) => {
if (error instanceof FileNotFoundError) {
return undefined
}
throw error
})
```

### Minor Changes

- fcd11af: Now `Directory#getParent` throws when called for the root directory. This makes the method easier to work with and aligns better with `File#getParent` always returning a `Directory` instance.
- 71aa01f: Adds a default `mdx` loader to `JavaScriptFile` that uses the `MDXRenderer` component. This allows MDX files without imports to be rendered easily:

```tsx
import { Directory } from 'renoun/file-system'

const posts = new Directory({ path: 'posts' })

export default async function Page({
params,
}: {
params: Promise<{ slug: string }>
}) {
const slug = (await params).slug
const post = await posts.getFile(slug, 'mdx')
const Content = await post.getExportValue('default')

return <Content />
}
```

- 21a952a: Adds `File#getText` method for retrieving the text contents of the file.
- e107c2f: Allows instantiating `File` and `JavaScriptFile` more easily using only a `path`:

```ts
import { JavaScriptFile } from 'renoun/file-system'

const indexFile = new JavaScriptFile({ path: 'src/index.ts' })
const indexFileExports = await indexFile.getExports()
```

- 919b73d: Configures the [JavaScript RegExp Engine](https://shiki.style/guide/regex-engines#javascript-regexp-engine) for `shiki`.
- 213cc11: Adds an option for specifying the `port` number when using `createServer` from `renoun/server`:

```ts
import { createServer } from 'renoun/server'

createServer({ port: 3001 })
```

- 446effc: Exports `FileSystem`, `MemoryFileSystem`, and `NodeFileSystem` classes for creating custom file systems as well as `Repository` for normalizing git providers.

```js
import { Directory, MemoryFileSystem } from 'renoun/file-system'

const fileSystem = new MemoryFileSystem({
'index.mdx': '# Hello, World!',
})
const directory = new Directory({ fileSystem })
```

### Patch Changes

- 7b90440: Fixes `getType` erroring when inferring a re-exported type.
- 54eeb9e: Fixes duplicate exports when there are overloads.

## 7.9.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": "7.9.0",
"version": "8.0.0",
"description": "The Technical Content Toolkit for React",
"author": "Travis Arnold",
"license": "AGPL-3.0-or-later",
Expand Down

0 comments on commit 856dd12

Please sign in to comment.