ses 0.18.5 → 0.18.7

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/dist/ses.cjs CHANGED
@@ -1204,6 +1204,7 @@ const permitted= {
1204
1204
  dotAll: getter,
1205
1205
  flags: getter,
1206
1206
  global: getter,
1207
+ hasIndices: getter,
1207
1208
  ignoreCase: getter,
1208
1209
  '@@match': fn,
1209
1210
  '@@matchAll': fn,
@@ -1216,13 +1217,11 @@ const permitted= {
1216
1217
  test: fn,
1217
1218
  toString: fn,
1218
1219
  unicode: getter,
1220
+ unicodeSets: getter,
1219
1221
 
1220
1222
  // Annex B: Additional Properties of the RegExp.prototype Object
1221
- compile: false, // UNSAFE and suppressed.
1222
- // Seen on FF Nightly 88.0a1, Chrome Canary 91.0.4446.0,
1223
- // Safari Tech Preview Release 122 (Safari 14.2, WebKit 16612.1.6.2)
1224
- hasIndices: false},
1225
-
1223
+ compile: false // UNSAFE and suppressed.
1224
+ },
1226
1225
 
1227
1226
  '%RegExpStringIteratorPrototype%': {
1228
1227
  // The %RegExpStringIteratorPrototype% Object
@@ -2138,7 +2137,12 @@ freeze(makeEnvironmentCaptor);
2138
2137
  })
2139
2138
  ,
2140
2139
  // === functors[6] ===
