From 5f735a45400d1bdc613375de2d98cb09f2d89373 Mon Sep 17 00:00:00 2001 From: fourdim <59462000+fourdim@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:30:16 -0500 Subject: [PATCH 1/3] chore: v0.1.7 --- Cargo.lock | 2 +- Cargo.toml | 2 +- build.sh | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c976945..fdaa8be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -508,7 +508,7 @@ checksum = "6ceee21e181cce2ab44e95923da6b3418df75369f570df82264c29c51ca398d4" [[package]] name = "intl-segmenter-polyfill-rs" -version = "0.1.6" +version = "0.1.7" dependencies = [ "console_error_panic_hook", "icu", diff --git a/Cargo.toml b/Cargo.toml index 471d90d..e9cdc2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "intl-segmenter-polyfill-rs" description = "A polyfill for Intl.Segmenter" -version = "0.1.6" +version = "0.1.7" edition = "2018" homepage = "https://github.com/toeverything/intl-segmenter-polyfill-rs" repository = "https://github.com/toeverything/intl-segmenter-polyfill-rs" diff --git a/build.sh b/build.sh index 83ef5cb..83e624b 100644 --- a/build.sh +++ b/build.sh @@ -1,4 +1,6 @@ -#!/bin/sh +#!/bin/bash + +set -eu -o pipefail wasm-pack build --release --out-dir pkg/esm wasm-pack build --target nodejs --release --out-dir pkg/cjs @@ -39,3 +41,7 @@ echo "$(jq --argjson FILES $(ls pkg | jq -R -s -c 'split("\n")[:-1]') \ .exports.".".require.default |= "./cjs/intl_segmenter_polyfill_rs.js" | .sideEffects[0] |= "./esm/intl_segmenter_polyfill_rs.mjs"' \ pkg/package.json)" > pkg/package.json + +echo "$(jq \ + '.name |= "intl-segmenter-polyfill-rs-web"' \ + web/package.json)" > web/package.json From 339363b7e2790471606023b9e57fde77a7f5e0fd Mon Sep 17 00:00:00 2001 From: fourdim <59462000+fourdim@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:33:28 -0500 Subject: [PATCH 2/3] fix: workflow --- .github/workflows/build.yml | 4 ++-- .github/workflows/publish.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26618cf..752614e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,10 +30,10 @@ jobs: run: cargo install icu_datagen - name: Generate data - run: sh icu-datagen.sh + run: bash icu-datagen.sh - name: Build - run: sh build.sh + run: bash build.sh - uses: pnpm/action-setup@v2 name: Install pnpm diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5611a69..14751a0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,10 +27,10 @@ jobs: run: cargo install icu_datagen - name: Generate data - run: sh icu-datagen.sh + run: bash icu-datagen.sh - name: Build - run: sh build.sh + run: bash build.sh - uses: actions/setup-node@v3 with: From e0543ea14b3f5a954242d656b937ba0904a99af7 Mon Sep 17 00:00:00 2001 From: fourdim <59462000+fourdim@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:35:19 -0500 Subject: [PATCH 3/3] docs: update readme --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1ece950..48763d7 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,11 @@ See the bugzilla issue [here](https://bugzilla.mozilla.org/show_bug.cgi?id=14235 **As firefox 122 will support the API, this project will be archived in a predictable future.** +Packages are available at: + +- https://www.npmjs.com/package/intl-segmenter-polyfill-rs +- https://www.npmjs.com/package/intl-segmenter-polyfill-rs-web + ## Usage ### Install `wasm-pack` @@ -29,13 +34,13 @@ cargo install icu_datagen ### Generate the data ``` -sh icu-datagen.sh +bash icu-datagen.sh ``` ### Build ``` -sh build.sh +bash build.sh ``` ### Use it in your project