js-md5 0.8.3 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,48 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+
11
+ jobs:
12
+ ci:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ matrix:
16
+ node-version: [16.x, 18.x, 20.x, 22.x, 24.x]
17
+ steps:
18
+ - name: Checkout code
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Set up Node ${{ matrix.node-version }}
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: ${{ matrix.node-version }}
25
+
26
+ - name: Install dependencies
27
+ run: npm ci
28
+
29
+ - name: Build
30
+ if: matrix.node-version == '24.x'
31
+ run: npm run build
32
+
33
+ - name: Check generated files
34
+ if: matrix.node-version == '24.x'
35
+ run: git diff --exit-code -- build
36
+
37
+ - name: Run tests
38
+ run: npm test
39
+
40
+ - name: Generate coverage report
41
+ if: matrix.node-version == '24.x'
42
+ run: npm run coverage
43
+
44
+ - name: Upload to coveralls
45
+ if: matrix.node-version == '24.x'
46
+ uses: coverallsapp/github-action@v2
47
+ with:
48
+ file: ./coverage.lcov
@@ -0,0 +1,32 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+ id-token: write
10
+
11
+ jobs:
12
+ publish:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - uses: actions/setup-node@v4
18
+ with:
19
+ node-version: 24.x
20
+ registry-url: https://registry.npmjs.org
21
+ package-manager-cache: false
22
+
23
+ - run: npm ci
24
+
25
+ - name: Verify release version
26
+ run: |
27
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
28
+ test "$GITHUB_REF_NAME" = "v$PACKAGE_VERSION"
29
+
30
+ - run: npm run build
31
+ - run: npm test
32
+ - run: npm publish
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Change Log
2
2
 
3
+ ## v0.9.2 / 2026-07-20
4
+ ### Fixed
5
+ - CI test.
6
+
7
+ ## v0.9.1 / 2026-07-20
8
+ ### Changed
9
+ - web worker detection. #44
10
+
11
+ ## v0.9.0 / 2026-07-20
12
+ ### Added
13
+ - Modern and lite builds generated from the same source. #44
14
+ - support ESM.
15
+ - Set up GitHub release action / provenance
16
+
17
+ ### Fixed
18
+ - Fix uploading coverage to coveralls
19
+ - fix recognize environment is node when use browserfs
20
+
3
21
  ## v0.8.3 / 2023-10-09
4
22
  ### Fixed
5
23
  - package.json main property.
package/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014-2023 Chen, Yi-Cyuan
1
+ Copyright 2014-2026 Chen, Yi-Cyuan
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # js-md5
2
- [![Build Status](https://travis-ci.org/emn178/js-md5.svg?branch=master)](https://travis-ci.org/emn178/js-md5)
2
+ [![CI](https://github.com/emn178/js-md5/actions/workflows/ci.yml/badge.svg)](https://github.com/emn178/js-md5/actions/workflows/ci.yml)
3
3
  [![Coverage Status](https://coveralls.io/repos/emn178/js-md5/badge.svg?branch=master)](https://coveralls.io/r/emn178/js-md5?branch=master)
4
4
  [![NPM](https://nodei.co/npm/js-md5.png?stars&downloads)](https://nodei.co/npm/js-md5/)
5
5
 
@@ -10,12 +10,39 @@ A simple and fast MD5 hash function for JavaScript supports UTF-8 encoding.
10
10
  [MD5 File Checksum Online](http://emn178.github.io/online-tools/md5_checksum.html)
11
11
 
12
12
  ## Download
13
- [Compress](https://raw.github.com/emn178/js-md5/master/build/md5.min.js)
14
- [Uncompress](https://raw.github.com/emn178/js-md5/master/src/md5.js)
13
+ - [Compress](https://raw.github.com/emn178/js-md5/master/build/md5.min.js)
14
+ - [Uncompressed build](https://raw.github.com/emn178/js-md5/master/build/md5.js)
15
+ - [Modern](https://raw.github.com/emn178/js-md5/master/build/md5.modern.min.js)
16
+ - [Modern uncompressed](https://raw.github.com/emn178/js-md5/master/build/md5.modern.js)
17
+ - [Lite](https://raw.github.com/emn178/js-md5/master/build/md5-lite.min.js)
18
+ - [Lite uncompressed](https://raw.github.com/emn178/js-md5/master/build/md5-lite.js)
19
+ - [Uncompress](https://raw.github.com/emn178/js-md5/master/src/md5.js)
20
+
21
+ ### Builds
22
+
23
+ | Build | Legacy fallbacks | Node acceleration | HMAC | Base64 | Deprecated `buffer` |
24
+ | --- | --- | --- | --- | --- | --- |
25
+ | `md5.js` / `md5.min.js` | Yes | Yes | Yes | Yes | Yes |
26
+ | `md5.modern.js` / `md5.modern.min.js` | No | Yes | Yes | Yes | Yes |
27
+ | `md5-lite.js` / `md5-lite.min.js` | No | No | No | No | No |
28
+
29
+ The modern and lite builds require `Array.isArray`, `ArrayBuffer`, typed arrays,
30
+ and `ArrayBuffer.isView`. The lite build keeps the one-shot and streaming MD5
31
+ APIs, including `hex`, `array`, `digest`, and `arrayBuffer` output.
15
32
 
16
33
  ## Benchmark
17
- [jsPerf Benchmark](https://jsperf.app/jonuhi)
18
- [File Benchmark](https://github.com/emn178/js-md5/issues/19)
34
+ - [Benchmark (measurethat.net) - Short String](https://measurethat.net/Benchmarks/Show/29171/0/md5-performance-comparison-v2)
35
+ - [Benchmark (measurethat.net) - Long String](https://measurethat.net/Benchmarks/Show/29172/0/md5-performance-comparison-long-text-v2)
36
+ - [Benchmark (jsperf.app) - Long String](https://jsperf.app/jonuhi/6)
37
+ - [Benchmark (measurethat.net) - Very Long String](https://measurethat.net/Benchmarks/Show/29173/0/md5-performance-comparison-very-long-text)
38
+ - [Benchmark (jsperf.app) - Very Long String](https://jsperf.app/jonuhi/8)
39
+ - [Async Benchmark (measurethat.net)](https://measurethat.net/Benchmarks/Show/29176/0/md5-performance-comparison-very-long-text-v6)
40
+ - [Async Benchmark (jsperf.app)](https://jsperf.app/jonuhi/9)
41
+
42
+ * js-md5 is the fastest synchronous MD5 library, but slower than Hash-WASM
43
+
44
+ - [File Benchmark - Issue #19](https://github.com/emn178/js-md5/issues/19)
45
+ - [File Benchmark - Issue #42](https://github.com/emn178/js-md5/issues/42)
19
46
 
20
47
  ## Installation
21
48
  You can also install js-md5 by using Bower.
@@ -85,7 +112,6 @@ md5.hex(''); // d41d8cd98f00b204e9800998ecf8427e
85
112
  md5.array(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]
86
113
  md5.digest(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]
87
114
  md5.arrayBuffer(''); // ArrayBuffer
88
- md5.buffer(''); // ArrayBuffer, deprecated, This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
89
115
  md5.base64(''); // 1B2M2Y8AsgTpgAmY7PhCfg==
90
116
 
91
117
  // HMAC