function parseImports(text) {
const program = acorn.parse(text, {
ecmaVersion: 11,
sourceType: "module"
});
return program.body
.filter(node => node.type === "ImportDeclaration")
.map(node =>
[
new URL(node.source.value, url) + ""
,
node.specifiers.map( spec => spec.local.name ).join(", ")
]
);
}