typedarray.prototype.slice 1.0.2 → 1.0.4

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v1.0.4](https://github.com/es-shims/TypedArray.prototype.slice/compare/v1.0.3...v1.0.4) - 2025-01-02
9
+
10
+ ### Commits
11
+
12
+ - [actions] split out node 10-20, and 20+ [`1ca7eb2`](https://github.com/es-shims/TypedArray.prototype.slice/commit/1ca7eb25ea741498bc6aff9df2d7a439e7cc374e)
13
+ - [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `auto-changelog`, `es-value-fixtures`, `object-inspect`, `tape` [`259de62`](https://github.com/es-shims/TypedArray.prototype.slice/commit/259de620bf2fa073e3c33492d0928cdf0a1a693e)
14
+ - [Deps] update `call-bind`, `es-abstract`, `typed-array-buffer`, `typed-array-byte-offset` [`5c9dbf9`](https://github.com/es-shims/TypedArray.prototype.slice/commit/5c9dbf99d524c02d0f67a7ceff1a7f9586c28311)
15
+ - [Refactor] use `math-intrinsics` directly [`dd67051`](https://github.com/es-shims/TypedArray.prototype.slice/commit/dd67051195bdc0a9a5a2252c0fd3bd9155f6b08b)
16
+ - [Refactor] use `get-proto` and `math-intrinsics` directly [`20395cc`](https://github.com/es-shims/TypedArray.prototype.slice/commit/20395cc9425ef1794023b69916a0702c6d94f4e4)
17
+ - [Tests] replace `aud` with `npm audit` [`53d2fef`](https://github.com/es-shims/TypedArray.prototype.slice/commit/53d2fefed9c793e51d265aa56360be042b405f3b)
18
+ - [Dev Deps] add missing peer dep [`70a2f57`](https://github.com/es-shims/TypedArray.prototype.slice/commit/70a2f57f29091ffdc14fd43e03520151a825e2b3)
19
+
20
+ ## [v1.0.3](https://github.com/es-shims/TypedArray.prototype.slice/compare/v1.0.2...v1.0.3) - 2024-03-15
21
+
22
+ ### Commits
23
+
24
+ - [Deps] update `es-abstract` [`9067824`](https://github.com/es-shims/TypedArray.prototype.slice/commit/906782435b34ec0ce54a9dd613974601e08b5c2e)
25
+ - [Deps] update `call-bind`, `typed-array-buffer`, `typed-array-byte-offset` [`33da086`](https://github.com/es-shims/TypedArray.prototype.slice/commit/33da086e39deedf551abd8398fdf5d189cbe3d77)
26
+ - [Dev Deps] update `available-typed-arrays`, `tape` [`2f8d038`](https://github.com/es-shims/TypedArray.prototype.slice/commit/2f8d038eb15b8ac3206c2368036b988b01e5c417)
27
+
8
28
  ## [v1.0.2](https://github.com/es-shims/TypedArray.prototype.slice/compare/v1.0.1...v1.0.2) - 2024-02-06
9
29
 
10
30
  ### Commits
package/implementation.js CHANGED
@@ -2,19 +2,19 @@
2
2
 
3
3
  var $TypeError = require('es-errors/type');
4
4
 
5
- var Get = require('es-abstract/2023/Get');
6
- var GetValueFromBuffer = require('es-abstract/2023/GetValueFromBuffer');
7
- var IsDetachedBuffer = require('es-abstract/2023/IsDetachedBuffer');
8
- var max = require('es-abstract/2023/max');
9
- var min = require('es-abstract/2023/min');
10
- var Set = require('es-abstract/2023/Set');
11
- var SetValueInBuffer = require('es-abstract/2023/SetValueInBuffer');
12
- var ToIntegerOrInfinity = require('es-abstract/2023/ToIntegerOrInfinity');
13
- var ToString = require('es-abstract/2023/ToString');
14
- var TypedArrayElementSize = require('es-abstract/2023/TypedArrayElementSize');
15
- var TypedArrayElementType = require('es-abstract/2023/TypedArrayElementType');
16
- var TypedArraySpeciesCreate = require('es-abstract/2023/TypedArraySpeciesCreate');
17
- var ValidateTypedArray = require('es-abstract/2023/ValidateTypedArray');
5
+ var Get = require('es-abstract/2024/Get');
6
+ var GetValueFromBuffer = require('es-abstract/2024/GetValueFromBuffer');
7
+ var IsDetachedBuffer = require('es-abstract/2024/IsDetachedBuffer');
8
+ var max = require('math-intrinsincs/max');
9
+ var min = require('math-intrinsincs/min');
10
+ var Set = require('es-abstract/2024/Set');
11
+ var SetValueInBuffer = require('es-abstract/2024/SetValueInBuffer');
12
+ var ToIntegerOrInfinity = require('es-abstract/2024/ToIntegerOrInfinity');
13
+ var ToString = require('es-abstract/2024/ToString');
14
+ var TypedArrayElementSize = require('es-abstract/2024/TypedArrayElementSize');
15
+ var TypedArrayElementType = require('es-abstract/2024/TypedArrayElementType');
16
+ var TypedArraySpeciesCreate = require('es-abstract/2024/TypedArraySpeciesCreate');
17
+ var ValidateTypedArray = require('es-abstract/2024/ValidateTypedArray');
18
18
 
19
19
  var typedArrayBuffer = require('typed-array-buffer');
20
20
  var typedArrayByteOffset = require('typed-array-byte-offset');
@@ -24,7 +24,7 @@ var typedArrayByteOffset = require('typed-array-byte-offset');
24
24
  module.exports = function slice(start, end) {
25
25
  var O = this; // step 1
26
26
 
27
- ValidateTypedArray(O); // step 2
27
+ ValidateTypedArray(O, 'SEQ-CST'); // step 2
28
28
 
29
29
  // 3. Let len be O.[[ArrayLength]].
30
30
  var len = O.length; // steps 3
@@ -71,8 +71,8 @@ module.exports = function slice(start, end) {
71
71
  var targetByteIndex = typedArrayByteOffset(A); // step 14.d.vii
72
72
  var limit = targetByteIndex + (count * elementSize); // step 14.d.viii
73
73
  while (targetByteIndex < limit) { // step 14.d.ix
74
- var value = GetValueFromBuffer(srcBuffer, srcByteIndex, 'Uint8', true, 'Unordered'); // step 14.d.ix.1
75
- SetValueInBuffer(targetBuffer, targetByteIndex, 'Uint8', value, true, 'Unordered'); // step 14.d.ix.2
74
+ var value = GetValueFromBuffer(srcBuffer, srcByteIndex, 'UINT8', true, 'UNORDERED'); // step 14.d.ix.1
75
+ SetValueInBuffer(targetBuffer, targetByteIndex, 'UINT8', value, true, 'UNORDERED'); // step 14.d.ix.2
76
76
  srcByteIndex += 1; // step 14.d.ix.3
77
77
  targetByteIndex += 1; // step 14.d.ix.4
78
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typedarray.prototype.slice",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "ES spec-compliant shim for TypedArray.prototype.slice",
5
5
  "author": "Jordan Harband <ljharb@gmail.com>",
6
6
  "funding": {
@@ -22,7 +22,7 @@
22
22
  "prepublishOnly": "safe-publish-latest",
23
23
  "pretest": "npm run lint",
24
24
  "test": "npm run tests-only",
25
- "posttest": "aud --production",
25
+ "posttest": "npx npm@'>= 10.2' audit --production",
26
26
  "tests-only": "nyc tape 'test/**/*.js'",
27
27
  "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
28
28
  "lint": "eslint --ext=js,mjs .",
@@ -53,21 +53,23 @@
53
53
  "es-shim API"
54
54
  ],
55
55
  "dependencies": {
56
- "call-bind": "^1.0.6",
56
+ "call-bind": "^1.0.8",
57
57
  "define-properties": "^1.2.1",
58
- "es-abstract": "^1.22.3",
58
+ "es-abstract": "^1.23.9",
59
59
  "es-errors": "^1.3.0",
60
- "typed-array-buffer": "^1.0.0",
61
- "typed-array-byte-offset": "^1.0.0"
60
+ "get-proto": "^1.0.1",
61
+ "math-intrinsics": "^1.1.0",
62
+ "typed-array-buffer": "^1.0.3",
63
+ "typed-array-byte-offset": "^1.0.4"
62
64
  },
63
65
  "devDependencies": {
64
- "@es-shims/api": "^2.4.2",
65
- "@ljharb/eslint-config": "^21.1.0",
66
- "aud": "^2.0.4",
67
- "auto-changelog": "^2.4.0",
68
- "available-typed-arrays": "^1.0.6",
66
+ "@es-shims/api": "^2.5.1",
67
+ "@ljharb/eslint-config": "^21.1.1",
68
+ "auto-changelog": "^2.5.0",
69
+ "available-typed-arrays": "^1.0.7",
69
70
  "eclint": "^2.8.1",
70
- "es-value-fixtures": "^1.4.2",
71
+ "encoding": "^0.1.13",
72
+ "es-value-fixtures": "^1.5.0",
71
73
  "eslint": "=8.8.0",
72
74
  "evalmd": "^0.0.19",
73
75
  "for-each": "^0.3.3",
@@ -76,9 +78,9 @@
76
78
  "in-publish": "^2.0.1",
77
79
  "npmignore": "^0.3.1",
78
80
  "nyc": "^10.3.2",
79
- "object-inspect": "^1.13.1",
81
+ "object-inspect": "^1.13.3",
80
82
  "safe-publish-latest": "^2.0.0",
81
- "tape": "^5.7.4"
83
+ "tape": "^5.9.0"
82
84
  },
83
85
  "testling": {
84
86
  "files": "test/index.js"
package/shim.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var define = require('define-properties');
4
- var getProto = require('es-abstract/helpers/getProto');
4
+ var getProto = require('get-proto');
5
5
 
6
6
  var getPolyfill = require('./polyfill');
7
7
 
package/test/shimmed.js CHANGED
@@ -9,7 +9,7 @@ var callBind = require('call-bind');
9
9
  var isEnumerable = Object.prototype.propertyIsEnumerable;
10
10
  var functionsHaveNames = require('functions-have-names')();
11
11
  var hasStrictMode = require('has-strict-mode')();
12
- var getProto = require('es-abstract/helpers/getProto');
12
+ var getProto = require('get-proto');
13
13
 
14
14
  var runTests = require('./tests');
15
15