Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ api-docs
# pack-all output
/dist/

# profiler output
*.cpuprofile

# ignore all declarations and mappings, but allow the "*.types.d{m,c,t}s"
# convention below to make it easier to track new declaration files as needed
*.d.ts*
Expand Down
8 changes: 0 additions & 8 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ catalogs:
ava: ^8.0.1
c8: ^11.0.0
eslint: ^10.4.1
eslint-config-prettier: ^10.0.0
eslint-plugin-eslint-comments: ^3.2.0
# Aliased to eslint-plugin-import-x so that the package on disk is
# named `eslint-plugin-import` (and ESLint registers it under the
# `import/*` namespace), while the implementation is the
# actively-maintained import-x soft fork. The pinned-exact version
# tracks security advisories on import-x.
eslint-plugin-import: 'npm:eslint-plugin-import-x@4.16.2'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only referenced in @endo/eslint-plugin now, so it doesn't need to be in the catalog.

tsd: ^0.33.0
typescript: ~6.0.3

Expand Down
1 change: 1 addition & 0 deletions knip.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const config: KnipConfig = {
// afaict everything here is up for grabs
entry: ['**/*.js'],
},
ignoreDependencies: [/.*/],
},
},
// allows use of @knipignore in docstrings to suppress errors
Expand Down
8 changes: 0 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,9 @@
"@lavamoat/allow-scripts": "^3.4.3",
"@lavamoat/preinstall-always-fail": "^2.1.1",
"@types/node": "catalog:dev",
"@typescript-eslint/eslint-plugin": "^8.60.0",
"@typescript-eslint/parser": "^8.60.0",
"ava": "catalog:dev",
"eslint": "catalog:dev",
"eslint-config-jessie": "^0.0.6",
"eslint-config-prettier": "^10.0.0",
"eslint-plugin-eslint-plugin": "^7.4.1",
"eslint-plugin-import": "catalog:dev",
"eslint-plugin-jsdoc": "^50.8.0",
"eslint-plugin-unicorn": "^56.0.1",
"globals": "^17.6.0",
"js-yaml": "^5.2.1",
"knip": "^6.32.2",
Expand All @@ -43,7 +36,6 @@
"typedoc": "^0.28.19",
"typedoc-plugin-mermaid": "^1.12.0",
"typescript": "catalog:dev",
"typescript-eslint": "^8.60.0",
"unist-util-visit": "^5.1.0",
"yaml": "^2.9.0",
"zx": "^8.8.5"
Expand Down
2 changes: 0 additions & 2 deletions packages/base64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@
},
"devDependencies": {
"ava": "catalog:dev",
"babel-eslint": "^10.1.0",
"c8": "catalog:dev",
"eslint": "catalog:dev",
"prettier": "^3.5.3",
"typescript": "catalog:dev"
},
"files": [
Expand Down
5 changes: 0 additions & 5 deletions packages/benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,9 @@
"@endo/init": "workspace:^",
"@endo/lockdown": "workspace:^",
"@endo/pass-style": "workspace:^",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-node-resolve": "^16.0.0",
"@types/rollup": "^0.54.0",
"c8": "catalog:dev",
"eshost-cli": "^9.0.0",
"eslint": "catalog:dev",
"rollup": "^4.34.6",
"tsd": "catalog:dev",
"typescript": "catalog:dev"
},
"files": [
Expand Down
1 change: 0 additions & 1 deletion packages/bundle-source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@endo/ses-ava": "workspace:^",
"@endo/zip": "workspace:^",
"ava": "catalog:dev",
"c8": "catalog:dev",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this sort of thing, it might be better if we actually add a reference to c8 in scripts, e.g., "test:coverage": "c8 yarn test" would be enough.

"eslint": "catalog:dev",
"ses": "workspace:^",
"typescript": "catalog:dev"
Expand Down
2 changes: 1 addition & 1 deletion packages/bundle-source/src/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const makeFileReader = (fileName, { fs, path }) => {
* @param {(there: string) => FileWriter} make
* @returns {FileWriter}
*/
export const makeFileWriter = (
const makeFileWriter = (
fileName,
{ fs, path },
make = there => makeFileWriter(there, { fs, path }, make),
Expand Down
17 changes: 0 additions & 17 deletions packages/bundle-source/src/is-entrypoint.js

This file was deleted.

18 changes: 8 additions & 10 deletions packages/bundle-source/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type ModuleFormat =
| 'getExport';

export type Logger = (...args: unknown[]) => void;
export type ComputeSha512 = (bytes: string | Uint8Array) => string;
type ComputeSha512 = (bytes: string | Uint8Array) => string;

export interface SharedPowers {
computeSha512?: ComputeSha512 | undefined;
Expand Down Expand Up @@ -33,12 +33,12 @@ export interface BundleCacheOptions extends BundleCacheOperationOptions {
log?: Logger | undefined;
}

export interface BundleMetaModuleSource {
interface BundleMetaModuleSource {
relative: string;
absolute: string;
}

export interface BundleMetaContent {
interface BundleMetaContent {
relativePath: string;
mtime: string;
size: number;
Expand Down Expand Up @@ -212,31 +212,29 @@ export type BundleSourceResult<T extends ModuleFormat> =
}
: never;

export interface BundlePowers extends SharedPowers {
interface BundlePowers extends SharedPowers {
read?: ReadFn | undefined;
canonical?: CanonicalFn | undefined;
externals?: string[] | undefined;
}

export type BundleSourceSimple = <T extends 'endoZipBase64'>(
type BundleSourceSimple = <T extends 'endoZipBase64'>(
startFilename: string,
) => Promise<BundleSourceResult<T>>;

export type BundleSourceWithFormat = <T extends ModuleFormat = 'endoZipBase64'>(
type BundleSourceWithFormat = <T extends ModuleFormat = 'endoZipBase64'>(
startFilename: string,
format: T,
powers?: BundlePowers,
) => Promise<BundleSourceResult<T>>;

export type BundleSourceWithOptions = <
T extends ModuleFormat = 'endoZipBase64',
>(
type BundleSourceWithOptions = <T extends ModuleFormat = 'endoZipBase64'>(
startFilename: string,
bundleOptions: BundleOptions<T>,
powers?: BundlePowers,
) => Promise<BundleSourceResult<T>>;

export type BundleSourceGeneral = <T extends ModuleFormat = 'endoZipBase64'>(
type BundleSourceGeneral = <T extends ModuleFormat = 'endoZipBase64'>(
startFilename: string,
formatOrOptions?: T | BundleOptions<T>,
powers?: BundlePowers,
Expand Down
3 changes: 0 additions & 3 deletions packages/bytes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@
"@endo/pass-style": "workspace:^",
"@endo/ses-ava": "workspace:^",
"ava": "catalog:dev",
"babel-eslint": "^10.1.0",
"c8": "catalog:dev",
"eslint": "catalog:dev",
"prettier": "^3.5.3",
"ses": "workspace:^",
"typescript": "catalog:dev"
},
"files": [
Expand Down
1 change: 0 additions & 1 deletion packages/cache-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"ava": "catalog:dev",
"c8": "catalog:dev",
"eslint": "catalog:dev",
"tsd": "catalog:dev",
"typescript": "catalog:dev"
},
"files": [
Expand Down
2 changes: 0 additions & 2 deletions packages/captp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
"@endo/init": "workspace:^",
"@endo/ses-ava": "workspace:^",
"ava": "catalog:dev",
"c8": "catalog:dev",
"eslint": "catalog:dev",
"ses": "workspace:^",
"typescript": "catalog:dev"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions packages/chacha12-fast-check-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
"ava": "catalog:dev",
"c8": "catalog:dev",
"eslint": "catalog:dev",
"prettier": "^3.5.3",
"ses": "workspace:^",
"typescript": "catalog:dev"
},
"files": [
Expand Down
3 changes: 0 additions & 3 deletions packages/chacha12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,8 @@
"@endo/init": "workspace:^",
"@endo/ses-ava": "workspace:^",
"ava": "catalog:dev",
"babel-eslint": "^10.1.0",
"c8": "catalog:dev",
"eslint": "catalog:dev",
"prettier": "^3.5.3",
"ses": "workspace:^",
"typescript": "catalog:dev"
},
"files": [
Expand Down
5 changes: 0 additions & 5 deletions packages/check-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,8 @@
"@endo/ses-ava": "workspace:^",
"@endo/zip": "workspace:^",
"ava": "catalog:dev",
"babel-eslint": "^10.1.0",
"c8": "catalog:dev",
"eslint": "catalog:dev",
"eslint-config-prettier": "catalog:dev",
"eslint-plugin-eslint-comments": "catalog:dev",
"eslint-plugin-import": "catalog:dev",
"prettier": "^3.5.3",
"ses": "workspace:^",
"typescript": "catalog:dev"
},
Expand Down
4 changes: 0 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@
"devDependencies": {
"@endo/stream": "workspace:^",
"ava": "catalog:dev",
"babel-eslint": "^10.1.0",
"eslint": "catalog:dev",
"eslint-config-prettier": "catalog:dev",
"eslint-plugin-eslint-comments": "catalog:dev",
"eslint-plugin-import": "catalog:dev",
"execa": "^9.3.0",
"typescript": "catalog:dev"
},
Expand Down
5 changes: 1 addition & 4 deletions packages/cli/src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ export const withInterrupt = async callback => {
}
};

export const withEndoBootstrap = (
{ os, process, clientName = 'cli' },
callback,
) =>
const withEndoBootstrap = ({ os, process, clientName = 'cli' }, callback) =>
withInterrupt(async ({ cancel, cancelled }) => {
const { username, homedir } = os.userInfo();
const temp = os.tmpdir();
Expand Down
1 change: 0 additions & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"c8": "catalog:dev",
"eslint": "catalog:dev",
"ses": "workspace:^",
"tsd": "catalog:dev",
"typescript": "catalog:dev"
},
"files": [
Expand Down
6 changes: 0 additions & 6 deletions packages/compartment-mapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"dependencies": {
"@endo/cjs-module-analyzer": "workspace:^",
"@endo/errors": "workspace:^",
"@endo/harden": "workspace:^",
"@endo/hex": "workspace:^",
"@endo/module-source": "workspace:^",
"@endo/path-compare": "workspace:^",
Expand All @@ -73,16 +72,11 @@
"devDependencies": {
"@endo/env-options": "workspace:^",
"@endo/evasive-transform": "workspace:^",
"@endo/eventual-send": "workspace:^",
"@endo/init": "workspace:^",
"@endo/ses-ava": "workspace:^",
"ava": "catalog:dev",
"babel-eslint": "^10.1.0",
"c8": "catalog:dev",
"eslint": "catalog:dev",
"eslint-config-prettier": "catalog:dev",
"eslint-plugin-eslint-comments": "catalog:dev",
"eslint-plugin-import": "catalog:dev",
"prettier": "^3.5.3",
"typescript": "catalog:dev"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/compartment-mapper/src/archive-lite.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const captureSourceLocations = async (sources, captureSourceLocation) => {
* @param {Sources} sources
* @returns {ArchiveResult}
*/
export const makeArchiveCompartmentMap = (compartmentMap, sources) => {
const makeArchiveCompartmentMap = (compartmentMap, sources) => {
/** @type {CompartmentsRenameFn<FileUrlString, string>} */
const renameCompartments = compartments => {
/** @type {Record<FileUrlString, string>} */
Expand Down
2 changes: 1 addition & 1 deletion packages/compartment-mapper/src/bundle-mjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const adaptReexport = reexportMap => {
return ret;
};

export const runtime = `\
const runtime = `\
function observeImports(map, importName, importIndex) {
for (const [name, observers] of map.get(importName)) {
const cell = cells[importIndex][name];
Expand Down
12 changes: 2 additions & 10 deletions packages/compartment-mapper/src/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,7 @@ const getBundlerKitForModule = (module, params) => {
* @param {BundleOptions} [options]
* @returns {Promise<string>}
*/
export const makeFunctorFromMap = async (
readPowers,
compartmentMap,
options,
) => {
const makeFunctorFromMap = async (readPowers, compartmentMap, options) => {
const {
moduleTransforms,
syncModuleTransforms,
Expand Down Expand Up @@ -659,11 +655,7 @@ ${m.bundlerKit.getFunctor()}`,
* @param {BundleOptions} [options]
* @returns {Promise<string>}
*/
export const makeScriptFromMap = async (
readPowers,
compartmentMap,
options,
) => {
const makeScriptFromMap = async (readPowers, compartmentMap, options) => {
// Functors partially apply the linker runtime.
// Scripts go on to apply static options and execute immediately.
const functor = await makeFunctorFromMap(readPowers, compartmentMap, options);
Expand Down
6 changes: 4 additions & 2 deletions packages/compartment-mapper/src/compartment-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ export const assertFileCompartmentMap = (
* @param {string} url
* @returns {asserts allegedCompartments is Record<string, DigestedCompartmentDescriptor>}
*/
export const assertDigestedCompartmentDescriptors = (
const assertDigestedCompartmentDescriptors = (
allegedCompartments,
url = '<unknown-compartment-map.json>',
) => {
Expand Down Expand Up @@ -862,8 +862,10 @@ export const assertDigestedCompartmentMap = (
* @param {unknown} allegedCompartmentMap
* @param {string} [url]
* @returns {asserts allegedCompartmentMap is PackageCompartmentMapDescriptor}
* @knipignore
*/
export const assertPackageCompartmentMap = (
// eslint-disable-next-line no-unused-vars
const assertPackageCompartmentMap = (
allegedCompartmentMap,
url = '<unknown-compartment-map.json>',
) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/compartment-mapper/src/infer-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function* interpretImports(imports, conditions, log) {
* with any recognized module's type, if implied by a tag.
* @yields {[string, string | null]}
*/
export const inferExportsEntries = function* inferExportsEntries(
const inferExportsEntries = function* inferExportsEntries(
{ main, module, exports },
conditions,
types,
Expand Down
8 changes: 0 additions & 8 deletions packages/compartment-mapper/src/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,3 @@ export const link = (
),
};
};

/**
* @param {PackageCompartmentMapDescriptor} compartmentMap
* @param {LinkOptions} options
* @deprecated Use {@link link}.
*/
export const assemble = (compartmentMap, options) =>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link.js is not exported, and assemble isn't used anywhere internally.

link(compartmentMap, options).compartment;
Loading
Loading