2023-10-18 14:28:05 +02:00
|
|
|
#!/bin/sh
|
2023-10-03 11:02:11 +02:00
|
|
|
|
2023-10-18 16:06:32 +02: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 11:02:11 +02:00
|
|
|
|
2023-10-18 14:28:05 +02:00
|
|
|
package_json_path="$1"
|
2023-10-02 18:18:42 +02:00
|
|
|
|
2023-10-03 09:34:35 +02:00
|
|
|
process_package() {
|
2023-10-18 14:28:05 +02:00
|
|
|
pkg_path="$1"
|
2023-10-02 18:18:42 +02:00
|
|
|
|
2023-10-18 14:28:05 +02:00
|
|
|
for package_name in $packages_to_remove; do
|
2024-01-16 14:00:33 +01: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-13 13:59:42 +02:00
|
|
|
done
|
2023-10-03 09:34:35 +02:00
|
|
|
}
|
2023-10-02 18:18:42 +02:00
|
|
|
|
2023-10-18 14:28:05 +02:00
|
|
|
process_package "$package_json_path"
|