From decc488f3b7ea7dd3bdb7f407ae35686d5f6ed46 Mon Sep 17 00:00:00 2001 From: Travis Jenkins Date: Fri, 9 Feb 2024 09:28:00 -0500 Subject: [PATCH] Adding updates to handle injecting some missing fields in package.json (#1371) Hard coding the name the file should use to ensure it matches expectations --- .github/workflows/flow-web.yaml | 10 +++++++++- Cargo.lock | 2 +- crates/flow-web/Cargo.toml | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flow-web.yaml b/.github/workflows/flow-web.yaml index c7791861f1..7a3ab7ca90 100644 --- a/.github/workflows/flow-web.yaml +++ b/.github/workflows/flow-web.yaml @@ -39,7 +39,15 @@ jobs: run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - name: Build flow-web - run: wasm-pack build --scope estuary crates/flow-web + run: wasm-pack build --scope estuary crates/flow-web --out-name flow_web + + # Fix from: https://github.com/rustwasm/wasm-pack/issues/1039#issuecomment-1712491804 + # We need to manually insert the main ref until this fix is published + # https://github.com/rustwasm/wasm-pack/pull/1061 + - name: Manually update package.json + run: | + npm pkg set type='module' --prefix crates/flow-web/pkg + npm pkg set main='flow_web.js' --prefix crates/flow-web/pkg - name: Publish flow-web if: ${{ github.ref == 'refs/heads/master' }} diff --git a/Cargo.lock b/Cargo.lock index 6ff9e7df06..b6f9258bd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1539,7 +1539,7 @@ dependencies = [ [[package]] name = "flow-web" -version = "0.3.0" +version = "0.4.0" dependencies = [ "console_error_panic_hook", "doc", diff --git a/crates/flow-web/Cargo.toml b/crates/flow-web/Cargo.toml index ab34d2c210..93877c2e76 100644 --- a/crates/flow-web/Cargo.toml +++ b/crates/flow-web/Cargo.toml @@ -2,7 +2,7 @@ name = "flow-web" # wasm-pack isn't yet fully compatible with workspace inheritance, so we can't use that for these fields -version = "0.3.0" +version = "0.4.0" authors = ["Estuary developers "] edition = "2021" license = "BSL"