diff --git a/.changeset/calm-sloths-wave.md b/.changeset/calm-sloths-wave.md deleted file mode 100644 index 20dd9b21..00000000 --- a/.changeset/calm-sloths-wave.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -'renoun': major ---- - -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], -}) -``` diff --git a/.changeset/curvy-news-speak.md b/.changeset/curvy-news-speak.md deleted file mode 100644 index 89d206dd..00000000 --- a/.changeset/curvy-news-speak.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'renoun': minor ---- - -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. diff --git a/.changeset/moody-guests-drive.md b/.changeset/moody-guests-drive.md deleted file mode 100644 index b8c8bef0..00000000 --- a/.changeset/moody-guests-drive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'renoun': minor ---- - -Adds `File#getText` method for retrieving the text contents of the file. diff --git a/.changeset/neat-shoes-yell.md b/.changeset/neat-shoes-yell.md deleted file mode 100644 index b02bf691..00000000 --- a/.changeset/neat-shoes-yell.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'renoun': minor ---- - -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() -``` diff --git a/.changeset/silly-mice-fix.md b/.changeset/silly-mice-fix.md deleted file mode 100644 index 30fb0c0b..00000000 --- a/.changeset/silly-mice-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'renoun': patch ---- - -Fixes `getType` erroring when inferring a re-exported type. diff --git a/.changeset/tiny-ears-whisper.md b/.changeset/tiny-ears-whisper.md deleted file mode 100644 index 60e2cb28..00000000 --- a/.changeset/tiny-ears-whisper.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'renoun': patch ---- - -Fixes duplicate exports when there are overloads. diff --git a/.changeset/witty-hounds-explode.md b/.changeset/witty-hounds-explode.md deleted file mode 100644 index 0a0c20ed..00000000 --- a/.changeset/witty-hounds-explode.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'renoun': minor ---- - -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 }) -``` diff --git a/packages/renoun/CHANGELOG.md b/packages/renoun/CHANGELOG.md index d715b867..f427131f 100644 --- a/packages/renoun/CHANGELOG.md +++ b/packages/renoun/CHANGELOG.md @@ -1,5 +1,78 @@ # 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], + }) + ``` + +### 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. +- 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() + ``` + +- 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 diff --git a/packages/renoun/package.json b/packages/renoun/package.json index bdc34116..6d85c5e4 100644 --- a/packages/renoun/package.json +++ b/packages/renoun/package.json @@ -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",