When developing Flex Plugins, there are three sets of versions that you want to keep updated:
- The Flex Plugins CLI version that provides the tooling required for building and managing plugins
flex-pluginversion of your plugin's development environment
- The versions of the plugins you create
Each of these is managed independently. Updating the Flex Plugins CLI won't automatically update the development environment of your existing plugins. This allows you to trial new features in your latest plugins without risking backwards-incompatible changes in your other codebases.
To identify the latest version release available, run the following command:
$ npm show @twilio-labs/plugin-flex
To identify the version installed in your development environment, run the following command:
$ twilio plugins
Refer to our Upgrade Guide if your installed version is behind the latest available version.
Existing plugin directories are not automatically updated to use the latest features from the Flex Plugins CLI. These must be individually migrated to add new build scripts or apply updated dependencies. You can verify the version of your plugin by checking the
flex-plugin dependency within your plugin's
In your plugin directory, run the following command using the CLI. This command upgrades and installs your plugin dependencies to be compatible to use the latest version of Plugins CLI.
twilio flex:plugins:upgrade-plugin --install
The command updates the scripts and the dependencies in the package.json of your plugin. This command will not override any of the changes you made in the package.json.
To upgrade your plugin to be compatible with Flex UI
2.x, run the following command:
twilio flex:plugins:upgrade-plugin --flexui2
Check out our Migration Guide to determine the necessary steps for your plugin upgrade.
As you develop your plugins, you may include dependencies in addition to the ones we've provided as part of the
create-flex-plugin template. The npm-check-updates package can check all of the dependencies in your
package.json and identify the latest available versions. To use this package:
npm install -g npm-check-updates
2. Run the
ncu command in the root directory of your plugin to display any new dependencies for the project.
[====================] 21/21 100%
craco-config-flex-plugin ^3.0.0 → ^3.0.1
Run ncu -u to upgrade package.json
3. Update any of the identified dependencies in your
package.json and run another
If you have been using the Flex Plugins CLI to deploy and release your plugins, you can confirm which versions are live by running the following command.
twilio flex:plugins:describe:release --active
An example output is shown below:
For each active plugin, you can identify the latest available version using the
describe:plugin command. For example:
twilio flex:plugins:describe:plugin --name plugin-agent-notes
You must generate a new plugin release to update Flex to use the latest version of your plugins. If we wanted to update
plugin-agent-notes, and this is the only plugin active for your agents, you'd use the following command:
twilio flex:plugins:release --description "Integrating notes with CRM" --name "Agent Notes v5" --plugin firstname.lastname@example.org
You can also change the version of a plugin by using the Plugins Dashboard. Refer to the Plugins Dashboard Usage Guide for more details.