2023-10-19 01:28:05 +13:00
|
|
|
#!/bin/sh
|
2023-10-03 22:02:11 +13:00
|
|
|
|
2023-10-19 03:06:32 +13:00
|
|
|
packages_to_remove="@budibase/backend-core @budibase/bbui @budibase/builder @budibase/cli @budibase/client @budibase/frontend-core @budibase/pro @budibase/sdk @budibase/server @budibase/shared-core @budibase/string-templates @budibase/types @budibase/worker"
|
2023-10-03 22:02:11 +13:00
|
|
|
|
2023-10-19 01:28:05 +13:00
|
|
|
package_json_path="$1"
|
2023-10-03 05:18:42 +13:00
|
|
|
|
2023-10-03 20:34:35 +13:00
|
|
|
process_package() {
|
2023-10-19 01:28:05 +13:00
|
|
|
pkg_path="$1"
|
2023-10-03 05:18:42 +13:00
|
|
|
|
2023-10-19 01:28:05 +13:00
|
|
|
for package_name in $packages_to_remove; do
|
2024-01-17 02:00:33 +13:00
|
|
|
jq "del(.dependencies[\"$package_name\"])" $pkg_path > tmp_file.json && mv tmp_file.json $pkg_path
|
|
|
|
jq "del(.resolutions[\"$package_name\"])" $pkg_path > tmp_file.json && mv tmp_file.json $pkg_path
|
2023-10-14 00:59:42 +13:00
|
|
|
done
|
2023-10-03 20:34:35 +13:00
|
|
|
}
|
2023-10-03 05:18:42 +13:00
|
|
|
|
2023-10-19 01:28:05 +13:00
|
|
|
process_package "$package_json_path"
|