Comparing version 1.8.0 to 1.9.0
{ | ||
"name": "ses", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "Hardened JavaScript for Fearless Cooperation", | ||
@@ -62,2 +62,3 @@ "keywords": [ | ||
"./compartment-shim.js": "./compartment-shim.js", | ||
"./console-shim.js": "./console-shim.js", | ||
"./package.json": "./package.json" | ||
@@ -76,11 +77,13 @@ }, | ||
"qt": "ava", | ||
"test": "tsd && ava" | ||
"test": "tsd && ava", | ||
"test:xs": "xst dist/ses.umd.js test/_lockdown-safe.js", | ||
"postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'" | ||
}, | ||
"dependencies": { | ||
"@endo/env-options": "^1.1.6" | ||
"@endo/env-options": "^1.1.7" | ||
}, | ||
"devDependencies": { | ||
"@endo/compartment-mapper": "^1.2.2", | ||
"@endo/module-source": "^1.0.2", | ||
"@endo/test262-runner": "^0.1.40", | ||
"@endo/compartment-mapper": "^1.3.0", | ||
"@endo/module-source": "^1.1.0", | ||
"@endo/test262-runner": "^0.1.41", | ||
"ava": "^6.1.3", | ||
@@ -96,16 +99,16 @@ "babel-eslint": "^10.1.0", | ||
"prettier": "^3.2.5", | ||
"sinon": "^15.1.0", | ||
"terser": "^5.16.6", | ||
"tsd": "^0.30.7", | ||
"typescript": "~5.6.1-rc" | ||
"tsd": "^0.31.2", | ||
"typescript": "~5.6.2" | ||
}, | ||
"files": [ | ||
"./*.d.ts", | ||
"./*.js", | ||
"./*.map", | ||
"LICENSE*", | ||
"NEWS*", | ||
"SECURITY*", | ||
"dist", | ||
"types.d.ts", | ||
"index.js", | ||
"tools.js", | ||
"src" | ||
"lib", | ||
"src", | ||
"tools" | ||
], | ||
@@ -122,2 +125,3 @@ "publishConfig": { | ||
"error", | ||
"AggregateError", | ||
"Array", | ||
@@ -130,2 +134,3 @@ "ArrayBuffer", | ||
"Boolean", | ||
"Compartment", | ||
"DataView", | ||
@@ -166,2 +171,3 @@ "Date", | ||
"WeakSet", | ||
"assert", | ||
"decodeURI", | ||
@@ -176,6 +182,6 @@ "decodeURIComponent", | ||
"isNaN", | ||
"lockdown", | ||
"parseFloat", | ||
"parseInt", | ||
"unescape", | ||
"AggregateError" | ||
"unescape" | ||
], | ||
@@ -200,3 +206,2 @@ "@endo/no-polymorphic-call": "error" | ||
"files": [ | ||
"test/**/test-*.*", | ||
"test/**/*.test.*" | ||
@@ -209,3 +214,3 @@ ], | ||
}, | ||
"gitHead": "cb060b7e22c92cc951fb03d86cdbceeae82fec34" | ||
"gitHead": "bbf20fae6726f7d26456714b8852572787d34e05" | ||
} |
@@ -22,2 +22,3 @@ /* global globalThis */ | ||
Array, | ||
ArrayBuffer, | ||
Date, | ||
@@ -38,2 +39,3 @@ FinalizationRegistry, | ||
Symbol, | ||
Uint8Array, | ||
WeakMap, | ||
@@ -129,2 +131,3 @@ WeakSet, | ||
export const { isArray, prototype: arrayPrototype } = Array; | ||
export const { prototype: arrayBufferPrototype } = ArrayBuffer; | ||
export const { prototype: mapPrototype } = Map; | ||
@@ -184,2 +187,11 @@ export const { revocable: proxyRevocable } = Proxy; | ||
// | ||
export const arrayBufferSlice = uncurryThis(arrayBufferPrototype.slice); | ||
/** @type {(b: ArrayBuffer) => number} */ | ||
export const arrayBufferGetByteLength = uncurryThis( | ||
// @ts-expect-error we know it is there on all conforming platforms | ||
getOwnPropertyDescriptor(arrayBufferPrototype, 'byteLength').get, | ||
); | ||
// | ||
export const typedArraySet = uncurryThis(typedArrayPrototype.set); | ||
// | ||
export const mapSet = uncurryThis(mapPrototype.set); | ||
@@ -186,0 +198,0 @@ export const mapGet = uncurryThis(mapPrototype.get); |
@@ -22,3 +22,3 @@ // @ts-check | ||
} from './global-object.js'; | ||
import { assertEqual } from './error/assert.js'; | ||
import { assert, assertEqual } from './error/assert.js'; | ||
import { sharedGlobalPropertyNames } from './permits.js'; | ||
@@ -25,0 +25,0 @@ import { load, loadNow } from './module-load.js'; |
@@ -371,4 +371,6 @@ // @ts-check | ||
const argTags = extractErrorArgs(logArgs, subErrors); | ||
// eslint-disable-next-line @endo/no-polymorphic-call | ||
baseConsole[level](...argTags); | ||
if (baseConsole[level]) { | ||
// eslint-disable-next-line @endo/no-polymorphic-call | ||
baseConsole[level](...argTags); | ||
} | ||
// @ts-expect-error ConsoleProp vs LogSeverity mismatch | ||
@@ -480,2 +482,4 @@ logSubErrors(level, subErrors); | ||
}); | ||
} else { | ||
baseConsole[name] = () => {}; | ||
} | ||
@@ -487,2 +491,4 @@ } | ||
}); | ||
} else { | ||
baseConsole.groupEnd = () => {}; | ||
} | ||
@@ -489,0 +495,0 @@ harden(baseConsole); |
@@ -49,2 +49,3 @@ // Copyright (C) 2018 Agoric | ||
import { tameDomains } from './tame-domains.js'; | ||
import { tameModuleSource } from './tame-module-source.js'; | ||
@@ -60,2 +61,3 @@ import { tameConsole } from './error/tame-console.js'; | ||
import { tameRegeneratorRuntime } from './tame-regenerator-runtime.js'; | ||
import { shimArrayBufferTransfer } from './shim-arraybuffer-transfer.js'; | ||
@@ -289,2 +291,4 @@ /** @import {LockdownOptions} from '../types.js' */ | ||
addIntrinsics(tameSymbolConstructor()); | ||
addIntrinsics(shimArrayBufferTransfer()); | ||
addIntrinsics(tameModuleSource()); | ||
@@ -291,0 +295,0 @@ addIntrinsics(getAnonymousIntrinsics()); |
@@ -159,4 +159,6 @@ // Copyright (C) 2011 Google Inc. | ||
// We can't clean [[prototype]], therefore abort. | ||
throw TypeError(`Unexpected intrinsic ${path}.__proto__ at ${protoName}`); | ||
// We can't clean [[Prototype]], therefore abort. | ||
throw TypeError( | ||
`Unexpected [[Prototype]] at ${path}.__proto__ (expected ${protoName || '%ObjectPrototype%'})`, | ||
); | ||
} | ||
@@ -216,3 +218,5 @@ | ||
throw TypeError(`Unexpected whitelist permit ${permit} at ${path}`); | ||
throw TypeError( | ||
`Unexpected property ${prop} with permit ${permit} at ${path}`, | ||
); | ||
} | ||
@@ -219,0 +223,0 @@ |
@@ -104,4 +104,8 @@ /* eslint-disable no-restricted-globals */ | ||
// https://github.com/tc39/proposal-source-phase-imports?tab=readme-ov-file#js-module-source | ||
ModuleSource: 'ModuleSource', | ||
lockdown: 'lockdown', | ||
harden: 'harden', | ||
HandledPromise: 'HandledPromise', // TODO: Until Promise.delegate (see below). | ||
@@ -1509,2 +1513,28 @@ }; | ||
// https://github.com/tc39/proposal-source-phase-imports?tab=readme-ov-file#js-module-source | ||
ModuleSource: { | ||
'[[Proto]]': '%AbstractModuleSource%', | ||
prototype: '%ModuleSourcePrototype%', | ||
}, | ||
'%ModuleSourcePrototype%': { | ||
'[[Proto]]': '%AbstractModuleSourcePrototype%', | ||
constructor: 'ModuleSource', | ||
'@@toStringTag': 'string', | ||
// https://github.com/tc39/proposal-compartments | ||
bindings: getter, | ||
needsImport: getter, | ||
needsImportMeta: getter, | ||
}, | ||
'%AbstractModuleSource%': { | ||
'[[Proto]]': '%FunctionPrototype%', | ||
prototype: '%AbstractModuleSourcePrototype%', | ||
}, | ||
'%AbstractModuleSourcePrototype%': { | ||
constructor: '%AbstractModuleSource%', | ||
}, | ||
Promise: { | ||
@@ -1511,0 +1541,0 @@ // Properties of the Promise Constructor |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3484821
16
82
74422
Updated@endo/env-options@^1.1.7