Skip to content

Commit

Permalink
update (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
dojyorin authored Aug 23, 2024
1 parent 39dab20 commit 91b106b
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
}, {
"name": "run test",
"run": "deno test -A ./mod.test.ts"
"run": "deno test -A --parallel --doc ./test"
}]
}
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
with:
deno-version: v1.x
- name: run test
run: deno test -A ./mod.test.ts
run: deno test -A --parallel --doc ./test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Export without external modules have fewer features than full, but not susceptib
Can be used from browser via [esm.sh](https://esm.sh).

```html
<script>
<script async type="module">
import {fetchExtend} from "https://esm.sh/gh/dojyorin/deno_simple_utility@version/mod.pure.ts?bundle&target=esnext";
</script>
```
Expand Down
10 changes: 5 additions & 5 deletions deps.pure.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export {parse, stringify} from "https://esm.sh/jsr/@std/csv@0.224.3?bundle&target=esnext";
export {ZipReader, ZipWriter, Uint8ArrayReader, Uint8ArrayWriter} from "https://esm.sh/jsr/@zip-js/[email protected].45?bundle&target=esnext";
export {parse, stringify} from "https://esm.sh/jsr/@std/csv@1.0.1?bundle&target=esnext";
export {ZipReader, ZipWriter, Uint8ArrayReader, Uint8ArrayWriter} from "https://esm.sh/jsr/@zip-js/[email protected].51?bundle&target=esnext";

// @deno-types="https://cdn.sheetjs.com/xlsx-0.20.2/package/types/index.d.ts"
export {type WorkBook as RawWorkBook, type WorkSheet as RawWorkSheet, type CellObject as RawWorkCell, set_cptable, read as sheetRead, write as sheetWrite, utils as sheetUtil} from "https://cdn.sheetjs.com/xlsx-0.20.2/package/xlsx.mjs";
export * as excelcp from "https://cdn.sheetjs.com/xlsx-0.20.2/package/dist/cpexcel.full.mjs";
// @deno-types="https://cdn.sheetjs.com/xlsx-0.20.3/package/types/index.d.ts"
export {type WorkBook as RawWorkBook, type WorkSheet as RawWorkSheet, type CellObject as RawWorkCell, set_cptable, read as sheetRead, write as sheetWrite, utils as sheetUtil} from "https://cdn.sheetjs.com/xlsx-0.20.3/package/xlsx.mjs";
export * as excelcp from "https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/cpexcel.full.mjs";
8 changes: 4 additions & 4 deletions deps.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export {assertEquals} from "jsr:@std/assert@0.226.0";
export {dirname, fromFileUrl} from "jsr:@std/path@0.225.2";
export {exists} from "jsr:@std/fs@0.229.3";
export {delay} from "jsr:@std/async@0.224.2";
export {assertEquals} from "jsr:@std/assert@1.0.2";
export {dirname, fromFileUrl} from "jsr:@std/path@1.0.2";
export {exists} from "jsr:@std/fs@1.0.1";
export {delay} from "jsr:@std/async@1.0.3";
export {DOMParser} from "jsr:@b-fuze/[email protected]";

export {init as smtpTest} from "npm:[email protected]";
6 changes: 3 additions & 3 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export {Logger, ConsoleHandler, FileHandler} from "jsr:@std/[email protected].3";
export {format} from "jsr:@std/datetime@0.224.1";
export {Logger, ConsoleHandler, FileHandler} from "jsr:@std/[email protected].5";
export {format} from "jsr:@std/datetime@0.225.0";
export {type Element, DOMParser} from "jsr:@b-fuze/[email protected]";

// @deno-types="npm:@types/[email protected]"
export {createTransport} from "npm:[email protected].13";
export {createTransport} from "npm:[email protected].14";
23 changes: 0 additions & 23 deletions mod.test.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/pure/deflate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const COMPRESS_CODEC = "deflate-raw";
* const decode = await deflateDecode(encode);
* ```
*/
export async function deflateEncode(data: Uint8Array, codec?: string): Promise<Uint8Array> {
export async function deflateEncode(data: Uint8Array, codec?: CompressionFormat): Promise<Uint8Array> {
return await streamDecode(streamEncode(data).pipeThrough(new CompressionStream(codec ?? COMPRESS_CODEC)));
}

Expand All @@ -26,6 +26,6 @@ export async function deflateEncode(data: Uint8Array, codec?: string): Promise<U
* const decode = await deflateDecode(encode);
* ```
*/
export async function deflateDecode(data: Uint8Array, codec?: string): Promise<Uint8Array> {
export async function deflateDecode(data: Uint8Array, codec?: CompressionFormat): Promise<Uint8Array> {
return await streamDecode(streamEncode(data).pipeThrough(new DecompressionStream(codec ?? COMPRESS_CODEC)));
}
1 change: 1 addition & 0 deletions src/pure_ext/zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export async function zipEncode(files: DataEntry[], pw?: string, weak?: boolean)
export async function zipDecode(archive: Uint8Array, pw?: string, encode?: string): Promise<DataEntry[]> {
const files: DataEntry[] = [];
const zip = new ZipReader(new Uint8ArrayReader(archive), {
checkPasswordOnly: false,
useWebWorkers: false,
filenameEncoding: encode,
password: pw
Expand Down

0 comments on commit 91b106b

Please sign in to comment.