refactor(marshal): Rename from Agoric to Endo
MODIFY
package.json
package.json
"packages/eventual-send",
"packages/lockdown",
"packages/lp32",
+ "packages/marshal",
"packages/netstring",
"packages/promise-kit",
"packages/ses",

MODIFY
packages/marshal/README.md
packages/marshal/README.md
-# @agoric/marshal
+# @endo/marshal
"Marshalling" refers to the conversion of structured data (a tree or graph of
objects) into a string, and back again.
@@ -26,8 +26,8 @@ an object with `serialize` and `unserialize` properties. If the callback
arguments are omitted, they default to the identity function.
```js
-import '@agoric/install-ses';
-import { makeMarshal } from '@agoric/marshal';
+import '@endo/install-ses';
+import { makeMarshal } from '@endo/marshal';
const m = makeMarshal();
const o = harden({a: 1});
@@ -40,7 +40,7 @@ console.log(o2); // { a: 1 }
## Frozen Objects Only
The entire object graph must be "hardened" (recursively frozen), such as done
-by the `ses` module (installed with `@agoric/install-ses`). The serialization
+by the `ses` module (installed with `@endo/install-ses`). The serialization
function will refuse to marshal any graph that contains a non-frozen object.
## Beyond JSON

MODIFY
packages/marshal/package.json
packages/marshal/package.json
{
- "name": "@agoric/marshal",
+ "name": "@endo/marshal",
"version": "0.5.0",
"description": "marshal",
"type": "module",
},
"repository": {
"type": "git",
- "url": "git+https://github.com/Agoric/agoric-sdk.git"
+ "url": "git+https://github.com/endojs/endo.git"
},
"keywords": [
"marshal"
],
- "author": "Agoric",
+ "author": "Endo contributors",
"license": "Apache-2.0",
"bugs": {
- "url": "https://github.com/Agoric/agoric-sdk/issues"
+ "url": "https://github.com/endojs/endo/issues"
},
- "homepage": "https://github.com/Agoric/agoric-sdk#readme",
+ "homepage": "https://github.com/endojs/endo#readme",
"dependencies": {
- "@agoric/eventual-send": "^0.14.0",
"@agoric/nat": "^4.1.0",
- "@agoric/promise-kit": "^0.2.29"
+ "@endo/eventual-send": "^0.14.0",
+ "@endo/promise-kit": "^0.2.29"
},
"devDependencies": {
- "@agoric/lockdown": "^0.1.1",
+ "@endo/lockdown": "^0.1.1",
"@endo/ses-ava": "^0.2.13",
"ava": "^3.12.1",
"c8": "^7.7.2"
],
"eslintConfig": {
"extends": [
- "@agoric"
+ "@endo"
]
},
"prettier": {

DELETE
packages/marshal/scripts/npm-audit-fix.sh
-git clone https://github.com/AgoricBot/marshal.git
-cd marshal
-git remote add upstream https://github.com/Agoric/marshal.git
-git remote set-url origin https://AgoricBot:$GITHUB_TOKEN@github.com/AgoricBot/marshal.git
-git fetch upstream
-git checkout master
-git rebase upstream/master
-git config user.email "kate+agoricbot@agoric.com"
-git config user.name "AgoricBot"
-git config --global hub.protocol https
-hub push origin master
-
-if git ls-remote --heads --exit-code origin npm-audit-fix ; then
- git push --delete origin npm-audit-fix
-fi
-
-git checkout -b npm-audit-fix
-
-if npm audit ; then
- echo "Nothing to fix"
-else
- npm audit fix
- files_changed=true
-fi
-
-if [ "$files_changed" = true ] ; then
- git add .
- git commit -m "results of running npm audit fix"
- git push origin npm-audit-fix
- hub pull-request --no-edit --base Agoric/marshal:master
-fi

MODIFY
packages/marshal/src/deeplyFulfilled.js
packages/marshal/src/deeplyFulfilled.js
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>
-import { E } from '@agoric/eventual-send';
+import { E } from '@endo/eventual-send';
/**
* @template T
- * @typedef {import('@agoric/eventual-send').ERef<T>} ERef
+ * @typedef {import('@endo/eventual-send').ERef<T>} ERef
*/
-import { isPromise } from '@agoric/promise-kit';
+import { isPromise } from '@endo/promise-kit';
import { getTag, isObject } from './helpers/passStyle-helpers.js';
import { makeTagged } from './makeTagged.js';
import { passStyleOf } from './passStyleOf.js';

MODIFY
packages/marshal/src/dot-membrane.js
packages/marshal/src/dot-membrane.js
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>
-import { E } from '@agoric/eventual-send';
+import { E } from '@endo/eventual-send';
import { isObject } from './helpers/passStyle-helpers.js';
import { getInterfaceOf } from './helpers/remotable.js';
import { Far } from './make-far.js';

MODIFY
packages/marshal/src/helpers/environment-options.js
packages/marshal/src/helpers/environment-options.js
@@ -49,7 +49,7 @@ const { details: X, quote: q } = assert;
* not authority beyond the ability to read this global state.
*
* The current placement of this `environment-options.js` module in the
- * `@agoric/marshal` package is a stopgap measure.
+ * `@endo/marshal` package is a stopgap measure.
* TODO the intention is to migrate it into Endo, and to migrate all our
* direct uses of `process.env` for configuration parameters to use it
* instead.

MODIFY
packages/marshal/src/passStyleOf.js
packages/marshal/src/passStyleOf.js
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>
-import { isPromise } from '@agoric/promise-kit';
+import { isPromise } from '@endo/promise-kit';
import { isObject, PASS_STYLE } from './helpers/passStyle-helpers.js';
import { CopyArrayHelper } from './helpers/copyArray.js';

MODIFY
packages/marshal/src/typeGuards.js
packages/marshal/src/typeGuards.js
@@ -6,7 +6,7 @@ const { details: X, quote: q } = assert;
/**
* Check whether the argument is a pass-by-copy array, AKA a "copyArray"
- * in @agoric/marshal terms
+ * in @endo/marshal terms
*
* @param {Passable} array
* @returns {array is CopyArray<any>}
@@ -16,7 +16,7 @@ harden(isCopyArray);
/**
* Check whether the argument is a pass-by-copy record, AKA a
- * "copyRecord" in @agoric/marshal terms
+ * "copyRecord" in @endo/marshal terms
*
* @param {Passable} record
* @returns {record is CopyRecord<any>}

MODIFY
packages/marshal/test/prepare-test-env-ava.js
packages/marshal/test/prepare-test-env-ava.js
-import '@agoric/lockdown';
-import '@agoric/eventual-send/shim.js';
-import '@agoric/lockdown/commit-debug.js';
+import '@endo/lockdown';
+import '@endo/eventual-send/shim.js';
+import '@endo/lockdown/commit-debug.js';
import { wrapTest } from '@endo/ses-ava';
import rawTest from 'ava';

refactor(marshal): Rename from Agoric to Endo