bpriver_versioning 0.3.1 copy "bpriver_versioning: ^0.3.1" to clipboard
bpriver_versioning: ^0.3.1 copied to clipboard

this package is bpriver_versioning library.

bpriver_versioning #

bpriver_versioning における 自然数 は 0 と 正の整数を含めたものとする.
versioning の仕様は 非常に小さな データ記述言語 の一種とも解釈できる.
この実装では parse 時に その source の開始と終了にある white space を除去する処理は行わない.

参考 #

semantic versioning

Syntax #

Three slot versioning #

規則 <major_version>.<minor_version>.<patch_version>
例 1.2.3

Four slot vesioning #

規則 <major_version>.<minor_version>.<patch_version>-<label>.<build_version>
例 1.2.3-development.4

Slot #

Major version

自然数.

Minor version

自然数.

Patch version

自然数.

Build version

自然数.

Label #

1文字以上であること.
利用可能な文字は a~z(alphabet の小文字) のみ.

version update #

それぞれの version を update(increment) する際の規則は api の変更を基準に考える.
version 管理の動機は semantic versioning 導入 で説明してくれている.
ここでは api の観点から version update の規則性を定義する.

下記に api の model を定義する.

  • api
    • name
    • return type
    • argument structure

また api とは public な class, property, method, のことである.

Major version update(api の互換性が保たれない修正) #

  • api の削除
  • api name の変更
  • api return type の 抽象度の下降 以外の変更.
    • final int result = int a()
    • final int result = num a() 抽象度の上昇は互換性が保たれない.
  • api argument structure の type の抽象度の上昇以外の変更
    • final String result = String a(num b)
    • final String result = String a(int b) 抽象度の下降は互換性が保たれな
  • api argument structure の 必須パラメーター数の変化(増加と減少)
    • final String result = String a(num b, num c)
    • final String result = String a(num b) 互換性が保たれない.
    • final String result = String a(num b, num c, num d) 互換性が保たれない.
  • api argument structure の 任意パラメーター数の減少
    • final String result = String a(int b int c)
    • final String result = String a(int b) 互換性が保たれない

Minor version update(api の互換性が保たれる修正) #

  • 新しい api の追加
    • final num result = num a()
    • final num result = num a() 互換性が保たれる.
  • api return type の 抽象度の下降 の変更.
    • final num result = num a()
    • final num result = int a() 互換性が保たれる.
  • api argument structure の type の抽象度の上昇
    • final String result = String a(int b)
    • final String result = String a(num b) 互換性が保たれる
  • api argument structure の 任意パラメーター数の増加
    • final String result = String a(int b)
    • final String result = String a(int b) 互換性が保たれる

Patch version update. #

  • api の修正が無かった時.

ある slot を update した際 すべての下位(右側にある)の slot は 0 にする. #

1.1.1-development.1(下にあるのは three slot の場合) に対して version update を実行した場合の例.

  • major version update
    • 2.0.0-development.0
    • 2.0.0
  • minor version update
    • 1.2.0-development.0
    • 1.2.0
  • patch version update
    • 1.1.2-development.0
    • 1.1.2
  • build version update
    • 1.1.1-development.2

beta 版時の version update #

major version は 0 で固定.
なので major version を上げる代わりに minor version を上げる.
他は 正式版と変わらない.

0
likes
125
points
154
downloads

Publisher

verified publisherbpriver.com

Weekly Downloads

this package is bpriver_versioning library.

Repository (GitLab)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

bpriver_json, bpriver_origin, bpriver_syntax_scanner

More

Packages that depend on bpriver_versioning