@mastra/codemod 1.0.1-alpha.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @mastra/codemod
2
2
 
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - dependencies updates: ([#11584](https://github.com/mastra-ai/mastra/pull/11584))
8
+ - Updated dependency [`@clack/prompts@1.0.0-alpha.9` ↗︎](https://www.npmjs.com/package/@clack/prompts/v/1.0.0) (from `1.0.0-alpha.6`, in `dependencies`)
9
+
10
+ - Added `workflow-get-init-data` codemod that transforms `getInitData()` calls to `getInitData<any>()`. ([#12212](https://github.com/mastra-ai/mastra/pull/12212))
11
+
12
+ This codemod helps migrate code after the `getInitData` return type changed from `any` to `unknown`. Adding the explicit `<any>` type parameter restores the previous behavior while maintaining type safety.
13
+
14
+ **Usage:**
15
+
16
+ ```bash
17
+ npx @mastra/codemod@latest v1/workflow-get-init-data .
18
+ ```
19
+
20
+ **Before:**
21
+
22
+ ```typescript
23
+ createStep({
24
+ execute: async ({ getInitData }) => {
25
+ const initData = getInitData();
26
+ if (initData.key === 'value') {
27
+ }
28
+ },
29
+ });
30
+ ```
31
+
32
+ **After:**
33
+
34
+ ```typescript
35
+ createStep({
36
+ execute: async ({ getInitData }) => {
37
+ const initData = getInitData<any>();
38
+ if (initData.key === 'value') {
39
+ }
40
+ },
41
+ });
42
+ ```
43
+
3
44
  ## 1.0.1-alpha.0
4
45
 
5
46
  ### Patch Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mastra/codemod",
3
3
  "type": "module",
4
- "version": "1.0.1-alpha.0",
4
+ "version": "1.0.1",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Codemod CLI for Mastra",
7
7
  "bin": {
@@ -34,7 +34,7 @@
34
34
  "tsup": "^8.5.1",
35
35
  "typescript": "^5.9.3",
36
36
  "vitest": "4.0.16",
37
- "@internal/lint": "0.0.55"
37
+ "@internal/lint": "0.0.56"
38
38
  },
39
39
  "homepage": "https://mastra.ai",
40
40
  "repository": {