diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index 344045f..de4af77 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -19,6 +19,10 @@ jobs: working-directory: ./expression-js steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ - name: Install wasm-pack run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - name: Install dependencies @@ -27,3 +31,7 @@ jobs: run: npm run build - name: Package run: wasm-pack pack + - name: Publish + run: wasm-pack publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/Cargo.lock b/Cargo.lock index d7bbd5c..52815ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "aho-corasick" @@ -283,18 +283,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "expression-js" -version = "0.1.0" -dependencies = [ - "bigdecimal", - "console_error_panic_hook", - "expression-core", - "js-sys", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "fastrand" version = "2.1.1" @@ -369,6 +357,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "lago-expression" +version = "0.1.0" +dependencies = [ + "bigdecimal", + "console_error_panic_hook", + "expression-core", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "lago_expression" version = "0.0.1" diff --git a/expression-js/Cargo.toml b/expression-js/Cargo.toml index c61bbc7..01cd6bf 100644 --- a/expression-js/Cargo.toml +++ b/expression-js/Cargo.toml @@ -1,9 +1,8 @@ [package] -name = "expression-js" +name = "lago-expression" version = "0.1.0" edition = "2021" - [lib] crate-type = ["cdylib"] diff --git a/expression-js/package-lock.json b/expression-js/package-lock.json index bbac42e..345da78 100644 --- a/expression-js/package-lock.json +++ b/expression-js/package-lock.json @@ -1,9 +1,10 @@ { - "name": "expression-js", + "name": "lago-expression", "lockfileVersion": 3, "requires": true, "packages": { "": { + "name": "lago-expression", "devDependencies": { "@wasm-tool/wasm-pack-plugin": "1.7.0", "html-webpack-plugin": "^5.6.0", diff --git a/expression-js/package.json b/expression-js/package.json index a584eae..0d81551 100644 --- a/expression-js/package.json +++ b/expression-js/package.json @@ -1,4 +1,5 @@ { + "name": "lago-expression", "scripts": { "build": "webpack", "serve": "webpack serve"