Skip to content

Commit

Permalink
move Uint8Array to / from base64 and hex proposal to stage 3
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Feb 12, 2024
1 parent 4207afd commit 5e68a01
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 17 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
- `ArrayBuffer.prototype.transferToFixedLength`
- Moved to stable ES, [Febrary 2024 TC39 meeting](https://github.com/tc39/proposals/commit/c84d3dde9a7d8ee4410ffa28624fc4c39247faca)
- Added `es.` namespace modules, `/es/` and `/stable/` namespaces entries
- [`Uint8Array` to / from base64 and hex proposal](https://github.com/tc39/proposal-arraybuffer-base64):
- Methods:
- `Uint8Array.fromBase64`
- `Uint8Array.fromHex`
- `Uint8Array.prototype.toBase64`
- `Uint8Array.prototype.toHex`
- Moved to stable stage 3, [Febrary 2024 TC39 meeting](https://github.com/tc39/proposals/commit/278ab28b8f849f2110d770e7b034b7ef59f14daf)
- Added `/actual/` namespaces entries
- Skipped adding new methods of writing to existing arrays to clarification some moments
- [`Promise.try` proposal](https://github.com/tc39/proposal-promise-try) has been resurrected and moved to stage 2, [Febrary 2024 TC39 meeting](https://github.com/tc39/proposal-promise-try/issues/15)
- Fixed regression in `Set.prototype.intersection` feature detection
- Fixed a missed check in `Array.prototype.{ indexOf, lastIndexOf, includes }`, [#1325](https://github.com/zloirock/core-js/issues/1325), thanks [**@minseok-choe**](https://github.com/minseok-choe)
Expand Down
2 changes: 2 additions & 0 deletions packages/core-js/actual/typed-array/from-base64.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use strict';
require('../../modules/esnext.uint8-array.from-base64');
2 changes: 2 additions & 0 deletions packages/core-js/actual/typed-array/from-hex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use strict';
require('../../modules/esnext.uint8-array.from-hex');
4 changes: 4 additions & 0 deletions packages/core-js/actual/typed-array/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
'use strict';
var parent = require('../../stable/typed-array');
require('../../modules/esnext.uint8-array.from-base64');
require('../../modules/esnext.uint8-array.from-hex');
require('../../modules/esnext.uint8-array.to-base64');
require('../../modules/esnext.uint8-array.to-hex');
// TODO: Remove from `core-js@4`
require('../../modules/esnext.typed-array.find-last');
require('../../modules/esnext.typed-array.find-last-index');
Expand Down
4 changes: 4 additions & 0 deletions packages/core-js/actual/typed-array/methods.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
'use strict';
var parent = require('../../stable/typed-array/methods');
require('../../modules/esnext.uint8-array.from-base64');
require('../../modules/esnext.uint8-array.from-hex');
require('../../modules/esnext.uint8-array.to-base64');
require('../../modules/esnext.uint8-array.to-hex');
// TODO: Remove from `core-js@4`
require('../../modules/esnext.typed-array.find-last');
require('../../modules/esnext.typed-array.find-last-index');
Expand Down
2 changes: 2 additions & 0 deletions packages/core-js/actual/typed-array/to-base64.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use strict';
require('../../modules/esnext.uint8-array.to-base64');
2 changes: 2 additions & 0 deletions packages/core-js/actual/typed-array/to-hex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use strict';
require('../../modules/esnext.uint8-array.to-hex');
4 changes: 3 additions & 1 deletion packages/core-js/full/typed-array/from-base64.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
'use strict';
require('../../modules/esnext.uint8-array.from-base64');
var parent = require('../../actual/typed-array/from-base64');

module.exports = parent;
4 changes: 3 additions & 1 deletion packages/core-js/full/typed-array/from-hex.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
'use strict';
require('../../modules/esnext.uint8-array.from-hex');
var parent = require('../../actual/typed-array/from-hex');

module.exports = parent;
4 changes: 0 additions & 4 deletions packages/core-js/full/typed-array/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,5 @@ require('../../modules/esnext.typed-array.filter-out');
require('../../modules/esnext.typed-array.filter-reject');
require('../../modules/esnext.typed-array.group-by');
require('../../modules/esnext.typed-array.unique-by');
require('../../modules/esnext.uint8-array.from-base64');
require('../../modules/esnext.uint8-array.from-hex');
require('../../modules/esnext.uint8-array.to-base64');
require('../../modules/esnext.uint8-array.to-hex');

module.exports = parent;
4 changes: 0 additions & 4 deletions packages/core-js/full/typed-array/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,5 @@ require('../../modules/esnext.typed-array.filter-out');
require('../../modules/esnext.typed-array.filter-reject');
require('../../modules/esnext.typed-array.group-by');
require('../../modules/esnext.typed-array.unique-by');
require('../../modules/esnext.uint8-array.from-base64');
require('../../modules/esnext.uint8-array.from-hex');
require('../../modules/esnext.uint8-array.to-base64');
require('../../modules/esnext.uint8-array.to-hex');

module.exports = parent;
4 changes: 3 additions & 1 deletion packages/core-js/full/typed-array/to-base64.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
'use strict';
require('../../modules/esnext.uint8-array.to-base64');
var parent = require('../../actual/typed-array/to-base64');

module.exports = parent;
4 changes: 3 additions & 1 deletion packages/core-js/full/typed-array/to-hex.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
'use strict';
require('../../modules/esnext.uint8-array.to-hex');
var parent = require('../../actual/typed-array/to-hex');

module.exports = parent;
1 change: 0 additions & 1 deletion packages/core-js/stage/2.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
var parent = require('./3');

require('../proposals/array-buffer-base64');
require('../proposals/array-is-template-object');
require('../proposals/async-iterator-helpers');
require('../proposals/iterator-range');
Expand Down
1 change: 1 addition & 0 deletions packages/core-js/stage/3.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
var parent = require('./4');

require('../proposals/array-buffer-base64');
require('../proposals/array-from-async-stage-2');
require('../proposals/decorator-metadata-v2');
require('../proposals/explicit-resource-management');
Expand Down
8 changes: 4 additions & 4 deletions tests/entries/unit.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1065,18 +1065,18 @@ for (const NS of ['es', 'stable', 'actual', 'full', 'features']) {
}

for (const NS of ['actual', 'full', 'features']) {
load(NS, 'typed-array/from-base64');
load(NS, 'typed-array/from-hex');
load(NS, 'typed-array/to-base64');
load(NS, 'typed-array/to-hex');
load(NS, 'typed-array/to-spliced');
}

for (const NS of ['full', 'features']) {
load(NS, 'typed-array/from-async');
load(NS, 'typed-array/from-base64');
load(NS, 'typed-array/from-hex');
load(NS, 'typed-array/filter-out');
load(NS, 'typed-array/filter-reject');
load(NS, 'typed-array/group-by');
load(NS, 'typed-array/to-base64');
load(NS, 'typed-array/to-hex');
load(NS, 'typed-array/unique-by');
}

Expand Down

0 comments on commit 5e68a01

Please sign in to comment.