From b7318b9ef7119850482b47439a904ae35197665d Mon Sep 17 00:00:00 2001 From: Mohab Sameh Date: Thu, 18 Apr 2024 19:40:10 +0200 Subject: [PATCH] remove codemod package readmes fix bull readmes fix mui readmes fix redwood readmes fix netlify sdk readmes fix ember readmes fix biome readme fix jest to vitest readme Update .codemodrc.json fix mocha readmes fix msw readmes Update .codemodrc.json fix next i18n readme Update README.md fix react router readmes fix typescript codemod readmes fix react codemod readmes fix cal readmes update codemod readmes --- packages/codemods/bull/bullmq/.codemodrc.json | 2 +- packages/codemods/bull/bullmq/README.md | 10 +---- .../.codemodrc.json | 2 +- .../README.md | 4 -- .../.codemodrc.json | 2 +- .../generate-metadata-tests-calcom/README.md | 4 -- .../generate-url-patterns/.codemodrc.json | 2 +- .../cal.com/generate-url-patterns/README.md | 4 -- .../.codemodrc.json | 2 +- .../5/app-controller-router-props/README.md | 10 +---- .../ember/5/array-wrapper/.codemodrc.json | 2 +- .../codemods/ember/5/array-wrapper/README.md | 10 +---- .../.codemodrc.json | 2 +- .../README.md | 10 +---- .../ember/5/cp-property-map/.codemodrc.json | 2 +- .../ember/5/cp-property-map/README.md | 10 +---- .../ember/5/cp-property/.codemodrc.json | 2 +- .../codemods/ember/5/cp-property/README.md | 10 +---- .../ember/5/cp-volatile/.codemodrc.json | 2 +- .../codemods/ember/5/cp-volatile/README.md | 10 +---- .../ember/5/deprecate-merge/.codemodrc.json | 2 +- .../ember/5/deprecate-merge/README.md | 10 +---- .../5/deprecate-router-events/.codemodrc.json | 2 +- .../ember/5/deprecate-router-events/README.md | 10 +---- .../5/ember-jquery-legacy/.codemodrc.json | 2 +- .../ember/5/ember-jquery-legacy/README.md | 10 +---- .../es5-getter-ember-codemod/.codemodrc.json | 2 +- .../5/es5-getter-ember-codemod/README.md | 10 +---- .../ember/5/fpe-computed/.codemodrc.json | 2 +- .../codemods/ember/5/fpe-computed/README.md | 10 +---- .../ember/5/fpe-observes/.codemodrc.json | 2 +- .../codemods/ember/5/fpe-observes/README.md | 10 +---- .../codemods/ember/5/fpe-on/.codemodrc.json | 2 +- packages/codemods/ember/5/fpe-on/README.md | 10 +---- .../ember/5/jquery-apis/.codemodrc.json | 2 +- .../codemods/ember/5/jquery-apis/README.md | 6 --- .../ember/5/jquery-event/.codemodrc.json | 2 +- .../codemods/ember/5/jquery-event/README.md | 10 +---- .../5/notify-property-change/.codemodrc.json | 2 +- .../ember/5/notify-property-change/README.md | 10 +---- .../5/object-new-constructor/.codemodrc.json | 2 +- .../ember/5/object-new-constructor/README.md | 10 +---- .../biome/migrate-rules/.codemodrc.json | 2 +- .../eslint/biome/migrate-rules/README.md | 8 +--- packages/codemods/jest/vitest/.codemodrc.json | 2 +- packages/codemods/jest/vitest/README.md | 4 -- .../migrate-configuration/.codemodrc.json | 2 +- .../vitest/migrate-configuration/README.md | 4 -- .../vitest/migrate-tests/.codemodrc.json | 2 +- .../mocha/vitest/migrate-tests/README.md | 4 -- .../mocha/vitest/recipe/.codemodrc.json | 2 +- .../codemods/mocha/vitest/recipe/README.md | 4 -- .../msw/2/callback-signature/.codemodrc.json | 2 +- .../msw/2/callback-signature/README.md | 16 +++----- .../codemods/msw/2/ctx-fetch/.codemodrc.json | 2 +- packages/codemods/msw/2/ctx-fetch/README.md | 10 +---- .../codemods/msw/2/imports/.codemodrc.json | 2 +- packages/codemods/msw/2/imports/README.md | 10 +---- .../.codemodrc.json | 2 +- .../2/lifecycle-events-signature/README.md | 10 +---- .../msw/2/print-handler/.codemodrc.json | 2 +- .../codemods/msw/2/print-handler/README.md | 10 +---- .../msw/2/req-passthrough/.codemodrc.json | 2 +- .../codemods/msw/2/req-passthrough/README.md | 10 +---- .../msw/2/request-changes/.codemodrc.json | 2 +- .../codemods/msw/2/request-changes/README.md | 10 +---- .../msw/2/response-usages/.codemodrc.json | 2 +- .../codemods/msw/2/response-usages/README.md | 26 +++++-------- .../codemods/msw/2/type-args/.codemodrc.json | 2 +- packages/codemods/msw/2/type-args/README.md | 24 +++++------- .../msw/2/upgrade-recipe/.codemodrc.json | 2 +- .../codemods/msw/2/upgrade-recipe/README.md | 18 +-------- .../mui/5/core-styles-import/.codemodrc.json | 2 +- .../mui/5/core-styles-import/README.md | 10 +---- .../addBuildEventContext/.codemodrc.json | 2 +- .../0.8.1/addBuildEventContext/README.md | 10 +---- .../addBuildEventHandler/.codemodrc.json | 2 +- .../0.8.1/addBuildEventHandler/README.md | 10 +---- .../disableBuildEventHandlers/.codemodrc.json | 2 +- .../0.8.1/disableBuildEventHandlers/README.md | 10 +---- .../enableBuildEventHandlers/.codemodrc.json | 2 +- .../0.8.1/enableBuildEventHandlers/README.md | 10 +---- .../0.8.1/exportZod/.codemodrc.json | 2 +- .../netlify-sdk/0.8.1/exportZod/README.md | 10 +---- .../0.8.4/addApiHandler/.codemodrc.json | 2 +- .../netlify-sdk/0.8.4/addApiHandler/README.md | 10 +---- .../createEnvironmentVariable/.codemodrc.json | 2 +- .../0.8.5/createEnvironmentVariable/README.md | 10 +---- .../createOrUpdateVariable/.codemodrc.json | 2 +- .../0.8.5/createOrUpdateVariable/README.md | 10 +---- .../createOrUpdateVariables/.codemodrc.json | 2 +- .../0.8.5/createOrUpdateVariables/README.md | 10 +---- .../deleteEnvironmentVariable/.codemodrc.json | 2 +- .../0.8.5/deleteEnvironmentVariable/README.md | 10 +---- .../.codemodrc.json | 2 +- .../deleteEnvironmentVariables/README.md | 10 +---- .../getEnvironmentVariables/.codemodrc.json | 2 +- .../0.8.5/getEnvironmentVariables/README.md | 10 +---- .../netlify-sdk-0.8.5-recipe/.codemodrc.json | 2 +- .../0.8.5/netlify-sdk-0.8.5-recipe/README.md | 4 -- .../patchEnvironmentVariable/.codemodrc.json | 2 +- .../0.8.5/patchEnvironmentVariable/README.md | 10 +---- .../updateEnvironmentVariable/.codemodrc.json | 2 +- .../0.8.5/updateEnvironmentVariable/README.md | 10 +---- .../next-i18next/copy-keys/.codemodrc.json | 2 +- .../codemods/next-i18next/copy-keys/README.md | 20 ++++------ .../codemods/next/13/ab-test/.codemodrc.json | 2 +- packages/codemods/next/13/ab-test/README.md | 4 -- .../app-directory-boilerplate/.codemodrc.json | 2 +- .../13/app-directory-boilerplate/README.md | 4 -- .../next/13/app-router-recipe/.codemodrc.json | 5 ++- .../next/13/app-router-recipe/README.md | 12 ++---- .../13/built-in-next-font/.codemodrc.json | 2 +- .../next/13/built-in-next-font/README.md | 4 -- .../comment-deletable-files/.codemodrc.json | 2 +- .../next/13/comment-deletable-files/README.md | 4 -- .../13/move-css-in-js-styles/.codemodrc.json | 2 +- .../next/13/move-css-in-js-styles/README.md | 4 -- .../13/new-image-experimental/.codemodrc.json | 2 +- .../next/13/new-image-experimental/README.md | 4 -- .../codemods/next/13/new-link/.codemodrc.json | 2 +- packages/codemods/next/13/new-link/README.md | 34 ----------------- .../.codemodrc.json | 2 +- .../13/next-image-to-legacy-image/README.md | 4 -- .../remove-get-static-props/.codemodrc.json | 2 +- .../next/13/remove-get-static-props/README.md | 34 ----------------- .../13/remove-next-export/.codemodrc.json | 2 +- .../next/13/remove-next-export/README.md | 4 -- .../13/replace-api-routes/.codemodrc.json | 2 +- .../next/13/replace-api-routes/README.md | 4 -- .../next/13/replace-next-head/.codemodrc.json | 2 +- .../next/13/replace-next-head/README.md | 4 -- .../13/replace-next-router/.codemodrc.json | 2 +- .../next/13/replace-next-router/README.md | 4 -- .../replace-use-search-params/.codemodrc.json | 2 +- .../13/replace-use-search-params/README.md | 4 -- .../.codemodrc.json | 2 +- .../13/upsert-use-client-directive/README.md | 4 -- .../.codemodrc.json | 2 +- .../14/metadata-to-viewport-export/README.md | 4 -- .../next/14/next-og-import/.codemodrc.json | 2 +- .../codemods/next/14/next-og-import/README.md | 4 -- .../4/add-exact-prop/.codemodrc.json | 2 +- .../react-router/4/add-exact-prop/README.md | 4 -- .../4/browser-router/.codemodrc.json | 2 +- .../react-router/4/browser-router/README.md | 4 -- .../4/create-hash-history/.codemodrc.json | 2 +- .../4/create-hash-history/README.md | 4 -- .../4/hash-router/.codemodrc.json | 2 +- .../react-router/4/hash-router/README.md | 4 -- .../4/index-route/.codemodrc.json | 2 +- .../react-router/4/index-route/README.md | 4 -- .../4/remove-with-props/.codemodrc.json | 2 +- .../4/remove-with-props/README.md | 4 -- .../4/rename-imports/.codemodrc.json | 2 +- .../react-router/4/rename-imports/README.md | 4 -- .../4/replace-location-query/.codemodrc.json | 2 +- .../4/replace-location-query/README.md | 36 +----------------- .../4/replace-nested-routes/.codemodrc.json | 2 +- .../4/replace-nested-routes/README.md | 4 -- .../4/replace-param-prop/.codemodrc.json | 2 +- .../4/replace-param-prop/README.md | 38 +------------------ .../4/use-history-hook/.codemodrc.json | 2 +- .../react-router/4/use-history-hook/README.md | 4 -- .../4/wrap-with-switch/.codemodrc.json | 2 +- .../react-router/4/wrap-with-switch/README.md | 4 -- .../6/compat-route/.codemodrc.json | 2 +- .../react-router/6/compat-route/README.md | 4 -- .../6/compat-router/.codemodrc.json | 2 +- .../react-router/6/compat-router/README.md | 4 -- .../6/link-to-props/.codemodrc.json | 2 +- .../react-router/6/link-to-props/README.md | 4 -- .../6/match-path-arguments/.codemodrc.json | 2 +- .../6/match-path-arguments/README.md | 4 -- .../6/navlink-exact-end/.codemodrc.json | 2 +- .../6/navlink-exact-end/README.md | 4 -- .../6/redirect-to-navigate/.codemodrc.json | 2 +- .../6/redirect-to-navigate/README.md | 4 -- .../6/remove-active-classname/.codemodrc.json | 2 +- .../6/remove-active-classname/README.md | 4 -- .../6/remove-active-style/.codemodrc.json | 2 +- .../6/remove-active-style/README.md | 4 -- .../6/remove-compat-router/.codemodrc.json | 2 +- .../6/remove-compat-router/README.md | 4 -- .../6/remove-go-hooks/.codemodrc.json | 2 +- .../react-router/6/remove-go-hooks/README.md | 4 -- .../.codemodrc.json | 2 +- .../6/remove-redirect-inside-switch/README.md | 4 -- .../6/rename-compat-imports/.codemodrc.json | 2 +- .../6/rename-compat-imports/README.md | 4 -- .../6/static-router-imports/.codemodrc.json | 2 +- .../6/static-router-imports/README.md | 4 -- .../6/use-location/.codemodrc.json | 2 +- .../react-router/6/use-location/README.md | 4 -- .../6/use-navigate/.codemodrc.json | 2 +- .../react-router/6/use-navigate/README.md | 4 -- .../react-router/6/use-params/.codemodrc.json | 2 +- .../react-router/6/use-params/README.md | 4 -- .../6/use-route-match/.codemodrc.json | 2 +- .../react-router/6/use-route-match/README.md | 4 -- .../remove-context-provider/.codemodrc.json | 2 +- .../19/remove-context-provider/README.md | 10 +---- .../19/remove-forward-ref/.codemodrc.json | 2 +- .../react/19/remove-forward-ref/README.md | 6 --- .../remove-memoization-hooks/.codemodrc.json | 2 +- .../19/remove-memoization-hooks/README.md | 4 -- .../19/replace-act-import/.codemodrc.json | 2 +- .../react/19/replace-act-import/README.md | 14 ++----- .../19/replace-use-form-state/.codemodrc.json | 2 +- .../react/19/replace-use-form-state/README.md | 14 ++----- .../react/19/use-context-hook/.codemodrc.json | 2 +- .../react/19/use-context-hook/README.md | 10 +---- .../prop-types-typescript/.codemodrc.json | 2 +- .../react/prop-types-typescript/README.md | 10 +---- .../.codemodrc.json | 2 +- .../replace-react-fc-typescript/README.md | 10 +---- .../core/4/auth-decoder/.codemodrc.json | 2 +- .../redwoodjs/core/4/auth-decoder/README.md | 12 ++---- .../remove-public-modifier/.codemodrc.json | 2 +- .../remove-public-modifier/README.md | 10 +---- .../use-template-literals/.codemodrc.json | 2 +- .../use-template-literals/README.md | 10 +---- 222 files changed, 254 insertions(+), 933 deletions(-) diff --git a/packages/codemods/bull/bullmq/.codemodrc.json b/packages/codemods/bull/bullmq/.codemodrc.json index a68ded819..d7d298474 100644 --- a/packages/codemods/bull/bullmq/.codemodrc.json +++ b/packages/codemods/bull/bullmq/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "bull/bullmq", "engine": "jscodeshift", diff --git a/packages/codemods/bull/bullmq/README.md b/packages/codemods/bull/bullmq/README.md index 2e7d90ef3..af74b077e 100644 --- a/packages/codemods/bull/bullmq/README.md +++ b/packages/codemods/bull/bullmq/README.md @@ -1,15 +1,9 @@ -# Bull to BullMQ - -## Description - This codemod provides straightforward changes to migrate from bull to bullmq. You have to manually create queue names for the existing queues in your application. You need to apply these names for the created workers in the files which previously used .process(). You will have to manually specify connection details if you used `createClient` method on `new Queue()` options before. Connection details should now also be specified for and `Worker` classes. -## Example - -### Before +## Before ```ts import Queue from 'bull'; @@ -64,7 +58,7 @@ queue.process(async function (job) { }); ``` -### After +## After ```ts import { Queue, DefaultJobOptions, QueueEvents, Worker } from "bullmq"; diff --git a/packages/codemods/cal.com/app-directory-boilerplate-calcom/.codemodrc.json b/packages/codemods/cal.com/app-directory-boilerplate-calcom/.codemodrc.json index 7e86cf6a1..509a79dce 100644 --- a/packages/codemods/cal.com/app-directory-boilerplate-calcom/.codemodrc.json +++ b/packages/codemods/cal.com/app-directory-boilerplate-calcom/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "cal.com/app-directory-boilerplate-calcom", "description": "This codemod provides boilerplate for the app directory.", diff --git a/packages/codemods/cal.com/app-directory-boilerplate-calcom/README.md b/packages/codemods/cal.com/app-directory-boilerplate-calcom/README.md index 2ed45f596..6ead6a0fa 100644 --- a/packages/codemods/cal.com/app-directory-boilerplate-calcom/README.md +++ b/packages/codemods/cal.com/app-directory-boilerplate-calcom/README.md @@ -1,7 +1,3 @@ -# App Directory Boilerplate for Cal.com - -## Description - The first step to migrate your pages to the `app` directory is to provide a new file structure, respected by the App router. This is attempted by this codemod, which reads the contents of your `pages` directory and creates the placeholder files. diff --git a/packages/codemods/cal.com/generate-metadata-tests-calcom/.codemodrc.json b/packages/codemods/cal.com/generate-metadata-tests-calcom/.codemodrc.json index 845704562..648e757e5 100644 --- a/packages/codemods/cal.com/generate-metadata-tests-calcom/.codemodrc.json +++ b/packages/codemods/cal.com/generate-metadata-tests-calcom/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "name": "generate-metadata-tests", "private": false, "engine": "filemod", diff --git a/packages/codemods/cal.com/generate-metadata-tests-calcom/README.md b/packages/codemods/cal.com/generate-metadata-tests-calcom/README.md index 7587573df..a8dc64b9b 100644 --- a/packages/codemods/cal.com/generate-metadata-tests-calcom/README.md +++ b/packages/codemods/cal.com/generate-metadata-tests-calcom/README.md @@ -1,7 +1,3 @@ -# Generate Metadata Tests for Cal.com - -## Description - This codemod generates metadata tests for all existing paths under the pages router. It uses the `testPath` argument to place the test file in the proper place. \ No newline at end of file diff --git a/packages/codemods/cal.com/generate-url-patterns/.codemodrc.json b/packages/codemods/cal.com/generate-url-patterns/.codemodrc.json index 0b1ca5c79..f62ee499e 100644 --- a/packages/codemods/cal.com/generate-url-patterns/.codemodrc.json +++ b/packages/codemods/cal.com/generate-url-patterns/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "name": "generate-url-patterns", "private": false, "engine": "filemod", diff --git a/packages/codemods/cal.com/generate-url-patterns/README.md b/packages/codemods/cal.com/generate-url-patterns/README.md index 9848a1b8c..4f5cba06d 100644 --- a/packages/codemods/cal.com/generate-url-patterns/README.md +++ b/packages/codemods/cal.com/generate-url-patterns/README.md @@ -1,5 +1 @@ -# Generate URL Patterns for Cal.com - -## Description - This codemod generates URL Patterns for all existing paths under the apps router to be placed in the middleware file that controls which pages are active. \ No newline at end of file diff --git a/packages/codemods/ember/5/app-controller-router-props/.codemodrc.json b/packages/codemods/ember/5/app-controller-router-props/.codemodrc.json index bd9b975cd..e5322aba6 100644 --- a/packages/codemods/ember/5/app-controller-router-props/.codemodrc.json +++ b/packages/codemods/ember/5/app-controller-router-props/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/app-controller-router-props", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/app-controller-router-props/README.md b/packages/codemods/ember/5/app-controller-router-props/README.md index 953710406..bed97d60f 100644 --- a/packages/codemods/ember/5/app-controller-router-props/README.md +++ b/packages/codemods/ember/5/app-controller-router-props/README.md @@ -1,13 +1,7 @@ -# App Controller Router Props - -## Description - This codemod replaces all occurrences of `this.currentRouteName` with `this.router.currentRouteName` and `this.currentPath` with `this.router.currentPath`. -## Example - -### Before: +## Before ```jsx import Controller from '@ember/controller'; @@ -29,7 +23,7 @@ export default Controller.extend({ }); ``` -### After: +## After ```tsx import Controller from '@ember/controller'; diff --git a/packages/codemods/ember/5/array-wrapper/.codemodrc.json b/packages/codemods/ember/5/array-wrapper/.codemodrc.json index 21c5f99e8..521f8672c 100644 --- a/packages/codemods/ember/5/array-wrapper/.codemodrc.json +++ b/packages/codemods/ember/5/array-wrapper/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/array-wrapper", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/array-wrapper/README.md b/packages/codemods/ember/5/array-wrapper/README.md index 02560974c..cf0585f8b 100644 --- a/packages/codemods/ember/5/array-wrapper/README.md +++ b/packages/codemods/ember/5/array-wrapper/README.md @@ -1,12 +1,6 @@ -# Array Wrapper - -## Description - This codemod removes any usage of `new` with `A`, and calls `A` as a standard function. -## Example - -### Before: +## Before ```jsx import { A } from '@ember/array'; @@ -14,7 +8,7 @@ import { A } from '@ember/array'; let arr = new A(); ``` -### After: +## After ```tsx import { A as emberA } from '@ember/array'; diff --git a/packages/codemods/ember/5/convert-module-for-to-setup-test/.codemodrc.json b/packages/codemods/ember/5/convert-module-for-to-setup-test/.codemodrc.json index 98a4da68a..87b26aa40 100644 --- a/packages/codemods/ember/5/convert-module-for-to-setup-test/.codemodrc.json +++ b/packages/codemods/ember/5/convert-module-for-to-setup-test/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/convert-module-for-to-setup-test", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/convert-module-for-to-setup-test/README.md b/packages/codemods/ember/5/convert-module-for-to-setup-test/README.md index f9c334f10..010c98bb2 100644 --- a/packages/codemods/ember/5/convert-module-for-to-setup-test/README.md +++ b/packages/codemods/ember/5/convert-module-for-to-setup-test/README.md @@ -1,12 +1,6 @@ -# Convert moduleFor to setupTest - -## Description - This codemod transforms from the older `moduleFor*` syntax of `ember-qunit@2` to the newer `setup*Test` syntax. -## Example - -### Before: +## Before ```tsx import { moduleFor, test } from 'ember-qunit'; @@ -20,7 +14,7 @@ test('should allow messages to be queued', function (assert) { }); ``` -### After: +## After ```tsx import { setupTest } from 'ember-qunit'; diff --git a/packages/codemods/ember/5/cp-property-map/.codemodrc.json b/packages/codemods/ember/5/cp-property-map/.codemodrc.json index e50d7eac3..20228d99d 100644 --- a/packages/codemods/ember/5/cp-property-map/.codemodrc.json +++ b/packages/codemods/ember/5/cp-property-map/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/cp-property-map", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/cp-property-map/README.md b/packages/codemods/ember/5/cp-property-map/README.md index 7632db7b3..2823a005e 100644 --- a/packages/codemods/ember/5/cp-property-map/README.md +++ b/packages/codemods/ember/5/cp-property-map/README.md @@ -1,12 +1,6 @@ -# Cp Property Map - -## Description - `.property()` is a modifier that adds additional property dependencies to an existing computed property. For `filter`, `map`, and `sort` computed property macros, this codemod ensures they receive an array of additional dependent keys as a second parameter. -## Example - -### Before: +## Before ```jsx const Person = EmberObject.extend({ @@ -16,7 +10,7 @@ const Person = EmberObject.extend({ }); ``` -### After: +## After ```tsx const Person = EmberObject.extend({ diff --git a/packages/codemods/ember/5/cp-property/.codemodrc.json b/packages/codemods/ember/5/cp-property/.codemodrc.json index 8c099ed8b..11e3edb6d 100644 --- a/packages/codemods/ember/5/cp-property/.codemodrc.json +++ b/packages/codemods/ember/5/cp-property/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/cp-property", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/cp-property/README.md b/packages/codemods/ember/5/cp-property/README.md index 61d5fc0ce..ba9bdea75 100644 --- a/packages/codemods/ember/5/cp-property/README.md +++ b/packages/codemods/ember/5/cp-property/README.md @@ -1,12 +1,6 @@ -# Cp Property - -## Description - `.property()` is a modifier that adds additional property dependencies to an existing computed property. This codemod moves the dependencies to the main computed property definition. -## Example - -### Before: +## Before ```jsx const Person = EmberObject.extend({ @@ -16,7 +10,7 @@ const Person = EmberObject.extend({ }); ``` -### After: +## After ```tsx const Person = EmberObject.extend({ diff --git a/packages/codemods/ember/5/cp-volatile/.codemodrc.json b/packages/codemods/ember/5/cp-volatile/.codemodrc.json index af13a2551..a9c865165 100644 --- a/packages/codemods/ember/5/cp-volatile/.codemodrc.json +++ b/packages/codemods/ember/5/cp-volatile/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/cp-volatile", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/cp-volatile/README.md b/packages/codemods/ember/5/cp-volatile/README.md index 851c1d202..5209be6e8 100644 --- a/packages/codemods/ember/5/cp-volatile/README.md +++ b/packages/codemods/ember/5/cp-volatile/README.md @@ -1,12 +1,6 @@ -# Cp Volatile - -## Description - This codemod removes all calls to `volatile()` and ensures that native getters are directly used. -## Example - -### Before: +## Before ```jsx const Person = EmberObject.extend({ @@ -16,7 +10,7 @@ const Person = EmberObject.extend({ }); ``` -### After: +## After ```tsx const Person = EmberObject.extend({ diff --git a/packages/codemods/ember/5/deprecate-merge/.codemodrc.json b/packages/codemods/ember/5/deprecate-merge/.codemodrc.json index 7e42f7c0b..60b1dac35 100644 --- a/packages/codemods/ember/5/deprecate-merge/.codemodrc.json +++ b/packages/codemods/ember/5/deprecate-merge/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/deprecate-merge", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/deprecate-merge/README.md b/packages/codemods/ember/5/deprecate-merge/README.md index 3930f76c5..5fdd0aa1c 100644 --- a/packages/codemods/ember/5/deprecate-merge/README.md +++ b/packages/codemods/ember/5/deprecate-merge/README.md @@ -1,12 +1,6 @@ -# Deprecate Merge - -## Description - This codemod replaces all calls to `Ember.merge` with `Ember.assign`. -## Example - -### Before: +## Before ```jsx import { merge } from '@ember/polyfills'; @@ -16,7 +10,7 @@ var b = { last: 'Katz' }; merge(a, b); ``` -### After: +## After ```tsx import { assign } from '@ember/polyfills'; diff --git a/packages/codemods/ember/5/deprecate-router-events/.codemodrc.json b/packages/codemods/ember/5/deprecate-router-events/.codemodrc.json index abaca9d6b..3647feca1 100644 --- a/packages/codemods/ember/5/deprecate-router-events/.codemodrc.json +++ b/packages/codemods/ember/5/deprecate-router-events/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/deprecate-router-events", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/deprecate-router-events/README.md b/packages/codemods/ember/5/deprecate-router-events/README.md index 0213a9015..fff138f7e 100644 --- a/packages/codemods/ember/5/deprecate-router-events/README.md +++ b/packages/codemods/ember/5/deprecate-router-events/README.md @@ -1,12 +1,6 @@ -# Deprecate Router Events - -## Description - This codemod removes all calls to `willTransition` or `didTransition` events on the Router via usage of `routeWillChange` event listener and `routeDidChange` event listener. -## Example - -### Before: +## Before ```jsx import Router from '@ember/routing/router'; @@ -32,7 +26,7 @@ export default Router.extend({ }); ``` -### After: +## After ```tsx import Router from '@ember/routing/router'; diff --git a/packages/codemods/ember/5/ember-jquery-legacy/.codemodrc.json b/packages/codemods/ember/5/ember-jquery-legacy/.codemodrc.json index 1a9e89ad5..dde2d1e79 100644 --- a/packages/codemods/ember/5/ember-jquery-legacy/.codemodrc.json +++ b/packages/codemods/ember/5/ember-jquery-legacy/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/ember-jquery-legacy", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/ember-jquery-legacy/README.md b/packages/codemods/ember/5/ember-jquery-legacy/README.md index acd2bf8d3..8e08382f3 100644 --- a/packages/codemods/ember/5/ember-jquery-legacy/README.md +++ b/packages/codemods/ember/5/ember-jquery-legacy/README.md @@ -1,12 +1,6 @@ -# Ember Jquery Legacy - -## Description - Using event object APIs that are specific to `jQuery.Event`, such as `originalEvent`, is deprecated in Ember.js v3.3. This codemod ensures the access to the native event without triggering any deprecations via wrapping the `event` with the `normalizeEvent` function provided by `ember-jquery-legacy`. -## Example - -### Before: +## Before ```jsx export default Component.extend({ @@ -16,7 +10,7 @@ export default Component.extend({ }); ``` -### After: +## After ```tsx import { normalizeEvent } from 'ember-jquery-legacy'; diff --git a/packages/codemods/ember/5/es5-getter-ember-codemod/.codemodrc.json b/packages/codemods/ember/5/es5-getter-ember-codemod/.codemodrc.json index 8afebc9b8..6edfb65e8 100644 --- a/packages/codemods/ember/5/es5-getter-ember-codemod/.codemodrc.json +++ b/packages/codemods/ember/5/es5-getter-ember-codemod/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/es5-getter-ember-codemod", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/es5-getter-ember-codemod/README.md b/packages/codemods/ember/5/es5-getter-ember-codemod/README.md index 875ccc913..64a54a87a 100644 --- a/packages/codemods/ember/5/es5-getter-ember-codemod/README.md +++ b/packages/codemods/ember/5/es5-getter-ember-codemod/README.md @@ -1,12 +1,6 @@ -# ES5 Getter Ember Codemod - -## Description - This codemod transforms `get()` to `getProperties()` to use traditional object dot notation. This standard was proposed by Ember.js team in https://github.com/emberjs/rfcs/blob/master/text/0281-es5-getters.md. -## Example - -### Before: +## Before ```jsx let chancancode = Person.create({ firstName: 'Godfrey', lastName: 'Chan' }); @@ -28,7 +22,7 @@ controller.get('foo.bar'); controller.get('foo-bar'); ``` -### After: +## After ```tsx let chancancode = Person.create({ firstName: 'Godfrey', lastName: 'Chan' }); diff --git a/packages/codemods/ember/5/fpe-computed/.codemodrc.json b/packages/codemods/ember/5/fpe-computed/.codemodrc.json index aa79a2980..6044ecb3d 100644 --- a/packages/codemods/ember/5/fpe-computed/.codemodrc.json +++ b/packages/codemods/ember/5/fpe-computed/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/fpe-computed", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/fpe-computed/README.md b/packages/codemods/ember/5/fpe-computed/README.md index b9c3c11b6..e4e88c809 100644 --- a/packages/codemods/ember/5/fpe-computed/README.md +++ b/packages/codemods/ember/5/fpe-computed/README.md @@ -1,10 +1,4 @@ -# Fpe Computed - -## Description - -## Example - -### Before: +## Before ```jsx import EmberObject from '@ember/object'; @@ -30,7 +24,7 @@ client.set('lastName', 'Fuller'); client.get('fullName'); // 'Betty Fuller' ``` -### After: +## After ```tsx import EmberObject, { computed } from '@ember/object'; diff --git a/packages/codemods/ember/5/fpe-observes/.codemodrc.json b/packages/codemods/ember/5/fpe-observes/.codemodrc.json index 4d6532a97..39854cc43 100644 --- a/packages/codemods/ember/5/fpe-observes/.codemodrc.json +++ b/packages/codemods/ember/5/fpe-observes/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/fpe-observes", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/fpe-observes/README.md b/packages/codemods/ember/5/fpe-observes/README.md index a824ce011..6a5e184f6 100644 --- a/packages/codemods/ember/5/fpe-observes/README.md +++ b/packages/codemods/ember/5/fpe-observes/README.md @@ -1,10 +1,4 @@ -# Fpe Observes - -## Description - -## Example - -### Before: +## Before ```jsx import EmberObject from '@ember/object'; @@ -16,7 +10,7 @@ export default EmberObject.extend({ }); ``` -### After: +## After ```tsx import EmberObject from '@ember/object'; diff --git a/packages/codemods/ember/5/fpe-on/.codemodrc.json b/packages/codemods/ember/5/fpe-on/.codemodrc.json index b24220d3e..5cd048a11 100644 --- a/packages/codemods/ember/5/fpe-on/.codemodrc.json +++ b/packages/codemods/ember/5/fpe-on/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/fpe-on", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/fpe-on/README.md b/packages/codemods/ember/5/fpe-on/README.md index 4c5ea2b5a..d15996390 100644 --- a/packages/codemods/ember/5/fpe-on/README.md +++ b/packages/codemods/ember/5/fpe-on/README.md @@ -1,10 +1,4 @@ -# Fpe On - -## Description - -## Example - -### Before: +## Before ```jsx import EmberObject from '@ember/object'; @@ -21,7 +15,7 @@ let job = Job.create(); sendEvent(job, 'completed'); // Logs 'Job completed!' ``` -### After: +## After ```tsx import EmberObject from '@ember/object'; diff --git a/packages/codemods/ember/5/jquery-apis/.codemodrc.json b/packages/codemods/ember/5/jquery-apis/.codemodrc.json index a93bb61dd..f8cac0d42 100644 --- a/packages/codemods/ember/5/jquery-apis/.codemodrc.json +++ b/packages/codemods/ember/5/jquery-apis/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/jquery-apis", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/jquery-apis/README.md b/packages/codemods/ember/5/jquery-apis/README.md index cc2ce8ccc..c0f6d872c 100644 --- a/packages/codemods/ember/5/jquery-apis/README.md +++ b/packages/codemods/ember/5/jquery-apis/README.md @@ -1,11 +1,5 @@ -# Jquery Apis - -## Description - This codemod replaces all calls to `this.$()` inside of an `Ember.Component` with `this.element` property, which provides a reference to a native DOM element. -## Example - ## Events ### Before: diff --git a/packages/codemods/ember/5/jquery-event/.codemodrc.json b/packages/codemods/ember/5/jquery-event/.codemodrc.json index 090a13e81..a19de29b4 100644 --- a/packages/codemods/ember/5/jquery-event/.codemodrc.json +++ b/packages/codemods/ember/5/jquery-event/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/jquery-event", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/jquery-event/README.md b/packages/codemods/ember/5/jquery-event/README.md index abb850bec..116f65daa 100644 --- a/packages/codemods/ember/5/jquery-event/README.md +++ b/packages/codemods/ember/5/jquery-event/README.md @@ -1,12 +1,6 @@ -# Jquery Event - -## Description - Using event object APIs that are specific to `jQuery.Event`, such as `originalEvent`, is deprecated in Ember.js v3.3. This codemod removes all calls to `originalEvent` in case of accessing properties that work with jQuery events as well as native events. -## Example - -### Before: +## Before ```jsx // your event handler: @@ -17,7 +11,7 @@ export default Component.extend({ }); ``` -### After: +## After ```tsx // your event handler: diff --git a/packages/codemods/ember/5/notify-property-change/.codemodrc.json b/packages/codemods/ember/5/notify-property-change/.codemodrc.json index 4d6b98b5f..d5ef2d180 100644 --- a/packages/codemods/ember/5/notify-property-change/.codemodrc.json +++ b/packages/codemods/ember/5/notify-property-change/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/notify-property-change", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/notify-property-change/README.md b/packages/codemods/ember/5/notify-property-change/README.md index 7af67ebce..f50fe079a 100644 --- a/packages/codemods/ember/5/notify-property-change/README.md +++ b/packages/codemods/ember/5/notify-property-change/README.md @@ -1,12 +1,6 @@ -# Notify Property Change - -## Description - This codemod removes all calls to `propertyWillChange` and replaces all calls to `propertyDidChange` with `notifyPropertyChange`. -## Example - -### Before: +## Before ```jsx Ember.propertyWillChange(object, 'someProperty'); @@ -18,7 +12,7 @@ doStuff(object); object.propertyDidChange('someProperty'); ``` -### After: +## After ```tsx doStuff(object); diff --git a/packages/codemods/ember/5/object-new-constructor/.codemodrc.json b/packages/codemods/ember/5/object-new-constructor/.codemodrc.json index 5826fe61d..d6b80b773 100644 --- a/packages/codemods/ember/5/object-new-constructor/.codemodrc.json +++ b/packages/codemods/ember/5/object-new-constructor/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "ember/5/object-new-constructor", "engine": "jscodeshift", diff --git a/packages/codemods/ember/5/object-new-constructor/README.md b/packages/codemods/ember/5/object-new-constructor/README.md index 50d51b472..990f91e82 100644 --- a/packages/codemods/ember/5/object-new-constructor/README.md +++ b/packages/codemods/ember/5/object-new-constructor/README.md @@ -1,12 +1,6 @@ -# Object New Constructor - -## Description - `new EmberObject()` is deprecated in Ember.js v3.9 in favor of constructing instances of `EmberObject` and its subclasses. This codemod replaces all calls to `new EmberObject()` with `EmberObject.create()` and adds a `constructor` function to classes that extend from `EmberObject` so that the classes no longer extend from `EmberObject`. -## Example - -### Before: +## Before ```jsx let obj1 = new EmberObject(); @@ -16,7 +10,7 @@ const Foo = EmberObject.extend(); let foo = new Foo({ bar: 123 }); ``` -### After: +## After ```tsx let obj1 = EmberObject.create(); diff --git a/packages/codemods/eslint/biome/migrate-rules/.codemodrc.json b/packages/codemods/eslint/biome/migrate-rules/.codemodrc.json index 1cb146f39..26bfed1f6 100644 --- a/packages/codemods/eslint/biome/migrate-rules/.codemodrc.json +++ b/packages/codemods/eslint/biome/migrate-rules/.codemodrc.json @@ -1,5 +1,5 @@ { - "version": "1.0.1", + "version": "1.0.2", "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", "name": "biome/migrate-rules", "private": false, diff --git a/packages/codemods/eslint/biome/migrate-rules/README.md b/packages/codemods/eslint/biome/migrate-rules/README.md index 408b7cfcb..fa39b1d8c 100644 --- a/packages/codemods/eslint/biome/migrate-rules/README.md +++ b/packages/codemods/eslint/biome/migrate-rules/README.md @@ -1,10 +1,6 @@ -# Migrate eslintrc to biome.json - -## Description - This codemod replaces configuration files for ESLint with corresponding biome.json for all the found rules. It also replaces Prettier configuration. -### NOTE: +## Note: This codemod accepts manual user input, which is required to migrate away from eslint. In order to run it properly, run the following command: @@ -142,4 +138,4 @@ This codemod requires internet connection. "indentStyle": "tab" } } -``` \ No newline at end of file +``` diff --git a/packages/codemods/jest/vitest/.codemodrc.json b/packages/codemods/jest/vitest/.codemodrc.json index 93a80000b..86c451bf4 100644 --- a/packages/codemods/jest/vitest/.codemodrc.json +++ b/packages/codemods/jest/vitest/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "jest/vitest", "engine": "jscodeshift", diff --git a/packages/codemods/jest/vitest/README.md b/packages/codemods/jest/vitest/README.md index 7bc55fe46..2d0b1bd92 100644 --- a/packages/codemods/jest/vitest/README.md +++ b/packages/codemods/jest/vitest/README.md @@ -1,5 +1 @@ -# Migrate from jest to vitest - -## Description - Run this codemod to upgrade your codebase from using jest to vitest. \ No newline at end of file diff --git a/packages/codemods/mocha/vitest/migrate-configuration/.codemodrc.json b/packages/codemods/mocha/vitest/migrate-configuration/.codemodrc.json index 3b5209898..03ad64710 100644 --- a/packages/codemods/mocha/vitest/migrate-configuration/.codemodrc.json +++ b/packages/codemods/mocha/vitest/migrate-configuration/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "name": "mocha/vitest/migrate-config", "private": false, "engine": "filemod", diff --git a/packages/codemods/mocha/vitest/migrate-configuration/README.md b/packages/codemods/mocha/vitest/migrate-configuration/README.md index 4d327e1ec..d61179695 100644 --- a/packages/codemods/mocha/vitest/migrate-configuration/README.md +++ b/packages/codemods/mocha/vitest/migrate-configuration/README.md @@ -1,7 +1,3 @@ -# Migrate Configuration from Mocha to Vitest - -## Description - Run this codemod to upgrade configuration files that need to be changed after migrating from `mocha` to `vitest`. ## Example diff --git a/packages/codemods/mocha/vitest/migrate-tests/.codemodrc.json b/packages/codemods/mocha/vitest/migrate-tests/.codemodrc.json index 93f22593c..456d69c10 100644 --- a/packages/codemods/mocha/vitest/migrate-tests/.codemodrc.json +++ b/packages/codemods/mocha/vitest/migrate-tests/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "mocha/vitest/migrate-test", "engine": "jscodeshift", diff --git a/packages/codemods/mocha/vitest/migrate-tests/README.md b/packages/codemods/mocha/vitest/migrate-tests/README.md index bdaf91883..677f63711 100644 --- a/packages/codemods/mocha/vitest/migrate-tests/README.md +++ b/packages/codemods/mocha/vitest/migrate-tests/README.md @@ -1,7 +1,3 @@ -# Migrate Tests from Mocha to Vitest - -## Description - Run this codemod to upgrade your codebase from using mocha to vitest. ## Example diff --git a/packages/codemods/mocha/vitest/recipe/.codemodrc.json b/packages/codemods/mocha/vitest/recipe/.codemodrc.json index 03d29cf2c..a78e5e76c 100644 --- a/packages/codemods/mocha/vitest/recipe/.codemodrc.json +++ b/packages/codemods/mocha/vitest/recipe/.codemodrc.json @@ -1,7 +1,7 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", "name": "mocha/vitest/recipe", - "version": "1.0.0", + "version": "1.0.1", "private": false, "engine": "recipe", "names": ["mocha/vitest/migrate-config", "mocha/vitest/migrate-test"], diff --git a/packages/codemods/mocha/vitest/recipe/README.md b/packages/codemods/mocha/vitest/recipe/README.md index 7ae7b7b41..9add3bb37 100644 --- a/packages/codemods/mocha/vitest/recipe/README.md +++ b/packages/codemods/mocha/vitest/recipe/README.md @@ -1,7 +1,3 @@ -# Mocha to Vitest Migration Recipe - -## Description - This recipe is a set of codemods that will upgrade your project from using `mocha` to `vitest`. The recipe includes the following codemods: diff --git a/packages/codemods/msw/2/callback-signature/.codemodrc.json b/packages/codemods/msw/2/callback-signature/.codemodrc.json index 0b333cd56..d41cd5391 100644 --- a/packages/codemods/msw/2/callback-signature/.codemodrc.json +++ b/packages/codemods/msw/2/callback-signature/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "msw/2/callback-signature", "engine": "ts-morph", diff --git a/packages/codemods/msw/2/callback-signature/README.md b/packages/codemods/msw/2/callback-signature/README.md index 0845e2712..34f49beb1 100644 --- a/packages/codemods/msw/2/callback-signature/README.md +++ b/packages/codemods/msw/2/callback-signature/README.md @@ -1,18 +1,12 @@ -# Replace MSW handler signature - -## Description - Following the original msw upgrade guide, the signature of the request handler have changed. This codemod hard replaces the callback signature to the new one and cleans up unused variables. NOTE: This codemod should be applied after running all the other codemods present in the `upgrade-recipe` that are related to `req`, `res`, `ctx` objects. On its own, this codemod makes no sense to be run, and will most likely not do what you want. -### WARNING +## WARNING This codemod runs `.fixUnusedIdentifiers()` on a source file you are running it on. This would remove any unused declarations in the file. This is due to atomicity of this mod, which blindly inserts the callback structure into each msw handler callback and then cleans up the variables that are not used. -## Example - -### Before +## Before ```ts import { http } from 'msw'; @@ -22,7 +16,7 @@ http.get('/resource', (req, res, ctx) => { }); ``` -### After +## After ```ts import { http } from 'msw'; @@ -32,7 +26,7 @@ http.get('/resource', () => { }); ``` -### Before +## Before ```ts import { http } from 'msw'; @@ -48,7 +42,7 @@ http.get('/resource', (req, res, ctx) => { }); ``` -### After +## After ```ts import { http } from 'msw'; diff --git a/packages/codemods/msw/2/ctx-fetch/.codemodrc.json b/packages/codemods/msw/2/ctx-fetch/.codemodrc.json index f0fb90412..a289a317d 100644 --- a/packages/codemods/msw/2/ctx-fetch/.codemodrc.json +++ b/packages/codemods/msw/2/ctx-fetch/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "msw/2/ctx-fetch", "engine": "ts-morph", diff --git a/packages/codemods/msw/2/ctx-fetch/README.md b/packages/codemods/msw/2/ctx-fetch/README.md index a0b60ddb6..202b8fea5 100644 --- a/packages/codemods/msw/2/ctx-fetch/README.md +++ b/packages/codemods/msw/2/ctx-fetch/README.md @@ -1,16 +1,10 @@ -# Replace ctx.fetch() calls - -## Description - `ctx.fetch(req)` is now meant to be called as `fetch(bypass(req))` where `bypass` is a new function available in the `msw` library. Changes applied by this codemod: - `ctx.fetch(req)` is replaced with `fetch(bypass(req))`. NOTE: The `bypass` call is meant to wrap the new `request` object available on the callback argument. This object is not being destructured in this codemod, so you will have to do it manually or run a `callback-signature` codemod that will do that and replace the reference for you. -## Example - -### Before +## Before ```ts import { rest } from 'msw'; @@ -24,7 +18,7 @@ const handlers: RestHandler[] = [ ]; ``` -### After +## After ```ts import { rest } from 'msw'; diff --git a/packages/codemods/msw/2/imports/.codemodrc.json b/packages/codemods/msw/2/imports/.codemodrc.json index 243901205..b07262219 100644 --- a/packages/codemods/msw/2/imports/.codemodrc.json +++ b/packages/codemods/msw/2/imports/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "msw/2/imports", "engine": "ts-morph", diff --git a/packages/codemods/msw/2/imports/README.md b/packages/codemods/msw/2/imports/README.md index 6c9fef9fd..ecf9e3e79 100644 --- a/packages/codemods/msw/2/imports/README.md +++ b/packages/codemods/msw/2/imports/README.md @@ -1,16 +1,10 @@ -# Replace MSW Imports - -## Description - Following the original msw [upgrade guide](https://mswjs.io/docs/migrations/1.x-to-2.x/#imports), there are certain imports that changed their location and/or naming. This codemod will adjust your imports to the new location and naming. - `setupWorker` is now imported from `msw/browser` - `rest` from `msw` is now named `http` - `RestHandler` from `msw` is now named `HttpHandler` -## Example - -### Before +## Before ```ts import { rest as caller, RestHandler, setupWorker } from 'msw'; @@ -22,7 +16,7 @@ const handlers: RestHandler[] = [ ]; ``` -### After +## After ```ts import { http as caller, HttpHandler } from 'msw'; diff --git a/packages/codemods/msw/2/lifecycle-events-signature/.codemodrc.json b/packages/codemods/msw/2/lifecycle-events-signature/.codemodrc.json index d429551c2..1de740aa8 100644 --- a/packages/codemods/msw/2/lifecycle-events-signature/.codemodrc.json +++ b/packages/codemods/msw/2/lifecycle-events-signature/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "msw/2/lifecycle-events-signature", "engine": "ts-morph", diff --git a/packages/codemods/msw/2/lifecycle-events-signature/README.md b/packages/codemods/msw/2/lifecycle-events-signature/README.md index 36bcd786d..a5dd6a36c 100644 --- a/packages/codemods/msw/2/lifecycle-events-signature/README.md +++ b/packages/codemods/msw/2/lifecycle-events-signature/README.md @@ -1,12 +1,6 @@ -# Replace lifecycle events callback signature [BETA] - -## Description - In msw v2, lifecycle events callback methods have changed their signature. This codemod replaces usages if its arguments with the new ones. -## Example - -### Before +## Before ```ts server.events.on('request:start', (req, reqId) => { @@ -14,7 +8,7 @@ server.events.on('request:start', (req, reqId) => { }); ``` -### After +## After ```ts server.events.on('request:start', ({ request, requestId }) => { diff --git a/packages/codemods/msw/2/print-handler/.codemodrc.json b/packages/codemods/msw/2/print-handler/.codemodrc.json index 962fecae4..0fb7d6dd5 100644 --- a/packages/codemods/msw/2/print-handler/.codemodrc.json +++ b/packages/codemods/msw/2/print-handler/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "msw/2/print-handler", "engine": "ts-morph", diff --git a/packages/codemods/msw/2/print-handler/README.md b/packages/codemods/msw/2/print-handler/README.md index e18846f5e..3d177e2d3 100644 --- a/packages/codemods/msw/2/print-handler/README.md +++ b/packages/codemods/msw/2/print-handler/README.md @@ -1,18 +1,12 @@ -# Replace printHandlers() calls - -## Description - A new way of listing all handlers is preferred in msw v2. This codemod replaces `printHandlers()` calls with the new way of doing that. -## Example - -### Before +## Before ```ts worker.printHandlers(); ``` -### After +## After ```ts worker.listHandlers().forEach((handler) => { diff --git a/packages/codemods/msw/2/req-passthrough/.codemodrc.json b/packages/codemods/msw/2/req-passthrough/.codemodrc.json index 67a146847..feadedf1a 100644 --- a/packages/codemods/msw/2/req-passthrough/.codemodrc.json +++ b/packages/codemods/msw/2/req-passthrough/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "msw/2/req-passthrough", "engine": "ts-morph", diff --git a/packages/codemods/msw/2/req-passthrough/README.md b/packages/codemods/msw/2/req-passthrough/README.md index 34a3e8b8c..8cae87988 100644 --- a/packages/codemods/msw/2/req-passthrough/README.md +++ b/packages/codemods/msw/2/req-passthrough/README.md @@ -1,12 +1,6 @@ -# Replace printHandlers() calls - -## Description - A new way of calling a passthrough is available in msw v2. This codemod replaces `req.passthrough()` calls with the new way of doing that using exported function. -## Example - -### Before +## Before ```ts rest.get('/resource', (req, res, ctx) => { @@ -14,7 +8,7 @@ rest.get('/resource', (req, res, ctx) => { }); ``` -### After +## After ```ts import { passthrough } from 'msw'; diff --git a/packages/codemods/msw/2/request-changes/.codemodrc.json b/packages/codemods/msw/2/request-changes/.codemodrc.json index 66aa6101c..7e8a6ebc1 100644 --- a/packages/codemods/msw/2/request-changes/.codemodrc.json +++ b/packages/codemods/msw/2/request-changes/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "msw/2/request-changes", "engine": "ts-morph", diff --git a/packages/codemods/msw/2/request-changes/README.md b/packages/codemods/msw/2/request-changes/README.md index 7b3be63ec..e85d6d713 100644 --- a/packages/codemods/msw/2/request-changes/README.md +++ b/packages/codemods/msw/2/request-changes/README.md @@ -1,7 +1,3 @@ -# Apply request changes - -## Description - Following the original msw upgrade guide, the signature of the request handler have changed. Some of the parameters have changed their type, some widely used objects are available directly on the callback argument object for convenience. Following changes are applied by this codemod: - `req.url` is now obtained as `new URL(request.url)`, request being a new object available for destructure from the single callback argument @@ -11,9 +7,7 @@ Following the original msw upgrade guide, the signature of the request handler h This codemod does not update the mentioned signatures of callback methods due to the fact that there are more changes in other codemods included in the `upgrade-recipe` that rely on the old signature. To apply the changes, you will have to run the recipe or run a `callback-signature` codemod that will do only that and replace all the references of old signature arguments. -## Example - -### Before +## Before ```ts import { rest } from 'msw'; @@ -31,7 +25,7 @@ rest.get('/user', (req, res, ctx) => { }); ``` -### After +## After ```ts import { http as caller, type HttpHandler } from 'msw'; diff --git a/packages/codemods/msw/2/response-usages/.codemodrc.json b/packages/codemods/msw/2/response-usages/.codemodrc.json index e409bead4..d9433fcea 100644 --- a/packages/codemods/msw/2/response-usages/.codemodrc.json +++ b/packages/codemods/msw/2/response-usages/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "msw/2/response-usages", "engine": "ts-morph", diff --git a/packages/codemods/msw/2/response-usages/README.md b/packages/codemods/msw/2/response-usages/README.md index 8dd45991e..ac62fc2ec 100644 --- a/packages/codemods/msw/2/response-usages/README.md +++ b/packages/codemods/msw/2/response-usages/README.md @@ -1,14 +1,8 @@ -# Update Response Usages - -## Description - To send a response from MSW handler, one would previously use something like `res(ctx.text("Hello world"))`. In msw v2, this is achieved by returning a native WebAPI Response object. msw v2 conveniently exposes a `HttpResponse` function that has useful methods for creating just that object with a desired body. This codemod replaces the old `res` calls with the new `HttpResponse` function calls and a bunch of ctx utilities that usually go with it. See examples below. This codemod does not remove unused properties on the callback signature due to the fact that there are more changes in other codemods included in the `upgrade-recipe` that rely on it. To apply these changes, you will have to run the recipe or run a `callback-signature` codemod that will do only that and replace all the references of old signature arguments. -## Example - -### Before +## Before ```ts import { rest } from 'msw'; @@ -23,7 +17,7 @@ rest.get('/user', (req, res, ctx) => { }); ``` -### After +## After ```ts import { rest } from 'msw'; @@ -41,7 +35,7 @@ rest.get('/user', (req, res, ctx) => { }); ``` -### Before +## Before ```ts import { rest } from 'msw'; @@ -51,7 +45,7 @@ rest.get('/user', (req, res, ctx) => { }); ``` -### After +## After ```ts import { rest, delay } from 'msw'; @@ -65,7 +59,7 @@ rest.get('/user', (req, res, ctx) => { }); ``` -### Before +## Before ```ts import { rest } from 'msw'; @@ -75,7 +69,7 @@ rest.get('/user', (req, res, ctx) => { }); ``` -### After +## After ```ts import { delay, rest } from 'msw'; @@ -85,7 +79,7 @@ rest.get('/user', (req, res, ctx) => { }); ``` -### Before +## Before ```ts import { rest } from 'msw'; @@ -95,7 +89,7 @@ rest.get('/user', (req, res, ctx) => { }); ``` -### After +## After ```ts import { rest } from 'msw'; @@ -105,7 +99,7 @@ rest.get('/user', (req, res, ctx) => { }); ``` -### Before +## Before ```ts graphql.query('GetUser', (req, res, ctx) => { @@ -123,7 +117,7 @@ graphql.query('GetUser', (req, res, ctx) => { }); ``` -### After +## After ```ts graphql.query('GetUser', (req, res, ctx) => { diff --git a/packages/codemods/msw/2/type-args/.codemodrc.json b/packages/codemods/msw/2/type-args/.codemodrc.json index d20f6e0e1..541519260 100644 --- a/packages/codemods/msw/2/type-args/.codemodrc.json +++ b/packages/codemods/msw/2/type-args/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "msw/2/type-args", "engine": "ts-morph", diff --git a/packages/codemods/msw/2/type-args/README.md b/packages/codemods/msw/2/type-args/README.md index 94b38d69c..c74654bc0 100644 --- a/packages/codemods/msw/2/type-args/README.md +++ b/packages/codemods/msw/2/type-args/README.md @@ -1,16 +1,10 @@ -# Move Generic Arguments and Body Type Casts - -## Description - There is a change to generic type interface of `rest.method()` calls. This codemod puts the generic arguments in the correct order to keep type safety. -### WARNING +## WARNING This codemod runs `.fixUnusedIdentifiers()` on a target source file. This would remove any unused declarations in the file. This is due to the atomicity of this codemod, which blindly inserts the callback structure into each msw handler callback and then cleans up the variables that are not used anymore. -## Example - -### Before +## Before ```ts http.get('/resource', (req, res, ctx) => { @@ -18,7 +12,7 @@ http.get('/resource', (req, res, ctx) => { }); ``` -### After +## After ```ts http.get('/resource', (req, res, ctx) => { @@ -26,7 +20,7 @@ http.get('/resource', (req, res, ctx) => { }); ``` -### Before +## Before ```ts http.get('/resource', (req, res, ctx) => { @@ -34,7 +28,7 @@ http.get('/resource', (req, res, ctx) => { }); ``` -### After +## After ```ts http.get('/resource', (req, res, ctx) => { @@ -42,7 +36,7 @@ http.get('/resource', (req, res, ctx) => { }); ``` -### Before +## Before ```ts const handlers: RestHandler[] = [ @@ -52,7 +46,7 @@ const handlers: RestHandler[] = [ ]; ``` -### After +## After ```ts const handlers: HttpHandler[] = [ @@ -62,7 +56,7 @@ const handlers: HttpHandler[] = [ ]; ``` -### Before +## Before ```ts export function mockFactory( @@ -77,7 +71,7 @@ export function mockFactory( } ``` -### After +## After ```ts export function mockFactory( diff --git a/packages/codemods/msw/2/upgrade-recipe/.codemodrc.json b/packages/codemods/msw/2/upgrade-recipe/.codemodrc.json index 57543812a..e3685800b 100644 --- a/packages/codemods/msw/2/upgrade-recipe/.codemodrc.json +++ b/packages/codemods/msw/2/upgrade-recipe/.codemodrc.json @@ -1,7 +1,7 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", "name": "msw/2/upgrade-recipe", - "version": "1.0.0", + "version": "1.0.2", "private": false, "engine": "recipe", "names": [ diff --git a/packages/codemods/msw/2/upgrade-recipe/README.md b/packages/codemods/msw/2/upgrade-recipe/README.md index 52323d3a1..ab526d178 100644 --- a/packages/codemods/msw/2/upgrade-recipe/README.md +++ b/packages/codemods/msw/2/upgrade-recipe/README.md @@ -1,22 +1,6 @@ -# MSW migration recipe - -## Description - This recipe is a set of codemods that will upgrade your project from using msw v1 to v2. -The recipe includes the following codemods: - -- [imports](https://github.com/codemod-com/codemod-registry/tree/main/codemods/msw/2/imports) -- [type-args](https://github.com/codemod-com/codemod-registry/tree/main/codemods/msw/2/type-args) -- [request-changes](https://github.com/codemod-com/codemod-registry/tree/main/codemods/msw/2/request-changes) -- [ctx-fetch](https://github.com/codemod-com/codemod-registry/tree/main/codemods/msw/2/ctx-fetch) -- [req-passthrough](https://github.com/codemod-com/codemod-registry/tree/main/codemods/msw/2/req-passthrough) -- [response-usages](https://github.com/codemod-com/codemod-registry/tree/main/codemods/msw/2/response-usages) -- [callback-signature](https://github.com/codemod-com/codemod-registry/tree/main/codemods/msw/2/callback-signature) -- [lifecycle-events-signature](https://github.com/codemod-com/codemod-registry/tree/main/codemods/msw/2/lifecycle-events-signature) -- [print-handler](https://github.com/codemod-com/codemod-registry/tree/main/codemods/msw/2/print-handler) - -### FNs +## FNs This recipe does not change the signatures of MSW handlers, if they were called using a custom factory function, for example to provide more type-safety or else. For example, the following code will only be partially updated: diff --git a/packages/codemods/mui/5/core-styles-import/.codemodrc.json b/packages/codemods/mui/5/core-styles-import/.codemodrc.json index 797aa7792..fa01c9c30 100644 --- a/packages/codemods/mui/5/core-styles-import/.codemodrc.json +++ b/packages/codemods/mui/5/core-styles-import/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "mui/5/core-styles-import", "engine": "jscodeshift", diff --git a/packages/codemods/mui/5/core-styles-import/README.md b/packages/codemods/mui/5/core-styles-import/README.md index e1f646347..4ed87776c 100644 --- a/packages/codemods/mui/5/core-styles-import/README.md +++ b/packages/codemods/mui/5/core-styles-import/README.md @@ -1,12 +1,6 @@ -# Core Styles Import - -## Description - Renames private import from `core/styles/*` to `core/styles` -## Example - -### Before +## Before ```typescript import { createTheme } from '@material-ui/core/styles'; @@ -15,7 +9,7 @@ import makeStyles from '@material-ui/core/styles/makeStyles'; import { Overrides } from '@material-ui/core/styles/overrides'; ``` -### After +## After ```typescript import { diff --git a/packages/codemods/netlify-sdk/0.8.1/addBuildEventContext/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.1/addBuildEventContext/.codemodrc.json index 5931b6e32..434f38ad0 100644 --- a/packages/codemods/netlify-sdk/0.8.1/addBuildEventContext/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.1/addBuildEventContext/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.1/addBuildEventContext", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.1/addBuildEventContext/README.md b/packages/codemods/netlify-sdk/0.8.1/addBuildEventContext/README.md index 261f01fd1..874d61a8f 100644 --- a/packages/codemods/netlify-sdk/0.8.1/addBuildEventContext/README.md +++ b/packages/codemods/netlify-sdk/0.8.1/addBuildEventContext/README.md @@ -1,12 +1,6 @@ -# Rename addBuildEventContext - -## Description - This codemod renames `addBuildContext` to `addBuildEventContext` as required in Netlify SDK v0.8.1. -## Example - -### Before +## Before ```jsx import { NetlifyIntegration } from '@netlify/sdk'; @@ -17,7 +11,7 @@ const integration = new NetlifyIntegration(); integration.addBuildContext(() => {}); ``` -### After +## After ```jsx import { NetlifyIntegration } from '@netlify/sdk'; diff --git a/packages/codemods/netlify-sdk/0.8.1/addBuildEventHandler/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.1/addBuildEventHandler/.codemodrc.json index 149527c59..ca7358d33 100644 --- a/packages/codemods/netlify-sdk/0.8.1/addBuildEventHandler/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.1/addBuildEventHandler/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.1/addBuildEventHandler", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.1/addBuildEventHandler/README.md b/packages/codemods/netlify-sdk/0.8.1/addBuildEventHandler/README.md index de2f958f4..8fc9573b9 100644 --- a/packages/codemods/netlify-sdk/0.8.1/addBuildEventHandler/README.md +++ b/packages/codemods/netlify-sdk/0.8.1/addBuildEventHandler/README.md @@ -1,12 +1,6 @@ -# Rename addBuildEventHandler - -## Description - This codemod renames `addBuildHook` to `addBuildEventHandler` as required in Netlify SDK v0.8.1. -## Example - -### Before +## Before ```jsx import { NetlifyIntegration } from '@netlify/sdk'; @@ -19,7 +13,7 @@ integration.addBuildHook('onPreBuild', () => { }); ``` -### After +## After ```jsx import { NetlifyIntegration } from '@netlify/sdk'; diff --git a/packages/codemods/netlify-sdk/0.8.1/disableBuildEventHandlers/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.1/disableBuildEventHandlers/.codemodrc.json index 86a469c9f..1cae3e779 100644 --- a/packages/codemods/netlify-sdk/0.8.1/disableBuildEventHandlers/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.1/disableBuildEventHandlers/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.1/disableBuildEventHandlers", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.1/disableBuildEventHandlers/README.md b/packages/codemods/netlify-sdk/0.8.1/disableBuildEventHandlers/README.md index 256375ade..38da46f67 100644 --- a/packages/codemods/netlify-sdk/0.8.1/disableBuildEventHandlers/README.md +++ b/packages/codemods/netlify-sdk/0.8.1/disableBuildEventHandlers/README.md @@ -1,18 +1,12 @@ -# Rename disableBuildEventHandlers - -## Description - This codemod renames `disableBuildhook` to `disableBuildEventHandlers` as required in Netlify SDK v0.8.1. -## Example - -### Before +## Before ```jsx await client.disableBuildhook(siteId); ``` -### After +## After ```jsx await client.disableBuildEventHandlers(siteId); diff --git a/packages/codemods/netlify-sdk/0.8.1/enableBuildEventHandlers/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.1/enableBuildEventHandlers/.codemodrc.json index c981e1593..8b2b6b160 100644 --- a/packages/codemods/netlify-sdk/0.8.1/enableBuildEventHandlers/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.1/enableBuildEventHandlers/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.1/enableBuildEventHandlers", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.1/enableBuildEventHandlers/README.md b/packages/codemods/netlify-sdk/0.8.1/enableBuildEventHandlers/README.md index be8f12b75..4d6cfa779 100644 --- a/packages/codemods/netlify-sdk/0.8.1/enableBuildEventHandlers/README.md +++ b/packages/codemods/netlify-sdk/0.8.1/enableBuildEventHandlers/README.md @@ -1,18 +1,12 @@ -# Rename enableBuildEventHandlers - -## Description - This codemod renames `enableBuildhook` to `enableBuildEventHandlers` as required in Netlify SDK v0.8.1. -## Example - -### Before +## Before ```jsx await client.enableBuildhook(siteId); ``` -### After +## After ```jsx await client.enableBuildEventHandlers(siteId); diff --git a/packages/codemods/netlify-sdk/0.8.1/exportZod/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.1/exportZod/.codemodrc.json index bd0f3a3ec..80ec915f2 100644 --- a/packages/codemods/netlify-sdk/0.8.1/exportZod/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.1/exportZod/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.1/exportZod", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.1/exportZod/README.md b/packages/codemods/netlify-sdk/0.8.1/exportZod/README.md index c0a083b7e..b6c17822a 100644 --- a/packages/codemods/netlify-sdk/0.8.1/exportZod/README.md +++ b/packages/codemods/netlify-sdk/0.8.1/exportZod/README.md @@ -1,18 +1,12 @@ -# Export Zod - -## Description - This codemod exports z from zod as required in Netlify SDK v0.8.1. -## Example - -### Before +## Before ```jsx import { z } from '@netlify/sdk'; ``` -### After +## After ```jsx import { z } from '@netlify/sdk'; diff --git a/packages/codemods/netlify-sdk/0.8.4/addApiHandler/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.4/addApiHandler/.codemodrc.json index 40cb251e7..a0e4970d6 100644 --- a/packages/codemods/netlify-sdk/0.8.4/addApiHandler/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.4/addApiHandler/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.4/addApiHandler", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.4/addApiHandler/README.md b/packages/codemods/netlify-sdk/0.8.4/addApiHandler/README.md index 42c684be7..78ebb33d3 100644 --- a/packages/codemods/netlify-sdk/0.8.4/addApiHandler/README.md +++ b/packages/codemods/netlify-sdk/0.8.4/addApiHandler/README.md @@ -1,12 +1,6 @@ -# addApiHandler - -## Description - This codemod renames `addHandler` to `addApiHandler` as required in Netlify SDK v0.8.1. -## Example - -### Before +## Before ```jsx import { NetlifyIntegration } from '@netlify/sdk'; @@ -16,7 +10,7 @@ const integration = new NetlifyIntegration(); integration.addHandler('some-function', async (event, context) => {}); ``` -### After +## After ```jsx import { NetlifyIntegration } from '@netlify/sdk'; diff --git a/packages/codemods/netlify-sdk/0.8.5/createEnvironmentVariable/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.5/createEnvironmentVariable/.codemodrc.json index 0af34469e..41eff12ff 100644 --- a/packages/codemods/netlify-sdk/0.8.5/createEnvironmentVariable/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.5/createEnvironmentVariable/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.5/createEnvironmentVariable", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.5/createEnvironmentVariable/README.md b/packages/codemods/netlify-sdk/0.8.5/createEnvironmentVariable/README.md index 999c6640f..57a11df18 100644 --- a/packages/codemods/netlify-sdk/0.8.5/createEnvironmentVariable/README.md +++ b/packages/codemods/netlify-sdk/0.8.5/createEnvironmentVariable/README.md @@ -1,18 +1,12 @@ -# createEnvironmentVariable - -## Description - This codemod changes `createEnvironmentVariable` to pass an object instead of the separate arguments as required in Netlify SDK v0.8.5. -## Example - -### Before +## Before ```jsx createEnvironmentVariable(accountId, siteId, key, values); ``` -### After +## After ```jsx createEnvironmentVariable({ diff --git a/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariable/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariable/.codemodrc.json index 06e348db7..7ad26739c 100644 --- a/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariable/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariable/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.5/createOrUpdateVariable", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariable/README.md b/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariable/README.md index 4c926fbda..4385c5272 100644 --- a/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariable/README.md +++ b/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariable/README.md @@ -1,18 +1,12 @@ -# createOrUpdateVariable - -## Description - This codemod changes `createOrUpdateVariable` to pass an object instead of the separate arguments as required in Netlify SDK v0.8.5. -## Example - -### Before +## Before ```jsx createOrUpdateVariable(accountId, siteId, key, value); ``` -### After +## After ```jsx createOrUpdateVariable({ diff --git a/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariables/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariables/.codemodrc.json index ceb4e902f..efea16701 100644 --- a/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariables/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariables/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.5/createOrUpdateVariables", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariables/README.md b/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariables/README.md index c20db5b4e..0b5d52b09 100644 --- a/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariables/README.md +++ b/packages/codemods/netlify-sdk/0.8.5/createOrUpdateVariables/README.md @@ -1,18 +1,12 @@ -# createOrUpdateVariables - -## Description - This codemod changes `createOrUpdateVariables` to pass an object instead of the separate arguments as required in Netlify SDK v0.8.5. -## Example - -### Before +## Before ```jsx createOrUpdateVariables(accountId, siteId, variables); ``` -### After +## After ```jsx createOrUpdateVariables({ diff --git a/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariable/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariable/.codemodrc.json index eb6c5e940..0e9d965e4 100644 --- a/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariable/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariable/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.5/deleteEnvironmentVariable", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariable/README.md b/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariable/README.md index 63ace8718..800f5f43e 100644 --- a/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariable/README.md +++ b/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariable/README.md @@ -1,18 +1,12 @@ -# deleteEnvironmentVariable - -## Description - This codemod changes `deleteEnvironmentVariable` to pass an object instead of the separate arguments as required in Netlify SDK v0.8.5. -## Example - -### Before +## Before ```jsx deleteEnvironmentVariable(accountId, siteId, key); ``` -### After +## After ```jsx deleteEnvironmentVariable({ diff --git a/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariables/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariables/.codemodrc.json index dfd846a3f..92b95b6b5 100644 --- a/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariables/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariables/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.5/deleteEnvironmentVariables", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariables/README.md b/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariables/README.md index 0709bcd2f..c56f97e39 100644 --- a/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariables/README.md +++ b/packages/codemods/netlify-sdk/0.8.5/deleteEnvironmentVariables/README.md @@ -1,18 +1,12 @@ -# deleteEnvironmentVariables - -## Description - This codemod changes `deleteEnvironmentVariables` to pass an object instead of the separate arguments as required in Netlify SDK v0.8.5. -## Example - -### Before +## Before ```jsx deleteEnvironmentVariables(accountId, siteId, variables); ``` -### After +## After ```jsx deleteEnvironmentVariables({ diff --git a/packages/codemods/netlify-sdk/0.8.5/getEnvironmentVariables/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.5/getEnvironmentVariables/.codemodrc.json index 460ac5af2..6614af273 100644 --- a/packages/codemods/netlify-sdk/0.8.5/getEnvironmentVariables/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.5/getEnvironmentVariables/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.5/getEnvironmentVariables", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.5/getEnvironmentVariables/README.md b/packages/codemods/netlify-sdk/0.8.5/getEnvironmentVariables/README.md index 49f26fad3..34fc8af08 100644 --- a/packages/codemods/netlify-sdk/0.8.5/getEnvironmentVariables/README.md +++ b/packages/codemods/netlify-sdk/0.8.5/getEnvironmentVariables/README.md @@ -1,18 +1,12 @@ -# getEnvironmentVariables - -## Description - This codemod changes `getEnvironmentVariables` to pass an object instead of the separate arguments as required in Netlify SDK v0.8.5. -## Example - -### Before +## Before ```jsx getEnvironmentVariables(accountId, siteId); ``` -### After +## After ```jsx getEnvironmentVariables({ diff --git a/packages/codemods/netlify-sdk/0.8.5/netlify-sdk-0.8.5-recipe/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.5/netlify-sdk-0.8.5-recipe/.codemodrc.json index 6b353bb19..9deac2e0f 100644 --- a/packages/codemods/netlify-sdk/0.8.5/netlify-sdk-0.8.5-recipe/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.5/netlify-sdk-0.8.5-recipe/.codemodrc.json @@ -1,7 +1,7 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", "name": "netlify/0.8.5/recipe", - "version": "1.0.0", + "version": "1.0.1", "private": false, "engine": "recipe", "names": [ diff --git a/packages/codemods/netlify-sdk/0.8.5/netlify-sdk-0.8.5-recipe/README.md b/packages/codemods/netlify-sdk/0.8.5/netlify-sdk-0.8.5-recipe/README.md index eb9177804..ed9c17dfb 100644 --- a/packages/codemods/netlify-sdk/0.8.5/netlify-sdk-0.8.5-recipe/README.md +++ b/packages/codemods/netlify-sdk/0.8.5/netlify-sdk-0.8.5-recipe/README.md @@ -1,7 +1,3 @@ -# Netlify SDK v0.8.5 Recipe - -## Description - The SDK v0.8.5 Recipe is a set of codemods that assist you with migrating to Netlify SDK v0.8.5. The recipe includes the following codemods: diff --git a/packages/codemods/netlify-sdk/0.8.5/patchEnvironmentVariable/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.5/patchEnvironmentVariable/.codemodrc.json index e2b4587a4..c8caef81a 100644 --- a/packages/codemods/netlify-sdk/0.8.5/patchEnvironmentVariable/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.5/patchEnvironmentVariable/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.5/patchEnvironmentVariable", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.5/patchEnvironmentVariable/README.md b/packages/codemods/netlify-sdk/0.8.5/patchEnvironmentVariable/README.md index 949dfd671..a933bb2f9 100644 --- a/packages/codemods/netlify-sdk/0.8.5/patchEnvironmentVariable/README.md +++ b/packages/codemods/netlify-sdk/0.8.5/patchEnvironmentVariable/README.md @@ -1,12 +1,6 @@ -# patchEnvironmentVariable - -## Description - This codemod changes `patchEnvironmentVariable` to pass an object instead of the separate arguments as required in Netlify SDK v0.8.5. -## Example - -### Before +## Before ```jsx patchEnvironmentVariable( @@ -19,7 +13,7 @@ patchEnvironmentVariable( ); ``` -### After +## After ```jsx patchEnvironmentVariable({ diff --git a/packages/codemods/netlify-sdk/0.8.5/updateEnvironmentVariable/.codemodrc.json b/packages/codemods/netlify-sdk/0.8.5/updateEnvironmentVariable/.codemodrc.json index ef8d6c8e4..e16a70fda 100644 --- a/packages/codemods/netlify-sdk/0.8.5/updateEnvironmentVariable/.codemodrc.json +++ b/packages/codemods/netlify-sdk/0.8.5/updateEnvironmentVariable/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "netlify/0.8.5/updateEnvironmentVariable", "engine": "jscodeshift", diff --git a/packages/codemods/netlify-sdk/0.8.5/updateEnvironmentVariable/README.md b/packages/codemods/netlify-sdk/0.8.5/updateEnvironmentVariable/README.md index 76b265ef9..0c32e170e 100644 --- a/packages/codemods/netlify-sdk/0.8.5/updateEnvironmentVariable/README.md +++ b/packages/codemods/netlify-sdk/0.8.5/updateEnvironmentVariable/README.md @@ -1,18 +1,12 @@ -# updateEnvironmentVariable - -## Description - This codemod changes `updateEnvironmentVariable` to pass an object instead of the separate arguments as required in Netlify SDK v0.8.5. -## Example - -### Before +## Before ```jsx updateEnvironmentVariable(accountId, siteId, key, values); ``` -### After +## After ```jsx updateEnvironmentVariable({ diff --git a/packages/codemods/next-i18next/copy-keys/.codemodrc.json b/packages/codemods/next-i18next/copy-keys/.codemodrc.json index c8c692cd9..b4dae76d7 100644 --- a/packages/codemods/next-i18next/copy-keys/.codemodrc.json +++ b/packages/codemods/next-i18next/copy-keys/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "name": "next-i18next/copy-keys", "private": false, "engine": "filemod", diff --git a/packages/codemods/next-i18next/copy-keys/README.md b/packages/codemods/next-i18next/copy-keys/README.md index 11ec7e874..9e8c59cef 100644 --- a/packages/codemods/next-i18next/copy-keys/README.md +++ b/packages/codemods/next-i18next/copy-keys/README.md @@ -1,7 +1,3 @@ -# Next-i18next Copy Keys - -## Description - This codemod copies specific keys from one translation namespace to another, for each of the supported languages. The codemod expects the following arguments: @@ -12,11 +8,9 @@ The codemod expects the following arguments: You need to pass these arguments using the [Codemod Arguments' settings](https://docs.codemod.com/docs/vs-code-extension/advanced-usage#set-codemod-arguments) in Codemod VSCode extension or [Codemod CLI](https://docs.codemod.com/docs/cli/quickstart). -## Example: +## Before -### Before: - -#### .../en/common.json +### .../en/common.json ```json { @@ -25,7 +19,7 @@ You need to pass these arguments using the [Codemod Arguments' settings](https:/ } ``` -#### .../en/new.json +### .../en/new.json ```json { @@ -33,9 +27,9 @@ You need to pass these arguments using the [Codemod Arguments' settings](https:/ } ``` -### After: +## After -#### .../en/common.json +### .../en/common.json ```json { @@ -44,11 +38,11 @@ You need to pass these arguments using the [Codemod Arguments' settings](https:/ } ``` -#### .../en/new.json +### .../en/new.json ```json { "existingKey": "existingKeyEnglish", "copyKey": "copyKeyEnglish" } -``` \ No newline at end of file +``` diff --git a/packages/codemods/next/13/ab-test/.codemodrc.json b/packages/codemods/next/13/ab-test/.codemodrc.json index 26f9348f5..e69ba6172 100644 --- a/packages/codemods/next/13/ab-test/.codemodrc.json +++ b/packages/codemods/next/13/ab-test/.codemodrc.json @@ -1,7 +1,7 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", "name": "next/13/ab-test", - "version": "1.0.0", + "version": "1.0.1", "private": false, "engine": "filemod", "arguments": [], diff --git a/packages/codemods/next/13/ab-test/README.md b/packages/codemods/next/13/ab-test/README.md index e00d44b55..6a59efe2a 100644 --- a/packages/codemods/next/13/ab-test/README.md +++ b/packages/codemods/next/13/ab-test/README.md @@ -1,5 +1 @@ -# Generate URL Patterns for Cal.com - -## Description - This codemod generates boilerplate code for A/B tests using the Next.js middlewares. The middleware controls the redirects from the legacy to the future pages. You can control the redirection probability and targeted pages using environment variables. diff --git a/packages/codemods/next/13/app-directory-boilerplate/.codemodrc.json b/packages/codemods/next/13/app-directory-boilerplate/.codemodrc.json index c9219c92d..7e387c313 100644 --- a/packages/codemods/next/13/app-directory-boilerplate/.codemodrc.json +++ b/packages/codemods/next/13/app-directory-boilerplate/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/app-directory-boilerplate", "description": "This codemod provides boilerplate for the app directory.", diff --git a/packages/codemods/next/13/app-directory-boilerplate/README.md b/packages/codemods/next/13/app-directory-boilerplate/README.md index 9587b71c1..5a4430cf4 100644 --- a/packages/codemods/next/13/app-directory-boilerplate/README.md +++ b/packages/codemods/next/13/app-directory-boilerplate/README.md @@ -1,7 +1,3 @@ -# App Directory Boilerplate - -## Description - The first step to migrate your pages to the `app` directory is to provide a new file structure, respected by the App router. This is attempted by this codemod, which reads the contents of your `pages` directory and creates the placeholder files. diff --git a/packages/codemods/next/13/app-router-recipe/.codemodrc.json b/packages/codemods/next/13/app-router-recipe/.codemodrc.json index 4c8bc4f03..ab9fd74b2 100644 --- a/packages/codemods/next/13/app-router-recipe/.codemodrc.json +++ b/packages/codemods/next/13/app-router-recipe/.codemodrc.json @@ -1,7 +1,7 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", "name": "next/13/app-router-recipe", - "version": "1.0.0", + "version": "1.0.3", "private": false, "engine": "recipe", "names": [ @@ -11,7 +11,8 @@ "next/13/app-directory-boilerplate" ], "meta": { - "tags": ["next.js", "migration"] + "tags": ["next.js", "migration"], + "git": "https://github.com/codemod-com/codemod/tree/main/packages/codemods/next/13/app-router-recipe" }, "applicability": { "from": [["next", "<", "13.0.0"]] diff --git a/packages/codemods/next/13/app-router-recipe/README.md b/packages/codemods/next/13/app-router-recipe/README.md index dcfaa5d33..2f9f15feb 100644 --- a/packages/codemods/next/13/app-router-recipe/README.md +++ b/packages/codemods/next/13/app-router-recipe/README.md @@ -1,12 +1,8 @@ -# App Router Recipe - -## Description - The App Router Recipe is a set of codemods that assist you with the pages-to-app migration process. The recipe includes the following codemods: -- [replace-next-router](https://github.com/codemod-com/codemod-registry/tree/main/codemods/next/13/replace-next-router) -- [replace-next-head](https://github.com/codemod-com/codemod-registry/tree/main/codemods/next/13/replace-next-head) -- [remove-get-static-props](https://github.com/codemod-com/codemod-registry/tree/main/codemods/next/13/remove-get-static-props) -- [app-directory-boilerplate](https://github.com/codemod-com/codemod-registry/tree/main/codemods/next/13/app-directory-boilerplate) +- [replace-next-router](https://github.com/codemod-com/codemod/tree/main/packages/codemods/next/13/replace-next-router) +- [replace-next-head](https://github.com/codemod-com/codemod/tree/main/packages/codemods/next/13/replace-next-head) +- [remove-get-static-props](https://github.com/codemod-com/codemod/tree/main/packages/codemods/next/13/remove-get-static-props) +- [app-directory-boilerplate](https://github.com/codemod-com/codemod/tree/main/packages/codemods/next/13/app-directory-boilerplate) diff --git a/packages/codemods/next/13/built-in-next-font/.codemodrc.json b/packages/codemods/next/13/built-in-next-font/.codemodrc.json index 73d3a5cae..6aa95d124 100644 --- a/packages/codemods/next/13/built-in-next-font/.codemodrc.json +++ b/packages/codemods/next/13/built-in-next-font/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/built-in-next-font", "description": "The codemod removes @next/font and changes @next/font imports to use the built-in next/font instead.", diff --git a/packages/codemods/next/13/built-in-next-font/README.md b/packages/codemods/next/13/built-in-next-font/README.md index f9698481e..9f0769690 100644 --- a/packages/codemods/next/13/built-in-next-font/README.md +++ b/packages/codemods/next/13/built-in-next-font/README.md @@ -1,7 +1,3 @@ -# Built in Next Font - -## Description - This codemod transforms the module specifier `@next/font/*` in import statements into `next/font/*`. Using the `@next/font/*` modules is deprecated since Next.js v13.2. diff --git a/packages/codemods/next/13/comment-deletable-files/.codemodrc.json b/packages/codemods/next/13/comment-deletable-files/.codemodrc.json index c8ccdb581..8a69327f5 100644 --- a/packages/codemods/next/13/comment-deletable-files/.codemodrc.json +++ b/packages/codemods/next/13/comment-deletable-files/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/comment-deletable-files", "description": "The codemod marks files that can be deleted with a comment.", diff --git a/packages/codemods/next/13/comment-deletable-files/README.md b/packages/codemods/next/13/comment-deletable-files/README.md index 46649295b..326c602ff 100644 --- a/packages/codemods/next/13/comment-deletable-files/README.md +++ b/packages/codemods/next/13/comment-deletable-files/README.md @@ -1,7 +1,3 @@ -# Comment Deletable Files - -## Description - This codemod is recommended when migrating from the `/pages` to the `/app` directory. It adds a comment to files that should be deleted and migrated to different files during the migration process. diff --git a/packages/codemods/next/13/move-css-in-js-styles/.codemodrc.json b/packages/codemods/next/13/move-css-in-js-styles/.codemodrc.json index 0b213791f..5c01ade54 100644 --- a/packages/codemods/next/13/move-css-in-js-styles/.codemodrc.json +++ b/packages/codemods/next/13/move-css-in-js-styles/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/move-css-in-js-styles", "description": "The codemod moves css-in-js styles to the css modules.", diff --git a/packages/codemods/next/13/move-css-in-js-styles/README.md b/packages/codemods/next/13/move-css-in-js-styles/README.md index 366264878..b1fe77a27 100644 --- a/packages/codemods/next/13/move-css-in-js-styles/README.md +++ b/packages/codemods/next/13/move-css-in-js-styles/README.md @@ -1,7 +1,3 @@ -# Move CSS in JS Styles - -## Description - This highly experimental codemod moves the CSS-in-JS styles into the CSS Modules. ## Example diff --git a/packages/codemods/next/13/new-image-experimental/.codemodrc.json b/packages/codemods/next/13/new-image-experimental/.codemodrc.json index dd370e033..fff4b945d 100644 --- a/packages/codemods/next/13/new-image-experimental/.codemodrc.json +++ b/packages/codemods/next/13/new-image-experimental/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/new-image-experimental", "description": "The codemod performs migration from next/legacy/image to the latest next/image by including inline styles and removing unnecessary properties.", diff --git a/packages/codemods/next/13/new-image-experimental/README.md b/packages/codemods/next/13/new-image-experimental/README.md index 3163b0138..e871eae11 100644 --- a/packages/codemods/next/13/new-image-experimental/README.md +++ b/packages/codemods/next/13/new-image-experimental/README.md @@ -1,7 +1,3 @@ -# New Image Experimental - -## Description - This codemod **dangerously** migrates the usages of the `Image` component from the `next/legacy/image` module to the `next/image` module. This is achieved by adding inline styles and removing unused props. diff --git a/packages/codemods/next/13/new-link/.codemodrc.json b/packages/codemods/next/13/new-link/.codemodrc.json index 21d9826d2..c392c4e6a 100644 --- a/packages/codemods/next/13/new-link/.codemodrc.json +++ b/packages/codemods/next/13/new-link/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.2", "private": false, "name": "next/13/new-link", "description": "The codemod safely removes from next/link or includes the legacyBehavior property", diff --git a/packages/codemods/next/13/new-link/README.md b/packages/codemods/next/13/new-link/README.md index 004344b6f..6fd1e3a41 100644 --- a/packages/codemods/next/13/new-link/README.md +++ b/packages/codemods/next/13/new-link/README.md @@ -1,7 +1,3 @@ -# New Link - -## Description - Safely removes `` from `Link` components imported from the `next/link` module or adds the `legacyBehavior` prop on the component level. ## Example @@ -25,33 +21,3 @@ export default function Component() { return Anchor; } ``` - -## Applicability Criteria - -Next.js version higher or equal to 13. - -## Other Metadata - -### Codemod Version - -v1.0.0 - -### Change Mode - -**Autonomous**: Changes can safely be pushed and merged without further human involvement. - -### **Codemod Engine** - -jscodeshift - -### Estimated Time Saving - -~5 minutes per occurrence - -### Owner - -[Vercel](https://github.com/vercel) - -### Links for more info - -- https://nextjs.org/docs/pages/building-your-application/upgrading/codemods#new-link diff --git a/packages/codemods/next/13/next-image-to-legacy-image/.codemodrc.json b/packages/codemods/next/13/next-image-to-legacy-image/.codemodrc.json index 331b254bb..8787f6695 100644 --- a/packages/codemods/next/13/next-image-to-legacy-image/.codemodrc.json +++ b/packages/codemods/next/13/next-image-to-legacy-image/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/next-image-to-legacy-image", "description": "The codemod safely migrates Next.js 10, 11, and 12 applications that use the next/image import to the renamed next/legacy/image import in Next.js 13.", diff --git a/packages/codemods/next/13/next-image-to-legacy-image/README.md b/packages/codemods/next/13/next-image-to-legacy-image/README.md index 82867383f..a348cc618 100644 --- a/packages/codemods/next/13/next-image-to-legacy-image/README.md +++ b/packages/codemods/next/13/next-image-to-legacy-image/README.md @@ -1,7 +1,3 @@ -# Next Image to Legacy Image - -## Description - This codemod safely migrates existing Next.js 10, 11, 12 applications importing `next/image` to the renamed `next/legacy/image` import in Next.js 13 by replacing `next/image` imports with `next/legacy/image` and replacing `next/future/image` imports with `next/image`. ## Example diff --git a/packages/codemods/next/13/remove-get-static-props/.codemodrc.json b/packages/codemods/next/13/remove-get-static-props/.codemodrc.json index d16a7ae90..6366faf49 100644 --- a/packages/codemods/next/13/remove-get-static-props/.codemodrc.json +++ b/packages/codemods/next/13/remove-get-static-props/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.2", "private": false, "name": "next/13/remove-get-static-props", "description": "The codemod removes getStaticProps data fetching method.", diff --git a/packages/codemods/next/13/remove-get-static-props/README.md b/packages/codemods/next/13/remove-get-static-props/README.md index e22073600..06257d7ef 100644 --- a/packages/codemods/next/13/remove-get-static-props/README.md +++ b/packages/codemods/next/13/remove-get-static-props/README.md @@ -1,7 +1,3 @@ -# Migrate Data Fetching Methods - -## Description - The following data fetching methods are no longer available in the `app` directory: - `getStaticPaths`, @@ -102,33 +98,3 @@ export default async function Post({ params }: PageProps) { export const dynamicParams = true; ``` - -## Applicability Criteria - -Next.js version is greater or equal to 13.4. - -## Other Metadata - -### Codemod Version - -v1.0.0 - -### Change Mode - -**Assistive**: The automation partially completes changes. Human involvement is needed to make changes ready to be pushed and merged. - -### **Codemod Engine** - -jscodeshift - -### Estimated Time Saving - -~2 minutes per occurrence - -### Owner - -Codemod.com - -### Links for more info - -- https://nextjs.org/docs/app/building-your-application/upgrading/app-router-migration#static-site-generation-getstaticprops diff --git a/packages/codemods/next/13/remove-next-export/.codemodrc.json b/packages/codemods/next/13/remove-next-export/.codemodrc.json index afd5308e9..7836d8d10 100644 --- a/packages/codemods/next/13/remove-next-export/.codemodrc.json +++ b/packages/codemods/next/13/remove-next-export/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/remove-next-export", "description": "This codemod removes all usages of the next export command", diff --git a/packages/codemods/next/13/remove-next-export/README.md b/packages/codemods/next/13/remove-next-export/README.md index 049edb59a..501ccc2d8 100644 --- a/packages/codemods/next/13/remove-next-export/README.md +++ b/packages/codemods/next/13/remove-next-export/README.md @@ -1,7 +1,3 @@ -# Remove Next Export - -## Description - The `next export` command is deprecated. This codemod dangerously removes all references to the command in `*.md`, `*.sh`, `package.json`. It also adds a property `output` with the value `export` to the `module.exports` object in `next.config.js` files. ## Example diff --git a/packages/codemods/next/13/replace-api-routes/.codemodrc.json b/packages/codemods/next/13/replace-api-routes/.codemodrc.json index a45d3abb5..94c8eea99 100644 --- a/packages/codemods/next/13/replace-api-routes/.codemodrc.json +++ b/packages/codemods/next/13/replace-api-routes/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/replace-api-routes", "description": "This codemod replaces API Routes with Route Handlers", diff --git a/packages/codemods/next/13/replace-api-routes/README.md b/packages/codemods/next/13/replace-api-routes/README.md index ada0b8033..6f4a0337c 100644 --- a/packages/codemods/next/13/replace-api-routes/README.md +++ b/packages/codemods/next/13/replace-api-routes/README.md @@ -1,5 +1 @@ -# Replace API Routes - -## Description - Replaces API Routes with Route Handlers. diff --git a/packages/codemods/next/13/replace-next-head/.codemodrc.json b/packages/codemods/next/13/replace-next-head/.codemodrc.json index e6222dea9..f2c62a88b 100644 --- a/packages/codemods/next/13/replace-next-head/.codemodrc.json +++ b/packages/codemods/next/13/replace-next-head/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/replace-next-head", "description": "This codemod generates Next 13 metadata object", diff --git a/packages/codemods/next/13/replace-next-head/README.md b/packages/codemods/next/13/replace-next-head/README.md index 73cf2f44f..81f9ea5c2 100644 --- a/packages/codemods/next/13/replace-next-head/README.md +++ b/packages/codemods/next/13/replace-next-head/README.md @@ -1,7 +1,3 @@ -# Replace Next Head - -## Description - Generates a static metadata object based on meta tags managed by `next/head`. The codemod checks all the child components used in a page file and extracts all the meta tags defined within the `` component. Such tags are then moved to the very page file alongside the dependencies of the tags. diff --git a/packages/codemods/next/13/replace-next-router/.codemodrc.json b/packages/codemods/next/13/replace-next-router/.codemodrc.json index 4681c3d57..e28ef54a3 100644 --- a/packages/codemods/next/13/replace-next-router/.codemodrc.json +++ b/packages/codemods/next/13/replace-next-router/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/replace-next-router", "description": "Replaces all usages of the useRouter() calls with useSearchParams and usePathname", diff --git a/packages/codemods/next/13/replace-next-router/README.md b/packages/codemods/next/13/replace-next-router/README.md index 09c35c035..610d51119 100644 --- a/packages/codemods/next/13/replace-next-router/README.md +++ b/packages/codemods/next/13/replace-next-router/README.md @@ -1,7 +1,3 @@ -# Replace Next Router - -## Description - Since Next.js 13.4, you can use the following hooks from the `next/navigation` module: - `useRouter`, diff --git a/packages/codemods/next/13/replace-use-search-params/.codemodrc.json b/packages/codemods/next/13/replace-use-search-params/.codemodrc.json index 21168ccae..0f356dcf2 100644 --- a/packages/codemods/next/13/replace-use-search-params/.codemodrc.json +++ b/packages/codemods/next/13/replace-use-search-params/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/13/replace-use-search-params", "description": "The codemod replaces getSearchParams with compatGetSearchParams", diff --git a/packages/codemods/next/13/replace-use-search-params/README.md b/packages/codemods/next/13/replace-use-search-params/README.md index 577380019..9ecfe818a 100644 --- a/packages/codemods/next/13/replace-use-search-params/README.md +++ b/packages/codemods/next/13/replace-use-search-params/README.md @@ -1,7 +1,3 @@ -# Replace useSearchParams with useCompatSearchParams - -## Description - A recent update in Next.js brought a breaking change: the useSearchParams hook no longer includes params. To ease the migration, the new useCompatSearchParams hook can be used. This hook mimics the behavior of the old useSearchParams in two ways: - it includes both params and searchParams diff --git a/packages/codemods/next/13/upsert-use-client-directive/.codemodrc.json b/packages/codemods/next/13/upsert-use-client-directive/.codemodrc.json index bdcc57ee9..fd1f5b6c5 100644 --- a/packages/codemods/next/13/upsert-use-client-directive/.codemodrc.json +++ b/packages/codemods/next/13/upsert-use-client-directive/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "name": "next/13/upsert-use-client-directive", "private": false, "engine": "ts-morph", diff --git a/packages/codemods/next/13/upsert-use-client-directive/README.md b/packages/codemods/next/13/upsert-use-client-directive/README.md index 274b06ab4..01286c848 100644 --- a/packages/codemods/next/13/upsert-use-client-directive/README.md +++ b/packages/codemods/next/13/upsert-use-client-directive/README.md @@ -1,7 +1,3 @@ -# Upsert Use Client Directive - -## Description - Since Next.js 13.4, you can mark the files that contain only client-side code with the `use client` directive at the top. The codemod will look for identifiers and string literals common for files that contain client-side code, such as React hooks or event handlers. On the other hand, it will not upsert any directive should it spot elements indicating server-side code. diff --git a/packages/codemods/next/14/metadata-to-viewport-export/.codemodrc.json b/packages/codemods/next/14/metadata-to-viewport-export/.codemodrc.json index 109ba9a75..682c742be 100644 --- a/packages/codemods/next/14/metadata-to-viewport-export/.codemodrc.json +++ b/packages/codemods/next/14/metadata-to-viewport-export/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/14/metadata-to-viewport-export", "description": "This codemod migrates certain viewport metadata to viewport export.", diff --git a/packages/codemods/next/14/metadata-to-viewport-export/README.md b/packages/codemods/next/14/metadata-to-viewport-export/README.md index ae7c2429e..09d14f187 100644 --- a/packages/codemods/next/14/metadata-to-viewport-export/README.md +++ b/packages/codemods/next/14/metadata-to-viewport-export/README.md @@ -1,7 +1,3 @@ -# Metadata to Viewport Export - -## Description - This codemod migrates certain viewport metadata to `viewport` export. ## Example diff --git a/packages/codemods/next/14/next-og-import/.codemodrc.json b/packages/codemods/next/14/next-og-import/.codemodrc.json index c0e1ea3f4..a5782780e 100644 --- a/packages/codemods/next/14/next-og-import/.codemodrc.json +++ b/packages/codemods/next/14/next-og-import/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "next/14/next-og-import", "description": "This codemod moves transforms imports from next/server to next/og for usage of Dynamic OG Image Generation.", diff --git a/packages/codemods/next/14/next-og-import/README.md b/packages/codemods/next/14/next-og-import/README.md index 4beb5ca2a..2f4d3708f 100644 --- a/packages/codemods/next/14/next-og-import/README.md +++ b/packages/codemods/next/14/next-og-import/README.md @@ -1,7 +1,3 @@ -# Next OG Import - -## Description - This codemod moves transforms imports from `next/server` to `next/og` for usage of [Dynamic OG Image Generation](https://nextjs.org/docs/app/building-your-application/optimizing/metadata#dynamic-image-generation). ## Example diff --git a/packages/codemods/react-router/4/add-exact-prop/.codemodrc.json b/packages/codemods/react-router/4/add-exact-prop/.codemodrc.json index 7b7058798..04fd2bd1d 100644 --- a/packages/codemods/react-router/4/add-exact-prop/.codemodrc.json +++ b/packages/codemods/react-router/4/add-exact-prop/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/add-exact-prop", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/add-exact-prop/README.md b/packages/codemods/react-router/4/add-exact-prop/README.md index 8763b2fc2..a142b9d26 100644 --- a/packages/codemods/react-router/4/add-exact-prop/README.md +++ b/packages/codemods/react-router/4/add-exact-prop/README.md @@ -1,5 +1 @@ -# Add Exact Prop - -## Description - Add `exact` prop to all instances of `Route` component. \ No newline at end of file diff --git a/packages/codemods/react-router/4/browser-router/.codemodrc.json b/packages/codemods/react-router/4/browser-router/.codemodrc.json index d55af0d86..d770a2845 100644 --- a/packages/codemods/react-router/4/browser-router/.codemodrc.json +++ b/packages/codemods/react-router/4/browser-router/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/browser-router", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/browser-router/README.md b/packages/codemods/react-router/4/browser-router/README.md index cda9635d3..364e3d619 100644 --- a/packages/codemods/react-router/4/browser-router/README.md +++ b/packages/codemods/react-router/4/browser-router/README.md @@ -1,5 +1 @@ -# Browser Router - -## Description - Run this codemod to replace `Router` using `browserHistory` to `BrowserRouter` in v4. \ No newline at end of file diff --git a/packages/codemods/react-router/4/create-hash-history/.codemodrc.json b/packages/codemods/react-router/4/create-hash-history/.codemodrc.json index 08d3c3296..4275495d8 100644 --- a/packages/codemods/react-router/4/create-hash-history/.codemodrc.json +++ b/packages/codemods/react-router/4/create-hash-history/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/create-hash-history", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/create-hash-history/README.md b/packages/codemods/react-router/4/create-hash-history/README.md index eca13e973..e69de29bb 100644 --- a/packages/codemods/react-router/4/create-hash-history/README.md +++ b/packages/codemods/react-router/4/create-hash-history/README.md @@ -1,4 +0,0 @@ -# Create Hash History - -## Description - diff --git a/packages/codemods/react-router/4/hash-router/.codemodrc.json b/packages/codemods/react-router/4/hash-router/.codemodrc.json index 0930c4c15..453b6b9ef 100644 --- a/packages/codemods/react-router/4/hash-router/.codemodrc.json +++ b/packages/codemods/react-router/4/hash-router/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/hash-router", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/hash-router/README.md b/packages/codemods/react-router/4/hash-router/README.md index eaf9a957d..ac7b2c702 100644 --- a/packages/codemods/react-router/4/hash-router/README.md +++ b/packages/codemods/react-router/4/hash-router/README.md @@ -1,5 +1 @@ -# Hash Router - -## Description - Run this codemod to replace `Router` using `hashHistory` to `HashRouter` in v4. \ No newline at end of file diff --git a/packages/codemods/react-router/4/index-route/.codemodrc.json b/packages/codemods/react-router/4/index-route/.codemodrc.json index 2de150ebf..77da6f033 100644 --- a/packages/codemods/react-router/4/index-route/.codemodrc.json +++ b/packages/codemods/react-router/4/index-route/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/index-route", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/index-route/README.md b/packages/codemods/react-router/4/index-route/README.md index 556564542..a77808953 100644 --- a/packages/codemods/react-router/4/index-route/README.md +++ b/packages/codemods/react-router/4/index-route/README.md @@ -1,5 +1 @@ -# Hash Router - -## Description - Replace `IndexRoute` with `Route` having `exact` prop set to `true`. \ No newline at end of file diff --git a/packages/codemods/react-router/4/remove-with-props/.codemodrc.json b/packages/codemods/react-router/4/remove-with-props/.codemodrc.json index 64faaf55d..a6d10b1ed 100644 --- a/packages/codemods/react-router/4/remove-with-props/.codemodrc.json +++ b/packages/codemods/react-router/4/remove-with-props/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/remove-with-props", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/remove-with-props/README.md b/packages/codemods/react-router/4/remove-with-props/README.md index c3b16bf02..e69de29bb 100644 --- a/packages/codemods/react-router/4/remove-with-props/README.md +++ b/packages/codemods/react-router/4/remove-with-props/README.md @@ -1,4 +0,0 @@ -# Remove With Props - -## Description - diff --git a/packages/codemods/react-router/4/rename-imports/.codemodrc.json b/packages/codemods/react-router/4/rename-imports/.codemodrc.json index 3be4ba65a..1ed12d7fc 100644 --- a/packages/codemods/react-router/4/rename-imports/.codemodrc.json +++ b/packages/codemods/react-router/4/rename-imports/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/rename-imports", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/rename-imports/README.md b/packages/codemods/react-router/4/rename-imports/README.md index 47dfc9f6b..0d14b7267 100644 --- a/packages/codemods/react-router/4/rename-imports/README.md +++ b/packages/codemods/react-router/4/rename-imports/README.md @@ -1,5 +1 @@ -# Rename Imports - -## Description - Replace `react-router` import source with `react-router-dom`. \ No newline at end of file diff --git a/packages/codemods/react-router/4/replace-location-query/.codemodrc.json b/packages/codemods/react-router/4/replace-location-query/.codemodrc.json index fca247bf9..b87c8e6ae 100644 --- a/packages/codemods/react-router/4/replace-location-query/.codemodrc.json +++ b/packages/codemods/react-router/4/replace-location-query/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/replace-location-query", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/replace-location-query/README.md b/packages/codemods/react-router/4/replace-location-query/README.md index edf669232..7b341d6eb 100644 --- a/packages/codemods/react-router/4/replace-location-query/README.md +++ b/packages/codemods/react-router/4/replace-location-query/README.md @@ -1,12 +1,6 @@ -# Replace Location Query - -## Description - This codemod replaces instances of `location.query` with `parse(location.search)`, where `parse` is a function imported from `query-string`. -## Example - -### Before +## Before ```jsx const List = ({ location }) => ( @@ -16,7 +10,7 @@ const List = ({ location }) => ( ); ``` -### After +## After ```jsx import { parse } from 'query-string'; @@ -27,29 +21,3 @@ const List = ({ location }) => ( ); ``` - -## Applicability Criteria - -React Router version 3.x.y - -## Other Metadata - -### Codemod Version - -v1.0.0 - -### Change Mode - -**Autonomous**: Changes can safely be pushed and merged without further human involvement. - -### **Codemod Engine** - -jscodeshift - -### Estimated Time Saving - -~3 minutes per occurrence - -### Owner - -[Codemod.com](https://codemod.com) diff --git a/packages/codemods/react-router/4/replace-nested-routes/.codemodrc.json b/packages/codemods/react-router/4/replace-nested-routes/.codemodrc.json index 6b9949f4d..62f3d70b8 100644 --- a/packages/codemods/react-router/4/replace-nested-routes/.codemodrc.json +++ b/packages/codemods/react-router/4/replace-nested-routes/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/replace-nested-routes", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/replace-nested-routes/README.md b/packages/codemods/react-router/4/replace-nested-routes/README.md index 1fb4082d8..178cf861c 100644 --- a/packages/codemods/react-router/4/replace-nested-routes/README.md +++ b/packages/codemods/react-router/4/replace-nested-routes/README.md @@ -1,5 +1 @@ -# Replace Nested Routes - -## Description - Run this codemod to deprecate nested components through the use of `render` prop of the parent component. \ No newline at end of file diff --git a/packages/codemods/react-router/4/replace-param-prop/.codemodrc.json b/packages/codemods/react-router/4/replace-param-prop/.codemodrc.json index 5892a72c4..d10352c60 100644 --- a/packages/codemods/react-router/4/replace-param-prop/.codemodrc.json +++ b/packages/codemods/react-router/4/replace-param-prop/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/replace-param-prop", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/replace-param-prop/README.md b/packages/codemods/react-router/4/replace-param-prop/README.md index 4f538ffc9..a3424cc9d 100644 --- a/packages/codemods/react-router/4/replace-param-prop/README.md +++ b/packages/codemods/react-router/4/replace-param-prop/README.md @@ -1,12 +1,6 @@ -# Replace params prop - -## Description - Replaces `params` prop passed by react-router with `match.params`. -## Example - -### Before +## Before ```jsx const PostEdit = ({ params }) => ( @@ -16,7 +10,7 @@ const PostEdit = ({ params }) => ( ); ``` -### After +## After ```jsx const PostEdit = ({ match }) => ( @@ -25,31 +19,3 @@ const PostEdit = ({ match }) => ( ); ``` - -## Applicability Criteria - -React Router version 3.x.y - -## Other Metadata - -### Codemod Version - -v1.0.0 - -### Change Mode - -**Assistive**: The automation partially completes changes. Human involvement is needed to make changes ready to be pushed and merged. - -### **Codemod Engine** - -jscodeshift - -### Estimated Time Saving - -~1 minutes per occurrence - -### Owner - -[Codemod.com](https://github.com/codemod-com) - -### Links for more info diff --git a/packages/codemods/react-router/4/use-history-hook/.codemodrc.json b/packages/codemods/react-router/4/use-history-hook/.codemodrc.json index c23fbee56..5d376956f 100644 --- a/packages/codemods/react-router/4/use-history-hook/.codemodrc.json +++ b/packages/codemods/react-router/4/use-history-hook/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/use-history-hook", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/use-history-hook/README.md b/packages/codemods/react-router/4/use-history-hook/README.md index dafb34a42..d1556043e 100644 --- a/packages/codemods/react-router/4/use-history-hook/README.md +++ b/packages/codemods/react-router/4/use-history-hook/README.md @@ -1,5 +1 @@ -# Use History Hook - -## Description - Run this codemod to deprecate `browserHistory` and use history from `useHistory` hook instead. \ No newline at end of file diff --git a/packages/codemods/react-router/4/wrap-with-switch/.codemodrc.json b/packages/codemods/react-router/4/wrap-with-switch/.codemodrc.json index ce6cb6006..f72943c52 100644 --- a/packages/codemods/react-router/4/wrap-with-switch/.codemodrc.json +++ b/packages/codemods/react-router/4/wrap-with-switch/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/4/wrap-with-switch", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/4/wrap-with-switch/README.md b/packages/codemods/react-router/4/wrap-with-switch/README.md index 53fd34cd2..e69de29bb 100644 --- a/packages/codemods/react-router/4/wrap-with-switch/README.md +++ b/packages/codemods/react-router/4/wrap-with-switch/README.md @@ -1,4 +0,0 @@ -# Wrap With Switch - -## Description - diff --git a/packages/codemods/react-router/6/compat-route/.codemodrc.json b/packages/codemods/react-router/6/compat-route/.codemodrc.json index 1386e4bc7..7582e1823 100644 --- a/packages/codemods/react-router/6/compat-route/.codemodrc.json +++ b/packages/codemods/react-router/6/compat-route/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/compat-route", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/compat-route/README.md b/packages/codemods/react-router/6/compat-route/README.md index bbfa8f802..e69de29bb 100644 --- a/packages/codemods/react-router/6/compat-route/README.md +++ b/packages/codemods/react-router/6/compat-route/README.md @@ -1,4 +0,0 @@ -# Compat Route - -## Description - diff --git a/packages/codemods/react-router/6/compat-router/.codemodrc.json b/packages/codemods/react-router/6/compat-router/.codemodrc.json index 9e2898b19..76a1c004c 100644 --- a/packages/codemods/react-router/6/compat-router/.codemodrc.json +++ b/packages/codemods/react-router/6/compat-router/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/compat-router", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/compat-router/README.md b/packages/codemods/react-router/6/compat-router/README.md index cc83dff9e..e69de29bb 100644 --- a/packages/codemods/react-router/6/compat-router/README.md +++ b/packages/codemods/react-router/6/compat-router/README.md @@ -1,4 +0,0 @@ -# Compat Router - -## Description - diff --git a/packages/codemods/react-router/6/link-to-props/.codemodrc.json b/packages/codemods/react-router/6/link-to-props/.codemodrc.json index 1ee7ed919..2cd28bc75 100644 --- a/packages/codemods/react-router/6/link-to-props/.codemodrc.json +++ b/packages/codemods/react-router/6/link-to-props/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/link-to-props", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/link-to-props/README.md b/packages/codemods/react-router/6/link-to-props/README.md index 9915d625d..e69de29bb 100644 --- a/packages/codemods/react-router/6/link-to-props/README.md +++ b/packages/codemods/react-router/6/link-to-props/README.md @@ -1,4 +0,0 @@ -# Link To Props - -## Description - diff --git a/packages/codemods/react-router/6/match-path-arguments/.codemodrc.json b/packages/codemods/react-router/6/match-path-arguments/.codemodrc.json index 976f4b1eb..1f8cb845e 100644 --- a/packages/codemods/react-router/6/match-path-arguments/.codemodrc.json +++ b/packages/codemods/react-router/6/match-path-arguments/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/match-path-arguments", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/match-path-arguments/README.md b/packages/codemods/react-router/6/match-path-arguments/README.md index 0bac27fed..e69de29bb 100644 --- a/packages/codemods/react-router/6/match-path-arguments/README.md +++ b/packages/codemods/react-router/6/match-path-arguments/README.md @@ -1,4 +0,0 @@ -# Match Path Arguments - -## Description - diff --git a/packages/codemods/react-router/6/navlink-exact-end/.codemodrc.json b/packages/codemods/react-router/6/navlink-exact-end/.codemodrc.json index 5b4027562..53130a03d 100644 --- a/packages/codemods/react-router/6/navlink-exact-end/.codemodrc.json +++ b/packages/codemods/react-router/6/navlink-exact-end/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/navlink-exact-end", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/navlink-exact-end/README.md b/packages/codemods/react-router/6/navlink-exact-end/README.md index d43bbf84f..e69de29bb 100644 --- a/packages/codemods/react-router/6/navlink-exact-end/README.md +++ b/packages/codemods/react-router/6/navlink-exact-end/README.md @@ -1,4 +0,0 @@ -# Navlink Exact End - -## Description - diff --git a/packages/codemods/react-router/6/redirect-to-navigate/.codemodrc.json b/packages/codemods/react-router/6/redirect-to-navigate/.codemodrc.json index 4954ec972..fafc25ab0 100644 --- a/packages/codemods/react-router/6/redirect-to-navigate/.codemodrc.json +++ b/packages/codemods/react-router/6/redirect-to-navigate/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/redirect-to-navigate", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/redirect-to-navigate/README.md b/packages/codemods/react-router/6/redirect-to-navigate/README.md index 1c95ef363..e69de29bb 100644 --- a/packages/codemods/react-router/6/redirect-to-navigate/README.md +++ b/packages/codemods/react-router/6/redirect-to-navigate/README.md @@ -1,4 +0,0 @@ -# Redirect To Navigate - -## Description - diff --git a/packages/codemods/react-router/6/remove-active-classname/.codemodrc.json b/packages/codemods/react-router/6/remove-active-classname/.codemodrc.json index d0f81a316..ad08b8fa0 100644 --- a/packages/codemods/react-router/6/remove-active-classname/.codemodrc.json +++ b/packages/codemods/react-router/6/remove-active-classname/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/remove-active-classname", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/remove-active-classname/README.md b/packages/codemods/react-router/6/remove-active-classname/README.md index 8da5d8332..e69de29bb 100644 --- a/packages/codemods/react-router/6/remove-active-classname/README.md +++ b/packages/codemods/react-router/6/remove-active-classname/README.md @@ -1,4 +0,0 @@ -# Remove Active Classname - -## Description - diff --git a/packages/codemods/react-router/6/remove-active-style/.codemodrc.json b/packages/codemods/react-router/6/remove-active-style/.codemodrc.json index 5b1d93a4e..9a9e2bb3a 100644 --- a/packages/codemods/react-router/6/remove-active-style/.codemodrc.json +++ b/packages/codemods/react-router/6/remove-active-style/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/remove-active-style", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/remove-active-style/README.md b/packages/codemods/react-router/6/remove-active-style/README.md index 5b3274925..e69de29bb 100644 --- a/packages/codemods/react-router/6/remove-active-style/README.md +++ b/packages/codemods/react-router/6/remove-active-style/README.md @@ -1,4 +0,0 @@ -# Remove Active Style - -## Description - diff --git a/packages/codemods/react-router/6/remove-compat-router/.codemodrc.json b/packages/codemods/react-router/6/remove-compat-router/.codemodrc.json index ec0c48414..b7aa2fb38 100644 --- a/packages/codemods/react-router/6/remove-compat-router/.codemodrc.json +++ b/packages/codemods/react-router/6/remove-compat-router/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/remove-compat-router", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/remove-compat-router/README.md b/packages/codemods/react-router/6/remove-compat-router/README.md index 2cc379948..e69de29bb 100644 --- a/packages/codemods/react-router/6/remove-compat-router/README.md +++ b/packages/codemods/react-router/6/remove-compat-router/README.md @@ -1,4 +0,0 @@ -# Remove Compat Router - -## Description - diff --git a/packages/codemods/react-router/6/remove-go-hooks/.codemodrc.json b/packages/codemods/react-router/6/remove-go-hooks/.codemodrc.json index 73b2c9a74..69140f735 100644 --- a/packages/codemods/react-router/6/remove-go-hooks/.codemodrc.json +++ b/packages/codemods/react-router/6/remove-go-hooks/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/remove-go-hooks", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/remove-go-hooks/README.md b/packages/codemods/react-router/6/remove-go-hooks/README.md index 259a3722a..e69de29bb 100644 --- a/packages/codemods/react-router/6/remove-go-hooks/README.md +++ b/packages/codemods/react-router/6/remove-go-hooks/README.md @@ -1,4 +0,0 @@ -# Remove Go Hooks - -## Description - diff --git a/packages/codemods/react-router/6/remove-redirect-inside-switch/.codemodrc.json b/packages/codemods/react-router/6/remove-redirect-inside-switch/.codemodrc.json index 0a2d06158..40c1d2585 100644 --- a/packages/codemods/react-router/6/remove-redirect-inside-switch/.codemodrc.json +++ b/packages/codemods/react-router/6/remove-redirect-inside-switch/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/remove-redirect-inside-switch", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/remove-redirect-inside-switch/README.md b/packages/codemods/react-router/6/remove-redirect-inside-switch/README.md index 4d18e940f..e69de29bb 100644 --- a/packages/codemods/react-router/6/remove-redirect-inside-switch/README.md +++ b/packages/codemods/react-router/6/remove-redirect-inside-switch/README.md @@ -1,4 +0,0 @@ -# Remove Redirect Inside Switch - -## Description - diff --git a/packages/codemods/react-router/6/rename-compat-imports/.codemodrc.json b/packages/codemods/react-router/6/rename-compat-imports/.codemodrc.json index bacee3ea8..15b61fdbf 100644 --- a/packages/codemods/react-router/6/rename-compat-imports/.codemodrc.json +++ b/packages/codemods/react-router/6/rename-compat-imports/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/rename-compat-imports", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/rename-compat-imports/README.md b/packages/codemods/react-router/6/rename-compat-imports/README.md index 6050c8bab..e69de29bb 100644 --- a/packages/codemods/react-router/6/rename-compat-imports/README.md +++ b/packages/codemods/react-router/6/rename-compat-imports/README.md @@ -1,4 +0,0 @@ -# Remove Compat Imports - -## Description - diff --git a/packages/codemods/react-router/6/static-router-imports/.codemodrc.json b/packages/codemods/react-router/6/static-router-imports/.codemodrc.json index b47c0345d..f7baf4d53 100644 --- a/packages/codemods/react-router/6/static-router-imports/.codemodrc.json +++ b/packages/codemods/react-router/6/static-router-imports/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/static-router-imports", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/static-router-imports/README.md b/packages/codemods/react-router/6/static-router-imports/README.md index 7d6aa9ead..e69de29bb 100644 --- a/packages/codemods/react-router/6/static-router-imports/README.md +++ b/packages/codemods/react-router/6/static-router-imports/README.md @@ -1,4 +0,0 @@ -# Static Router Imports - -## Description - diff --git a/packages/codemods/react-router/6/use-location/.codemodrc.json b/packages/codemods/react-router/6/use-location/.codemodrc.json index 3f73767fe..69f449680 100644 --- a/packages/codemods/react-router/6/use-location/.codemodrc.json +++ b/packages/codemods/react-router/6/use-location/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/use-location", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/use-location/README.md b/packages/codemods/react-router/6/use-location/README.md index 2c65e5d52..e69de29bb 100644 --- a/packages/codemods/react-router/6/use-location/README.md +++ b/packages/codemods/react-router/6/use-location/README.md @@ -1,4 +0,0 @@ -# Use Location - -## Description - diff --git a/packages/codemods/react-router/6/use-navigate/.codemodrc.json b/packages/codemods/react-router/6/use-navigate/.codemodrc.json index cb61d9888..0c193d25c 100644 --- a/packages/codemods/react-router/6/use-navigate/.codemodrc.json +++ b/packages/codemods/react-router/6/use-navigate/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/use-navigate", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/use-navigate/README.md b/packages/codemods/react-router/6/use-navigate/README.md index 8d6334730..e69de29bb 100644 --- a/packages/codemods/react-router/6/use-navigate/README.md +++ b/packages/codemods/react-router/6/use-navigate/README.md @@ -1,4 +0,0 @@ -# Use Navigate - -## Description - diff --git a/packages/codemods/react-router/6/use-params/.codemodrc.json b/packages/codemods/react-router/6/use-params/.codemodrc.json index 7cbd00264..cce501c83 100644 --- a/packages/codemods/react-router/6/use-params/.codemodrc.json +++ b/packages/codemods/react-router/6/use-params/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/use-params", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/use-params/README.md b/packages/codemods/react-router/6/use-params/README.md index 5681c54ff..e69de29bb 100644 --- a/packages/codemods/react-router/6/use-params/README.md +++ b/packages/codemods/react-router/6/use-params/README.md @@ -1,4 +0,0 @@ -# Use Params - -## Description - diff --git a/packages/codemods/react-router/6/use-route-match/.codemodrc.json b/packages/codemods/react-router/6/use-route-match/.codemodrc.json index 79c65ca87..00686beeb 100644 --- a/packages/codemods/react-router/6/use-route-match/.codemodrc.json +++ b/packages/codemods/react-router/6/use-route-match/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react-router/6/use-route-match", "engine": "jscodeshift", diff --git a/packages/codemods/react-router/6/use-route-match/README.md b/packages/codemods/react-router/6/use-route-match/README.md index 0796c1ad5..e69de29bb 100644 --- a/packages/codemods/react-router/6/use-route-match/README.md +++ b/packages/codemods/react-router/6/use-route-match/README.md @@ -1,4 +0,0 @@ -# Use Route Match - -## Description - diff --git a/packages/codemods/react/19/remove-context-provider/.codemodrc.json b/packages/codemods/react/19/remove-context-provider/.codemodrc.json index d58954806..e092c8de4 100644 --- a/packages/codemods/react/19/remove-context-provider/.codemodrc.json +++ b/packages/codemods/react/19/remove-context-provider/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "name": "react/19/remove-context-provider", "private": false, "engine": "jscodeshift", diff --git a/packages/codemods/react/19/remove-context-provider/README.md b/packages/codemods/react/19/remove-context-provider/README.md index fa1b733d5..40c3f227e 100644 --- a/packages/codemods/react/19/remove-context-provider/README.md +++ b/packages/codemods/react/19/remove-context-provider/README.md @@ -1,12 +1,6 @@ -# Change Context.Provider to Context - -## Description - This codemod will remove the usage of `Provider` for contexts; e.g., Context.Provider to Context -## Example - -### Before: +## Before: ```tsx function App() { @@ -20,7 +14,7 @@ function App() { } ``` -### After: +## After: ```tsx function App() { diff --git a/packages/codemods/react/19/remove-forward-ref/.codemodrc.json b/packages/codemods/react/19/remove-forward-ref/.codemodrc.json index 2d43391b3..5701df11d 100644 --- a/packages/codemods/react/19/remove-forward-ref/.codemodrc.json +++ b/packages/codemods/react/19/remove-forward-ref/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react/19/remove-forward-ref", "description": "Codemod to remove React.forwardRef function that will be deprecated in next major React release", diff --git a/packages/codemods/react/19/remove-forward-ref/README.md b/packages/codemods/react/19/remove-forward-ref/README.md index 484713f7a..f26f3c4f3 100644 --- a/packages/codemods/react/19/remove-forward-ref/README.md +++ b/packages/codemods/react/19/remove-forward-ref/README.md @@ -1,11 +1,5 @@ -# Replace forwardRef with ref prop - -## Description - React.forwardRef will be deprecated for Function Components in near future. This codemod removes forwardRef function. -## Example - ### Before: ```jsx diff --git a/packages/codemods/react/19/remove-memoization-hooks/.codemodrc.json b/packages/codemods/react/19/remove-memoization-hooks/.codemodrc.json index 06acfa501..c411bca4b 100644 --- a/packages/codemods/react/19/remove-memoization-hooks/.codemodrc.json +++ b/packages/codemods/react/19/remove-memoization-hooks/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "name": "react/19/remove-memoization", "private": false, "engine": "jscodeshift", diff --git a/packages/codemods/react/19/remove-memoization-hooks/README.md b/packages/codemods/react/19/remove-memoization-hooks/README.md index c505093e2..dbdb01a3d 100644 --- a/packages/codemods/react/19/remove-memoization-hooks/README.md +++ b/packages/codemods/react/19/remove-memoization-hooks/README.md @@ -1,5 +1 @@ -# Remove Manual Memoization Hooks - -## Description - This codemod will remove manual memoization hooks: `useCallback`, `useMemo` and `memo`. This codemod goes hand in hand with React Compiler. diff --git a/packages/codemods/react/19/replace-act-import/.codemodrc.json b/packages/codemods/react/19/replace-act-import/.codemodrc.json index 2f9338e70..6f4b78e52 100644 --- a/packages/codemods/react/19/replace-act-import/.codemodrc.json +++ b/packages/codemods/react/19/replace-act-import/.codemodrc.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.1", "name": "react/19/replace-act-import", "private": false, "engine": "jscodeshift", diff --git a/packages/codemods/react/19/replace-act-import/README.md b/packages/codemods/react/19/replace-act-import/README.md index 982b6743e..6d0871f5d 100644 --- a/packages/codemods/react/19/replace-act-import/README.md +++ b/packages/codemods/react/19/replace-act-import/README.md @@ -1,12 +1,6 @@ -# Replace react dom test utils with react - -## Description - This codemod will replace the usages of `TestUtils.act()` to use `React.act()`, introduced in React v19. -## Examples - -### Before +## Before ```ts import { act } from 'react-dom/test-utils'; @@ -14,7 +8,7 @@ import { act } from 'react-dom/test-utils'; act(); ``` -### After +## After ```ts import { act } from "react"; @@ -24,7 +18,7 @@ act(); -### Before +## Before ```ts import * as ReactDOMTestUtils from 'react-dom/test-utils'; @@ -32,7 +26,7 @@ import * as ReactDOMTestUtils from 'react-dom/test-utils'; ReactDOMTestUtils.act(); ``` -### After +## After ```ts import * as React from "react"; diff --git a/packages/codemods/react/19/replace-use-form-state/.codemodrc.json b/packages/codemods/react/19/replace-use-form-state/.codemodrc.json index 9deaabf4c..b3c2095dd 100644 --- a/packages/codemods/react/19/replace-use-form-state/.codemodrc.json +++ b/packages/codemods/react/19/replace-use-form-state/.codemodrc.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.1", "name": "react/19/replace-use-form-state", "private": false, "engine": "jscodeshift", diff --git a/packages/codemods/react/19/replace-use-form-state/README.md b/packages/codemods/react/19/replace-use-form-state/README.md index 58c4cc195..97e436b07 100644 --- a/packages/codemods/react/19/replace-use-form-state/README.md +++ b/packages/codemods/react/19/replace-use-form-state/README.md @@ -1,12 +1,6 @@ -# Replace react useFormState with useActionState - -## Description - This codemod will replace the usages of `useFormState()` to use `useActionState()`, introduced in React v19. -## Examples - -### Before +## Before ```ts import { useFormState } from "react-dom"; @@ -26,7 +20,7 @@ function StatefulForm({}) { } ``` -### After +## After ```ts import { useActionState } from "react-dom"; @@ -48,7 +42,7 @@ function StatefulForm({}) { -### Before +## Before ```ts import * as ReactDOM from "react-dom"; @@ -59,7 +53,7 @@ function StatefulForm({}) { } ``` -### After +## After ```ts import * as ReactDOM from "react-dom"; diff --git a/packages/codemods/react/19/use-context-hook/.codemodrc.json b/packages/codemods/react/19/use-context-hook/.codemodrc.json index 2f439a596..bfa56ddf8 100644 --- a/packages/codemods/react/19/use-context-hook/.codemodrc.json +++ b/packages/codemods/react/19/use-context-hook/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "name": "react/19/use-context-hook", "private": false, "engine": "jscodeshift", diff --git a/packages/codemods/react/19/use-context-hook/README.md b/packages/codemods/react/19/use-context-hook/README.md index 14b6f0040..04e839093 100644 --- a/packages/codemods/react/19/use-context-hook/README.md +++ b/packages/codemods/react/19/use-context-hook/README.md @@ -1,12 +1,6 @@ -# Change useContext usage to use hook - -## Description - This codemod will convert the usage of `useContext` to the new hook format, introduced in React v19. -## Example - -### Before: +## Before: ```tsx import { useContext } from "react"; @@ -15,7 +9,7 @@ import ThemeContext from "./ThemeContext"; const theme = useContext(ThemeContext); ``` -### After: +## After: ```tsx import { use } from "react"; diff --git a/packages/codemods/react/prop-types-typescript/.codemodrc.json b/packages/codemods/react/prop-types-typescript/.codemodrc.json index 0530fa3c6..e203fb38e 100644 --- a/packages/codemods/react/prop-types-typescript/.codemodrc.json +++ b/packages/codemods/react/prop-types-typescript/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react/prop-types-typescript", "description": "Codemod to convert React PropTypes to TypeScript types.", diff --git a/packages/codemods/react/prop-types-typescript/README.md b/packages/codemods/react/prop-types-typescript/README.md index b4902b24e..ba5e7e527 100644 --- a/packages/codemods/react/prop-types-typescript/README.md +++ b/packages/codemods/react/prop-types-typescript/README.md @@ -1,7 +1,3 @@ -# Migrate prop types to typescript - -## Description - Codemod to convert React PropTypes to TypeScript types. - Supports function and class components @@ -11,9 +7,7 @@ Codemod to convert React PropTypes to TypeScript types. - Copies JSDoc comments to the generated TypeScript types - Option to remove or preserve PropTypes after converting to TS -## Example - -### Before: +## Before: ```jsx import PropTypes from 'prop-types'; @@ -29,7 +23,7 @@ MyComponent.propTypes = { }; ``` -### After: +## After: ```tsx import React from 'react'; diff --git a/packages/codemods/react/replace-react-fc-typescript/.codemodrc.json b/packages/codemods/react/replace-react-fc-typescript/.codemodrc.json index f18229254..b720c99f0 100644 --- a/packages/codemods/react/replace-react-fc-typescript/.codemodrc.json +++ b/packages/codemods/react/replace-react-fc-typescript/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "react/replace-react-fc-typescript", "description": "Codemod to replace React.FC when using React with Typescript.", diff --git a/packages/codemods/react/replace-react-fc-typescript/README.md b/packages/codemods/react/replace-react-fc-typescript/README.md index 364151534..fe9480aa5 100644 --- a/packages/codemods/react/replace-react-fc-typescript/README.md +++ b/packages/codemods/react/replace-react-fc-typescript/README.md @@ -1,7 +1,3 @@ -# Replace React FC Typescript - -## Description - This codemod removes `React.FC`, `React.FunctionComponent` and `React.SFC` and replaces the Props as the type of the unique argument in the component definition. This codemod supports: @@ -14,9 +10,7 @@ This codemod supports: - Functions that accept a component definition. - Using FC, FunctionComponent and SFC as a named export. -## Example - -### Before: +## Before: ```jsx type Props2 = { id: number }; @@ -25,7 +19,7 @@ export const MyComponent2: React.FC = (props) => { } ``` -### After: +## After: ```tsx type Props2 = { id: number }; diff --git a/packages/codemods/redwoodjs/core/4/auth-decoder/.codemodrc.json b/packages/codemods/redwoodjs/core/4/auth-decoder/.codemodrc.json index fc5e7eb2f..f3b9f0ae4 100644 --- a/packages/codemods/redwoodjs/core/4/auth-decoder/.codemodrc.json +++ b/packages/codemods/redwoodjs/core/4/auth-decoder/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "redwoodjs/core/4/auth-decoder", "engine": "jscodeshift", diff --git a/packages/codemods/redwoodjs/core/4/auth-decoder/README.md b/packages/codemods/redwoodjs/core/4/auth-decoder/README.md index f33080bd6..258e6d17e 100644 --- a/packages/codemods/redwoodjs/core/4/auth-decoder/README.md +++ b/packages/codemods/redwoodjs/core/4/auth-decoder/README.md @@ -1,12 +1,6 @@ -# Auth Decoder - -## Description - This codemod for RedwoodJS v4 automatically inserts an `authDecoder` property into the `createGraphQLHandler` call if it's not already present. It also adds an import statement for `authDecoder` from `@redwoodjs/auth-auth0-api` at the beginning of the file, ensuring that the necessary functionality for authentication is correctly integrated. -## Example - -### Before +## Before ```ts import { createGraphQLHandler } from '@redwoodjs/graphql-server'; @@ -28,7 +22,7 @@ export const handler = createGraphQLHandler({ }); ``` -### After +## After ```ts import { authDecoder } from '@redwoodjs/auth-auth0-api'; @@ -51,4 +45,4 @@ export const handler = createGraphQLHandler({ db.$disconnect(); }, }); -``` \ No newline at end of file +``` diff --git a/packages/codemods/typescript/remove-public-modifier/.codemodrc.json b/packages/codemods/typescript/remove-public-modifier/.codemodrc.json index f2a50bea1..e75d7b870 100644 --- a/packages/codemods/typescript/remove-public-modifier/.codemodrc.json +++ b/packages/codemods/typescript/remove-public-modifier/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "typescript/remove-public-modifier", "description": "This codemod removes public modifier in interface declarations as it is implicit.", diff --git a/packages/codemods/typescript/remove-public-modifier/README.md b/packages/codemods/typescript/remove-public-modifier/README.md index 812c356d4..d5ba5166a 100644 --- a/packages/codemods/typescript/remove-public-modifier/README.md +++ b/packages/codemods/typescript/remove-public-modifier/README.md @@ -1,12 +1,6 @@ -# Remove Public Modifier - -## Description - This codemod removes public modifier in interface declarations as it is implicit. -## Example - -### Before +## Before ```jsx class MyClass { @@ -20,7 +14,7 @@ class MyClass { } ``` -### After +## After ```jsx class MyClass { diff --git a/packages/codemods/typescript/use-template-literals/.codemodrc.json b/packages/codemods/typescript/use-template-literals/.codemodrc.json index 08c92cd36..b2357882d 100644 --- a/packages/codemods/typescript/use-template-literals/.codemodrc.json +++ b/packages/codemods/typescript/use-template-literals/.codemodrc.json @@ -1,6 +1,6 @@ { "$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json", - "version": "1.0.0", + "version": "1.0.1", "private": false, "name": "typescript/use-template-literals", "description": "This codemod replaces string concatenations with template literals.", diff --git a/packages/codemods/typescript/use-template-literals/README.md b/packages/codemods/typescript/use-template-literals/README.md index dade2d986..5c3f86f0b 100644 --- a/packages/codemods/typescript/use-template-literals/README.md +++ b/packages/codemods/typescript/use-template-literals/README.md @@ -1,19 +1,13 @@ -# Use Template Literals - -## Description - This codemod replaces string concatenations with template literals. -## Example - -### Before +## Before ```jsx const name = 'John'; const greeting = 'Hello, ' + name + '!'; ``` -### After +## After ```jsx const name = 'John';