@@ -7,6 +7,8 @@ This PR revolutionizes Superset's frontend build system by combining Bun's fast
7
7
- ** 10-20x faster typical builds** (only rebuild what changed)
8
8
- ** 25% faster full builds** with Bun optimizations
9
9
- ** Local caching** - no cloud dependencies
10
+ - ** Fixed TypeScript error reporting** that was silently failing
11
+ - ** DRY configuration** - reduced 325+ lines of repetitive config
10
12
11
13
## Key Changes
12
14
@@ -34,6 +36,12 @@ This PR revolutionizes Superset's frontend build system by combining Bun's fast
34
36
- All new scripts include proper ASF headers
35
37
- Prevents commits with missing license headers
36
38
39
+ ### 5. DRY Configuration with Nx
40
+ - Moved all repetitive build configuration to ` nx.json ` ` targetDefaults `
41
+ - Reduced each ` project.json ` from 20 lines to just 7 lines
42
+ - Eliminated ~ 325 lines of duplicate configuration
43
+ - Single source of truth for build settings
44
+
37
45
## Performance Results
38
46
39
47
### Real-World Benchmarks
@@ -86,28 +94,35 @@ npx nx affected:build --dry-run
86
94
87
95
#### Core Build System
88
96
- ` package.json ` - Added Nx dependency, updated ` plugins:build ` to use Nx
89
- - ` nx.json ` - Nx configuration (caching rules, build pipeline)
90
- - ` scripts/build-package-nx.sh ` - Build script for individual packages
97
+ - ` nx.json ` - Nx configuration with centralized ` targetDefaults ` for DRY principles
98
+ - ` scripts/build-package-nx.sh ` - Build script for individual packages with parallel Babel compilation
91
99
- ` scripts/clean-packages.js ` - Simplified clean script with Nx cache reset
92
- - ` scripts/tsc.sh ` - Fixed critical bug in TypeScript error handling
100
+ - ` scripts/tsc.sh ` - Fixed critical bug in TypeScript error handling (exit codes now properly captured)
101
+ - ` scripts/simplify-nx-configs.js ` - Script to reduce repetition in project.json files
93
102
94
103
#### License Compliance
95
- - ` scripts/check_license_pre_commit.sh ` - Fast license header checker for changed files
104
+ - ` scripts/check_license_pre_commit.sh ` - Fast license header checker for changed files only
96
105
- ` .pre-commit-config.yaml ` - Added license-check hook
97
106
98
107
#### Package Configurations (all 25 packages)
99
- - ` project.json ` - Nx project configuration for each package
108
+ - ` project.json ` - Minimal Nx configuration (7 lines each, inheriting from nx.json)
100
109
- ` package.json ` - Added ` build:nx ` script for Nx builds
101
110
111
+ #### Repository Cleanup
112
+ - ` .gitignore ` - Added ` .nx/ ` cache directory exclusion
113
+ - Removed all unnecessary cache/workspace files from git tracking
114
+
102
115
## Testing
103
116
104
117
✅ All 25 packages build successfully
105
118
✅ Cache properly invalidates on file changes
106
- ✅ TypeScript errors are now properly reported
119
+ ✅ TypeScript errors are now properly reported (fixed tsc.sh bug)
107
120
✅ Build outputs identical to previous system
108
121
✅ CI/CD compatible (no external dependencies)
109
122
✅ License headers verified on all new files
110
123
✅ Pre-commit hooks installed and working
124
+ ✅ DRY configuration tested - builds work with minimal project.json files
125
+ ✅ Repository clean - no cache files in git
111
126
112
127
## Migration Notes
113
128
0 commit comments