Page MenuHomePhabricator

[chronik-client] Version bump to publish non-nng chronik-client
ClosedPublic

Authored by bytesofman on Sep 3 2024, 23:41.

Details

Summary

Now that the monorepo does not use NNG chronik-client anywhere (and the use of ChronikClientNode has also been deprecated in the monorepo), publish in-node-only chronik-client as 1.0.0

This is a breaking change for existing users. Aliasing ChronikClientNode and all types was considered, however there is no clean way to deprecate this as users with old types will always be forced to update them unless dozens of aliases are maintained here indefinitely. Given the present low download count of the module, judged better impact to drop all legacy names and types now.

Going forward, breaking changes will have major version bumps.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman published this revision for review.Sep 3 2024, 23:57
emack requested changes to this revision.Sep 4 2024, 01:09
emack added a subscriber: emack.
emack added inline comments.
modules/chronik-client/README.md
111 ↗(On Diff #49466)
111 ↗(On Diff #49466)

Should mention the above commentary around ChronikClientNode being aliased to ChronikClient and that there would only be issues if users are directly importing types specific to legacy chronik-client. Otherwise this diff is the only documentation of this.

This revision now requires changes to proceed.Sep 4 2024, 01:09
bytesofman marked 2 inline comments as done.

improve changelog copy

Tail of the build log:

    os.makedirs(tmpdir)
  File "/usr/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/work/abc-ci-builds/ecash-lib-integration-tests/test/tmp/test_runner_₿₵_🏃_20240904_175710'
Test runner completed with code 1
----------------------------|---------|----------|---------|---------|------------------------------
File                        | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s            
----------------------------|---------|----------|---------|---------|------------------------------
All files                   |   62.22 |    52.47 |   62.44 |    62.2 |                              
 ecash-lib                  |       0 |        0 |       0 |       0 |                              
  eslint.config.js          |       0 |        0 |       0 |       0 |                              
 ecash-lib/src              |    71.5 |    54.71 |    72.5 |    71.1 |                              
  consts.ts                 |       0 |      100 |     100 |       0 | 6-8                          
  ecc.ts                    |   57.14 |    83.33 |      40 |   57.14 | 23-31                        
  hash.ts                   |   88.88 |    83.33 |      80 |   88.88 | 14                           
  index.ts                  |       0 |        0 |       0 |       0 |                              
  indexBrowser.ts           |       0 |        0 |       0 |       0 |                              
  indexNodeJs.ts            |       0 |        0 |       0 |       0 |                              
  initBrowser.ts            |       0 |      100 |       0 |       0 | 11-13                        
  initNodeJs.ts             |     100 |      100 |     100 |     100 |                              
  op.ts                     |      40 |    44.44 |   66.66 |      40 | ...4,107,109,117-122,133-161 
  opcode.ts                 |     100 |    83.33 |     100 |     100 | 1                            
  script.ts                 |   52.63 |    38.09 |      60 |    50.9 | ...4-135,146,156,166,188-199 
  sigHashType.ts            |   77.77 |       44 |   85.71 |   77.77 | 26-38                        
  tx.ts                     |   93.47 |    79.16 |    90.9 |   93.18 | 123-125                      
  txBuilder.ts              |   56.17 |    48.14 |   69.23 |   54.65 | ...3-107,139-183,206,236-240 
  unsignedTx.ts             |    73.8 |    57.14 |   78.57 |   74.07 | ...3,151,159,184,192,198-201 
 ecash-lib/src/ffi          |   28.26 |    15.94 |   16.98 |   28.98 |                              
  ecash_lib_wasm_browser.js |       0 |        0 |       0 |       0 | 3-336                        
  ecash_lib_wasm_nodejs.js  |    61.9 |       55 |   39.13 |   62.75 | ...1,197-215,237,250-251,255 
 ecash-lib/src/io           |   59.55 |    60.29 |   70.58 |   58.77 |                              
  bytes.ts                  |     7.4 |    71.42 |    12.5 |     7.4 | 13-64                        
  hex.ts                    |   82.05 |     62.5 |      80 |   82.35 | 41-45,50,58                  
  int.ts                    |       0 |        0 |       0 |       0 |                              
  str.ts                    |   85.71 |    83.33 |   66.66 |   85.71 | 15                           
  varsize.ts                |      32 |    36.36 |   66.66 |      32 | 14-24,40-47                  
  writer.ts                 |       0 |        0 |       0 |       0 |                              
  writerbytes.ts            |   83.33 |    68.42 |     100 |   83.33 | 33,43,53,63,79               
  writerlength.ts           |     100 |    83.33 |     100 |     100 | 1                            
 ecash-lib/src/test         |   87.67 |    54.34 |    87.5 |   88.23 |                              
  testRunner.ts             |   87.67 |    54.34 |    87.5 |   88.23 | 71-73,86-87,110,121,164      
 ecash-lib/src/token        |   87.15 |    72.85 |   93.33 |   87.07 |                              
  alp.ts                    |   82.92 |    89.47 |   83.33 |   82.92 | 110-123,142                  
  common.ts                 |     100 |    83.33 |     100 |     100 | 1                            
  empp.ts                   |    92.3 |       75 |     100 |   91.66 | 12                           
  slp.ts                    |   89.74 |    62.16 |     100 |   89.74 | ...9,161,167,175,178,197,202 
----------------------------|---------|----------|---------|---------|------------------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='776']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='1247']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='244']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='465']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='133']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='213']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='757']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='1217']
##teamcity[blockClosed name='Code Coverage Summary']
mv: cannot stat 'test_results/ecash-lib-integration-tests-junit.xml': No such file or directory
Build ecash-lib-integration-tests failed with exit code 1

