v1.0.0
BREAKING CHANGES
Client-side components and hooks are no longer available from @unleash/nextjs
The default exports of @unleash/nextjs no longer include client-side components. The exports have been moved to @unleash/nextjs/client instead. This change was done to make the package work better with Next.js's new app router. Refer to Next.js's documentation on third-party packages for more information.
In specific, these components and hooks are affected:
FlagProvideruseFlaguseVariantuseFlagsuseFlagsStatus
If you import these from @unleash/nextjs in your code, you will need to change the import declarations as shown here:
// pre v1.0.0. This won't work anymore.
import { FlagProvider, useFlag } from `@unleash/nextjs`
// v1.0.0. Import client-side components from @unleash/nextjs/client
import { FlagProvider, useFlag } from `@unleash/nextjs/client`Other updates
- Middleware and App Router examples
- Added tests for compatibility with Unleash Client Specification
- Added compatibility GitLab authentication impementation relying on
instanceId - Updated all dependencies to latest versions
Detailed changelog
- Possibility to add instance_id and omit token #27 by @Tymek in #28
- chore: update dependencies by @Tymek in #30
- CI: update pipelines by @Tymek in #29
- Support for instanceId by @Tymek in #31
- Add middleware example by @Tymek in #33
- reject promise when unleash client fails to fetch by @karl-run in #36
- Fix: TS on error type by @Tymek in #37
- add client specification tests by @Tymek in #38
- Add client spec header by @Tymek in #40
- App directory support and example by @Tymek in #34
- Add instance id to the docs by @Tymek in #39
- v1.0.0 by @Tymek in #41
New Contributors
Full Changelog: v0.1.2...v1.0.0