Skip to content

Commit

Permalink
add enablements to fix tape-4.x
Browse files Browse the repository at this point in the history
This adds `FunctionPrototype.apply`, as well as `.message` for all the
various Error prototypes, to the enablements list.

This allows tape-4.x to be imported after lockdown, as well as fixing tape's
t.throws() method.

refs #293, but does not close it because tape-5.x is still broken
  • Loading branch information
warner committed May 15, 2020
1 parent e54c237 commit 7dfbf89
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/ses/src/enablements.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default {
FunctionPrototype: {
constructor: t, // set by "regenerator-runtime"
bind: t, // set by "underscore"
apply: t, // set by "tape"
name: t,
toString: t,
},
Expand All @@ -82,9 +83,30 @@ export default {

TypeErrorPrototype: {
constructor: t, // set by "readable-stream"
message: t, // set by "tape"
name: t, // set by "readable-stream"
},

SyntaxErrorPrototype: {
message: t // to match TypeErrorPrototype.message
},

RangeErrorPrototype: {
message: t // to match TypeErrorPrototype.message
},

URIErrorPrototype: {
message: t // to match TypeErrorPrototype.message
},

EvalErrorPrototype: {
message: t // to match TypeErrorPrototype.message
},

ReferenceErrorPrototype: {
message: t // to match TypeErrorPrototype.message
},

PromisePrototype: {
constructor: t, // set by "core-js"
},
Expand Down

0 comments on commit 7dfbf89

Please sign in to comment.