Socket
Socket
Sign inDemoInstall

ses

Package Overview
Dependencies
Maintainers
5
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ses - npm Package Compare versions

Comparing version 0.15.22 to 0.15.23

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

### [0.15.23](https://github.com/endojs/endo/compare/ses@0.15.22...ses@0.15.23) (2022-09-27)
### Features
* **ses:** improve performance of uncurryThis ([b1ad60a](https://github.com/endojs/endo/commit/b1ad60ae89545499d6cbcaa3812118ac4229d83c))
### Bug Fixes
* add a do-nothing SharedError.prepareStackTrace ([#1290](https://github.com/endojs/endo/issues/1290)) ([705aef2](https://github.com/endojs/endo/commit/705aef24f34bb9794f0aa807d567b3efbf0c23af))
* **ses:** report unhandled promise rejection when collected ([dae7235](https://github.com/endojs/endo/commit/dae7235011da907823c27ca5dfb9ed72519a4062))
* **ses:** uncurryThis type fixes ([feb062c](https://github.com/endojs/endo/commit/feb062c56ee05b12657596defce68107894bafd4))
### [0.15.22](https://github.com/endojs/endo/compare/ses@0.15.21...ses@0.15.22) (2022-09-14)

@@ -8,0 +24,0 @@

46

NEWS.md
User-visible changes in SES:
# v0.15.23 (2022-09-26)
- Fixes the unhandled promise rejection logic to report unhandled rejections
when the promise is collected. Because of a bug it previously only reported
at process exit.
- Improves the fidelity of emulation for V8 `Error.prepareStackTrace`,
allowing more legacy code to work by default in isolation.
# v0.15.18 (2022-08-23)

@@ -48,3 +56,3 @@

- *BREAKING CHANGE*: The lockdown option `domainTaming` is now `safe` by
- _BREAKING CHANGE_: The lockdown option `domainTaming` is now `safe` by
default, which will break any application that depends transtively on the

@@ -57,6 +65,7 @@ Node.js `domain` module.

objects like callbacks and promises.
This overcomes the last *known* obstacle toward object capability containment.
This overcomes the last _known_ obstacle toward object capability containment.
- Lockdown will now read options from the environment as defined by the Node.js
`process.env` parameter space.
- *BREAKING CHANGE*: Lockdown may no longer be called more than once.
- _BREAKING CHANGE_: Lockdown may no longer be called more than once.
Lockdown no longer returns a boolean to indicate whether it was effective

@@ -107,3 +116,3 @@ (true) or redundant (false). Instead, Lockdown will return undefined for

- *BREAKING*: Any precompiled static module records from prior versions
- _BREAKING_: Any precompiled static module records from prior versions
will not load in this version of SES or beyond. The format of the preamble

@@ -125,4 +134,3 @@ has been changed to admit the possibility of a variable named `Map` declared

- Adds more TypeScript definitions, importable with `/// <reference
types="ses"/>`, covering `harden`, `lockdown`, `assert`, and `Compartment`,
- Adds more TypeScript definitions, importable with `/// <reference types="ses"/>`, covering `harden`, `lockdown`, `assert`, and `Compartment`,
and many types importable with `import('ses')` notation.

@@ -139,7 +147,7 @@ - Adds descriptive detail to module system link error messages and fixes the

- *BREAKING CHANGE* The `ses/lockdown` module is again just `ses`.
- _BREAKING CHANGE_ The `ses/lockdown` module is again just `ses`.
Instead of having a light 43KB `ses/lockdown` and a heavy 3.1MB `ses`, there
is just a 52KB `ses` that has everything except `StaticModuleRecord`.
For this release, there remains a `ses/lockdown` alias to `ses`.
- *BREAKING CHANGE* Third-party static module interface implementations *must*
- _BREAKING CHANGE_ Third-party static module interface implementations _must_
now explicitly list their exported names.

@@ -151,3 +159,3 @@ For CommonJS, this implies using a heuristic static analysis of `exports`

like `import * from './spec.cjs'`.
- *BREAKING CHANGE* The `StaticModuleRecord` constructor has been removed in
- _BREAKING CHANGE_ The `StaticModuleRecord` constructor has been removed in
favor of a duck-type for compiled static module records that is intrinsic to

@@ -159,3 +167,3 @@ the shim and may be emulated by a third-party `StaticModuleRecord`

This relieves SES of a dependency on Babel and simplifies its API.
- *BREAKING CHANGE* The UMD distribution of SES must have the UTF-8 charset.
- _BREAKING CHANGE_ The UMD distribution of SES must have the UTF-8 charset.
The prior versions were accidentally ASCII, so SES would have worked

@@ -173,4 +181,3 @@ in any web page, regardless of the charset.

assignment needs to be turned into a `defineProperty` to avoid the override
mistake. Most useful as `overrideTaming: 'severe', overrideDebug:
['constructor']`.
mistake. Most useful as `overrideTaming: 'severe', overrideDebug: ['constructor']`.
- We reopened Safari bug

@@ -248,15 +255,14 @@ [Object.defineProperties triggering a setter](https://bugs.webkit.org/show_bug.cgi?id=222538#c17)

```js
assert(false, X`literal part ${secretData} with ${q(publicData)}.`);
```
```js
assert(false, X`literal part ${secretData} with ${q(publicData)}.`);
```
acts like
```js
assert(false, X`literal part ${q(secretData)} with ${q(publicData)}.`);
```
```js
assert(false, X`literal part ${q(secretData)} with ${q(publicData)}.`);
```
Note that the information rendered by the SES shim `console` object always includes all the unredacted data independent of the setting of `errorTaming`.
Note that the information rendered by the SES shim `console` object always includes all the unredacted data independent of the setting of `errorTaming`.
# 0.12.3 (2021-03-01)

@@ -263,0 +269,0 @@

{
"name": "ses",
"version": "0.15.22",
"version": "0.15.23",
"description": "Hardened JavaScript for Fearless Cooperation",

@@ -62,5 +62,5 @@ "keywords": [

"devDependencies": {
"@endo/compartment-mapper": "^0.7.12",
"@endo/compartment-mapper": "^0.7.13",
"@endo/eslint-config": "^0.5.1",
"@endo/static-module-record": "^0.7.11",
"@endo/static-module-record": "^0.7.12",
"@endo/test262-runner": "^0.1.28",

@@ -183,3 +183,3 @@ "ava": "^3.12.1",

},
"gitHead": "44b17d92334592b2da54d91dba73f28db513412a"
"gitHead": "2d3f1a5c472aaef102e8919cbf8d0c53238d155f"
}

@@ -148,10 +148,7 @@ /* global globalThis */

const { bind } = functionPrototype;
/**
* uncurryThis()
* This form of uncurry uses Reflect.apply()
* Equivalent of: fn => (thisArg, ...args) => apply(fn, thisArg, args)
*
* The original uncurry uses:
* const bind = Function.prototype.bind;
* const uncurryThis = bind.bind(bind.call);
*
* See those reference for a complete explanation:

@@ -162,7 +159,5 @@ * http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming

*
* @template {Function} F
* @param {F} fn
* returns {(thisArg: ThisParameterType<F>, ...args: Parameters<F>) => ReturnType<F>}
* @type {<F extends (this: any, ...args: any[]) => any>(fn: F) => ((thisArg: ThisParameterType<F>, ...args: Parameters<F>) => ReturnType<F>)}
*/
export const uncurryThis = fn => (thisArg, ...args) => apply(fn, thisArg, args);
export const uncurryThis = bind.bind(bind.call); // eslint-disable-line @endo/no-polymorphic-call

@@ -175,4 +170,6 @@ export const objectHasOwnProperty = uncurryThis(objectPrototype.hasOwnProperty);

export const arrayJoin = uncurryThis(arrayPrototype.join);
/** @type {<T, U>(thisArg: readonly T[], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[]} */
export const arrayMap = uncurryThis(arrayPrototype.map);
export const arrayPop = uncurryThis(arrayPrototype.pop);
/** @type {<T>(thisArg: T[], ...items: T[]) => number} */
export const arrayPush = uncurryThis(arrayPrototype.push);

@@ -205,5 +202,12 @@ export const arraySlice = uncurryThis(arrayPrototype.slice);

export const stringMatch = uncurryThis(stringPrototype.match);
/**
* @type {
* ((thisArg: string, searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string) => string) |
* ((thisArg: string, searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string) => string)
* }
*/
export const stringReplace = uncurryThis(stringPrototype.replace);
export const stringSearch = uncurryThis(stringPrototype.search);
export const stringSlice = uncurryThis(stringPrototype.slice);
/** @type {(thisArg: string, splitter: string | RegExp | { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number) => string[]} */
export const stringSplit = uncurryThis(stringPrototype.split);

@@ -228,2 +232,3 @@ export const stringStartsWith = uncurryThis(stringPrototype.startsWith);

export const promiseCatch = uncurryThis(promisePrototype.catch);
/** @type {<T, TResult1 = T, TResult2 = never>(thisArg: T, onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null) => Promise<TResult1 | TResult2>} */
export const promiseThen = uncurryThis(promisePrototype.then);

@@ -230,0 +235,0 @@ //

@@ -157,3 +157,6 @@ // @ts-check

// change in an appropriately numbered future version.
const namespace = compartmentImportNow(this, specifier);
const namespace = compartmentImportNow(
/** @type {Compartment} */ (this),
specifier,
);
return { namespace };

@@ -181,3 +184,3 @@ },

return compartmentImportNow(this, specifier);
return compartmentImportNow(/** @type {Compartment} */ (this), specifier);
},

@@ -184,0 +187,0 @@ };

@@ -325,5 +325,5 @@ // @ts-check

const argTags = extractErrorArgs(logArgs, subErrors);
// @ts-ignore
// eslint-disable-next-line @endo/no-polymorphic-call
baseConsole[level](...argTags);
// @ts-expect-error ConsoleProp vs LogSeverity mismatch
logSubErrors(level, subErrors);

@@ -330,0 +330,0 @@ };

@@ -22,3 +22,3 @@ // @ts-check

*
* @param {string[]} terms
* @param {(string | StringablePayload)[]} terms
* @param {"and" | "or"} conjunction

@@ -25,0 +25,0 @@ */

@@ -9,2 +9,3 @@ import {

getOwnPropertyDescriptor,
defineProperty,
} from '../commons.js';

@@ -141,2 +142,35 @@ import { NativeErrors } from '../whitelist.js';

if (platform === 'v8') {
// `SharedError.prepareStackTrace`, if it exists, must also be
// powerless. However, from what we've heard, depd expects to be able to
// assign to it without the assignment throwing. It is normally a function
// that returns a stack string to be magically added to error objects.
// However, as long as we're adding a lenient standin, we may as well
// accommodate any who expect to get a function they can call and get
// a string back. This prepareStackTrace is a do-nothing function that
// always returns the empty string.
defineProperties(SharedError, {
prepareStackTrace: {
get() {
return () => '';
},
set(_prepareFn) {
// do nothing
},
enumerable: false,
configurable: true,
},
captureStackTrace: {
value: (errorish, _constructorOpt) => {
defineProperty(errorish, 'stack', {
value: '',
});
},
writable: false,
enumerable: false,
configurable: true,
},
});
}
let initialGetStackString = tamedMethods.getStackString;

@@ -143,0 +177,0 @@ if (platform === 'v8') {

@@ -66,3 +66,3 @@ // @ts-check

const finalizeDroppedPromise = heldReasonId => {
if (mapHas(idToReason)) {
if (mapHas(idToReason, heldReasonId)) {
const reason = mapGet(idToReason, heldReasonId);

@@ -69,0 +69,0 @@ removeReasonId(heldReasonId);

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc