@xylabs/ts-scripts-yarn3 6.4.5 → 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/actions/deplint.mjs +2 -1
- package/dist/actions/deplint.mjs.map +1 -1
- package/dist/actions/deploy-major.mjs +31 -3
- package/dist/actions/deploy-major.mjs.map +1 -1
- package/dist/actions/deploy-minor.mjs +31 -3
- package/dist/actions/deploy-minor.mjs.map +1 -1
- package/dist/actions/deploy-next.mjs +31 -3
- package/dist/actions/deploy-next.mjs.map +1 -1
- package/dist/actions/deploy.mjs +31 -3
- package/dist/actions/deploy.mjs.map +1 -1
- package/dist/actions/index.mjs +62 -5
- package/dist/actions/index.mjs.map +1 -1
- package/dist/bin/xy.mjs +62 -5
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.mjs +62 -5
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +62 -5
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +62 -5
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyDeployCommands.mjs +74 -6
- package/dist/xy/xyDeployCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +2 -1
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +5 -5
package/dist/bin/xy.mjs
CHANGED
|
@@ -693,13 +693,14 @@ function getImportsFromFile(filePath, importPaths, typeImportPaths) {
|
|
|
693
693
|
);
|
|
694
694
|
const imports = [];
|
|
695
695
|
const typeImports = [];
|
|
696
|
+
const isDeclarationFile = filePath.endsWith(".d.ts");
|
|
696
697
|
function visit(node) {
|
|
697
698
|
if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) {
|
|
698
699
|
const moduleSpecifier = node.moduleSpecifier?.getFullText();
|
|
699
700
|
const isTypeImport = ts.isImportDeclaration(node) ? node.importClause?.isTypeOnly ?? false : false;
|
|
700
701
|
if (moduleSpecifier) {
|
|
701
702
|
const trimmed = moduleSpecifier.split("'").at(1) ?? moduleSpecifier;
|
|
702
|
-
if (isTypeImport) {
|
|
703
|
+
if (isTypeImport && !isDeclarationFile) {
|
|
703
704
|
typeImports.push(trimmed);
|
|
704
705
|
} else {
|
|
705
706
|
imports.push(trimmed);
|
|
@@ -876,46 +877,102 @@ var deplint = ({ pkg }) => {
|
|
|
876
877
|
};
|
|
877
878
|
|
|
878
879
|
// src/actions/deploy.ts
|
|
880
|
+
import { readFileSync as readFileSync3 } from "node:fs";
|
|
881
|
+
var privatePackageExcludeList = () => {
|
|
882
|
+
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
883
|
+
workspace,
|
|
884
|
+
JSON.parse(readFileSync3(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
885
|
+
]);
|
|
886
|
+
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
887
|
+
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
888
|
+
return excludeList;
|
|
889
|
+
};
|
|
879
890
|
var deploy = () => {
|
|
891
|
+
const excludeList = privatePackageExcludeList();
|
|
892
|
+
if (excludeList.length > 0) {
|
|
893
|
+
console.log("Excluding private packages from deployment:", excludeList);
|
|
894
|
+
}
|
|
880
895
|
return runSteps("Deploy [Patch]", [
|
|
881
896
|
["yarn", "workspaces foreach --all version patch --deferred"],
|
|
882
897
|
["yarn", "xy clean"],
|
|
883
898
|
["yarn", "xy build"],
|
|
884
899
|
["yarn", "version apply --all"],
|
|
885
|
-
["yarn",
|
|
900
|
+
["yarn", `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish`]
|
|
886
901
|
]);
|
|
887
902
|
};
|
|
888
903
|
|
|
889
904
|
// src/actions/deploy-major.ts
|
|
905
|
+
import { readFileSync as readFileSync4 } from "node:fs";
|
|
906
|
+
var privatePackageExcludeList2 = () => {
|
|
907
|
+
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
908
|
+
workspace,
|
|
909
|
+
JSON.parse(readFileSync4(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
910
|
+
]);
|
|
911
|
+
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
912
|
+
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
913
|
+
return excludeList;
|
|
914
|
+
};
|
|
890
915
|
var deployMajor = () => {
|
|
916
|
+
const excludeList = privatePackageExcludeList2();
|
|
917
|
+
if (excludeList.length > 0) {
|
|
918
|
+
console.log("Excluding private packages from deployment:", excludeList);
|
|
919
|
+
}
|
|
891
920
|
return runSteps("Deploy [Major]", [
|
|
892
921
|
["yarn", "workspaces foreach --all version major --deferred"],
|
|
893
922
|
["yarn", "xy clean"],
|
|
894
923
|
["yarn", "xy build"],
|
|
895
924
|
["yarn", "version apply --all"],
|
|
896
|
-
["yarn",
|
|
925
|
+
["yarn", `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish`]
|
|
897
926
|
]);
|
|
898
927
|
};
|
|
899
928
|
|
|
900
929
|
// src/actions/deploy-minor.ts
|
|
930
|
+
import { readFileSync as readFileSync5 } from "node:fs";
|
|
931
|
+
var privatePackageExcludeList3 = () => {
|
|
932
|
+
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
933
|
+
workspace,
|
|
934
|
+
JSON.parse(readFileSync5(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
935
|
+
]);
|
|
936
|
+
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
937
|
+
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
938
|
+
return excludeList;
|
|
939
|
+
};
|
|
901
940
|
var deployMinor = () => {
|
|
941
|
+
const excludeList = privatePackageExcludeList3();
|
|
942
|
+
if (excludeList.length > 0) {
|
|
943
|
+
console.log("Excluding private packages from deployment:", excludeList);
|
|
944
|
+
}
|
|
902
945
|
return runSteps("Deploy [Minor]", [
|
|
903
946
|
["yarn", "workspaces foreach --all version minor --deferred"],
|
|
904
947
|
["yarn", "xy clean"],
|
|
905
948
|
["yarn", "xy build"],
|
|
906
949
|
["yarn", "version apply --all"],
|
|
907
|
-
["yarn",
|
|
950
|
+
["yarn", `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish`]
|
|
908
951
|
]);
|
|
909
952
|
};
|
|
910
953
|
|
|
911
954
|
// src/actions/deploy-next.ts
|
|
955
|
+
import { readFileSync as readFileSync6 } from "node:fs";
|
|
956
|
+
var privatePackageExcludeList4 = () => {
|
|
957
|
+
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
958
|
+
workspace,
|
|
959
|
+
JSON.parse(readFileSync6(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
960
|
+
]);
|
|
961
|
+
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
962
|
+
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
963
|
+
return excludeList;
|
|
964
|
+
};
|
|
912
965
|
var deployNext = () => {
|
|
966
|
+
const excludeList = privatePackageExcludeList4();
|
|
967
|
+
if (excludeList.length > 0) {
|
|
968
|
+
console.log("Excluding private packages from deployment:", excludeList);
|
|
969
|
+
}
|
|
913
970
|
return runSteps("Deploy [Next]", [
|
|
914
971
|
["yarn", "workspaces foreach --all version minor --deferred"],
|
|
915
972
|
["yarn", "xy clean"],
|
|
916
973
|
["yarn", "xy build"],
|
|
917
974
|
["yarn", "version apply --all --prerelease"],
|
|
918
|
-
["yarn",
|
|
975
|
+
["yarn", `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish --tag next`]
|
|
919
976
|
]);
|
|
920
977
|
};
|
|
921
978
|
|