Skip to content

Commit

Permalink
fixup! stop exporting ponyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jan 15, 2025
1 parent f76f21e commit 8e5af93
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion packages/non-trapping-shim/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ponyfill and Shim for Non-trapping Integrity Trait
# Shim for Non-trapping Integrity Trait

Emulates support for the non-trapping integrity trait from the
[Stabilize proposal](https://github.com/tc39/proposal-stabilize).
Expand All @@ -7,6 +7,8 @@ A *shim* attempts to be as full fidelity as practical an emulation of the propos

A shim typically "exports" its functionality by adding properties to primordial objects. A ponyfill typically exports its functionality by explicit module exports, to be explicitly imported by code wishing to use it.

This package is currently organized internally as a ponyfill, and a shim based on that ponyfill. But it no longer exports the ponyfill, as the [eval twin problems](https://github.com/endojs/endo/issues/1583) for using the ponyfill are fatal.

See https://github.com/endojs/endo/blob/master/packages/ses/docs/preparing-for-stabilize.md for guidance on how to prepare for the changes that will be introduced by this proposal.

TODO: More explanation.
1 change: 0 additions & 1 deletion packages/non-trapping-shim/index.js

This file was deleted.

3 changes: 1 addition & 2 deletions packages/non-trapping-shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@endo/non-trapping-shim",
"version": "0.1.0",
"private": true,
"description": "shim and ponyfill for non-trapping integrity trait",
"description": "shim of the non-trapping integrity trait",
"keywords": [],
"author": "Endo contributors",
"license": "Apache-2.0",
Expand All @@ -19,7 +19,6 @@
"main": "./index.js",
"module": "./index.js",
"exports": {
".": "./index.js",
"./shim.js": "./shim.js",
"./package.json": "./package.json"
},
Expand Down
5 changes: 5 additions & 0 deletions packages/non-trapping-shim/src/non-trapping-pony.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// The exports of this ponyfill should only be used internally to this package
// for separate unit testing, and for building the shim. The eval-twin
// problems https://github.com/endojs/endo/issues/1583 with using a ponyfill
// of this package are fatal, and so only the shim should be used externally.

const OriginalObject = Object;
const OriginalReflect = Reflect;
const OriginalProxy = Proxy;
Expand Down
2 changes: 1 addition & 1 deletion packages/non-trapping-shim/test/non-trapping-shim.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import '../shim.js';

const { freeze, isFrozen } = Object;

test('non-trapping-pony', async t => {
test('non-trapping-shim', async t => {
const specimen = { foo: 8 };

const sillyHandler = freeze({
Expand Down

0 comments on commit 8e5af93

Please sign in to comment.