ses 0.15.1 → 0.15.2
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/CHANGELOG.md +14 -0
- package/NEWS.md +11 -0
- package/dist/lockdown.cjs +2519 -3489
- package/dist/lockdown.mjs +2519 -3489
- package/dist/lockdown.umd.js +2519 -3489
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +2519 -3489
- package/dist/ses.mjs +2519 -3489
- package/dist/ses.umd.js +2519 -3489
- package/dist/ses.umd.min.js +1 -1
- package/package.json +8 -8
- package/src/make-hardener.js +2 -2
- package/src/whitelist-intrinsics.js +3 -3
- package/src/whitelist.js +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ses",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Hardened JavaScript for Fearless Cooperation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lockdown",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"cover": "c8 ava",
|
|
51
51
|
"demo": "http-server -o /demos",
|
|
52
52
|
"lint": "yarn lint:types && yarn lint:js",
|
|
53
|
-
"lint-fix": "eslint --fix
|
|
54
|
-
"lint:js": "eslint
|
|
53
|
+
"lint-fix": "eslint --fix .",
|
|
54
|
+
"lint:js": "eslint .",
|
|
55
55
|
"lint:types": "tsc --build jsconfig.json",
|
|
56
56
|
"prepublish": "yarn run clean && yarn build",
|
|
57
57
|
"qt": "ava",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"test:platform-compatability": "node test/package/test.cjs"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@endo/compartment-mapper": "^0.
|
|
63
|
-
"@endo/eslint-config": "^0.3.
|
|
64
|
-
"@endo/static-module-record": "^0.6.
|
|
65
|
-
"@endo/test262-runner": "^0.1.
|
|
62
|
+
"@endo/compartment-mapper": "^0.6.0",
|
|
63
|
+
"@endo/eslint-config": "^0.3.19",
|
|
64
|
+
"@endo/static-module-record": "^0.6.7",
|
|
65
|
+
"@endo/test262-runner": "^0.1.13",
|
|
66
66
|
"ava": "^3.12.1",
|
|
67
67
|
"babel-eslint": "^10.0.3",
|
|
68
68
|
"c8": "^7.7.3",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
],
|
|
180
180
|
"timeout": "2m"
|
|
181
181
|
},
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "26d991afb01cf824827db0c958c50970e038112f"
|
|
183
183
|
}
|
package/src/make-hardener.js
CHANGED
|
@@ -85,7 +85,7 @@ export const makeHardener = () => {
|
|
|
85
85
|
// Ignore if this is an exit, or we've already visited it
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
|
-
// console.
|
|
88
|
+
// console.warn(`adding ${val} to toFreeze`, val);
|
|
89
89
|
setAdd(toFreeze, val);
|
|
90
90
|
weakmapSet(paths, val, path);
|
|
91
91
|
}
|
|
@@ -150,7 +150,7 @@ export const makeHardener = () => {
|
|
|
150
150
|
|
|
151
151
|
enqueue(root);
|
|
152
152
|
dequeue();
|
|
153
|
-
// console.
|
|
153
|
+
// console.warn("toFreeze set:", toFreeze);
|
|
154
154
|
commit();
|
|
155
155
|
|
|
156
156
|
return root;
|
|
@@ -244,11 +244,11 @@ export default function whitelistIntrinsics(
|
|
|
244
244
|
// that we are removing it so we know to look into it, as happens when
|
|
245
245
|
// the language evolves new features to existing intrinsics.
|
|
246
246
|
if (subPermit !== false) {
|
|
247
|
-
// This call to `console.
|
|
248
|
-
//
|
|
247
|
+
// This call to `console.warn` is intentional. It is not a vestige of
|
|
248
|
+
// a debugging attempt. See the comment at top of file for an
|
|
249
249
|
// explanation.
|
|
250
250
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
251
|
-
console.
|
|
251
|
+
console.warn(`Removing ${subPath}`);
|
|
252
252
|
}
|
|
253
253
|
try {
|
|
254
254
|
delete obj[prop];
|
package/src/whitelist.js
CHANGED
|
@@ -425,6 +425,8 @@ export const whitelist = {
|
|
|
425
425
|
seal: fn,
|
|
426
426
|
setPrototypeOf: fn,
|
|
427
427
|
values: fn,
|
|
428
|
+
// See https://github.com/tc39/proposal-accessible-object-hasownproperty
|
|
429
|
+
hasOwn: fn,
|
|
428
430
|
},
|
|
429
431
|
|
|
430
432
|
'%ObjectPrototype%': {
|
|
@@ -922,6 +924,9 @@ export const whitelist = {
|
|
|
922
924
|
// Failed tc39 proposal
|
|
923
925
|
// Seen on FF Nightly 88.0a1
|
|
924
926
|
at: false,
|
|
927
|
+
// See https://github.com/tc39/proposal-array-find-from-last
|
|
928
|
+
findLast: fn,
|
|
929
|
+
findLastIndex: fn,
|
|
925
930
|
},
|
|
926
931
|
|
|
927
932
|
'%ArrayIteratorPrototype%': {
|
|
@@ -978,6 +983,9 @@ export const whitelist = {
|
|
|
978
983
|
// Failed tc39 proposal
|
|
979
984
|
// Seen on FF Nightly 88.0a1
|
|
980
985
|
at: false,
|
|
986
|
+
// See https://github.com/tc39/proposal-array-find-from-last
|
|
987
|
+
findLast: fn,
|
|
988
|
+
findLastIndex: fn,
|
|
981
989
|
},
|
|
982
990
|
|
|
983
991
|
// The TypedArray Constructors
|
|
@@ -1117,6 +1125,11 @@ export const whitelist = {
|
|
|
1117
1125
|
'@@toStringTag': 'string',
|
|
1118
1126
|
// See https://github.com/Moddable-OpenSource/moddable/issues/523
|
|
1119
1127
|
concat: false,
|
|
1128
|
+
// See https://github.com/tc39/proposal-resizablearraybuffer
|
|
1129
|
+
transfer: fn,
|
|
1130
|
+
resize: fn,
|
|
1131
|
+
resizable: getter,
|
|
1132
|
+
maxByteLength: getter,
|
|
1120
1133
|
},
|
|
1121
1134
|
|
|
1122
1135
|
// SharedArrayBuffer Objects
|