Skip to content

Commit

Permalink
[Refactor] use es-errors, so things that only need those do not nee…
Browse files Browse the repository at this point in the history
…d `get-intrinsic`
  • Loading branch information
ljharb committed Feb 5, 2024
1 parent f0e874f commit 0cefa0e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
6 changes: 2 additions & 4 deletions aos/GetSetRecord.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
'use strict';

var GetIntrinsic = require('get-intrinsic');

var $RangeError = GetIntrinsic('%RangeError%');
var $TypeError = GetIntrinsic('%TypeError%');
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');

var Get = require('es-abstract/2023/Get');
var IsCallable = require('es-abstract/2023/IsCallable');
Expand Down
4 changes: 1 addition & 3 deletions aos/SetDataHas.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
'use strict';

var GetIntrinsic = require('get-intrinsic');

var $TypeError = GetIntrinsic('%TypeError%');
var $TypeError = require('es-errors/type');

var IsArray = require('es-abstract/2023/IsArray');
var SameValueZero = require('es-abstract/2023/SameValueZero');
Expand Down
4 changes: 1 addition & 3 deletions implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

// Note: the commented out code is because there is no performant way in userland to do the optimization in step 7.

var GetIntrinsic = require('get-intrinsic');

var $TypeError = GetIntrinsic('%TypeError%');
var $TypeError = require('es-errors/type');

var $Set = require('es-set/polyfill')();

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"call-bind": "^1.0.5",
"define-properties": "^1.2.1",
"es-abstract": "^1.22.3",
"es-errors": "^1.3.0",
"es-set": "^1.1.1",
"get-intrinsic": "^1.2.2",
"is-set": "^2.0.2",
"stop-iteration-iterator": "^1.0.0"
},
Expand Down

0 comments on commit 0cefa0e

Please sign in to comment.