@bensandee/tooling 0.25.1 → 0.25.2
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/bin.mjs +13 -8
- package/package.json +1 -1
package/dist/bin.mjs
CHANGED
|
@@ -983,7 +983,7 @@ function getAddedDevDepNames(config) {
|
|
|
983
983
|
const deps = { ...ROOT_DEV_DEPS };
|
|
984
984
|
if (config.structure !== "monorepo") Object.assign(deps, PER_PACKAGE_DEV_DEPS);
|
|
985
985
|
deps["@bensandee/config"] = "0.9.0";
|
|
986
|
-
deps["@bensandee/tooling"] = "0.25.
|
|
986
|
+
deps["@bensandee/tooling"] = "0.25.2";
|
|
987
987
|
if (config.formatter === "oxfmt") deps["oxfmt"] = "0.35.0";
|
|
988
988
|
if (config.formatter === "prettier") deps["prettier"] = "3.8.1";
|
|
989
989
|
addReleaseDeps(deps, config);
|
|
@@ -1008,7 +1008,7 @@ async function generatePackageJson(ctx) {
|
|
|
1008
1008
|
const devDeps = { ...ROOT_DEV_DEPS };
|
|
1009
1009
|
if (!isMonorepo) Object.assign(devDeps, PER_PACKAGE_DEV_DEPS);
|
|
1010
1010
|
devDeps["@bensandee/config"] = isWorkspacePackage(ctx, "@bensandee/config") ? "workspace:*" : "0.9.0";
|
|
1011
|
-
devDeps["@bensandee/tooling"] = isWorkspacePackage(ctx, "@bensandee/tooling") ? "workspace:*" : "0.25.
|
|
1011
|
+
devDeps["@bensandee/tooling"] = isWorkspacePackage(ctx, "@bensandee/tooling") ? "workspace:*" : "0.25.2";
|
|
1012
1012
|
if (ctx.config.useEslintPlugin) devDeps["@bensandee/eslint-plugin"] = isWorkspacePackage(ctx, "@bensandee/eslint-plugin") ? "workspace:*" : "0.9.2";
|
|
1013
1013
|
if (ctx.config.formatter === "oxfmt") devDeps["oxfmt"] = "0.35.0";
|
|
1014
1014
|
if (ctx.config.formatter === "prettier") devDeps["prettier"] = "3.8.1";
|
|
@@ -2649,6 +2649,11 @@ function readPackageInfo(executor, packageJsonPath) {
|
|
|
2649
2649
|
};
|
|
2650
2650
|
}
|
|
2651
2651
|
}
|
|
2652
|
+
/** Strip npm scope from a package name: "@scope/foo" → "foo", "foo" → "foo". */
|
|
2653
|
+
function stripScope(name) {
|
|
2654
|
+
const slashIndex = name.indexOf("/");
|
|
2655
|
+
return name.startsWith("@") && slashIndex !== -1 ? name.slice(slashIndex + 1) : name;
|
|
2656
|
+
}
|
|
2652
2657
|
/** Convention paths to check for Dockerfiles in a package directory. */
|
|
2653
2658
|
const CONVENTION_DOCKERFILE_PATHS = ["Dockerfile", "docker/Dockerfile"];
|
|
2654
2659
|
/**
|
|
@@ -2698,7 +2703,7 @@ function detectDockerPackages(executor, cwd, repoName) {
|
|
|
2698
2703
|
const { name, version } = readPackageInfo(executor, path.join(cwd, "packages", dir, "package.json"));
|
|
2699
2704
|
packages.push({
|
|
2700
2705
|
dir,
|
|
2701
|
-
imageName: `${repoName}-${name ?? dir}`,
|
|
2706
|
+
imageName: `${repoName}-${stripScope(name ?? dir)}`,
|
|
2702
2707
|
version,
|
|
2703
2708
|
docker
|
|
2704
2709
|
});
|
|
@@ -2709,7 +2714,7 @@ function detectDockerPackages(executor, cwd, repoName) {
|
|
|
2709
2714
|
const { name, version } = readPackageInfo(executor, path.join(cwd, "packages", dir, "package.json"));
|
|
2710
2715
|
packages.push({
|
|
2711
2716
|
dir,
|
|
2712
|
-
imageName: `${repoName}-${name ?? dir}`,
|
|
2717
|
+
imageName: `${repoName}-${stripScope(name ?? dir)}`,
|
|
2713
2718
|
version,
|
|
2714
2719
|
docker
|
|
2715
2720
|
});
|
|
@@ -2721,7 +2726,7 @@ function detectDockerPackages(executor, cwd, repoName) {
|
|
|
2721
2726
|
const { name, version } = readPackageInfo(executor, path.join(cwd, "package.json"));
|
|
2722
2727
|
packages.push({
|
|
2723
2728
|
dir: ".",
|
|
2724
|
-
imageName: name ?? repoName,
|
|
2729
|
+
imageName: stripScope(name ?? repoName),
|
|
2725
2730
|
version,
|
|
2726
2731
|
docker
|
|
2727
2732
|
});
|
|
@@ -2741,7 +2746,7 @@ function readSinglePackageDocker(executor, cwd, packageDir, repoName) {
|
|
|
2741
2746
|
const { name, version } = readPackageInfo(executor, path.join(cwd, "packages", dir, "package.json"));
|
|
2742
2747
|
return {
|
|
2743
2748
|
dir,
|
|
2744
|
-
imageName: `${repoName}-${name ?? dir}`,
|
|
2749
|
+
imageName: `${repoName}-${stripScope(name ?? dir)}`,
|
|
2745
2750
|
version,
|
|
2746
2751
|
docker
|
|
2747
2752
|
};
|
|
@@ -4666,7 +4671,7 @@ const dockerCheckCommand = defineCommand({
|
|
|
4666
4671
|
const main = defineCommand({
|
|
4667
4672
|
meta: {
|
|
4668
4673
|
name: "tooling",
|
|
4669
|
-
version: "0.25.
|
|
4674
|
+
version: "0.25.2",
|
|
4670
4675
|
description: "Bootstrap and maintain standardized TypeScript project tooling"
|
|
4671
4676
|
},
|
|
4672
4677
|
subCommands: {
|
|
@@ -4682,7 +4687,7 @@ const main = defineCommand({
|
|
|
4682
4687
|
"docker:check": dockerCheckCommand
|
|
4683
4688
|
}
|
|
4684
4689
|
});
|
|
4685
|
-
console.log(`@bensandee/tooling v0.25.
|
|
4690
|
+
console.log(`@bensandee/tooling v0.25.2`);
|
|
4686
4691
|
async function run() {
|
|
4687
4692
|
await runMain(main);
|
|
4688
4693
|
process.exit(process.exitCode ?? 0);
|