Skip to content

Commit bfe2797

Browse files
committed
Auto-generated commit
1 parent 411f026 commit bfe2797

File tree

13 files changed

+1415
-2
lines changed

13 files changed

+1415
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-05-29)
7+
## Unreleased (2025-06-21)
88

99
<section class="features">
1010

1111
### Features
1212

13+
- [`7f0421e`](https://github.com/stdlib-js/stdlib/commit/7f0421e54502fdd9e92758d9c9123216372287fd) - add inital implementation of `array/struct-factory`
1314
- [`79efa56`](https://github.com/stdlib-js/stdlib/commit/79efa566515a8c7453fb59b9e18050be37969830) - add `anyHasOwnProp`, `anyHasProp`, `anyIsEntry`, and `anyIsEntryIn` to namespace
1415
- [`9d04faf`](https://github.com/stdlib-js/stdlib/commit/9d04fafb8ff8cbba366950b2659de2c652953597) - add `array/base/any-is-entry-in`
1516
- [`1090b61`](https://github.com/stdlib-js/stdlib/commit/1090b61370d43c7224595f0038a086257fdb0113) - add `array/base/any-is-entry`
@@ -127,6 +128,7 @@
127128

128129
### Bug Fixes
129130

131+
- [`4252199`](https://github.com/stdlib-js/stdlib/commit/42521999bf5751baf748fb1e9528c9c4b31a9116) - ensure byte offset is a multiple of data type byte length
130132
- [`c54d1e0`](https://github.com/stdlib-js/stdlib/commit/c54d1e095143ad68529927fe76e8ddc435592a19) - revert iterator type change
131133
- [`09ff0ce`](https://github.com/stdlib-js/stdlib/commit/09ff0ce53ae1c659591a4106c7f44b9df29bcdfd) - add missing index normalization and add associated tests
132134
- [`165c7fb`](https://github.com/stdlib-js/stdlib/commit/165c7fb75861f4c1ee28940aadbe44ba4f6e8268) - use the correct TypeScript callback signature and update docs for `array/base/for-each` [(#5448)](https://github.com/stdlib-js/stdlib/pull/5448)
@@ -211,6 +213,8 @@ A total of 32 issues were closed in this release:
211213

212214
<details>
213215

216+
- [`7f0421e`](https://github.com/stdlib-js/stdlib/commit/7f0421e54502fdd9e92758d9c9123216372287fd) - **feat:** add inital implementation of `array/struct-factory` _(by Athan Reines)_
217+
- [`4252199`](https://github.com/stdlib-js/stdlib/commit/42521999bf5751baf748fb1e9528c9c4b31a9116) - **fix:** ensure byte offset is a multiple of data type byte length _(by Athan Reines)_
214218
- [`4951a9d`](https://github.com/stdlib-js/stdlib/commit/4951a9dabc0a1cd2a9a93d8db024538db302b801) - **refactor:** tighten types _(by Athan Reines)_
215219
- [`3fa6ce1`](https://github.com/stdlib-js/stdlib/commit/3fa6ce1f3ef526cb91a02c2dffd2cbfd215b4f8c) - **refactor:** tighten types _(by Athan Reines)_
216220
- [`979807b`](https://github.com/stdlib-js/stdlib/commit/979807b5577c8a68aa06ba159ad2d905742eaf46) - **bench:** fix invocation _(by Athan Reines)_

CONTRIBUTORS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ Ali Salesi <[email protected]>
2121
AlyAbdelmoneim <[email protected]>
2222
Aman Bhansali <[email protected]>
2323
AmanBhadkariya <[email protected]>
24+
Amisha Chhajed <[email protected]>
2425
Amit Jimiwal <[email protected]>
26+
Annamalai Prabu <[email protected]>
2527
Anshu Kumar <[email protected]>
2628
Anshu Kumar <[email protected]>
2729
Anudeep Sanapala <[email protected]>
30+
Aryan Bhirud <[email protected]>
2831
Athan Reines <[email protected]>
2932
3033
Bhavishy Agrawal <[email protected]>
@@ -38,6 +41,7 @@ Daniel Killenberger <[email protected]>
3841
Daniel Yu <[email protected]>
3942
Debashis Maharana <[email protected]>
4043
Deep Trivedi <[email protected]>
44+
Deepak Singh <[email protected]>
4145
Desh Deepak Kant <[email protected]>
4246
4347
Dhanyabad behera <[email protected]>
@@ -53,6 +57,7 @@ Frank Kovacs <[email protected]>
5357
GK Bishnoi <[email protected]>
5458
GURU PRASAD SHARMA <[email protected]>
5559
60+
Gautam Kaushik <[email protected]>
5661
Gautam sharma <[email protected]>
5762
Girish Garg <[email protected]>
5863
Golden Kumar <[email protected]>
@@ -80,6 +85,7 @@ Joris Labie <[email protected]>
8085
Justin Dennison <[email protected]>
8186
Justyn Shelby <[email protected]>
8287
Karan Anand <[email protected]>
88+
Karan Vasudevamurthy <[email protected]>
8389
Karan Yadav <[email protected]>
8490
Karthik Prakash <[email protected]>
8591
Kaushikgtm <[email protected]>
@@ -89,6 +95,7 @@ Krishnam Agarwal <[email protected]>
8995
Krishnendu Das <[email protected]>
9096
Kshitij-Dale <[email protected]>
9197
Lalit Narayan Yadav <[email protected]>
98+
Lokesh Ranjan <[email protected]>
9299
Lovelin Dhoni J B <[email protected]>
93100
94101
Mahfuza Humayra Mohona <[email protected]>
@@ -117,6 +124,7 @@ Ognjen Jevremović <[email protected]>
117124
Oneday12323 <[email protected]>
118125
Ori Miles <[email protected]>
119126
Philipp Burckhardt <[email protected]>
127+
Pierre Forstmann <[email protected]>
120128
Prajjwal Bajpai <[email protected]>
121129
Prajwal Kulkarni <[email protected]>
122130
Pranav Goswami <[email protected]>
@@ -172,7 +180,9 @@ Tanishq Ahuja <[email protected]>
172180
Tirtadwipa Manunggal <[email protected]>
173181
Tudor Pagu <[email protected]>
174182
Tufailahmed Bargir <[email protected]>
183+
Tushar Bhardwaj <[email protected]>
175184
Uday Kakade <[email protected]>
185+
Ujjwal Kirti <[email protected]>
176186
Utkarsh <http://[email protected]>
177187
Utkarsh Raj <[email protected]>
178188
UtkershBasnet <[email protected]>

fixed-endian-factory/lib/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
234234
* @throws {TypeError} if provided only two arguments, the second argument must be a valid argument
235235
* @throws {TypeError} byte offset must be a nonnegative integer
236236
* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements
237+
* @throws {RangeError} byte offset must be a multiple of the data type size
238+
* @throws {TypeError} view length must be a positive multiple of the data type size
237239
* @returns {TypedArray} typed array instance
238240
*/
239241
function TypedArray() {
@@ -278,6 +280,9 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
278280
buf = fromArray( new DataView( new ArrayBuffer( arg.length*BYTES_PER_ELEMENT ) ), arg, isLE );
279281
} else if ( isArrayBuffer( arg ) ) {
280282
buf = new DataView( arg );
283+
if ( !isNonNegativeInteger( arg.byteLength/BYTES_PER_ELEMENT ) ) {
284+
throw new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );
285+
}
281286
} else if ( isObject( arg ) ) {
282287
if ( HAS_ITERATOR_SYMBOL === false ) {
283288
throw new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', arg ) );
@@ -1046,7 +1051,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
10461051
) {
10471052
// We need to copy source values...
10481053
tmp = [];
1049-
for ( i = 0; i < value.length; i++ ) {
1054+
for ( i = 0; i < N; i++ ) {
10501055
tmp.push( get( value, i ) );
10511056
}
10521057
sbuf = tmp;

0 commit comments

Comments
 (0)