Skip to content

Commit

Permalink
Merge divergent release master.
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Sep 8, 2020
2 parents ab1dece + 4c7d4b5 commit d1e711b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/transform-module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ record's metadata, evaluate the functor, call the functor with linkage.
import { makeModuleAnalyzer } from './src/main.js';
import * as babel from '@agoric/babel-standalone';
const analyze = makeModuleAnalyzer(babel.default);
const moduleStaticRecord = analyze(moduleSource);
const moduleFunctor = evaluateModuleFunctor(moduleStaticRecord.functorSource, /* ... */);
const moduleAnalysis = analyze(moduleSource);
const moduleFunctor = evaluateModuleFunctor(moduleAnalysis.functorSource, /* ... */);
moduleFunctor({
imports(importedVariableUpdaters, exportAlls) { /* ... */ },
liveVar: exportedVariableUpdaters,
Expand Down Expand Up @@ -124,11 +124,11 @@ to all modules that import the value.
```ts
// This is the signature of the analyze function, after composing it
// with Babel core.
type Analyzer = ({string: ModuleSource}) => StaticModuleRecord
type Analyzer = ({string: ModuleSource}) => ModuleAnalysis

type ModuleSource = string

type StaticModuleRecord = {
type ModuleAnalysis = {
exportAlls: ExportAlls,
imports: Imports,
liveExportMap: LiveExportMap,
Expand Down
5 changes: 2 additions & 3 deletions packages/transform-module/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,14 @@ const makeCreateStaticRecord = transformSource =>
})
//# sourceURL=${url}`;

const moduleStaticRecord = freeze({
const moduleAnalysis = freeze({
exportAlls: freeze(sourceOptions.exportAlls),
imports: freeze(sourceOptions.imports),
liveExportMap: freeze(sourceOptions.liveExportMap),
fixedExportMap: freeze(sourceOptions.fixedExportMap),
functorSource,
});
// console.log(moduleStaticRecord);
return moduleStaticRecord;
return moduleAnalysis;
};

export const makeModuleAnalyzer = babel => {
Expand Down

0 comments on commit d1e711b

Please sign in to comment.