From 990c1be65b9b3281b8624c199b1e805e936ce3ed Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 9 Dec 2022 23:39:44 +0100 Subject: [PATCH 1/2] fixes --- code/lib/codemod/package.json | 2 +- code/lib/codemod/tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 2ee00d118c30..0d9d31817208 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -71,7 +71,7 @@ "entries": [ "./src/index.js", "./src/transforms/add-component-parameters.js", - "./src/transforms/csf-2-to-3.js", + "./src/transforms/csf-2-to-3.ts", "./src/transforms/csf-hoist-story-annotations.js", "./src/transforms/csf-to-mdx.js", "./src/transforms/move-builtin-addons.js", diff --git a/code/lib/codemod/tsconfig.json b/code/lib/codemod/tsconfig.json index cf1e09965901..551c2d6fff04 100644 --- a/code/lib/codemod/tsconfig.json +++ b/code/lib/codemod/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "skipLibCheck": true + "skipLibCheck": true, + "allowJs": true }, "include": ["src/**/*"] } From 10a298ff65119bd1cff8e3e3710963c21e4486d8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 9 Dec 2022 23:59:03 +0100 Subject: [PATCH 2/2] change to correct file-ext --- .../mdx-to-csf/{basic.input.js => basic.input.mdx} | 0 .../{component-id.input.js => component-id.input.mdx} | 0 .../mdx-to-csf/{decorators.input.js => decorators.input.mdx} | 0 .../{exclude-stories.input.js => exclude-stories.input.mdx} | 0 .../mdx-to-csf/{parameters.input.js => parameters.input.mdx} | 0 .../mdx-to-csf/{plaintext.input.js => plaintext.input.mdx} | 0 .../{story-function.input.js => story-function.input.mdx} | 0 .../{story-parameters.input.js => story-parameters.input.mdx} | 0 .../mdx-to-csf/{story-refs.input.js => story-refs.input.mdx} | 0 code/lib/codemod/tsconfig.json | 3 ++- 10 files changed, 2 insertions(+), 1 deletion(-) rename code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/{basic.input.js => basic.input.mdx} (100%) rename code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/{component-id.input.js => component-id.input.mdx} (100%) rename code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/{decorators.input.js => decorators.input.mdx} (100%) rename code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/{exclude-stories.input.js => exclude-stories.input.mdx} (100%) rename code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/{parameters.input.js => parameters.input.mdx} (100%) rename code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/{plaintext.input.js => plaintext.input.mdx} (100%) rename code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/{story-function.input.js => story-function.input.mdx} (100%) rename code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/{story-parameters.input.js => story-parameters.input.mdx} (100%) rename code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/{story-refs.input.js => story-refs.input.mdx} (100%) diff --git a/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/basic.input.js b/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/basic.input.mdx similarity index 100% rename from code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/basic.input.js rename to code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/basic.input.mdx diff --git a/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/component-id.input.js b/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/component-id.input.mdx similarity index 100% rename from code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/component-id.input.js rename to code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/component-id.input.mdx diff --git a/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/decorators.input.js b/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/decorators.input.mdx similarity index 100% rename from code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/decorators.input.js rename to code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/decorators.input.mdx diff --git a/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/exclude-stories.input.js b/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/exclude-stories.input.mdx similarity index 100% rename from code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/exclude-stories.input.js rename to code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/exclude-stories.input.mdx diff --git a/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/parameters.input.js b/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/parameters.input.mdx similarity index 100% rename from code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/parameters.input.js rename to code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/parameters.input.mdx diff --git a/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/plaintext.input.js b/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/plaintext.input.mdx similarity index 100% rename from code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/plaintext.input.js rename to code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/plaintext.input.mdx diff --git a/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-function.input.js b/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-function.input.mdx similarity index 100% rename from code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-function.input.js rename to code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-function.input.mdx diff --git a/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-parameters.input.js b/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-parameters.input.mdx similarity index 100% rename from code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-parameters.input.js rename to code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-parameters.input.mdx diff --git a/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-refs.input.js b/code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-refs.input.mdx similarity index 100% rename from code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-refs.input.js rename to code/lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-refs.input.mdx diff --git a/code/lib/codemod/tsconfig.json b/code/lib/codemod/tsconfig.json index 551c2d6fff04..b00caeb54501 100644 --- a/code/lib/codemod/tsconfig.json +++ b/code/lib/codemod/tsconfig.json @@ -4,5 +4,6 @@ "skipLibCheck": true, "allowJs": true }, - "include": ["src/**/*"] + "include": ["src/**/*"], + "exclude": ["node_modules", "__testfixtures__", "__tests__"] }