@@ -7,25 +7,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10- ### Fixed
10+ ## [ 1.7.0 ] - 2026-06-25
1111
12- - HMAC ` generateKey ` now honors the optional ` length ` parameter correctly (bits,
13- not bytes) and zeroes the unused trailing bits of the final byte for
14- non-byte-aligned lengths, matching native Web Crypto behavior.
15- - AES ` generateKey ` (CBC, GCM, KW) now rejects key lengths other than 128, 192,
16- or 256 bits instead of accepting any multiple of 8.
12+ ### Added
13+
14+ - TypeScript declarations ([ ` types/msrCrypto.d.ts ` ] ( types/msrCrypto.d.ts ) ) were
15+ rewritten to describe the library's own ` MsrCrypto ` surface and to resolve for
16+ the ` @microsoft/msrcrypto ` import specifier (via ` export = ` ).
17+ - An ` Errors ` test module that asserts the public APIs reject/throw with the
18+ correct error names, plus the previously-unwired ` CryptoKey ` test module.
19+ - npm package metadata (` keywords ` , ` author ` , ` homepage ` , ` bugs ` , ` exports ` ,
20+ ` sideEffects ` , ` publishConfig ` ) and a ` prepublishOnly ` build guard.
21+ - Dormant GitHub Actions release workflow that builds, verifies the package,
22+ and publishes to npm with provenance on tagged releases.
1723
1824### Changed
1925
26+ - ` SubtleCrypto ` algorithm parameters now accept a string ` AlgorithmIdentifier `
27+ (e.g. ` "SHA-256" ` ) in addition to an object, matching the W3C Web Crypto spec.
28+ - ` SubtleCrypto ` methods now surface invalid input and unsupported algorithms as
29+ a rejected promise instead of throwing synchronously, per the Web Crypto
30+ contract. Missing or wrong-type arguments reject with a ` TypeError ` .
31+ - Errors raised by the library are now ` DOMException ` s with specification names
32+ (` NotSupportedError ` , ` OperationError ` , ` InvalidAccessError ` , ` DataError ` ),
33+ falling back to an ` Error ` carrying the name and legacy code on engines
34+ without a ` DOMException ` constructor (e.g. IE8).
35+ - ` getRandomValues ` now throws ` QuotaExceededError ` for requests larger than
36+ 65,536 bytes and ` TypeMismatchError ` for floating-point typed arrays.
2037- The library version is now injected into the bundle from ` package.json ` at
2138 build time, eliminating version drift between the package and the bundle.
39+ - Repository layout: built output moved from ` lib/ ` to ` dist/ ` , type
40+ declarations from ` definitions/ ` to ` types/ ` , and sources under ` src/ ` . The
41+ published ` main ` /` types ` paths are resolved through ` package.json ` , so
42+ installs via the package name are unaffected; only deep paths such as
43+ ` @microsoft/msrcrypto/lib/... ` changed.
2244
23- ### Added
45+ ### Fixed
2446
25- - npm package metadata (` keywords ` , ` author ` , ` homepage ` , ` bugs ` , ` exports ` ,
26- ` sideEffects ` , ` publishConfig ` ) and a ` prepublishOnly ` build guard.
27- - Dormant GitHub Actions release workflow that builds, verifies the package,
28- and publishes to npm with provenance on tagged releases.
47+ - HMAC ` generateKey ` now honors the optional ` length ` parameter correctly (bits,
48+ not bytes) and zeroes the unused trailing bits of the final byte for
49+ non-byte-aligned lengths, matching native Web Crypto behavior.
50+ - AES ` generateKey ` (CBC, GCM, KW) now rejects key lengths other than 128, 192,
51+ or 256 bits instead of accepting any multiple of 8.
52+ - Removed a stray ` console.log ` that leaked exported key material during
53+ ` wrapKey ` .
54+ - Fixed an error in the worker result path that threw when assigning to the
55+ read-only ` DOMException.code ` property.
2956
3057## [ 1.6.0]
3158
0 commit comments