Skip to content

Commit bfe2797

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

13 files changed

Lines changed: 1415 additions & 2 deletions

File tree

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 <ali_sal1381@yahoo.com>
2121
AlyAbdelmoneim <148393799+AlyAbdelmoneim@users.noreply.github.com>
2222
Aman Bhansali <bhansali.1@iitj.ac.in>
2323
AmanBhadkariya <140033975+AmanBhadkariya@users.noreply.github.com>
24+
Amisha Chhajed <136238836+amishhaa@users.noreply.github.com>
2425
Amit Jimiwal <amitjimiwal45@gmail.com>
26+
Annamalai Prabu <apfossdev@gmail.com>
2527
Anshu Kumar <132515490+anxhukumar@users.noreply.github.com>
2628
Anshu Kumar <contact.anshukumar@protonmail.com>
2729
Anudeep Sanapala <anudeep0306@gmail.com>
30+
Aryan Bhirud <112156883+AryanBhirud@users.noreply.github.com>
2831
Athan Reines <kgryte@gmail.com>
2932
Ayaka <73595362+USERSATOSHI@users.noreply.github.com>
3033
Bhavishy Agrawal <90029607+bhavishy2801@users.noreply.github.com>
@@ -38,6 +41,7 @@ Daniel Killenberger <daniel.killenberger@gmail.com>
3841
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
3942
Debashis Maharana <debashismaharana7854@gmail.com>
4043
Deep Trivedi <128926685+thedeeppp@users.noreply.github.com>
44+
Deepak Singh <78257493+Deepak91168@users.noreply.github.com>
4145
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
4246
Dev Goel <135586571+corsairier@users.noreply.github.com>
4347
Dhanyabad behera <110620935+dhanyabad11@users.noreply.github.com>
@@ -53,6 +57,7 @@ Frank Kovacs <fran70kk@gmail.com>
5357
GK Bishnoi <gkishan1kyt@gmail.com>
5458
GURU PRASAD SHARMA <168292003+GURUPRASADSHARMA@users.noreply.github.com>
5559
Gaurav <gaurav70380@gmail.com>
60+
Gautam Kaushik <162317291+Kaushikgtm@users.noreply.github.com>
5661
Gautam sharma <gautamkrishnasharma1@gmail.com>
5762
Girish Garg <garggirish2020@gmail.com>
5863
Golden Kumar <103646877+AuenKr@users.noreply.github.com>
@@ -80,6 +85,7 @@ Joris Labie <joris.labie1@gmail.com>
8085
Justin Dennison <justin1dennison@gmail.com>
8186
Justyn Shelby <96994781+ShelbyJustyn@users.noreply.github.com>
8287
Karan Anand <anandkarancompsci@gmail.com>
88+
Karan Vasudevamurthy <karanlvm123@gmail.com>
8389
Karan Yadav <77043443+karanBRAVO@users.noreply.github.com>
8490
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
8591
Kaushikgtm <162317291+Kaushikgtm@users.noreply.github.com>
@@ -89,6 +95,7 @@ Krishnam Agarwal <83017176+888krishnam@users.noreply.github.com>
8995
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
9096
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
9197
Lalit Narayan Yadav <162928571+LalitNarayanYadav@users.noreply.github.com>
98+
Lokesh Ranjan <lokesh.ranjan.phe23@itbhu.ac.in>
9299
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
93100
MANI <77221000+Eternity0207@users.noreply.github.com>
94101
Mahfuza Humayra Mohona <mhmohona@gmail.com>
@@ -117,6 +124,7 @@ Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
117124
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
118125
Ori Miles <97595296+orimiles5@users.noreply.github.com>
119126
Philipp Burckhardt <pburckhardt@outlook.com>
127+
Pierre Forstmann <15964998+pierreforstmann@users.noreply.github.com>
120128
Prajjwal Bajpai <142303989+prajjwalbajpai@users.noreply.github.com>
121129
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
122130
Pranav Goswami <pranavchiku11@gmail.com>
@@ -172,7 +180,9 @@ Tanishq Ahuja <68651083+TheGEN1U5@users.noreply.github.com>
172180
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
173181
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
174182
Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com>
183+
Tushar Bhardwaj <155543597+TusharBhardwaj441@users.noreply.github.com>
175184
Uday Kakade <141299403+udaykakade25@users.noreply.github.com>
185+
Ujjwal Kirti <64329707+ujjwalkirti@users.noreply.github.com>
176186
Utkarsh <http://utkarsh11105@gmail.com>
177187
Utkarsh Raj <rajutkarsh2505@gmail.com>
178188
UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com>

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)