Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
`,
];
}
if (context.parentDescriptorSource) {
body.unshift(
t.importDeclaration(
[t.importSpecifier(t.identifier('parentDescriptor'), t.identifier('descriptor'))],
t.stringLiteral(context.parentDescriptorSource)
)
);
}
if (context.hasNamedExport) {
body.unshift(t.exportAllDeclaration(retargedPath));
}
const program = t.program(body);
traverse(program, transformTemplateLiterals(api).visitor, path.scope, path);
path.replaceWith(program);
path.stop();
},
};