User Tools

Site Tools


documentation:fabric_mod_json_spec

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
documentation:fabric_mod_json_spec [2020/08/16 13:52] – add accessWidener property juuzdocumentation:fabric_mod_json_spec [2023/06/10 12:02] mineblock11
Line 1: Line 1:
 +:!: This page is slightly outdated.
 +
 ====== fabric.mod.json ====== ====== fabric.mod.json ======
  
Line 65: Line 67:
 === VersionRange === === VersionRange ===
  
-A string or array of string declaring supported version ranges. In the case of an array, an "OR" relationship is assumed - that is, only one range has to match for the collective range to be satisfied.+A string or array of string declaring supported version ranges in the form ''<operator1><range1>[ <operator2><range2>]...''. Multiple space separated ranges within the same string follow an "AND" relationship - they must all be satisfied. In the case of an array, an "OR" relationship is assumed between the array elements - that is, only one element has to match for the collective declaration to be satisfied
 + 
 +In the case of all versions, ''*'' is a special string declaring that any version is matched by the range. Fabric Loader supports a [[https://semver.org/ semver 2.0.0]] superset that allows an arbitrary amount of version components, empty pre-release and arbitrary build metadata. Version strings that are incompatible with this format are still accepted, but comparison support is limited to equality operators.
  
-In the case of all versions, ''*'' is a special string declaring that any version is matched by the range. In addition, exact string matches must be possible regardless of the version type.+Versions compatible with the extended semver format are compared as defined by [[https://semver.org/ semver 2.0.0]] with arbitrary version component comparisons beign done left to right for all componentstreating absent components as ''0''. The empty pre-release is the earliest possible pre-release, making ''1.2-'' the earliest possible version in the ''1.2'' series, intended for comparison operand declarations. Build metadata is ignored for comparison as usual.
  
-For semantic versions, the specification follows a rough subset of the [[https://docs.npmjs.com/misc/semver|NPM semver]] specification, in particular the following features are supported:+The following declarations are supported for version strings compatible with this semver superset:
  
-  * ''='' as a leading character, or the lack of one, denoting an exact match, +  * standalone ''<version>'', denoting an exact version match 
-  * Version ranges - a set of space-delimited comparators of the ''>='', ''>'', ''<='', ''<'', ''='' or no prefix, following NPM behaviour and declaring an intersection of supported versions within the scope of the string, +  * standard operators ''<operator><version>'' comparing to the declared version 
-  * X-Ranges, +    * ''='', ''>='', ''>'', ''<''''='', ''<'' for equalgreater or equal, greater, less or equal, less 
-  Tilde Ranges, +    * ''^'' for same version and up within the same major version: ''^a.b.c'' is equivalent to ''>=a.b.c <(a+1).0.0-'' 
-  * Caret Ranges.+    * ''~'' for same version and up within the same minor version: ''~a.b.c'' is equivalent to ''>=a.b.c <a.(b+1).0-'' 
 +  * X-Ranges: ''<vcp>.x''''<vcp>.X'' or ''<vcp>.*'' for same ''<vcp>'' where ''<vcp>'' is ''<major>'' or ''<major>.<minor>''e.g. ''1.x'' for ''>=1- <2-'' or ''1.2.x'' for ''>=1.2- <1.3-''. Additional trailing ''.x''/''.X''/''.*'' are allowed but have no effect
  
 +All operators always work the same regardless of the version they are matching against, there is no special casing for ''0.x''.
 ==== Mandatory fields ==== ==== Mandatory fields ====
  
documentation/fabric_mod_json_spec.txt · Last modified: 2023/12/27 12:54 by mineblock11