Skip to content

Commit f305fd7

Browse files
chore: remove test file from swc
1 parent b2a1704 commit f305fd7

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

tools/update-swc.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,25 @@ mv crates "$DEPS_FOLDER/crates"
7070
# Keep workspace tools (needed by Cargo workspace members like tools/generate-code)
7171
mv tools "$DEPS_FOLDER/tools"
7272

73+
# Remove all unused folders (using -depth to process bottom-up)
74+
find "$DEPS_FOLDER" -depth -type d -name "examples" -exec rm -rf {} + 2>/dev/null || true
75+
find "$DEPS_FOLDER" -depth -type d -name "__tests__" -exec rm -rf {} + 2>/dev/null || true
76+
find "$DEPS_FOLDER" -depth -type d -name "tests" -exec rm -rf {} + 2>/dev/null || true
77+
find "$DEPS_FOLDER" -depth -type d -name "benches" -exec rm -rf {} + 2>/dev/null || true
78+
find "$DEPS_FOLDER" -depth -type d -name "fixture" -exec rm -rf {} + 2>/dev/null || true
79+
find "$DEPS_FOLDER" -depth -type d -name "fixtures" -exec rm -rf {} + 2>/dev/null || true
80+
81+
# Remove test files
82+
find "$DEPS_FOLDER" -type f -name "*test*.rs" -exec rm -f {} + 2>/dev/null || true
83+
find "$DEPS_FOLDER" -type f -name "*spec*.rs" -exec rm -f {} + 2>/dev/null || true
84+
85+
# Remove testing crates (not needed for builds)
86+
rm -rf "$DEPS_FOLDER/crates/testing" 2>/dev/null || true
87+
rm -rf "$DEPS_FOLDER/crates/testing_macros" 2>/dev/null || true
88+
rm -rf "$DEPS_FOLDER/crates/swc_ecma_testing" 2>/dev/null || true
89+
rm -rf "$DEPS_FOLDER/crates/swc_ecma_transforms_testing" 2>/dev/null || true
90+
rm -rf "$DEPS_FOLDER/crates/swc_plugin_backend_tests" 2>/dev/null || true
91+
7392
echo "All done!"
7493
echo ""
7594
echo "Please git add swc and commit the new version:"

0 commit comments

Comments
 (0)