Declare Target Versions

This topic applies to

Applies to

Commerce Web Stores

 

When you run the theme or extension developer tools, you specify the Commerce product for which your theme or extension applies. However, you must also specify which releases of those products are compatible with your theme or extension. You do this by declaring a target version.

Target versions are required when creating themes or extensions for the following Commerce products:

  • Commerce Web Stores– Includes SuiteCommerce (SC) and SuiteCommerce Advanced (SCA). The theme and extension developer tools both refer to this combination as SuiteCommerce Online.

  • SuiteCommerce InStore (SCIS) (Extensions only)

Target versions prevent site managers from activating or updating incompatible themes and extensions on their site because the Extension Manager:

  • Only lists themes and extensions that are compatible with the declared target version of the associated Commerce product.

  • Excludes incompatible updates to active themes and extensions.

To declare a target version:

  1. Access the theme or extension developer tools, depending on what you are creating. For details, see Theme Developer Tools and Extension Developer Tools.

  2. Follow the on-screen prompts.

    The developer tools prompt you for a target version when using the following commands:

    • gulp theme:deploy

    • gulp extension:create

    • gulp extension:deploy

  3. When prompted to enter a target version, enter a string to declare compatible versions. This string requires a three-part versioning number scheme, as described in Commerce Releases and Versioning. The developer tools prompt you for a target version for each product specified earlier. Leaving these prompts blank results in compatibility with all versions of the associated Commerce products.

    You can set the range of compatible versions using standard SEMVER range specifiers, such as the tilde (~), greater-than and equal (>=), and carat (^).

    Note

    For more information on SEMVER schema, see https://semver.org/.


  4. Leave this prompt empty to specify that the theme or extension is available for all versions of the associated Commerce product. This applies for legacy and new themes and extensions, where the target version was not provided.

The following table highlights a few useful examples.

Prefix

String Example

Description

Compatibility Examples

None

None

Leaving the target version prompt blank results in compatibility with all versions of the associated product.

All releases

None

2019.1.0

Listing the version with no symbol prefix results in compatibility with the specified release only.

2019.1.0

>=

>=2019.1.0

Greater Than and Equal

This prefix results in compatibility with the specified release and all future releases.

2019.1.0

2019.1.1

2019.2.0

2020.1.0

^

^2019.1.0

Caret

This prefix results in compatibility with the specified SC/SCA/SCIS release and all future releases within a given year, both major and minor.

2019.1.0

2019.1.1

2019.2.0

~

~2019.1.0

Tilde

This prefix results in compatibility with the specified major release including all future minor releases.

2019.1.0

2019.1.1