Repository navigation
fix(cli): generate plugins on the current Rozenite 2.x packages - #571
Open
lukewalczak wants to merge 1 commit into
Open
lukewalczak wants to merge 1 commit into
lukewalczak wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
rozenite generatescaffolds new plugins on the 1.x line, so every plugin created since 2.0.0 shipped starts on outdated packages. This bumps the template to the current 2.x line:It also adds a test that fails when the template's Rozenite dependencies fall off the CLI's major version.
Related Issue
Closes
Context
The template was last bumped in #171, before 2.0.0. Nothing in the release flow updates it, since the template is not a published package, so
^1.2.0stayed while the packages moved to 2.x. Because a caret range never crosses a major, new plugins resolve to 1.13.0.The template already uses 2.x features: #456 added
integrationsto itsrozenite.config.ts, but the 1.x build ignores the option and leaves it out of the manifest. Official plugins on npm already depend on@rozenite/plugin-bridge2.5.0.Rozenite packages are released in lockstep, so the test reads the CLI's own version and checks that
rozenite,@rozenite/vite-pluginand@rozenite/plugin-bridgeintemplate/package.jsonuse^with the same major. On the next major the test fails until someone bumps the template.Testing
Automated:
pnpm checks:affected && pnpm test:affectedpass.@rozenite/plugin-bridge: expected '^1.2.0' to match /^\^2\./✓ plugin template > depends on the Rozenite major line the CLI belongs toManual verification, using a plugin generated with the local CLI build (
rozenite generate):dist/rozenite.jsonhad nointegrations.tscandrozenite buildpass, anddist/rozenite.jsonincludesintegrations.integrationsfails the build:Invalid integration "reakt-native" in rozenite.config.ts.rozenite devserves the dev host onlocalhost:8888, and the "Hello world!" panel renders.ROZENITE_DEV_MODE. "Hello world!" appears in the Rozenite tab of React Native DevTools, and its panel loads fromlocalhost:8888.