Closed coatless closed 2 months ago
Good idea!
I've reworked how versioning is reported in https://github.com/r-wasm/webr/commit/3b1e66720a4168a099cd442fb24acc13882f50d9. Once GHA CI has caught up, it should be possible to access the version of webR using the property webR.version
from JS. I'll try to remember to keep an eye on the results of this change for the next few pushes to main
and tagged releases.
I've set this up so that the version should include the GitHub SHA for development builds hosted at [...]/latest/
.
> webR.version;
< '0.3.3-dev+1298d00'
For tagged releases, this should return a standard version number as expected:
> webR.version;
< '0.3.3'
Note that this is based on the version reported in webR's package.json
, which follows semver. For development versions of webR this will be slightly different to the version of the webr
support package as reported by utils::packageVersion()
due to the differing versioning practices for indicating pre-release versions. They should, however, match for tagged releases of webR.
@georgestagg this is wonderful! Thank you so much. 👍
No worries on the semver
part, Quarto has a similar versioning scheme required for extensions.
With the update cadence increasing, it would be good to be able to query the
webR
module itself to obtain the current version information, e.g.This would avoid needing to querying the
webr
support package for version information, e.g.