From ac630997411336491908aff4e6a1fe098caf8126 Mon Sep 17 00:00:00 2001 From: UneBaguette <28904802+UneBaguette@users.noreply.github.com> Date: Sun, 14 Jun 2026 05:30:25 +0200 Subject: [PATCH] feat: add webpack export condition and init type declaration bump to 0.6.5 --- .github/workflows/publish.yml | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- Makefile | 3 ++- scripts/tpl/index.d.ts | 5 ++++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 401cb14..a356e51 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4 with: - node-version: '24.15.0' + node-version: '24.16.0' registry-url: 'https://registry.npmjs.org' - name: Install wasm-pack diff --git a/Cargo.lock b/Cargo.lock index f33fbaf..9ab4bc9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -57,7 +57,7 @@ dependencies = [ [[package]] name = "blake3-wasm-rs" -version = "0.6.3" +version = "0.6.5" dependencies = [ "blake3", "hex", diff --git a/Cargo.toml b/Cargo.toml index 8819e60..ab4e58b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "blake3-wasm-rs" -version = "0.6.3" +version = "0.6.5" edition = "2024" license = "MIT OR Apache-2.0" authors = ["Thomas "] diff --git a/Makefile b/Makefile index 874e1f8..c59ab7e 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,8 @@ build-all: exports: { '.': {\ types: './index.d.ts',\ node: { require: './node/$(CRATE).js', import: './node-esm/index.mjs' },\ - import: './bundler/$(CRATE).js',\ + webpack: './bundler/$(CRATE).js',\ + import: './web/$(CRATE).js',\ default: './web/$(CRATE).js'\ }},\ files: ['bundler/', 'web/', 'node/', 'node-esm/', 'index.js', 'index.d.ts', '$(CRATE)_bg.wasm', '$(CRATE)_bg.js', 'README.md', 'LICENSE'],\ diff --git a/scripts/tpl/index.d.ts b/scripts/tpl/index.d.ts index a568852..2f913d2 100644 --- a/scripts/tpl/index.d.ts +++ b/scripts/tpl/index.d.ts @@ -1,4 +1,7 @@ // SPDX-License-Identifier: MIT OR Apache-2.0 // Copyright 2026 Thomas // @ts-nocheck -export { Hasher, deriveKey, hash, hashXof, keyedHash } from './bundler/blake3_wasm_rs'; \ No newline at end of file +export { Hasher, deriveKey, hash, hashXof, keyedHash } from './bundler/blake3_wasm_rs'; + +export type * from './web/blake3_wasm_rs.d.ts'; +export type { default } from './web/blake3_wasm_rs.d.ts'; \ No newline at end of file