Tail of the build log:

    os.makedirs(tmpdir)
  File "/usr/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/work/abc-ci-builds/ecash-lib-integration-tests/test/tmp/test_runner_₿₵_🏃_20240904_175710'
Test runner completed with code 1
----------------------------|---------|----------|---------|---------|------------------------------
File                        | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s            
----------------------------|---------|----------|---------|---------|------------------------------
All files                   |   62.22 |    52.47 |   62.44 |    62.2 |                              
 ecash-lib                  |       0 |        0 |       0 |       0 |                              
  eslint.config.js          |       0 |        0 |       0 |       0 |                              
 ecash-lib/src              |    71.5 |    54.71 |    72.5 |    71.1 |                              
  consts.ts                 |       0 |      100 |     100 |       0 | 6-8                          
  ecc.ts                    |   57.14 |    83.33 |      40 |   57.14 | 23-31                        
  hash.ts                   |   88.88 |    83.33 |      80 |   88.88 | 14                           
  index.ts                  |       0 |        0 |       0 |       0 |                              
  indexBrowser.ts           |       0 |        0 |       0 |       0 |                              
  indexNodeJs.ts            |       0 |        0 |       0 |       0 |                              
  initBrowser.ts            |       0 |      100 |       0 |       0 | 11-13                        
  initNodeJs.ts             |     100 |      100 |     100 |     100 |                              
  op.ts                     |      40 |    44.44 |   66.66 |      40 | ...4,107,109,117-122,133-161 
  opcode.ts                 |     100 |    83.33 |     100 |     100 | 1                            
  script.ts                 |   52.63 |    38.09 |      60 |    50.9 | ...4-135,146,156,166,188-199 
  sigHashType.ts            |   77.77 |       44 |   85.71 |   77.77 | 26-38                        
  tx.ts                     |   93.47 |    79.16 |    90.9 |   93.18 | 123-125                      
  txBuilder.ts              |   56.17 |    48.14 |   69.23 |   54.65 | ...3-107,139-183,206,236-240 
  unsignedTx.ts             |    73.8 |    57.14 |   78.57 |   74.07 | ...3,151,159,184,192,198-201 
 ecash-lib/src/ffi          |   28.26 |    15.94 |   16.98 |   28.98 |                              
  ecash_lib_wasm_browser.js |       0 |        0 |       0 |       0 | 3-336                        
  ecash_lib_wasm_nodejs.js  |    61.9 |       55 |   39.13 |   62.75 | ...1,197-215,237,250-251,255 
 ecash-lib/src/io           |   59.55 |    60.29 |   70.58 |   58.77 |                              
  bytes.ts                  |     7.4 |    71.42 |    12.5 |     7.4 | 13-64                        
  hex.ts                    |   82.05 |     62.5 |      80 |   82.35 | 41-45,50,58                  
  int.ts                    |       0 |        0 |       0 |       0 |                              
  str.ts                    |   85.71 |    83.33 |   66.66 |   85.71 | 15                           
  varsize.ts                |      32 |    36.36 |   66.66 |      32 | 14-24,40-47                  
  writer.ts                 |       0 |        0 |       0 |       0 |                              
  writerbytes.ts            |   83.33 |    68.42 |     100 |   83.33 | 33,43,53,63,79               
  writerlength.ts           |     100 |    83.33 |     100 |     100 | 1                            
 ecash-lib/src/test         |   87.67 |    54.34 |    87.5 |   88.23 |                              
  testRunner.ts             |   87.67 |    54.34 |    87.5 |   88.23 | 71-73,86-87,110,121,164      
 ecash-lib/src/token        |   87.15 |    72.85 |   93.33 |   87.07 |                              
  alp.ts                    |   82.92 |    89.47 |   83.33 |   82.92 | 110-123,142                  
  common.ts                 |     100 |    83.33 |     100 |     100 | 1                            
  empp.ts                   |    92.3 |       75 |     100 |   91.66 | 12                           
  slp.ts                    |   89.74 |    62.16 |     100 |   89.74 | ...9,161,167,175,178,197,202 
