feat(browser): Implement fallback SHA256 for non-HTTPS environments and enhance browser tests for consistent hashing

This commit is contained in:
Juergen Kunz
2025-06-19 23:03:36 +00:00
parent 0bae2d6eec
commit 23ad99d0e2
7 changed files with 250 additions and 10 deletions

74
changelog.md Normal file
View File

@ -0,0 +1,74 @@
# Changelog
## 2025-06-19 - 3.1.0 - feat(browser)
Implement fallback SHA256 for non-HTTPS environments and enhance browser tests for consistent hashing
- Added a pure JavaScript SHA256 fallback in ts_web/sha256.fallback.ts for environments without crypto.subtle
- Updated ts_web/index.ts to use the fallback when necessary
- Enhanced browser tests in test/test.browser.ts to verify consistent hash outputs
- Reflected new features in documentation updates (readme.plan.md)
## 2025-06-19 - 3.0.4 - feat
Merge isohash functionality into smarthash to enable crossenvironment hash support. This release introduces browsercompatible SHA256 functions via the Web Crypto API and plugins for environment detection and JSON handling.
- Added new plan and implementation steps to merge isohash into smarthash.
- Updated test files to use the new tapbundle import.
- Implemented browserspecific hashing functions in ts_web/index.ts and ts_web/plugins.ts.
- Created browser tests in test/test.browser.ts for SHA256 functions.
- Ensured consistent smarthash functionality across environments.
Note: Several nonbreaking maintenance updates (e.g. description, tsconfig, and npmextra.json adjustments) were applied between 2024 and 2023 alongside version marker commits.
---
## 2023-09-22 to 2022-06-26 - 3.0.0 - Maintenance
Between versions 3.0.3 and 3.0.0, a series of core fixes and organizational improvements were rolled out.
- Multiple “fix(core)” commits addressed various update needs.
- A couple of releases also switched to a new organization scheme.
- Routine maintenance commits ensured stability across these versions.
---
## 2022-06-26 - 2.1.10 - BREAKING CHANGE
A major change was introduced by switching the module system.
- BREAKING CHANGE(core): Switched to ESM, requiring consumers to update their imports accordingly.
---
## 2021-03-01 to 2019-11-21 - 2.1.0 - Maintenance
Across versions 2.1.9 down to 2.1.0, the project received multiple fixes and CI updates.
- Repeated “fix(core)” commits improved internal stability.
- A “fix(ci)” update was also introduced to streamline continuous integration processes.
---
## 2019-11-21 - 2.0.6 - feat
New functionality was added to expand the available hashing algorithms.
- feat(md5): Now creates MD5 hashes, broadening the projects cryptographic capabilities.
---
## 2019-07-04 to 2018-09-07 - 2.0.0 - Maintenance
This range of releases was dedicated to refining core functionality and enhancing security.
- Numerous “fix(core)” commits ensured consistent behavior.
- A “fix(snyk)” commit added a .snyk file and marked the project as Open Source for improved security auditing.
---
## 2018-09-07 - 1.0.4 - BREAKING CHANGE
A breaking change was introduced by renaming the package scope.
- BREAKING CHANGE(scope): Changed the package name to @pushrocks/smarthash, requiring updates for consumers referencing the old name.
---
## 2016-08-16 to 2016-05-23 - 1.0.0 - Initial Setup
During the early days of the project, core implementation and structure were established.
- Early commits included the initial implementation (“implementation is ready”), package metadata adjustments (e.g. “update package tags”, “fix README”), and structural additions (“add structure”).
- The journey began with the Initial commit on 2016-05-23, setting the groundwork for future development.