diff --git a/utl/version_number.py b/utl/version_number.py index a89805c2278..e8bacb11808 100755 --- a/utl/version_number.py +++ b/utl/version_number.py @@ -18,7 +18,8 @@ def debug_print(msg): sys.exit(1) git_describe = subprocess.check_output( - ["git", "describe", "--tags", "--first-parent", "--long"], text=True + ["git", "describe", "--tags", "--first-parent", "--long", "--exclude", "wasm_v*"], + text=True, ).strip() debug_print("Output of 'git describe' is: " + git_describe) diff --git a/wasm/README.md b/wasm/README.md index c361a3a7580..12d84fbb03a 100644 --- a/wasm/README.md +++ b/wasm/README.md @@ -2,15 +2,20 @@ Javascript bindings for [VowpalWabbit](https://vowpalwabbit.org/) +| npmjs version | Vowpal Wabbit version | Vowpal Wabbit tag | +|----------|----------|----------| +| 0.0.3 | 9.8.0 | wasm_v0.0.3 | +| 0.0.4 | 9.8.0 | wasm_v0.0.4 | + ## Documentation -[API documentation](documentation.md) +[API documentation](https://github.com/VowpalWabbit/vowpal_wabbit/blob/wasm_v0.0.4/wasm/documentation.md) ## Examples and How-To ### How-To include the dependency and initialize a Contextual Bandit ADF model -Full API reference [here](documentation.md#CbWorkspace) +Full API reference [here](https://github.com/VowpalWabbit/vowpal_wabbit/blob/wasm_v0.0.4/wasm/documentation.md#CbWorkspace) Require returns a promise because we need to wait for the WASM module to be initialized before including and using the VowpalWabbit JS code @@ -177,7 +182,7 @@ There is also the option of stringifying an example for user-handled logging: let cbAsString = CBExampleToString(example); ``` -Synchronous logging options are also available [see API documentation](documentation.md#VWExampleLogger) +Synchronous logging options are also available [see API documentation](https://github.com/VowpalWabbit/vowpal_wabbit/blob/wasm_v0.0.4/wasm/documentation.md#VWExampleLogger) ### How-To train a model with data from a file @@ -226,7 +231,7 @@ catch (e) ### How-To use a generic VW model (non Contextual Bandit specific functionality) -Full API reference [here](documentation.md#Workspace) +Full API reference [here](https://github.com/VowpalWabbit/vowpal_wabbit/blob/wasm_v0.0.4/wasm/documentation.md#Workspace) #### Simple regression example diff --git a/wasm/developer_readme.md b/wasm/developer_readme.md index 88300333680..bb48d2ea880 100644 --- a/wasm/developer_readme.md +++ b/wasm/developer_readme.md @@ -48,4 +48,13 @@ npm test ### Build docs ``` sh npm run docs -``` \ No newline at end of file +``` + +### Release on npm + +1. Update the version in package.json +2. Change all version references in README.md (relative links will be broken until merged to master and the tag is cut) +3. Update the table in README.md to point to latest VW version and tag +4. Commit changes to master +5. Tag the release as `wasm_v.major.minor.patch` +6. Publish to npm `npm publish --access public` (you need to sign into your npm account first and have access to the vowpalwabbit organisation) \ No newline at end of file diff --git a/wasm/package.json b/wasm/package.json index 8525908f142..cc3620ae730 100644 --- a/wasm/package.json +++ b/wasm/package.json @@ -1,6 +1,6 @@ { "name": "@vowpalwabbit/vowpalwabbit", - "version": "0.0.3", + "version": "0.0.4", "description": "wasm bindings for vowpal wabbit", "exports": { "require": "./dist/vw.js"