----------------------------|---------|----------|---------|---------|------------------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='776']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='1247']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='244']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='465']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='133']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='213']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='757']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='1217']
##teamcity[blockClosed name='Code Coverage Summary']
mv: cannot stat 'test_results/ecash-lib-integration-tests-junit.xml': No such file or directory
Build ecash-lib-integration-tests failed with exit code 1

flakiness here looks potentially CI related, tho I am not sure really. Re-running to test.

Is it semver compatible to remove the alias without a major version bump ? If yes then it's fine and we can remove it with a minor version change. Otherwise we should remove the alias when publishing this major version.

Tail of the build log:

    os.makedirs(tmpdir)
  File "/usr/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/work/abc-ci-builds/ecash-lib-integration-tests/test/tmp/test_runner_₿₵_🏃_20240904_175710'
Test runner completed with code 1
----------------------------|---------|----------|---------|---------|------------------------------
File                        | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s            
----------------------------|---------|----------|---------|---------|------------------------------
All files                   |   62.22 |    52.47 |   62.44 |    62.2 |                              
 ecash-lib                  |       0 |        0 |       0 |       0 |                              
  eslint.config.js          |       0 |        0 |       0 |       0 |                              
 ecash-lib/src              |    71.5 |    54.71 |    72.5 |    71.1 |                              
  consts.ts                 |       0 |      100 |     100 |       0 | 6-8                          
  ecc.ts                    |   57.14 |    83.33 |      40 |   57.14 | 23-31                        
  hash.ts                   |   88.88 |    83.33 |      80 |   88.88 | 14                           
  index.ts                  |       0 |        0 |       0 |       0 |                              
  indexBrowser.ts           |       0 |        0 |       0 |       0 |                              
  indexNodeJs.ts            |       0 |        0 |       0 |       0 |                              
  initBrowser.ts            |       0 |      100 |       0 |       0 | 11-13                        
  initNodeJs.ts             |     100 |      100 |     100 |     100 |                              
  op.ts                     |      40 |    44.44 |   66.66 |      40 | ...4,107,109,117-122,133-161 
  opcode.ts                 |     100 |    83.33 |     100 |     100 | 1                            
  script.ts                 |   52.63 |    38.09 |      60 |    50.9 | ...4-135,146,156,166,188-199 
  sigHashType.ts            |   77.77 |       44 |   85.71 |   77.77 | 26-38                        
  tx.ts                     |   93.47 |    79.16 |    90.9 |   93.18 | 123-125                      
  txBuilder.ts              |   56.17 |    48.14 |   69.23 |   54.65 | ...3-107,139-183,206,236-240 
  unsignedTx.ts             |    73.8 |    57.14 |   78.57 |   74.07 | ...3,151,159,184,192,198-201 
 ecash-lib/src/ffi          |   28.26 |    15.94 |   16.98 |   28.98 |                              
  ecash_lib_wasm_browser.js |       0 |        0 |       0 |       0 | 3-336                        
  ecash_lib_wasm_nodejs.js  |    61.9 |       55 |   39.13 |   62.75 | ...1,197-215,237,250-251,255 
 ecash-lib/src/io           |   59.55 |    60.29 |   70.58 |   58.77 |                              
  bytes.ts                  |     7.4 |    71.42 |    12.5 |     7.4 | 13-64                        
  hex.ts                    |   82.05 |     62.5 |      80 |   82.35 | 41-45,50,58                  
  int.ts                    |       0 |        0 |       0 |       0 |                              
  str.ts                    |   85.71 |    83.33 |   66.66 |   85.71 | 15                           
  varsize.ts                |      32 |    36.36 |   66.66 |      32 | 14-24,40-47                  
  writer.ts                 |       0 |        0 |       0 |       0 |                              
  writerbytes.ts            |   83.33 |    68.42 |     100 |   83.33 | 33,43,53,63,79               
  writerlength.ts           |     100 |    83.33 |     100 |     100 | 1                            
 ecash-lib/src/test         |   87.67 |    54.34 |    87.5 |   88.23 |                              
  testRunner.ts             |   87.67 |    54.34 |    87.5 |   88.23 | 71-73,86-87,110,121,164      
 ecash-lib/src/token        |   87.15 |    72.85 |   93.33 |   87.07 |                              
  alp.ts                    |   82.92 |    89.47 |   83.33 |   82.92 | 110-123,142                  
  common.ts                 |     100 |    83.33 |     100 |     100 | 1                            
  empp.ts                   |    92.3 |       75 |     100 |   91.66 | 12                           
  slp.ts                    |   89.74 |    62.16 |     100 |   89.74 | ...9,161,167,175,178,197,202 
