Skip to content

Commit 041d96e

Browse files
committed
Fix types
1 parent 4e5b8d0 commit 041d96e

File tree

5 files changed

+19
-6
lines changed

5 files changed

+19
-6
lines changed

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
uses: threeal/cmake-action@v1.3.0
3131
with:
3232
c-compiler: emcc
33-
options: CMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
33+
options: CMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake CMAKE_BUILD_TYPE=Release
3434
- name: Build Project
3535
run: cmake --build build
3636
- name: Install Project

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Emscripten")
6262
${CMAKE_SOURCE_DIR}/LICENSE-2.0.txt
6363
js/package.json
6464
js/index.d.ts
65+
js/index.d.cts
6566
js/LICENSE
66-
js/README.md
67+
${CMAKE_SOURCE_DIR}/README.md
6768
${CMAKE_CURRENT_BINARY_DIR}/index.cjs
6869
${CMAKE_CURRENT_BINARY_DIR}/index.mjs
6970
DESTINATION pkg

src/js/README.md

Whitespace-only changes.

src/js/index.d.cts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default _default;
2+
declare function _default(): {
3+
readonly scrub: () => void;
4+
readonly exportState: () => ArrayBufferLike;
5+
readonly importState: (state: AllowSharedBufferSource) => void;
6+
readonly update: (data: AllowSharedBufferSource) => void;
7+
readonly finish: () => ArrayBufferLike;
8+
};

src/js/package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "@exact-realty/sha2",
33
"author": "Exact Realty Limited",
4-
"keywords": ["sha256", "sha2", "hash", "digst"],
5-
"description": "SHA2 implementation with exportable state",
6-
"version": "1.0.0",
4+
"keywords": ["sha256", "sha2", "hash", "digest"],
5+
"description": "SHA-2 implementation with exportable state",
6+
"version": "1.0.1",
77
"license": "Apache-2.0",
88
"repository": {
99
"type": "git",
@@ -13,6 +13,7 @@
1313
"LICENSE-2.0.txt",
1414
"index.cjs",
1515
"index.d.ts",
16+
"index.d.cts",
1617
"index.mjs"
1718
],
1819
"type": "module",
@@ -21,7 +22,10 @@
2122
"types": "./index.d.ts",
2223
"exports": {
2324
".": {
24-
"types": "./index.d.ts",
25+
"types": {
26+
"import": "./index.d.ts",
27+
"require": "./index.d.cts"
28+
},
2529
"import": "./index.mjs",
2630
"require": "./index.cjs"
2731
}

0 commit comments

Comments
 (0)