diff --git a/.changeset/fix-debarrel-jssg-runtime.md b/.changeset/fix-debarrel-jssg-runtime.md new file mode 100644 index 0000000..5effcea --- /dev/null +++ b/.changeset/fix-debarrel-jssg-runtime.md @@ -0,0 +1,5 @@ +--- +"debarrel": patch +--- + +Fix debarrel selector initialization in the current JSSG runtime. diff --git a/codemods/debarrel/scripts/codemod.ts b/codemods/debarrel/scripts/codemod.ts index f4d1e73..d191b2a 100644 --- a/codemods/debarrel/scripts/codemod.ts +++ b/codemods/debarrel/scripts/codemod.ts @@ -153,12 +153,12 @@ const codemod: Codemod = async (root, options) => { return rootNode.commitEdits(edits); }; -export const getSelector: GetSelector = () => { +export function getSelector(): ReturnType> { return { rule: { any: [{ kind: "import_statement" }, { kind: "export_statement" }], }, }; -}; +} export default codemod;