----------------------------|---------|----------|---------|---------|------------------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='776']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='1247']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='244']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='465']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='133']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='213']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='757']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='1217']
##teamcity[blockClosed name='Code Coverage Summary']
mv: cannot stat 'test_results/ecash-lib-integration-tests-junit.xml': No such file or directory
Build ecash-lib-integration-tests failed with exit code 1

flakiness here looks potentially CI related, tho I am not sure really. Re-running to test.

Yes it's unrelated. I've seen that before but no idea what happens

Is it semver compatible to remove the alias without a major version bump ? If yes then it's fine and we can remove it with a minor version change. Otherwise we should remove the alias when publishing this major version.

semver is pretty loosely defined, and we are still at an early stage in this repo. "technically" it should be a major version change. but we have already neglected a major version bump for a breaking change before in the chronik-client module.

"1.0.0" is more like "ok, we are now starting to add features exclusively for the in-node version" -- so, a potential opportunity to bump.

if we keep ChronikClientNode alias here, it will probably stay for years, then unexpectedly break something down the line when another dev removes the "dead" code...so I am open to just taking it out and dealing with the handful of impacted parties rightnow.

decision to major or minor bump is more aesthetic at this point. chronik-client has 11 weekly downloads on npm.

Is it semver compatible to remove the alias without a major version bump ? If yes then it's fine and we can remove it with a minor version change. Otherwise we should remove the alias when publishing this major version.

semver is pretty loosely defined, and we are still at an early stage in this repo. "technically" it should be a major version change. but we have already neglected a major version bump for a breaking change before in the chronik-client module.

"1.0.0" is more like "ok, we are now starting to add features exclusively for the in-node version" -- so, a potential opportunity to bump.

if we keep ChronikClientNode alias here, it will probably stay for years, then unexpectedly break something down the line when another dev removes the "dead" code...so I am open to just taking it out and dealing with the handful of impacted parties rightnow.

decision to major or minor bump is more aesthetic at this point. chronik-client has 11 weekly downloads on npm.

OK go ahead then

make the change more breaking and the version bump less breaking

