Actions35
- Cleaning Actions
- Coercion Actions
- Comparison Actions
- Increment Actions
- Parsing Actions
- Range Actions
- Sorting Actions
- Validation Actions
Overview
This node provides utilities for working with semantic versioning (semver) ranges, specifically for the "Less Than Range" operation under the "Range" resource. It checks whether a given version is less than a specified version range according to semver rules.
Common scenarios where this node is useful include:
- Validating if a software version falls below a certain supported range.
- Automating deployment or upgrade decisions based on version constraints.
- Filtering versions in CI/CD pipelines or package management workflows.
For example, you can check if version 1.2.3 is less than the range ^1.3.0, which would return true because 1.2.3 is less than any version starting from 1.3.0.
Properties
| Name | Meaning |
|---|---|
| Version | The specific version string to check against the range (e.g., 1.2.3). |
| Range | The version range string defining the boundary (e.g., ^1.3.0). |
| Options | Additional options to customize parsing and comparison: |
| - Loose: Whether to use loose parsing for version strings (boolean). | |
| - Include Prerelease: Whether to include prerelease versions in range matching (boolean). |
Output
The output JSON contains the original input data plus a result field indicating the boolean outcome of the "less than range" check.
Example output structure:
{
"version": "1.2.3",
"range": "^1.3.0",
"result": true
}
result: A boolean value;truemeans the version is less than the specified range,falseotherwise.
No binary data output is produced by this node.
Dependencies
- This node depends on the
semverlibrary for all version parsing and comparison logic. - No external API keys or services are required.
- No special environment variables or n8n credentials are needed.
Troubleshooting
- Invalid version or range strings: If the version or range inputs are malformed or invalid semver strings, the node may throw errors or return unexpected results. Ensure inputs conform to semver specifications.
- Loose parsing option: If your version strings do not strictly follow semver format, enable the "Loose" option to allow more permissive parsing.
- Prerelease handling: By default, prerelease versions are excluded from range matching unless "Include Prerelease" is enabled.
- Error messages: Errors typically indicate invalid input formats or unknown resources/operations. Verify that the Resource is set to "Range" and Operation to "Less Than Range".