2141
- (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => { let Set,String,arrayJoin,arraySlice,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h‍_imports([["../commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arraySlice", [$h‍_a => (arraySlice = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isError", [$h‍_a => (isError = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]],["stringIncludes", [$h‍_a => (stringIncludes = $h‍_a)]],["stringStartsWith", [$h‍_a => (stringStartsWith = $h‍_a)]],["stringifyJson", [$h‍_a => (stringifyJson = $h‍_a)]],["toStringTagSymbol", [$h‍_a => (toStringTagSymbol = $h‍_a)]]]]]);
2140
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => { let Set,String,isArray,arrayJoin,arraySlice,arraySort,arrayMap,keys,fromEntries,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h‍_imports([["../commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["isArray", [$h‍_a => (isArray = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arraySlice", [$h‍_a => (arraySlice = $h‍_a)]],["arraySort", [$h‍_a => (arraySort = $h‍_a)]],["arrayMap", [$h‍_a => (arrayMap = $h‍_a)]],["keys", [$h‍_a => (keys = $h‍_a)]],["fromEntries", [$h‍_a => (fromEntries = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isError", [$h‍_a => (isError = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]],["stringIncludes", [$h‍_a => (stringIncludes = $h‍_a)]],["stringStartsWith", [$h‍_a => (stringStartsWith = $h‍_a)]],["stringifyJson", [$h‍_a => (stringifyJson = $h‍_a)]],["toStringTagSymbol", [$h‍_a => (toStringTagSymbol = $h‍_a)]]]]]);
2141
+
2142
+
2143
+
2144
+
2145
+
2142
2146
 
2143
2147
 
2144
2148
 
@@ -2260,7 +2264,26 @@ const bestEffortStringify= (payload, spaces= undefined)=> {
2260
2264
  // and their remote presences in the first place.
2261
2265
  return `[${val[toStringTagSymbol]}]`;
2262
2266
  }
2263
- return val;
2267
+ if( isArray(val)) {
2268
+ return val;
2269
+ }
2270
+ const names= keys(val);
2271
+ if( names.length< 2) {
2272
+ return val;
2273
+ }
2274
+ let sorted= true;
2275
+ for( let i= 1; i< names.length; i+= 1) {
2276
+ if( names[i- 1]>= names[i]) {
2277
+ sorted= false;
2278
+ break;
2279
+ }
2280
+ }
2281
+ if( sorted) {
2282
+ return val;
2283
+ }
2284
+ arraySort(names);
2285
+ const entries= arrayMap(names, (name)=>[name, val[name]]);
2286
+ return fromEntries(entries);
2264
2287
  }
2265
2288
  case 'function': {
2266
2289
  return `[Function ${val.name|| '<anon>' }]`;
@@ -5679,7 +5702,7 @@ const evadeHtmlCommentTest= (src)=>{
5679
5702
  // /////////////////////////////////////////////////////////////////////////////
5680
5703
  $h‍_once.evadeHtmlCommentTest(evadeHtmlCommentTest);
5681
5704
  const importPattern= new FERAL_REG_EXP(
5682
- '(^|[^.])\\bimport(\\s*(?:\\(|/[/*]))',
5705
+ '(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))',
5683
5706
  'g');
5684
5707
 
5685
5708
 
package/dist/ses.mjs CHANGED
@@ -1204,6 +1204,7 @@ const permitted= {
1204
1204
  dotAll: getter,
1205
1205
  flags: getter,
1206
1206
  global: getter,
1207
+ hasIndices: getter,
1207
1208
  ignoreCase: getter,
1208
1209
  '@@match': fn,
1209
1210
  '@@matchAll': fn,
@@ -1216,13 +1217,11 @@ const permitted= {
1216
1217
  test: fn,
1217
1218
  toString: fn,
1218
1219
  unicode: getter,
1220
+ unicodeSets: getter,
1219
1221
 
1220
1222
  // Annex B: Additional Properties of the RegExp.prototype Object
1221
- compile: false, // UNSAFE and suppressed.
1222
- // Seen on FF Nightly 88.0a1, Chrome Canary 91.0.4446.0,
1223
- // Safari Tech Preview Release 122 (Safari 14.2, WebKit 16612.1.6.2)
1224
- hasIndices: false},
1225
-
1223
+ compile: false // UNSAFE and suppressed.
1224
+ },
1226
1225
 
1227
1226
  '%RegExpStringIteratorPrototype%': {
1228
1227
  // The %RegExpStringIteratorPrototype% Object
@@ -2138,7 +2137,12 @@ freeze(makeEnvironmentCaptor);
2138
2137
  })
2139
2138
  ,
2140
2139
  // === functors[6] ===
2141
- (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => { let Set,String,arrayJoin,arraySlice,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h‍_imports([["../commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arraySlice", [$h‍_a => (arraySlice = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isError", [$h‍_a => (isError = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]],["stringIncludes", [$h‍_a => (stringIncludes = $h‍_a)]],["stringStartsWith", [$h‍_a => (stringStartsWith = $h‍_a)]],["stringifyJson", [$h‍_a => (stringifyJson = $h‍_a)]],["toStringTagSymbol", [$h‍_a => (toStringTagSymbol = $h‍_a)]]]]]);
2140
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => { let Set,String,isArray,arrayJoin,arraySlice,arraySort,arrayMap,keys,fromEntries,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h‍_imports([["../commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["isArray", [$h‍_a => (isArray = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arraySlice", [$h‍_a => (arraySlice = $h‍_a)]],["arraySort", [$h‍_a => (arraySort = $h‍_a)]],["arrayMap", [$h‍_a => (arrayMap = $h‍_a)]],["keys", [$h‍_a => (keys = $h‍_a)]],["fromEntries", [$h‍_a => (fromEntries = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isError", [$h‍_a => (isError = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]],["stringIncludes", [$h‍_a => (stringIncludes = $h‍_a)]],["stringStartsWith", [$h‍_a => (stringStartsWith = $h‍_a)]],["stringifyJson", [$h‍_a => (stringifyJson = $h‍_a)]],["toStringTagSymbol", [$h‍_a => (toStringTagSymbol = $h‍_a)]]]]]);
2141
+
2142
+
2143
+
2144
+
2145
+
2142
2146
 
2143
2147
 
2144
2148
 
@@ -2260,7 +2264,26 @@ const bestEffortStringify= (payload, spaces= undefined)=> {
2260
2264
  // and their remote presences in the first place.
2261
2265
  return `[${val[toStringTagSymbol]}]`;
2262
2266
  }
2263
- return val;
2267
+ if( isArray(val)) {
2268
+ return val;
2269
+ }
2270
+ const names= keys(val);
2271
+ if( names.length< 2) {
2272
+ return val;
2273
+ }
2274
+ let sorted= true;
2275
+ for( let i= 1; i< names.length; i+= 1) {
2276
+ if( names[i- 1]>= names[i]) {
2277
+ sorted= false;
2278
+ break;
2279
+ }
2280
+ }
2281
+ if( sorted) {
2282
+ return val;
2283
+ }
2284
+ arraySort(names);
2285
+ const entries= arrayMap(names, (name)=>[name, val[name]]);
2286
+ return fromEntries(entries);
2264
2287
  }
2265
2288
  case 'function': {
2266
2289
  return `[Function ${val.name|| '<anon>' }]`;
@@ -5679,7 +5702,7 @@ const evadeHtmlCommentTest= (src)=>{
5679
5702
  // /////////////////////////////////////////////////////////////////////////////
5680
5703
  $h‍_once.evadeHtmlCommentTest(evadeHtmlCommentTest);
5681
5704
  const importPattern= new FERAL_REG_EXP(
5682
- '(^|[^.])\\bimport(\\s*(?:\\(|/[/*]))',
5705
+ '(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))',
5683
5706
  'g');
5684
5707
 
5685
5708
 
package/dist/ses.umd.js CHANGED
@@ -1204,6 +1204,7 @@ const permitted= {
1204
1204
  dotAll: getter,
1205
1205
  flags: getter,
1206
1206
  global: getter,
1207
+ hasIndices: getter,
1207
1208
  ignoreCase: getter,
1208
1209
  '@@match': fn,
1209
1210
  '@@matchAll': fn,
@@ -1216,13 +1217,11 @@ const permitted= {
1216
1217
  test: fn,
1217
1218
  toString: fn,
1218
1219
  unicode: getter,
1220
+ unicodeSets: getter,
1219
1221
 
1220
1222
  // Annex B: Additional Properties of the RegExp.prototype Object
1221
- compile: false, // UNSAFE and suppressed.
1222
- // Seen on FF Nightly 88.0a1, Chrome Canary 91.0.4446.0,
1223
- // Safari Tech Preview Release 122 (Safari 14.2, WebKit 16612.1.6.2)
1224
- hasIndices: false},
1225
-
1223
+ compile: false // UNSAFE and suppressed.
1224
+ },
1226
1225
 
1227
1226
  '%RegExpStringIteratorPrototype%': {
1228
1227
  // The %RegExpStringIteratorPrototype% Object
@@ -2138,7 +2137,12 @@ freeze(makeEnvironmentCaptor);
2138
2137
  })
2139
2138
  ,
2140
2139
  // === functors[6] ===
2141
- (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => { let Set,String,arrayJoin,arraySlice,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h‍_imports([["../commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arraySlice", [$h‍_a => (arraySlice = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isError", [$h‍_a => (isError = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]],["stringIncludes", [$h‍_a => (stringIncludes = $h‍_a)]],["stringStartsWith", [$h‍_a => (stringStartsWith = $h‍_a)]],["stringifyJson", [$h‍_a => (stringifyJson = $h‍_a)]],["toStringTagSymbol", [$h‍_a => (toStringTagSymbol = $h‍_a)]]]]]);
2140
+ (({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => { let Set,String,isArray,arrayJoin,arraySlice,arraySort,arrayMap,keys,fromEntries,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h‍_imports([["../commons.js", [["Set", [$h‍_a => (Set = $h‍_a)]],["String", [$h‍_a => (String = $h‍_a)]],["isArray", [$h‍_a => (isArray = $h‍_a)]],["arrayJoin", [$h‍_a => (arrayJoin = $h‍_a)]],["arraySlice", [$h‍_a => (arraySlice = $h‍_a)]],["arraySort", [$h‍_a => (arraySort = $h‍_a)]],["arrayMap", [$h‍_a => (arrayMap = $h‍_a)]],["keys", [$h‍_a => (keys = $h‍_a)]],["fromEntries", [$h‍_a => (fromEntries = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["isError", [$h‍_a => (isError = $h‍_a)]],["setAdd", [$h‍_a => (setAdd = $h‍_a)]],["setHas", [$h‍_a => (setHas = $h‍_a)]],["stringIncludes", [$h‍_a => (stringIncludes = $h‍_a)]],["stringStartsWith", [$h‍_a => (stringStartsWith = $h‍_a)]],["stringifyJson", [$h‍_a => (stringifyJson = $h‍_a)]],["toStringTagSymbol", [$h‍_a => (toStringTagSymbol = $h‍_a)]]]]]);
2141
+
2142
+
2143
+
2144
+
2145
+
2142
2146
 
2143
2147
 
2144
2148
 
@@ -2260,7 +2264,26 @@ const bestEffortStringify= (payload, spaces= undefined)=> {
2260
2264
  // and their remote presences in the first place.
2261
2265
  return `[${val[toStringTagSymbol]}]`;
2262
2266
  }
2263
- return val;
2267
+ if( isArray(val)) {
2268
+ return val;
2269
+ }
2270
+ const names= keys(val);
2271
+ if( names.length< 2) {
2272
+ return val;
2273
+ }
2274
+ let sorted= true;
2275
+ for( let i= 1; i< names.length; i+= 1) {
2276
+ if( names[i- 1]>= names[i]) {
2277
+ sorted= false;
2278
+ break;
2279
+ }
2280
+ }
2281
+ if( sorted) {
2282
+ return val;
2283
+ }
2284
+ arraySort(names);
2285
+ const entries= arrayMap(names, (name)=>[name, val[name]]);
2286
+ return fromEntries(entries);
2264
2287
  }
2265
2288
  case 'function': {
2266
2289
  return `[Function ${val.name|| '<anon>' }]`;
@@ -5679,7 +5702,7 @@ const evadeHtmlCommentTest= (src)=>{
5679
5702
  // /////////////////////////////////////////////////////////////////////////////
5680
5703
  $h‍_once.evadeHtmlCommentTest(evadeHtmlCommentTest);
5681
5704
  const importPattern= new FERAL_REG_EXP(
5682
- '(^|[^.])\\bimport(\\s*(?:\\(|/[/*]))',
5705
+ '(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))',
5683
5706
  'g');
5684
5707
 
5685
5708