1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2026-06-24 11:35:58 -04:00

fix: rename new site to new project to match Hugo v0.156.0

Hugo v0.156.0 renamed the `new site` subcommand to `new project`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 10:33:35 -05:00
parent 5059fcb1d8
commit f111ebd21e
5 changed files with 30 additions and 30 deletions
+4 -4
View File
@@ -16,8 +16,8 @@ describe("buildArgs", () => {
describe("positional arguments", () => {
it("should add positional arguments after command", () => {
const args = buildArgs("new site", ["my-site"]);
expect(args).toEqual(["new", "site", "my-site"]);
const args = buildArgs("new project", ["my-site"]);
expect(args).toEqual(["new", "project", "my-site"]);
});
it("should handle multiple positional arguments", () => {
@@ -26,8 +26,8 @@ describe("buildArgs", () => {
});
it("should handle positional args with options", () => {
const args = buildArgs("new site", ["my-site"], { format: "yaml" });
expect(args).toEqual(["new", "site", "my-site", "--format", "yaml"]);
const args = buildArgs("new project", ["my-site"], { format: "yaml" });
expect(args).toEqual(["new", "project", "my-site", "--format", "yaml"]);
});
});
+4 -4
View File
@@ -6,7 +6,7 @@ describe("Type Safety", () => {
// Check that specific commands are valid HugoCommand values
expectTypeOf<"build">().toExtend<HugoCommand>();
expectTypeOf<"server">().toExtend<HugoCommand>();
expectTypeOf<"new site">().toExtend<HugoCommand>();
expectTypeOf<"new project">().toExtend<HugoCommand>();
expectTypeOf<"new theme">().toExtend<HugoCommand>();
expectTypeOf<"new content">().toExtend<HugoCommand>();
});
@@ -14,7 +14,7 @@ describe("Type Safety", () => {
it("should map commands to correct option types", () => {
type BuildOpts = HugoOptionsFor<"build">;
type ServerOpts = HugoOptionsFor<"server">;
type NewSiteOpts = HugoOptionsFor<"new site">;
type NewProjectOpts = HugoOptionsFor<"new project">;
type NewThemeOpts = HugoOptionsFor<"new theme">;
// Build options should have minify
@@ -23,8 +23,8 @@ describe("Type Safety", () => {
// Server options should have port
expectTypeOf<ServerOpts>().toHaveProperty("port");
// New site options should have format
expectTypeOf<NewSiteOpts>().toHaveProperty("format");
// New project options should have format
expectTypeOf<NewProjectOpts>().toHaveProperty("format");
// New theme options should have format
expectTypeOf<NewThemeOpts>().toHaveProperty("format");