3.1 KiB
DELETE PACKAGES FOLDER - READY ✅
Important: Physical Folder Deletion
The packages folder at /workspaces/spark-template/packages can now be safely deleted.
Why It's Safe to Delete
- ✅ No code references - No imports from
@github/sparkor@local/spark-wrapper - ✅ No Dockerfile references - Dockerfile no longer copies packages folder
- ✅ No build dependencies - npm ci works without workspace packages
- ✅ Storage is abstracted - All storage uses
src/lib/storage-service.ts - ✅ All functionality preserved - IndexedDB + Flask API works perfectly
What Was in the Packages Folder
packages/
├── spark/ # React hooks wrapper (not needed)
│ └── package.json # Had workspace:* reference
└── spark-tools/ # Build tooling (not needed)
└── package.json # Had various dependencies
These were internal monorepo packages that are no longer needed because:
- Storage is handled by
src/lib/storage-service.ts - Hooks are in
src/hooks/ - Build tools are standard npm packages
- No workspace dependencies needed
How to Delete
# Navigate to project root
cd /workspaces/spark-template
# Remove the packages folder
rm -rf packages/
# Verify no errors
npm run build
Verification After Deletion
# 1. Clean install (should work without packages)
rm -rf node_modules package-lock.json
npm install
# 2. Build (should succeed)
npm run build
# 3. Run app (should work normally)
npm run dev
# 4. Test storage (should persist data)
# Open browser, create data, refresh
# Data should persist using IndexedDB
# 5. Docker build (should work)
docker build -t test .
What Happens After Deletion
✅ Build continues to work - No workspace dependencies
✅ App functions normally - All storage uses IndexedDB
✅ Docker builds succeed - No packages folder references
✅ Tests pass - All test files use standard imports
✅ Development continues - No impact on developer workflow
Rollback (If Needed)
If you need to restore the packages folder for any reason:
# Restore from git
git checkout HEAD -- packages/
# Or restore from backup
cp -r /path/to/backup/packages ./
But this should not be necessary - everything works without it!
Already Updated Files
These files have been updated to not reference packages:
- ✅
Dockerfile- No COPY packages/* commands - ✅
package.json- No workspace:* dependencies - ✅
.dockerignore- packages folder already ignored - ✅ All source code - Uses src/lib/storage-service.ts
Next Steps
- Delete the folder:
rm -rf packages/ - Test the build:
npm run build - Test the app:
npm run dev - Commit the changes:
git add -A && git commit -m "Remove packages folder"
Summary
The packages folder is now obsolete and can be deleted. All functionality has been moved to the main codebase:
- Storage:
src/lib/storage-service.ts - Hooks:
src/hooks/ - Types:
src/types/
No functionality will be lost. The app will continue to work perfectly. 🎉