fix: move arb-passable to pass-style
MODIFY
packages/marshal/package.json
packages/marshal/package.json
{
"name": "@endo/marshal",
"version": "0.8.2",
- "description": "marshal",
+ "description": "marshal: encoding and deconding of Passable subgraphs",
"type": "module",
"main": "index.js",
"directories": {
"@endo/eventual-send": "^0.16.9",
"@endo/nat": "^4.1.24",
"@endo/pass-style": "^0.1.0",
- "@endo/promise-kit": "^0.2.53",
- "@fast-check/ava": "^1.0.1"
+ "@endo/promise-kit": "^0.2.53"
},
"devDependencies": {
"@endo/init": "^0.5.53",
"@endo/lockdown": "^0.1.25",
"@endo/ses-ava": "^0.2.37",
+ "@fast-check/ava": "^1.0.1",
"ava": "^5.1.0",
"c8": "^7.7.3"
},

MODIFY
packages/marshal/test/test-encodePassable.js
packages/marshal/test/test-encodePassable.js
// @ts-nocheck
/* eslint-disable no-bitwise */
+// eslint-disable-next-line import/order
import { test } from './prepare-test-env-ava.js';
-// eslint-disable-next-line import/order, import/no-extraneous-dependencies
+
+// eslint-disable-next-line import/no-extraneous-dependencies
import { fc } from '@fast-check/ava';
+import { arbPassable } from '@endo/pass-style/tools.js';
import {
makeEncodePassable,
makeDecodePassable,
} from '../src/encodePassable.js';
import { compareRank, makeComparatorKit } from '../src/rankOrder.js';
import { sample } from './test-rankOrder.js';
-import { arbPassable } from '../tools/arb-passable.js';
const { Fail, quote: q } = assert;

MODIFY
packages/marshal/test/test-rankOrder.js
packages/marshal/test/test-rankOrder.js
@@ -5,6 +5,12 @@ import { test } from './prepare-test-env-ava.js';
// eslint-disable-next-line import/no-extraneous-dependencies
import { fc } from '@fast-check/ava';
import { makeTagged } from '@endo/pass-style';
+import {
+ exampleAlice,
+ exampleBob,
+ exampleCarol,
+ arbPassable,
+} from '@endo/pass-style/tools.js';
import {
FullRankCover,
@@ -16,13 +22,6 @@ import {
assertRankSorted,
} from '../src/rankOrder.js';
-import {
- arbPassable,
- exampleAlice,
- exampleBob,
- exampleCarol,
-} from '../tools/arb-passable.js';
-
const { quote: q } = assert;
test('compareRank is reflexive', async t => {

MODIFY
packages/pass-style/package.json
packages/pass-style/package.json
{
"name": "@endo/pass-style",
"version": "0.1.0",
- "private": null,
- "description": "Description forthcoming.",
+ "description": "pass-style: defines the taxonomy of Passable objects.",
"keywords": [],
"author": "Endo contributors",
"license": "Apache-2.0",
"module": "./index.js",
"exports": {
".": "./index.js",
+ "./tools.js": "./tools.js",
"./package.json": "./package.json"
},
"scripts": {
"test": "ava"
},
"dependencies": {
- "@endo/promise-kit": "^0.2.53"
+ "@endo/promise-kit": "^0.2.53",
+ "@fast-check/ava": "^1.0.1"
},
"devDependencies": {
"@endo/eslint-config": "^0.5.2",
"NEWS*",
"LICENSE*",
"SECURITY*",
- "src"
+ "src",
+ "tools"
],
"publishConfig": {
"access": "public"

ADD
packages/pass-style/tools.js
+// The tools are exported separately because it is intended to support testing,
+// including testing done by other packages. Code dependent only on this
+// package from production purposes, such as production code in importing
+// packages, should avoid importing tools.
+// Note that locally, the depenencies of tools are still listed as
+// `dependencies` rather than `devDependencies`.
+
+export {
+ exampleAlice,
+ exampleBob,
+ exampleCarol,
+ arbString,
+ arbLeaf,
+ arbPassable,
+} from './tools/arb-passable.js';

RENAME
packages/marshal/tools/arb-passable.js
packages/pass-style/tools/arb-passable.js
// @ts-check
import '../src/types.js';
import { fc } from '@fast-check/ava';
-import { Far, makeTagged } from '@endo/pass-style';
+import { Far } from '../src/make-far.js';
+import { makeTagged } from '../src/makeTagged.js';
/**
* The only elements with identity. Everything else should be equal

fix: move arb-passable to pass-style (#1448)