@designcrowd/fe-shared-lib 1.5.20-dts-upgrades → 1.5.20
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/dist/css/tailwind-brandCrowd.css +2595 -0
- package/dist/css/tailwind-brandPage.css +2275 -0
- package/dist/css/tailwind-crazyDomains.css +2595 -0
- package/dist/css/tailwind-designCom.css +2595 -0
- package/dist/css/tailwind-designCrowd.css +2595 -0
- package/package.json +1 -2
- package/.claude/settings.local.json +0 -33
- package/.npm-publish-token +0 -1
- package/MODERNIZATION_ROADMAP.md +0 -264
- package/docs/plans/2026-01-19-typescript-declarations-design.md +0 -114
- package/docs/plans/2026-01-19-typescript-declarations-tdd-plan.md +0 -953
- package/index.d.ts +0 -309
- package/types-test/all-components.test.ts +0 -81
- package/types-test/basic-imports.test.ts +0 -16
- package/types-test/button-props.test.ts +0 -63
- package/types-test/checkbox-toggle-props.test.ts +0 -78
- package/types-test/dropdown-props.test.ts +0 -36
- package/types-test/icon-props.test.ts +0 -42
- package/types-test/loader-props.test.ts +0 -7
- package/types-test/modal-props.test.ts +0 -39
- package/types-test/select-props.test.ts +0 -97
- package/types-test/text-input-props.test.ts +0 -80
- package/types-test/textarea-props.test.ts +0 -72
- package/types-test/tsconfig.json +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designcrowd/fe-shared-lib",
|
|
3
|
-
"version": "1.5.20
|
|
3
|
+
"version": "1.5.20",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "run-p storybook watch:translation",
|
|
6
6
|
"build": "npm run build:css --production",
|
|
@@ -99,7 +99,6 @@
|
|
|
99
99
|
},
|
|
100
100
|
"exports": {
|
|
101
101
|
".": {
|
|
102
|
-
"types": "./index.d.ts",
|
|
103
102
|
"require": "./index.cjs",
|
|
104
103
|
"import": "./index.js"
|
|
105
104
|
},
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(npm outdated:*)",
|
|
5
|
-
"Bash(npm install:*)",
|
|
6
|
-
"Bash(npx npm-check-updates)",
|
|
7
|
-
"Bash(npm audit:*)",
|
|
8
|
-
"Skill(superpowers:writing-plans)",
|
|
9
|
-
"Bash(cat:*)",
|
|
10
|
-
"Bash(mkdir:*)",
|
|
11
|
-
"Skill(superpowers:subagent-driven-development)",
|
|
12
|
-
"Bash(echo:*)",
|
|
13
|
-
"Bash(ping:*)",
|
|
14
|
-
"Bash(docker system:*)",
|
|
15
|
-
"Bash(docker buildx du:*)",
|
|
16
|
-
"Bash(npm view:*)",
|
|
17
|
-
"Bash(~/.npmrc)",
|
|
18
|
-
"Bash(npm run bundle-translation:*)",
|
|
19
|
-
"mcp__plugin_context7_context7__resolve-library-id",
|
|
20
|
-
"Bash(node:*)",
|
|
21
|
-
"Bash(npm:*)",
|
|
22
|
-
"Bash(find:*)",
|
|
23
|
-
"Bash(git -C /home/zknowles/repos/fe-shared-lib log --oneline --all)",
|
|
24
|
-
"Bash(wc:*)",
|
|
25
|
-
"mcp__plugin_context7_context7__query-docs",
|
|
26
|
-
"Skill(superpowers:test-driven-development)",
|
|
27
|
-
"Bash(git rev-parse:*)",
|
|
28
|
-
"Bash(npx tsc:*)",
|
|
29
|
-
"Bash(git add:*)",
|
|
30
|
-
"Bash(git commit:*)"
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
package/.npm-publish-token
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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
|
package/MODERNIZATION_ROADMAP.md
DELETED
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
# fe-shared-lib Modernization Roadmap
|
|
2
|
-
|
|
3
|
-
> Generated: January 2026
|
|
4
|
-
|
|
5
|
-
## Current State Overview
|
|
6
|
-
|
|
7
|
-
| Area | Status | Health Score |
|
|
8
|
-
|------|--------|--------------|
|
|
9
|
-
| **Dependencies** | 27 security vulnerabilities (10 moderate, 17 high) | 4/10 |
|
|
10
|
-
| **Vue Architecture** | Vue 3 but 82% Options API, mixins | 6/10 |
|
|
11
|
-
| **Build Tooling** | Vite 6 + legacy Vue CLI remnants | 6/10 |
|
|
12
|
-
| **Testing** | Zero automated tests | 1/10 |
|
|
13
|
-
| **TypeScript** | 1.3% coverage, no tsconfig.json | 2/10 |
|
|
14
|
-
| **Storybook** | v9 (modern) but mixed CSF2/CSF3 formats | 7/10 |
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Critical Security Issues (Immediate Action)
|
|
19
|
-
|
|
20
|
-
1. **axios 1.6.7** → 1.13.2+ (SSRF & DoS vulnerabilities)
|
|
21
|
-
2. **Storybook 9.0.4** → 9.1.17+ (environment variable exposure)
|
|
22
|
-
3. **Vite 6.3.5** → 6.4.1+ (file serving vulnerabilities)
|
|
23
|
-
4. **PostCSS 8.4.33** → 8.5.6+ (parsing fix)
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Key Modernization Areas
|
|
28
|
-
|
|
29
|
-
### 1. Vue Component Architecture
|
|
30
|
-
|
|
31
|
-
- 510 Vue files total
|
|
32
|
-
- 93 components use Options API (legacy pattern)
|
|
33
|
-
- Only 5 components use modern `<script setup>`
|
|
34
|
-
- 5 mixins need conversion to composables
|
|
35
|
-
|
|
36
|
-
**Mixins to Convert:**
|
|
37
|
-
- `ButtonVariant.mixin.vue`
|
|
38
|
-
- `Checkbox.mixin.js`
|
|
39
|
-
- `FormControl.mixin.js`
|
|
40
|
-
- `CollapsiblePanel.mixin.js`
|
|
41
|
-
- `PaymentConfig.mixin.js`
|
|
42
|
-
|
|
43
|
-
### 2. Build System Debt
|
|
44
|
-
|
|
45
|
-
**Unused Dependencies to Remove:**
|
|
46
|
-
- `@vue/cli-service` (5.0.8)
|
|
47
|
-
- `@vue/cli-plugin-eslint` (5.0.8)
|
|
48
|
-
- `ts-loader` (9.5.1)
|
|
49
|
-
- `css-loader` (6.10.0)
|
|
50
|
-
- `vue-style-loader` (4.1.3)
|
|
51
|
-
- `postcss-loader` (8.1.0)
|
|
52
|
-
|
|
53
|
-
**Custom Scripts Adding Maintenance Burden:**
|
|
54
|
-
- `tailwind.build.js` - CSS compilation with require cache workaround
|
|
55
|
-
- `tailwind.themes.js` - Storybook theme link injection
|
|
56
|
-
|
|
57
|
-
### 3. TypeScript Gaps
|
|
58
|
-
|
|
59
|
-
- No `tsconfig.json` exists
|
|
60
|
-
- Only 6 `.ts` files in entire src/ directory (398 lines)
|
|
61
|
-
- Zero type declarations for 77 exported components
|
|
62
|
-
- ESLint configured for TypeScript but not enforced
|
|
63
|
-
|
|
64
|
-
**Files with TypeScript:**
|
|
65
|
-
- `src/atoms/components/SparkleIcon/sparkle-paths.ts`
|
|
66
|
-
- `src/atoms/components/SparkleIcon/sparkle-with-spinner-paths.ts`
|
|
67
|
-
- `src/atoms/components/SparkleIcon/index.ts`
|
|
68
|
-
- `src/atoms/constants/constants.ts`
|
|
69
|
-
- `src/experiences/models/websiteContextualModel.ts`
|
|
70
|
-
- `src/atoms/components/PromoCard/PromoCard.stories.ts`
|
|
71
|
-
|
|
72
|
-
### 4. Testing Infrastructure
|
|
73
|
-
|
|
74
|
-
- Zero unit/integration/E2E tests
|
|
75
|
-
- 74 main components without test coverage
|
|
76
|
-
- `@vue/test-utils` installed but never used
|
|
77
|
-
- Relies entirely on manual Storybook visual testing (45 story files)
|
|
78
|
-
|
|
79
|
-
**High-Value Test Targets:**
|
|
80
|
-
- `/src/experiences/helpers/email-validator.js`
|
|
81
|
-
- `/src/experiences/helpers/hex-diff.js`
|
|
82
|
-
- `/src/experiences/helpers/tracking.js`
|
|
83
|
-
- API clients in `/src/experiences/clients/`
|
|
84
|
-
|
|
85
|
-
### 5. Storybook Modernization
|
|
86
|
-
|
|
87
|
-
- 57 stories use deprecated `.story` property syntax
|
|
88
|
-
- 22 stories still use legacy CSF2 function format
|
|
89
|
-
- No MDX documentation files
|
|
90
|
-
- `autodocs: true` enabled but underutilized
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Proposed Modernization Roadmap
|
|
95
|
-
|
|
96
|
-
### Phase 0: Security Fixes (Immediate)
|
|
97
|
-
|
|
98
|
-
**Goal:** Patch critical vulnerabilities and remove dead code
|
|
99
|
-
|
|
100
|
-
- [ ] Update axios to 1.13.2+
|
|
101
|
-
- [ ] Update Storybook ecosystem to 9.1.17+
|
|
102
|
-
- [ ] Update Vite to 6.4.1+
|
|
103
|
-
- [ ] Update PostCSS to 8.5.6+
|
|
104
|
-
- [ ] Remove unused Vue CLI dependencies
|
|
105
|
-
- [ ] Remove unused Webpack loaders
|
|
106
|
-
|
|
107
|
-
**Estimated Effort:** 1-2 days
|
|
108
|
-
|
|
109
|
-
### Phase 1: Foundation
|
|
110
|
-
|
|
111
|
-
**Goal:** Establish infrastructure for modern development
|
|
112
|
-
|
|
113
|
-
- [ ] Create `tsconfig.json` with strict mode
|
|
114
|
-
- [ ] Set up Vitest testing framework
|
|
115
|
-
- [ ] Add test script to package.json and CI pipeline
|
|
116
|
-
- [ ] Convert 5 mixins → composables
|
|
117
|
-
- [ ] Standardize all Storybook stories to CSF3 format
|
|
118
|
-
|
|
119
|
-
**Migration Commands:**
|
|
120
|
-
```bash
|
|
121
|
-
# Storybook CSF2 to CSF3 migration
|
|
122
|
-
npx storybook@latest migrate csf-2-to-3 --glob="**/*.stories.js"
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**Estimated Effort:** 1-2 weeks
|
|
126
|
-
|
|
127
|
-
### Phase 2: TypeScript Adoption
|
|
128
|
-
|
|
129
|
-
**Goal:** Improve type safety incrementally
|
|
130
|
-
|
|
131
|
-
- [ ] Convert API clients to TypeScript
|
|
132
|
-
- [ ] Convert helper functions to TypeScript
|
|
133
|
-
- [ ] Convert constants files to TypeScript
|
|
134
|
-
- [ ] Add type definitions for exported components
|
|
135
|
-
- [ ] Enable strict TypeScript linting rules
|
|
136
|
-
- [ ] Add `lang="ts"` to high-value Vue components
|
|
137
|
-
|
|
138
|
-
**Priority Files:**
|
|
139
|
-
1. `/src/experiences/clients/brand-crowd-api.client.js`
|
|
140
|
-
2. `/src/experiences/clients/brand-page-api.client.js`
|
|
141
|
-
3. `/src/experiences/helpers/*.js`
|
|
142
|
-
4. `/src/experiences/constants/*.js`
|
|
143
|
-
|
|
144
|
-
**Estimated Effort:** 2-3 weeks
|
|
145
|
-
|
|
146
|
-
### Phase 3: Vue Modernization
|
|
147
|
-
|
|
148
|
-
**Goal:** Migrate to modern Vue 3 patterns
|
|
149
|
-
|
|
150
|
-
- [ ] Migrate Options API → Composition API (atoms first)
|
|
151
|
-
- [ ] Add `<script setup>` to components
|
|
152
|
-
- [ ] Add explicit `emits` declarations to all components
|
|
153
|
-
- [ ] Replace `this.$refs` with `ref()` pattern
|
|
154
|
-
- [ ] Standardize event naming conventions
|
|
155
|
-
|
|
156
|
-
**Migration Order:**
|
|
157
|
-
1. Simple atoms (Button, Icon, Badge)
|
|
158
|
-
2. Form components (Input, Checkbox, Select)
|
|
159
|
-
3. Complex atoms (Modal, Dropdown, Carousel)
|
|
160
|
-
4. Experience components
|
|
161
|
-
|
|
162
|
-
**Estimated Effort:** 4-6 weeks
|
|
163
|
-
|
|
164
|
-
### Phase 4: Testing Coverage
|
|
165
|
-
|
|
166
|
-
**Goal:** Establish comprehensive test coverage
|
|
167
|
-
|
|
168
|
-
- [ ] Unit tests for utilities and helpers
|
|
169
|
-
- [ ] Component tests for atoms
|
|
170
|
-
- [ ] Integration tests for experiences
|
|
171
|
-
- [ ] Add coverage thresholds (target 70%+)
|
|
172
|
-
- [ ] Integrate tests into CI/CD pipeline
|
|
173
|
-
- [ ] Add Storybook interaction testing
|
|
174
|
-
|
|
175
|
-
**Recommended Testing Stack:**
|
|
176
|
-
```
|
|
177
|
-
Framework: Vitest
|
|
178
|
-
DOM: Happy DOM
|
|
179
|
-
Vue Testing: @vue/test-utils
|
|
180
|
-
Coverage: Vitest coverage (c8)
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
**Estimated Effort:** 3-4 weeks
|
|
184
|
-
|
|
185
|
-
### Phase 5: Build Tool Updates
|
|
186
|
-
|
|
187
|
-
**Goal:** Modernize build pipeline
|
|
188
|
-
|
|
189
|
-
- [ ] Tailwind CSS v3 → v4 migration
|
|
190
|
-
- [ ] ESLint 8 → 9 (flat config)
|
|
191
|
-
- [ ] Consolidate CSS build into Vite pipeline
|
|
192
|
-
- [ ] Remove custom build scripts
|
|
193
|
-
- [ ] Update remaining dependencies
|
|
194
|
-
|
|
195
|
-
**Migration Commands:**
|
|
196
|
-
```bash
|
|
197
|
-
# Tailwind CSS v3 to v4 migration
|
|
198
|
-
npx @tailwindcss/upgrade
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
**Estimated Effort:** 2-3 weeks
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## Migration Tooling Available
|
|
206
|
-
|
|
207
|
-
| Tool | Purpose | Command |
|
|
208
|
-
|------|---------|---------|
|
|
209
|
-
| Tailwind Upgrade | v3 → v4 automated migration | `npx @tailwindcss/upgrade` |
|
|
210
|
-
| Storybook CSF | CSF2 → CSF3 story format | `npx storybook@latest migrate csf-2-to-3` |
|
|
211
|
-
| Storybook MDX | MDX to CSF conversion | `npx storybook@latest migrate mdx-to-csf` |
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## Dependency Version Targets
|
|
216
|
-
|
|
217
|
-
### Core Framework
|
|
218
|
-
| Package | Current | Target |
|
|
219
|
-
|---------|---------|--------|
|
|
220
|
-
| vue | 3.5.15 | 3.5.26 |
|
|
221
|
-
| vue-router | 4.5.0 | 4.6.4 |
|
|
222
|
-
| typescript | 5.3.3 | 5.9.x |
|
|
223
|
-
|
|
224
|
-
### Build Tools
|
|
225
|
-
| Package | Current | Target |
|
|
226
|
-
|---------|---------|--------|
|
|
227
|
-
| vite | 6.3.5 | 6.4.1+ |
|
|
228
|
-
| tailwindcss | 3.4.1 | 4.x |
|
|
229
|
-
| postcss | 8.4.33 | 8.5.6+ |
|
|
230
|
-
| @vitejs/plugin-vue | 5.2.4 | 6.x |
|
|
231
|
-
|
|
232
|
-
### Storybook
|
|
233
|
-
| Package | Current | Target |
|
|
234
|
-
|---------|---------|--------|
|
|
235
|
-
| storybook | 9.0.4 | 9.1.17+ |
|
|
236
|
-
| All @storybook/* addons | 9.0.4 | 9.1.17+ |
|
|
237
|
-
|
|
238
|
-
### Code Quality
|
|
239
|
-
| Package | Current | Target |
|
|
240
|
-
|---------|---------|--------|
|
|
241
|
-
| eslint | 8.56.0 | 9.x |
|
|
242
|
-
| eslint-plugin-vue | 9.21.1 | 10.x |
|
|
243
|
-
| stylelint | 16.2.1 | 17.x |
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## Project Statistics
|
|
248
|
-
|
|
249
|
-
- **Total Vue Components:** 510
|
|
250
|
-
- **Atoms:** 466 components
|
|
251
|
-
- **Experiences:** 43 components
|
|
252
|
-
- **Icons:** ~100+ icon components
|
|
253
|
-
- **Storybook Stories:** 45 files
|
|
254
|
-
- **Total Source Lines:** 31,226
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## Reference Links
|
|
259
|
-
|
|
260
|
-
- [Vue 3 Composition API Migration](https://vuejs.org/guide/extras/composition-api-faq.html)
|
|
261
|
-
- [Vue Composables Guide](https://vuejs.org/guide/reusability/composables.html)
|
|
262
|
-
- [Tailwind CSS v4 Upgrade Guide](https://tailwindcss.com/docs/upgrade-guide)
|
|
263
|
-
- [Storybook Migration Guide](https://storybook.js.org/docs/migration-guide)
|
|
264
|
-
- [Vitest Documentation](https://vitest.dev/)
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# fe-shared-lib TypeScript Declarations Design
|
|
2
|
-
|
|
3
|
-
## Overview & Goals
|
|
4
|
-
|
|
5
|
-
**Objective**: Add TypeScript declaration file to `@designcrowd/fe-shared-lib` so consumers get basic type checking and IDE autocomplete without converting the library to TypeScript.
|
|
6
|
-
|
|
7
|
-
**Success Criteria**:
|
|
8
|
-
- BrandCrowd.Nuxt's 117 `TS7016` errors for `@designcrowd/fe-shared-lib` resolve
|
|
9
|
-
- Commonly-used components (Button, Modal, Icon, etc.) have typed props
|
|
10
|
-
- Less-used components have minimal stub declarations
|
|
11
|
-
- No changes to existing JavaScript/Vue component code
|
|
12
|
-
|
|
13
|
-
**Approach**:
|
|
14
|
-
1. Create `index.d.ts` at package root declaring all exports from `index.js`
|
|
15
|
-
2. Add `"types": "./index.d.ts"` to `package.json` exports
|
|
16
|
-
3. Define detailed prop interfaces for ~10 most-used components
|
|
17
|
-
4. Use generic `DefineComponent<{}, {}, any>` for remaining components
|
|
18
|
-
5. Publish new version for BrandCrowd.Nuxt to consume
|
|
19
|
-
|
|
20
|
-
**Files to Create/Modify**:
|
|
21
|
-
- `index.d.ts` (new) - Main declaration file
|
|
22
|
-
- `package.json` - Add types field to exports
|
|
23
|
-
|
|
24
|
-
## Implementation Details
|
|
25
|
-
|
|
26
|
-
**Structure of `index.d.ts`**:
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
import { DefineComponent, PropType } from 'vue';
|
|
30
|
-
|
|
31
|
-
// ============ Detailed Component Types ============
|
|
32
|
-
// Most-used components with full prop definitions
|
|
33
|
-
|
|
34
|
-
export interface ButtonProps {
|
|
35
|
-
label?: string;
|
|
36
|
-
variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'link';
|
|
37
|
-
size?: 'sm' | 'md' | 'lg';
|
|
38
|
-
disabled?: boolean;
|
|
39
|
-
isBusy?: boolean;
|
|
40
|
-
fullWidth?: boolean;
|
|
41
|
-
icon?: string;
|
|
42
|
-
// ... other props from examining Button.vue
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const Button: DefineComponent<ButtonProps>;
|
|
46
|
-
export const Modal: DefineComponent<ModalProps>;
|
|
47
|
-
export const Icon: DefineComponent<IconProps>;
|
|
48
|
-
// ... ~10 detailed components
|
|
49
|
-
|
|
50
|
-
// ============ Stub Component Types ============
|
|
51
|
-
// Less-used components - typed but generic
|
|
52
|
-
|
|
53
|
-
export const UploadYourLogoDropzone: DefineComponent<{}, {}, any>;
|
|
54
|
-
export const SignUpModal: DefineComponent<{}, {}, any>;
|
|
55
|
-
// ... remaining ~45 components
|
|
56
|
-
|
|
57
|
-
// ============ Utilities ============
|
|
58
|
-
export function setSharedLibLocaleAsync(locale: string): Promise<void>;
|
|
59
|
-
export function tr(key: string, params?: Record<string, any>): string;
|
|
60
|
-
|
|
61
|
-
// ============ API Clients ============
|
|
62
|
-
export const brandPageApiClient: any;
|
|
63
|
-
export const brandCrowdApiClient: any;
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
**Components to fully type** (based on usage frequency):
|
|
67
|
-
1. Button
|
|
68
|
-
2. Modal
|
|
69
|
-
3. Icon
|
|
70
|
-
4. Dropdown
|
|
71
|
-
5. TextInput
|
|
72
|
-
6. Textarea
|
|
73
|
-
7. Checkbox
|
|
74
|
-
8. Toggle
|
|
75
|
-
9. Loader
|
|
76
|
-
10. Select
|
|
77
|
-
|
|
78
|
-
## Verification & Publishing
|
|
79
|
-
|
|
80
|
-
**Local Testing** (before publishing):
|
|
81
|
-
1. Create `index.d.ts` in fe-shared-lib
|
|
82
|
-
2. In BrandCrowd.Nuxt, run `npm link ../fe-shared-lib`
|
|
83
|
-
3. Run `npx vue-tsc --noEmit` - verify TS7016 errors for fe-shared-lib resolve
|
|
84
|
-
4. Check IDE autocomplete works for Button props in a .vue file
|
|
85
|
-
|
|
86
|
-
**Publishing Workflow**:
|
|
87
|
-
1. Bump version in `package.json` (e.g., `1.5.20` → `1.5.21`)
|
|
88
|
-
2. Commit with message: `Add TypeScript declarations for consumers`
|
|
89
|
-
3. Build and publish: `npm publish` (or via CI pipeline)
|
|
90
|
-
4. In BrandCrowd.Nuxt: `npm update @designcrowd/fe-shared-lib`
|
|
91
|
-
|
|
92
|
-
**Iterative Improvement**:
|
|
93
|
-
After initial release, prop types can be refined by:
|
|
94
|
-
- Examining actual component `.vue` files for accurate prop definitions
|
|
95
|
-
- Adding missing props as consumers report them
|
|
96
|
-
- Eventually generating declarations from JSDoc or migrating to TypeScript
|
|
97
|
-
|
|
98
|
-
**Rollback Plan**:
|
|
99
|
-
If declarations cause issues, consumers can add to their own `types/vendor-modules.d.ts`:
|
|
100
|
-
```typescript
|
|
101
|
-
declare module '@designcrowd/fe-shared-lib';
|
|
102
|
-
```
|
|
103
|
-
This overrides the package's declarations with a permissive stub.
|
|
104
|
-
|
|
105
|
-
## Checklist
|
|
106
|
-
|
|
107
|
-
- [ ] Create `index.d.ts` with all exports from `index.js`
|
|
108
|
-
- [ ] Add detailed prop interfaces for 10 most-used components
|
|
109
|
-
- [ ] Add stub declarations for remaining components
|
|
110
|
-
- [ ] Add types for utility functions (setSharedLibLocaleAsync, tr)
|
|
111
|
-
- [ ] Update `package.json` with types field in exports
|
|
112
|
-
- [ ] Test locally with `npm link` in BrandCrowd.Nuxt
|
|
113
|
-
- [ ] Verify TS7016 errors resolve
|
|
114
|
-
- [ ] Bump version and publish
|