@xylabs/ts-scripts-yarn3 6.4.6 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/xy/xy.mjs CHANGED
@@ -875,46 +875,102 @@ var deplint = ({ pkg }) => {
875
875
  };
876
876
 
877
877
  // src/actions/deploy.ts
878
+ import { readFileSync as readFileSync3 } from "node:fs";
879
+ var privatePackageExcludeList = () => {
880
+ const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
881
+ workspace,
882
+ JSON.parse(readFileSync3(`${workspace.location}/package.json`, { encoding: "utf8" }))
883
+ ]);
884
+ const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
885
+ const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
886
+ return excludeList;
887
+ };
878
888
  var deploy = () => {
889
+ const excludeList = privatePackageExcludeList();
890
+ if (excludeList.length > 0) {
891
+ console.log("Excluding private packages from deployment:", excludeList);
892
+ }
879
893
  return runSteps("Deploy [Patch]", [
880
894
  ["yarn", "workspaces foreach --all version patch --deferred"],
881
895
  ["yarn", "xy clean"],
882
896
  ["yarn", "xy build"],
883
897
  ["yarn", "version apply --all"],
884
- ["yarn", "workspaces foreach --all --parallel npm publish"]
898
+ ["yarn", `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish`]
885
899
  ]);
886
900
  };
887
901
 
888
902
  // src/actions/deploy-major.ts
903
+ import { readFileSync as readFileSync4 } from "node:fs";
904
+ var privatePackageExcludeList2 = () => {
905
+ const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
906
+ workspace,
907
+ JSON.parse(readFileSync4(`${workspace.location}/package.json`, { encoding: "utf8" }))
908
+ ]);
909
+ const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
910
+ const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
911
+ return excludeList;
912
+ };
889
913
  var deployMajor = () => {
914
+ const excludeList = privatePackageExcludeList2();
915
+ if (excludeList.length > 0) {
916
+ console.log("Excluding private packages from deployment:", excludeList);
917
+ }
890
918
  return runSteps("Deploy [Major]", [
891
919
  ["yarn", "workspaces foreach --all version major --deferred"],
892
920
  ["yarn", "xy clean"],
893
921
  ["yarn", "xy build"],
894
922
  ["yarn", "version apply --all"],
895
- ["yarn", "workspaces foreach --all --parallel npm publish"]
923
+ ["yarn", `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish`]
896
924
  ]);
897
925
  };
898
926
 
899
927
  // src/actions/deploy-minor.ts
928
+ import { readFileSync as readFileSync5 } from "node:fs";
929
+ var privatePackageExcludeList3 = () => {
930
+ const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
931
+ workspace,
932
+ JSON.parse(readFileSync5(`${workspace.location}/package.json`, { encoding: "utf8" }))
933
+ ]);
934
+ const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
935
+ const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
936
+ return excludeList;
937
+ };
900
938
  var deployMinor = () => {
939
+ const excludeList = privatePackageExcludeList3();
940
+ if (excludeList.length > 0) {
941
+ console.log("Excluding private packages from deployment:", excludeList);
942
+ }
901
943
  return runSteps("Deploy [Minor]", [
902
944
  ["yarn", "workspaces foreach --all version minor --deferred"],
903
945
  ["yarn", "xy clean"],
904
946
  ["yarn", "xy build"],
905
947
  ["yarn", "version apply --all"],
906
- ["yarn", "workspaces foreach --all --parallel npm publish"]
948
+ ["yarn", `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish`]
907
949
  ]);
908
950
  };
909
951
 
910
952
  // src/actions/deploy-next.ts
953
+ import { readFileSync as readFileSync6 } from "node:fs";
954
+ var privatePackageExcludeList4 = () => {
955
+ const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
956
+ workspace,
957
+ JSON.parse(readFileSync6(`${workspace.location}/package.json`, { encoding: "utf8" }))
958
+ ]);
959
+ const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
960
+ const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
961
+ return excludeList;
962
+ };
911
963
  var deployNext = () => {
964
+ const excludeList = privatePackageExcludeList4();
965
+ if (excludeList.length > 0) {
966
+ console.log("Excluding private packages from deployment:", excludeList);
967
+ }
912
968
  return runSteps("Deploy [Next]", [
913
969
  ["yarn", "workspaces foreach --all version minor --deferred"],
914
970
  ["yarn", "xy clean"],
915
971
  ["yarn", "xy build"],
916
972
  ["yarn", "version apply --all --prerelease"],
917
- ["yarn", "workspaces foreach --all --parallel npm publish --tag next"]
973
+ ["yarn", `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish --tag next`]
918
974
  ]);
919
975
  };
920
976