Update guide
3 minute read
New versions of API Builder are released every 2 weeks, often containing important fixes and features. Each API Builder project depends on it is own version of API Builder which allows you to update your services individually.
API Builder provides details about component updates in the Updates tab in the UI. There are two types:
-
Updates - These are safe, incremental updates that may fix bugs, introduce new features, or apply security updates. These types of updates are automatically applied when
npm update
is run from the command line. You should regularly update your application (see installing updates). -
Upgrades - These are breaking changes, meaning that the new version that is introduced is somehow incompatible with the previous version, and may adversely effect your application. Installing upgrades is optional, however you should check the release schedule for when your current version will no longer be supported. For these, you should read the release notes carefully before installing. In many cases, a component may only require a newer version of Node.js. However, some upgrades may require that you make changes to your application, and these will be detailed in the release notes (see installing upgrades).
Occassionally, there are also recommended updates to the project’s files that will be mentioned in the release notes, these can be found in Project updates.
Update notifications
When updates or upgrades are available, the UI will show a badge in the Updates button in the navigation panel indicating the number of components that have updates.
Installing updates
When updates are available, a panel will appear at the top of the Updates page, that indicates it is an “Update”.
The panel can be expanded by clicking on it to review the components and the release notes for each component that will be updated.
When ready, click the Update button. The UI does not actually install updates. It merely guides you in how to install the update, which is effectively:
- Return to the console where you started the application.
- Exit the application.
- Run
npm update
- Restart the application
The UI is not required for installing updates. The npm update
command can be run any time.
Note
Installing updates is a manual process that requires restart.Installing upgrades
When upgrades are available, a panel will appear at the bottom of the Updates page, that indicates it is an “Upgrade”. The panels can be expanded to see the effected module and versions and review the release notes.
In the example below, there are two panels, Updates and Upgrades, but all of the upgrades are disabled because we require all updates be applied before upgrading.
Note
- All upgrade prerequisites must be installed before the upgrade can be installed.
- All updates must be installed before any upgrade.
- Installing upgrades is a manual process that requires restart.
Once all of the prerequisites are met for an individual upgrade, you may install the upgrade. A final prerequisite is a check-box to ensure that you have read the release notes. Installing upgrades can have an adverse effect on your application if you do not correctly prepare for them.
When ready, click the Update button. The UI does not actually install upgrades. It merely guides you in how to install the upgrade, which is effectively:
- Return to the console where you started the application.
- Exit the application.
- Run the command provided from the Upgrade dialog
- Restart the application
Update CLI
The CLI is used to create new projects. Before creating a new project, ensure that your CLI is up to date. This ensures that the project contains all of the latest updates.
npm install -g axway
axway pm update