@sproutsocial/racine 31.7.14 → 31.7.16

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Change Log
2
2
 
3
+ ## 31.7.16
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [487cab4]
8
+ - Updated dependencies [f3bed6c]
9
+ - Updated dependencies [50982e3]
10
+ - @sproutsocial/seeds-react-panel@1.1.0
11
+ - @sproutsocial/seeds-react-peek-in@0.4.0
12
+ - @sproutsocial/seeds-react-table@1.0.51
13
+ - @sproutsocial/seeds-react-data-table@2.6.33
14
+
15
+ ## 31.7.15
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [a0b98f1]
20
+ - Updated dependencies [ea120a6]
21
+ - Updated dependencies [690479a]
22
+ - Updated dependencies [c36361c]
23
+ - Updated dependencies [a635951]
24
+ - @sproutsocial/seeds-react-character-counter@1.0.8
25
+ - @sproutsocial/seeds-react-grid@0.2.13
26
+ - @sproutsocial/seeds-react-duration@1.0.32
27
+ - @sproutsocial/seeds-react-image@1.0.29
28
+ - @sproutsocial/seeds-react-empty-state@1.0.31
29
+ - @sproutsocial/seeds-react-avatar@1.1.25
30
+ - @sproutsocial/seeds-react-message@1.0.59
31
+
3
32
  ## 31.7.14
4
33
 
5
34
  ### Patch Changes
package/README.NPM.md CHANGED
@@ -7,4 +7,4 @@
7
7
  <a href="https://github.com/sproutsocial/seeds/blob/main/seeds-react/racine/LICENSE"><img src="https://flat.badgen.net/badge/license/MIT/blue" alt=""></a>
8
8
  </p>
9
9
 
10
- Racine!
10
+ Racine!
package/README.md CHANGED
@@ -88,6 +88,7 @@ Racine's file structure is set up like this:
88
88
  - `ComponentName` - Deprecated components that won't get added to the monorepo have a folder within the `src` directory.
89
89
 
90
90
  Most components in Racine are exported at the root from their own packages. Each package typically structures its files similarly to how they appeared in Racine:
91
+
91
92
  - `src`
92
93
  - `index.js` - This file should contain all necessary exports for the component.
93
94
  - `index.stories.js` - Storybook stories can be written here.
@@ -108,26 +109,31 @@ And you can interact with Racine via the command line with these commands:
108
109
  Codemods are automated scripts that help migrate code when component APIs change. They're available via the `racine-codemod` CLI tool and are automatically discovered from both racine and other `@sproutsocial/seeds-react-*` packages.
109
110
 
110
111
  **List available codemods:**
112
+
111
113
  ```bash
112
114
  racine-codemod
113
115
  ```
114
116
 
115
117
  **View codemod documentation:**
118
+
116
119
  ```bash
117
120
  racine-codemod <codemod-name>
118
121
  ```
119
122
 
120
123
  **Run a codemod:**
124
+
121
125
  ```bash
122
126
  racine-codemod <codemod-name> <path-to-files>
123
127
  ```
124
128
 
125
129
  **Example:**
130
+
126
131
  ```bash
127
132
  racine-codemod badge-1.x-to-2.x src --parser=tsx --quote=double
128
133
  ```
129
134
 
130
135
  After running a codemod, you should run Prettier to fix any formatting issues:
136
+
131
137
  ```bash
132
138
  yarn format
133
139
  ```
@@ -182,6 +188,7 @@ Racine components are documented in [Seeds](https://sproutsocial.com/seeds/compo
182
188
  When making breaking changes to a component API, you should create a codemod to help users migrate their code. Codemods should be added to the package that needs migration (not racine), and will be automatically discovered by the `racine-codemod` CLI.
183
189
 
184
190
  **When to create a codemod:**
191
+
185
192
  - Removing or renaming props
186
193
  - Changing prop types or values
187
194
  - Breaking API changes that affect multiple files
@@ -189,22 +196,28 @@ When making breaking changes to a component API, you should create a codemod to
189
196
  **Initial Setup** (for packages adding their first codemod):
190
197
 
191
198
  1. **Update `tsup.config.ts`**:
199
+
192
200
  - Add a separate config entry for codemods:
201
+
193
202
  ```typescript
194
203
  export default defineConfig([
195
204
  // Main package build
196
- { entry: ["src/index.ts"], format: ["cjs", "esm"], /* ... */ },
205
+ { entry: ["src/index.ts"], format: ["cjs", "esm"] /* ... */ },
197
206
  // Codemods build (CJS only)
198
- { entry: ["codemods/**/*.ts"], format: ["cjs"], dts: false, /* ... */ },
207
+ { entry: ["codemods/**/*.ts"], format: ["cjs"], dts: false /* ... */ },
199
208
  ]);
200
209
  ```
201
210
 
202
211
  2. **Update `package.json`**:
212
+
203
213
  - Add `exports` field for codemods:
214
+
204
215
  ```json
205
216
  {
206
217
  "exports": {
207
- ".": { /* existing exports */ },
218
+ ".": {
219
+ /* existing exports */
220
+ },
208
221
  "./codemods/*": {
209
222
  "require": "./dist/codemods/*.js"
210
223
  }
@@ -212,6 +225,7 @@ When making breaking changes to a component API, you should create a codemod to
212
225
  "files": ["dist", "codemods"]
213
226
  }
214
227
  ```
228
+
215
229
  - Add `@types/jscodeshift` and `jscodeshift` to devDependencies (if not already present)
216
230
 
217
231
  3. **Update `tsconfig.json`**:
@@ -228,11 +242,13 @@ When making breaking changes to a component API, you should create a codemod to
228
242
  7. Codemod will be discoverable via `racine-codemod` CLI after package is built
229
243
 
230
244
  **Testing codemods locally:**
245
+
231
246
  - Run `yarn build` to compile codemod to JavaScript
232
247
  - Run `yarn test` to run codemod tests
233
248
  - Test codemod execution: `racine-codemod my-codemod path/to/test/files`
234
249
 
235
250
  **Example structure:**
251
+
236
252
  ```
237
253
  my-package/
238
254
  codemods/