modules/chronik-client/README.md
111 ↗(On Diff #49483)

My bad if I was not clear, I did mean remove the alias but keep the 1.0.0 version number which makes sense imo. This means that from there we will maintain the API or bump the major version number

keep to 1.0.0 version bump

Tail of the build log:

    os.makedirs(tmpdir)
  File "/usr/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/work/abc-ci-builds/ecash-lib-integration-tests/test/tmp/test_runner_₿₵_🏃_20240904_183648'
Test runner completed with code 1
----------------------------|---------|----------|---------|---------|------------------------------
File                        | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s            
----------------------------|---------|----------|---------|---------|------------------------------
All files                   |   58.21 |    48.38 |   56.33 |   58.09 |                              
 ecash-lib                  |       0 |        0 |       0 |       0 |                              
  eslint.config.js          |       0 |        0 |       0 |       0 |                              
 ecash-lib/src              |    71.5 |    54.71 |    72.5 |    71.1 |                              
  consts.ts                 |       0 |      100 |     100 |       0 | 6-8                          
  ecc.ts                    |   57.14 |    83.33 |      40 |   57.14 | 23-31                        
  hash.ts                   |   88.88 |    83.33 |      80 |   88.88 | 14                           
  index.ts                  |       0 |        0 |       0 |       0 |                              
  indexBrowser.ts           |       0 |        0 |       0 |       0 |                              
  indexNodeJs.ts            |       0 |        0 |       0 |       0 |                              
  initBrowser.ts            |       0 |      100 |       0 |       0 | 11-13                        
  initNodeJs.ts             |     100 |      100 |     100 |     100 |                              
  op.ts                     |      40 |    44.44 |   66.66 |      40 | ...4,107,109,117-122,133-161 
  opcode.ts                 |     100 |    83.33 |     100 |     100 | 1                            
  script.ts                 |   52.63 |    38.09 |      60 |    50.9 | ...4-135,146,156,166,188-199 
  sigHashType.ts            |   77.77 |       44 |   85.71 |   77.77 | 26-38                        
  tx.ts                     |   93.47 |    79.16 |    90.9 |   93.18 | 123-125                      
  txBuilder.ts              |   56.17 |    48.14 |   69.23 |   54.65 | ...3-107,139-183,206,236-240 
  unsignedTx.ts             |    73.8 |    57.14 |   78.57 |   74.07 | ...3,151,159,184,192,198-201 
 ecash-lib/src/ffi          |   28.26 |    15.94 |   16.98 |   28.98 |                              
  ecash_lib_wasm_browser.js |       0 |        0 |       0 |       0 | 3-336                        
  ecash_lib_wasm_nodejs.js  |    61.9 |       55 |   39.13 |   62.75 | ...1,197-215,237,250-251,255 
 ecash-lib/src/io           |   59.55 |    60.29 |   70.58 |   58.77 |                              
  bytes.ts                  |     7.4 |    71.42 |    12.5 |     7.4 | 13-64                        
  hex.ts                    |   82.05 |     62.5 |      80 |   82.35 | 41-45,50,58                  
  int.ts                    |       0 |        0 |       0 |       0 |                              
  str.ts                    |   85.71 |    83.33 |   66.66 |   85.71 | 15                           
  varsize.ts                |      32 |    36.36 |   66.66 |      32 | 14-24,40-47                  
  writer.ts                 |       0 |        0 |       0 |       0 |                              
  writerbytes.ts            |   83.33 |    68.42 |     100 |   83.33 | 33,43,53,63,79               
  writerlength.ts           |     100 |    83.33 |     100 |     100 | 1                            
 ecash-lib/src/test         |   84.93 |    52.17 |   81.25 |   85.29 |                              
  testRunner.ts             |   84.93 |    52.17 |   81.25 |   85.29 | 71-73,85-87,110,121,164,187  
 ecash-lib/src/token        |   60.33 |    47.14 |   53.33 |   60.11 |                              
  alp.ts                    |   82.92 |    89.47 |   83.33 |   82.92 | 110-123,142                  
  common.ts                 |     100 |    83.33 |     100 |     100 | 1                            
  empp.ts                   |    92.3 |       75 |     100 |   91.66 | 12                           
  slp.ts                    |    28.2 |    13.51 |    7.69 |    28.2 | ...7,174-178,185-197,201-211 
----------------------------|---------|----------|---------|---------|------------------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='726']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='1247']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='225']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='465']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='120']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='213']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='707']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='1217']
##teamcity[blockClosed name='Code Coverage Summary']
mv: cannot stat 'test_results/ecash-lib-integration-tests-junit.xml': No such file or directory
Build ecash-lib-integration-tests failed with exit code 1
This revision is now accepted and ready to land.Sep 4 2024, 23:04