|
| 1 | +# [1.0.0](https://github.com/mi-examples/pp-dev/compare/v0.19.0-beta.2...v1.0.0) (2026-06-19) |
| 2 | + |
| 3 | +## ⚠ BREAKING CHANGES |
| 4 | + |
| 5 | +This release replaces the flat configuration API with a grouped schema. All existing `pp-dev.config.*` files must be updated — use `pp-dev migrate` to do it automatically. |
| 6 | + |
| 7 | +### Configuration schema |
| 8 | + |
| 9 | +The flat `VitePPDevOptions` object is replaced by `PPDevConfig` with five grouped sections: |
| 10 | + |
| 11 | +```ts |
| 12 | +// BEFORE (0.x) |
| 13 | +export default { |
| 14 | + backendBaseURL: 'https://mi.company.com', |
| 15 | + personalAccessToken: 'YOUR_TOKEN', |
| 16 | + miHudLess: true, |
| 17 | + v7Features: true, |
| 18 | + appId: 937, |
| 19 | + templateLess: false, |
| 20 | +}; |
| 21 | + |
| 22 | +// AFTER (1.0) |
| 23 | +import { defineConfig } from '@metricinsights/pp-dev'; |
| 24 | + |
| 25 | +export default defineConfig({ |
| 26 | + mi: { url: 'https://mi.company.com', token: 'YOUR_TOKEN', mode: 'standalone', apiVersion: 7 }, |
| 27 | + app: { id: 937, type: 'template' }, |
| 28 | +}); |
| 29 | +``` |
| 30 | + |
| 31 | +| 0.x field | 1.0 field | |
| 32 | +|---|---| |
| 33 | +| `backendBaseURL` | `mi.url` | |
| 34 | +| `personalAccessToken` | `mi.token` | |
| 35 | +| `miHudLess: true` | `mi.mode: 'standalone'` | |
| 36 | +| `miHudLess: false` | `mi.mode: 'embedding'` | |
| 37 | +| `integrateMiTopBar: true` | `mi.mode: 'standalone'`, `mi.include: 'top-bar'` | |
| 38 | +| `integrateMiTopBar: { addSharedComponentsScripts: true }` | `mi.include: 'shared-components'` | |
| 39 | +| `v7Features: true` | `mi.apiVersion: 7` | |
| 40 | +| `v7Features: false` | `mi.apiVersion: 6` | |
| 41 | +| `appId` / `portalPageId` | `app.id` | |
| 42 | +| `templateName` | `app.name` (auto-resolved from `package.json#name` — usually omit) | |
| 43 | +| `templateLess: true` | `app.type: 'page'` | |
| 44 | +| `templateLess: false` | `app.type: 'template'` | |
| 45 | +| `enableProxyCache` | `proxy.cache` | |
| 46 | +| `proxyCacheTTL` | `proxy.cacheTtl` | |
| 47 | +| `disableSSLValidation: true` | `proxy.tls.allowSelfSigned: true` | |
| 48 | +| `distZip` | `build.zip` | |
| 49 | +| `versionPlugin` | `build.versionFile` | |
| 50 | +| `imageOptimizer` | `build.imageOptimisations` | |
| 51 | +| `outDir` | `build.outDir` | |
| 52 | +| `syncBackupsDir` | `sync.backupsDir` | |
| 53 | + |
| 54 | +### Removed |
| 55 | + |
| 56 | +- `pp-watch.config.*` / `.pp-watch.config.*` config files — use `pp-dev.config.*` instead |
| 57 | +- `PPWatchConfig` type |
| 58 | +- `VitePPDevOptions` type — use `PPDevConfig` |
| 59 | +- `normalizeVitePPDevConfig()` — internal, use `normalizePPDevConfig()` |
| 60 | + |
| 61 | +### Defaults |
| 62 | + |
| 63 | +| Field | Default | |
| 64 | +|---|---| |
| 65 | +| `mi.mode` | `'standalone'` | |
| 66 | +| `mi.apiVersion` | `7` | |
| 67 | +| `app.type` | `'template'` | |
| 68 | +| `app.name` | resolved from `package.json#name` | |
| 69 | + |
| 70 | +### Validation |
| 71 | + |
| 72 | +Startup validation now throws meaningful errors instead of silently ignoring bad config. Key rules: |
| 73 | + |
| 74 | +- `mi.include` requires `mi.mode: 'standalone'` |
| 75 | +- `mi.url` is required when `mi.mode: 'embedding'` or `app.type: 'template'` |
| 76 | +- `app.id` is required for templates and standalone pages |
| 77 | + |
| 78 | +### Migration |
| 79 | + |
| 80 | +Run the built-in codemod to upgrade your config automatically: |
| 81 | + |
| 82 | +```bash |
| 83 | +npx @metricinsights/pp-dev migrate |
| 84 | +# Preview changes first: |
| 85 | +npx @metricinsights/pp-dev migrate --dry-run |
| 86 | +# Force output format: |
| 87 | +npx @metricinsights/pp-dev migrate --format ts |
| 88 | +``` |
| 89 | + |
| 90 | +The command detects flat 0.x configs and `pp-watch.config.*` files, migrates them to the new grouped format, and writes a `.bak` backup before overwriting. |
| 91 | + |
| 92 | +## Features |
| 93 | + |
| 94 | +* **config:** grouped `PPDevConfig` schema with `mi`, `app`, `proxy`, `build`, `sync` sections |
| 95 | +* **config:** `defineConfig()` helper for full TypeScript intellisense |
| 96 | +* **cli:** `pp-dev migrate` codemod — auto-migrates 0.x flat and `pp-watch` configs to 1.0 format, supports `--dry-run`, `--format ts|js|json`, `--output`, `--no-backup` |
| 97 | +* **ui:** redesigned dev panel — MI brand colors (`#075B7E`), Inter font, bordered buttons, updated toast and confirm modal styles |
| 98 | + |
| 99 | +--- |
| 100 | + |
1 | 101 | # [0.19.0-beta.2](https://github.com/mi-examples/pp-dev/compare/v0.19.0-beta.1...v0.19.0-beta.2) (2026-06-18) |
2 | 102 |
|
3 | 103 |
|
|
0 commit comments