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/NEWS.md +8 -0
- package/dist/lockdown.cjs +31 -8
- package/dist/lockdown.mjs +31 -8
- package/dist/lockdown.umd.js +31 -8
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +31 -8
- package/dist/ses.mjs +31 -8
- package/dist/ses.umd.js +31 -8
- package/dist/ses.umd.min.js +1 -1
- package/package.json +6 -6
- package/src/error/stringify-utils.js +25 -1
- package/src/permits.js +2 -3
- package/src/transforms.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ses",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.7",
|
|
4
4
|
"description": "Hardened JavaScript for Fearless Cooperation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lockdown",
|
|
@@ -60,17 +60,17 @@
|
|
|
60
60
|
"test:platform-compatibility": "node test/package/test.cjs"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@endo/env-options": "^0.1.
|
|
63
|
+
"@endo/env-options": "^0.1.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@endo/compartment-mapper": "^0.
|
|
67
|
-
"@endo/static-module-record": "^0.
|
|
66
|
+
"@endo/compartment-mapper": "^0.9.1",
|
|
67
|
+
"@endo/static-module-record": "^0.8.1",
|
|
68
68
|
"@endo/test262-runner": "^0.1.32",
|
|
69
69
|
"ava": "^5.3.0",
|
|
70
70
|
"babel-eslint": "^10.0.3",
|
|
71
71
|
"c8": "^7.14.0",
|
|
72
72
|
"core-js": "^3.31.0",
|
|
73
|
-
"eslint": "^8.
|
|
73
|
+
"eslint": "^8.46.0",
|
|
74
74
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
75
75
|
"eslint-config-prettier": "^8.8.0",
|
|
76
76
|
"eslint-plugin-eslint-comments": "^3.1.2",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
],
|
|
180
180
|
"timeout": "2m"
|
|
181
181
|
},
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "b38361616f968415291b089dcca75cc4a2672a35"
|
|
183
183
|
}
|
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
import {
|
|
4
4
|
Set,
|
|
5
5
|
String,
|
|
6
|
+
isArray,
|
|
6
7
|
arrayJoin,
|
|
7
8
|
arraySlice,
|
|
9
|
+
arraySort,
|
|
10
|
+
arrayMap,
|
|
11
|
+
keys,
|
|
12
|
+
fromEntries,
|
|
8
13
|
freeze,
|
|
9
14
|
is,
|
|
10
15
|
isError,
|
|
@@ -120,7 +125,26 @@ const bestEffortStringify = (payload, spaces = undefined) => {
|
|
|
120
125
|
// and their remote presences in the first place.
|
|
121
126
|
return `[${val[toStringTagSymbol]}]`;
|
|
122
127
|
}
|
|
123
|
-
|
|
128
|
+
if (isArray(val)) {
|
|
129
|
+
return val;
|
|
130
|
+
}
|
|
131
|
+
const names = keys(val);
|
|
132
|
+
if (names.length < 2) {
|
|
133
|
+
return val;
|
|
134
|
+
}
|
|
135
|
+
let sorted = true;
|
|
136
|
+
for (let i = 1; i < names.length; i += 1) {
|
|
137
|
+
if (names[i - 1] >= names[i]) {
|
|
138
|
+
sorted = false;
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (sorted) {
|
|
143
|
+
return val;
|
|
144
|
+
}
|
|
145
|
+
arraySort(names);
|
|
146
|
+
const entries = arrayMap(names, name => [name, val[name]]);
|
|
147
|
+
return fromEntries(entries);
|
|
124
148
|
}
|
|
125
149
|
case 'function': {
|
|
126
150
|
return `[Function ${val.name || '<anon>'}]`;
|
package/src/permits.js
CHANGED
|
@@ -852,6 +852,7 @@ export const permitted = {
|
|
|
852
852
|
dotAll: getter,
|
|
853
853
|
flags: getter,
|
|
854
854
|
global: getter,
|
|
855
|
+
hasIndices: getter,
|
|
855
856
|
ignoreCase: getter,
|
|
856
857
|
'@@match': fn,
|
|
857
858
|
'@@matchAll': fn,
|
|
@@ -864,12 +865,10 @@ export const permitted = {
|
|
|
864
865
|
test: fn,
|
|
865
866
|
toString: fn,
|
|
866
867
|
unicode: getter,
|
|
868
|
+
unicodeSets: getter,
|
|
867
869
|
|
|
868
870
|
// Annex B: Additional Properties of the RegExp.prototype Object
|
|
869
871
|
compile: false, // UNSAFE and suppressed.
|
|
870
|
-
// Seen on FF Nightly 88.0a1, Chrome Canary 91.0.4446.0,
|
|
871
|
-
// Safari Tech Preview Release 122 (Safari 14.2, WebKit 16612.1.6.2)
|
|
872
|
-
hasIndices: false,
|
|
873
872
|
},
|
|
874
873
|
|
|
875
874
|
'%RegExpStringIteratorPrototype%': {
|
package/src/transforms.js
CHANGED
|
@@ -106,7 +106,7 @@ export const evadeHtmlCommentTest = src => {
|
|
|
106
106
|
// /////////////////////////////////////////////////////////////////////////////
|
|
107
107
|
|
|
108
108
|
const importPattern = new FERAL_REG_EXP(
|
|
109
|
-
'(^|[^.])\\bimport(\\s*(?:\\(|/[/*]))',
|
|
109
|
+
'(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))',
|
|
110
110
|
'g',
|
|
111
111
|
);
|
|
112
112
|
|