Releases: souporserious/renoun
[email protected]
Major Changes
-
1c4c390: Moves
MDXContent
andMDXComponents
type exports to@renoun/mdx
package. -
5fa1a9e: Renames
createCollection
tocollection
.Breaking Changes
Replace all instances of
createCollection
withcollection
:-import { createCollection } from 'renoun/collections' +import { collection } from 'renoun/collections' -const PostsCollection = createCollection({ +const PostsCollection = collection({ filePattern: 'posts/*.mdx', })
-
f5ecc15: Removes
getDefaultExport
andgetNamedExport
from collection export sources in favor of a newgetExport
method. This method works exactly the same as the previousgetNamedExport
method with the addition of acceptingdefault
as an export. This simplifies the API and reduces the number of methods needed to query an export source.Breaking Changes
Update any usage of
getDefaultExport
andgetNamedExport
to use the newgetExport
method:getDefaultExport()
->getExport('default')
getNamedExport('metadata')
->getExport('metadata')
Minor Changes
- 5cdff4d: Adds
@renoun/mdx
to corerenoun
package as arenoun/mdx
export. The@renoun/mdx
package was initially split off to make maintenance easier. Since renoun is catering to content authoring, the MDX features should be as easy as possible to use.
Patch Changes
- 482e1e4: Fixes fast refresh when using a custom JSX pragma.
- 78080ed: Fixes fast refresh for collections targeting files outside of workspace.
- abca1f8: Fixes package manager tab panel layout shift on page load.
- 7e58c6d: Adds better error handling to internal CLI
WebSocketClient
. - 5da3781: Fixes watch command running during deployments.
- Updated dependencies [1c4c390]
- Updated dependencies [b9d52a3]
- @renoun/[email protected]
@renoun/[email protected]
[email protected]
Minor Changes
-
ff7665e: Moves import map generation from the
.renoun
directory to the second argument of thecreateCollection
call expression. This will automatically be updated to the newfilePattern
argument and generate the import getter for each collection:import { createCollection } from 'renoun/collections' export const DocsCollection = createCollection( { filePattern: 'docs/**/*.mdx', baseDirectory: 'docs', basePath: 'docs', }, (slug) => import(`docs/${slug}.mdx`) )
This reduces a lot of boilerplate and configuration. Previously, the
.renoun
directory needed to be generated, added to.gitignore
, and then the server needed to be restarted after the first initialization. Now, import maps are colocated with their respective collection configuration. -
a484f7e: Adds support for Vite by utilizing the package.json
imports
field when the workspace is a module.
Patch Changes
- 2f4837b: Prevents error when tsconfig
exclude
field is not defined. - d49606d: Adds
baseUrl
field if it does not exist when code-modding tsconfig to add the path alias. - 46e463f: Fixes
PackageInstall
component warning showing when not being used. - 8621338: Uses CJS compatible imports to fix bundlers like Vite that will end up with
undefined
imports.
[email protected]
Minor Changes
- 2d64da1: Adds a
PackageInstall
component for displaying a list of package manager install commands that can be copied.
Patch Changes
- 2ad1db1: Removes unused
createCollection
title
andlabel
options. - 779df0a: Adds better error when trying to create a collection within a route group file pattern that needs to be escaped properly.
- 170d382: Fixes error when collection
baseDirectory
does not have any additional segments after normalizing file paths.
@renoun/[email protected]
Patch Changes
- ca8b35d: Enables old school dashes through SmartyPants remark plugin.
[email protected]
Minor Changes
-
9f6c0f2: Moves config from
.renoun/config.json
torenoun.json
. See configuration docs for more information. -
1a71061: Moves
renoun
package to ESM only. To upgrade in Next.js projects, modify thenext.config.js
file to include the following in the webpackextensionAlias
configuration:export default { webpack(config) { config.resolve.extensionAlias = { '.js': ['.ts', '.tsx', '.js'], } // ... return config }, }
-
3c78b3e: Adds the ability to filter export sources when creating a collection:
import { createCollection, isFileSystemSource, isExportSource, } from 'renoun/collections' export const ComponentsCollection = createCollection< Record<string, React.ComponentType> >('src/components/**/*.{ts,tsx}', { baseDirectory: 'components', basePath: 'components', filter: (source) => { if (isFileSystemSource(source)) { if (source.isFile()) { const allInternal = source .getExports() .every((exportSource) => exportSource.getTags()?.every((tag) => tag.tagName === 'internal') ) if (allInternal) { return false } } } if (isExportSource(source)) { if (source.getTags()?.find((tag) => tag.tagName === 'internal')) { return false } } return true }, })
Patch Changes
- aaf965c: Collections now respect the tsconfig
ignore
field if defined and will filter out sources that should be ignored. - e40258a: Fixes large font sizes on mobile devices. See this article for more info.
- bf684ca: Fixes svg warning for logo asset.
- af07785: Uses css container padding for
CodeBlock
internal padding if defined. - d207ecc: Fixes
CodeBlock
highlightedLines
regression. - cb3843c: Fixes suspense fallback layout shift during local development.
- 700969a: Normalizes custom
CodeBlock
padding values to offsetCopyButton
correctly.
@renoun/[email protected]
Major Changes
- 3565fa9: Adds
@renoun/mdx
package that includes pre-configured and customremark
andrehype
plugins.
[email protected]
Major Changes
- 8e1a7e1: Renames the package from
omnidoc
torenoun
.
@renoun/[email protected]
Major Changes
- 52b18ed: Renames the package from
@omnidoc/mdx-plugins
to@renoun/mdx-plugins
.