When developing Flex Plugins, there are three sets of versions that you want to keep updated:
flex-plugin
version of your plugin's development environmentEach 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:
1$ npm show @twilio-labs/plugin-flex231.0.0
To identify the version installed in your development environment, run the following command:
1$ twilio plugins23@twilio-labs/plugin-flex 4.8.0
Refer to our Upgrade Guide if your installed version is behind the latest available version.
If you aren't using the Flex Plugins CLI or don't have the Twilio CLI installed to run the twilio
command, then you may be running Flex using legacy plugins. Refer to our migration guide for updating your plugins to use the Flex Plugins CLI.
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 package.json
.
1"dependencies": {2"flex-plugin": "4.0.0",3...,4}
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-check-updates
globally.npm install -g npm-check-updates
ncu
command in the root directory of your plugin to display any new dependencies for the project.1ncu2Checking ~/plugin-sample/package.json3[====================] 21/21 100%45craco-config-flex-plugin ^3.0.0 → ^3.0.167Run ncu -u to upgrade package.json
package.json
and run another npm install
.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 plugin-agent-notes@5.0.0
You can also change the version of a plugin by using the Plugins Dashboard. Refer to the Plugins Dashboard Usage Guide for more details.