|
| 1 | +# Package Updates Analysis |
| 2 | + |
| 3 | +## ✅ Fixed |
| 4 | + |
| 5 | +### 1. **node-sass → sass** (CRITICAL) |
| 6 | +- ❌ `[email protected]` - **DEPRECATED ** |
| 7 | +- ✅ `sass@^1.84.0` - Modern Dart Sass implementation |
| 8 | + |
| 9 | +### 2. **@tanstack/react-query-devtools** |
| 10 | +- ✅ Updated to `^5.90.7` to match `@tanstack/react-query` |
| 11 | + |
| 12 | +## 🚨 Deprecated Packages (Action Recommended) |
| 13 | + |
| 14 | +### 1. **react-beautiful-dnd** (Current: 13.1.1) |
| 15 | +**Status:** DEPRECATED - No longer maintained |
| 16 | + |
| 17 | +**Recommended Alternatives:** |
| 18 | +- **@dnd-kit/core** (Modern, TypeScript-first, actively maintained) |
| 19 | +- **@hello-pangea/dnd** (Community fork of react-beautiful-dnd) |
| 20 | +- **react-dnd** (More low-level, flexible) |
| 21 | + |
| 22 | +**Impact:** Used for drag-and-drop in payment gateway ordering |
| 23 | +**Action:** Consider migrating to @dnd-kit or @hello-pangea/dnd |
| 24 | + |
| 25 | +### 2. **@types/wordpress__components** (Current: 23.8.0) |
| 26 | +**Status:** DEPRECATED |
| 27 | + |
| 28 | +**Note:** Types might be included in `@wordpress/components` now |
| 29 | +**Action:** Check if types are built-in with latest `@wordpress/components` |
| 30 | + |
| 31 | +## 📦 Recommended Updates |
| 32 | + |
| 33 | +### Minor/Patch Updates (Safe to Update) |
| 34 | + |
| 35 | +| Package | Current | Latest | Priority | |
| 36 | +|---------|---------|--------|----------| |
| 37 | +| `@headlessui/react` | 2.2.0 | 2.2.9 | HIGH | |
| 38 | +| `@babel/core` | 7.24.7 | 7.28.5 | HIGH | |
| 39 | +| `@babel/plugin-transform-runtime` | 7.24.7 | 7.28.5 | HIGH | |
| 40 | +| `@babel/preset-env` | 7.24.7 | 7.28.5 | HIGH | |
| 41 | +| `@babel/preset-react` | 7.24.7 | 7.28.5 | HIGH | |
| 42 | +| `@babel/preset-typescript` | 7.24.7 | 7.28.5 | HIGH | |
| 43 | +| `@babel/runtime` | 7.24.7 | 7.28.4 | HIGH | |
| 44 | +| `typescript` | 5.4.5 | 5.9.3 | HIGH | |
| 45 | +| `webpack` | 5.92.0 | 5.102.1 | HIGH | |
| 46 | +| `postcss` | 8.4.38 | 8.5.6 | MEDIUM | |
| 47 | +| `autoprefixer` | 10.4.19 | 10.4.22 | MEDIUM | |
| 48 | +| `prettier` | 3.3.2 | 3.6.2 | MEDIUM | |
| 49 | +| `husky` | 9.0.11 | 9.1.7 | LOW | |
| 50 | +| `terser-webpack-plugin` | 5.3.10 | 5.3.14 | LOW | |
| 51 | +| `mini-css-extract-plugin` | 2.9.0 | 2.9.4 | LOW | |
| 52 | +| `ts-loader` | 9.5.2 | 9.5.4 | LOW | |
| 53 | +| `postcss-loader` | 8.1.1 | 8.2.0 | LOW | |
| 54 | +| `html-webpack-plugin` | 5.6.0 | 5.6.4 | LOW | |
| 55 | +| `fork-ts-checker-webpack-plugin` | 9.0.2 | 9.1.0 | LOW | |
| 56 | +| `jsdoc` | 4.0.3 | 4.0.5 | LOW | |
| 57 | +| `postcss-cli` | 11.0.0 | 11.0.1 | LOW | |
| 58 | +| `@types/lodash` | 4.17.5 | 4.17.20 | LOW | |
| 59 | +| `@transifex/native` | 7.1.3 | 7.1.4 | LOW | |
| 60 | +| `@transifex/react` | 7.1.3 | 7.1.4 | LOW | |
| 61 | +| `@transifex/cli` | 7.1.3 | 7.1.4 | LOW | |
| 62 | + |
| 63 | +### Major Updates (⚠️ Test Thoroughly) |
| 64 | + |
| 65 | +| Package | Current | Latest | Breaking Changes? | |
| 66 | +|---------|---------|--------|-------------------| |
| 67 | +| `react` | 18.3.1 | 19.2.0 | ⚠️ YES - React 19 has breaking changes | |
| 68 | +| `react-dom` | 18.3.1 | 19.2.0 | ⚠️ YES | |
| 69 | +| `@types/react` | 18.3.3 | 19.2.3 | ⚠️ YES | |
| 70 | +| `@types/react-dom` | 18.3.0 | 19.2.2 | ⚠️ YES | |
| 71 | +| `@wordpress/components` | 28.13.0 | 30.7.0 | ⚠️ Possibly | |
| 72 | +| `@wordpress/api-fetch` | 7.0.0 | 7.34.0 | ⚠️ Possibly | |
| 73 | +| `@wordpress/element` | 6.0.0 | 6.34.0 | ⚠️ Possibly | |
| 74 | +| `@wordpress/url` | 4.0.0 | 4.34.0 | ⚠️ Possibly | |
| 75 | +| `@wordpress/env` | 10.23.0 | 10.34.0 | ⚠️ Possibly | |
| 76 | +| `react-error-boundary` | 4.0.13 | 6.0.0 | ⚠️ YES | |
| 77 | +| `@typescript-eslint/eslint-plugin` | 7.13.0 | 8.46.4 | ⚠️ YES | |
| 78 | +| `@typescript-eslint/parser` | 7.13.0 | 8.46.4 | ⚠️ YES | |
| 79 | +| `babel-loader` | 9.1.3 | 10.0.0 | ⚠️ Possibly | |
| 80 | +| `webpack-cli` | 5.1.4 | 6.0.1 | ⚠️ Possibly | |
| 81 | +| `sass-loader` | 14.2.1 | 16.0.6 | ⚠️ Possibly | |
| 82 | +| `jest` | 29.7.0 | 30.2.0 | ⚠️ Possibly | |
| 83 | +| `@types/jest` | 29.5.12 | 30.0.0 | ⚠️ YES | |
| 84 | + |
| 85 | +## 💡 Recommended Update Strategy |
| 86 | + |
| 87 | +### Phase 1: Safe Updates (Do Now) |
| 88 | +```bash |
| 89 | +pnpm update @headlessui/react @babel/core @babel/plugin-transform-runtime @babel/preset-env @babel/preset-react @babel/preset-typescript @babel/runtime typescript webpack autoprefixer postcss prettier |
| 90 | +``` |
| 91 | + |
| 92 | +### Phase 2: WordPress Packages (Test Thoroughly) |
| 93 | +The WordPress packages have significant version jumps. Check release notes: |
| 94 | +- https://github.com/WordPress/gutenberg/releases |
| 95 | + |
| 96 | +### Phase 3: React 19 Migration (Plan Carefully) |
| 97 | +**DO NOT UPDATE YET** without reviewing: |
| 98 | +- https://react.dev/blog/2024/12/05/react-19 |
| 99 | +- Breaking changes in React 19 |
| 100 | +- Compatibility with @wordpress/components |
| 101 | + |
| 102 | +### Phase 4: Major Dev Tools (When Ready) |
| 103 | +- TypeScript ESLint v8 |
| 104 | +- Jest v30 |
| 105 | +- Webpack CLI v6 |
| 106 | +- Babel Loader v10 |
| 107 | +- Sass Loader v16 |
| 108 | + |
| 109 | +## 🔧 Migration Tasks |
| 110 | + |
| 111 | +### 1. Replace react-beautiful-dnd |
| 112 | +**Priority:** MEDIUM |
| 113 | +**Complexity:** HIGH |
| 114 | +**Files affected:** |
| 115 | +- `src/screens/checkout/gateways.tsx` |
| 116 | + |
| 117 | +**Options:** |
| 118 | +```bash |
| 119 | +# Option 1: Modern alternative |
| 120 | +pnpm add @dnd-kit/core @dnd-kit/sortable |
| 121 | + |
| 122 | +# Option 2: Community fork (drop-in replacement) |
| 123 | +pnpm add @hello-pangea/dnd |
| 124 | +pnpm remove react-beautiful-dnd |
| 125 | +``` |
| 126 | + |
| 127 | +### 2. Remove @types/wordpress__components |
| 128 | +Check if types are now included in `@wordpress/[email protected]` |
| 129 | + |
| 130 | +## 📝 Notes |
| 131 | + |
| 132 | +1. **Tailwind CSS v4** and **React Query v5.90.7** are already updated ✅ |
| 133 | +2. **node-sass** has been replaced with **sass** ✅ |
| 134 | +3. WordPress packages have very old versions - major updates might require code changes |
| 135 | +4. React 19 is a significant update - requires migration planning |
| 136 | +5. Consider running `pnpm audit` to check for security vulnerabilities |
| 137 | + |
| 138 | +## 🚀 Quick Update Command |
| 139 | + |
| 140 | +For safe, non-breaking updates: |
| 141 | +```bash |
| 142 | +cd /Users/kilbot/Projects/woocommerce-pos/packages/settings |
| 143 | +pnpm update --latest @headlessui/react @babel/core @babel/plugin-transform-runtime @babel/preset-env @babel/preset-react @babel/preset-typescript @babel/runtime typescript webpack |
| 144 | +``` |
| 145 | + |
0 commit comments