Skip to content

feat: tsci config set && refactor(clone): improve error message, author name customization #183

Merged
seveibar merged 4 commits intomainfrom
cl
Apr 23, 2025
Merged

feat: tsci config set && refactor(clone): improve error message, author name customization #183
seveibar merged 4 commits intomainfrom
cl

Conversation

@ArnavK-09
Copy link
Copy Markdown
Collaborator

@ArnavK-09 ArnavK-09 commented Apr 23, 2025

The directory path for cloned snippets no longer includes the author prefix, simplifying the structure and making it more consistent with user expectations. This change also updates the corresponding test cases to reflect the new directory naming convention.

Introduce a new configuration option alwaysCloneWithAuthorName to control whether the author name is included in the cloned snippet directory by default. This allows users to set a global preference for including the author name, reducing the need to specify the --include-author flag repeatedly.

Additionally, improve error handling for the clone command by providing a more user-friendly message when a snippet is not found. Register a new config set command to allow users to modify configuration values programmatically.

/claim #182

The directory path for cloned snippets no longer includes the author prefix, simplifying the structure and making it more consistent with user expectations. This change also updates the corresponding test cases to reflect the new directory naming convention.
@seveibar
Copy link
Copy Markdown
Contributor

@imrishabh18 so I actually like this feature where we keep the author name in the package, github doesn't do it and that's our reference so maybe it's ok to disable it by default, but for my selfish self we should make it a config setting that i can turn on 😁

the reason i like it is because the directory structure you create resembles the registry, i'm sure it would be really annoying for teams where everything in the directory has company.* though!!!!

This commit introduces a new `--include-author` flag to the clone command, which includes the author's name in the directory path when cloning a snippet. This change helps avoid naming conflicts and improves project organization by clearly distinguishing projects by their authors.
Copy link
Copy Markdown
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the flag is OK but can you make it a user setting as well?

also note, -ia is not a best-practice flag since in many CLIs it means -i and -a, i would maybe use --include-author / -a

The `-ia, --include-author` flag was simplified to `-a, --include-author` for better usability. Additionally, a new test was added to verify the functionality of the `-a` flag.
Introduce a new configuration option `alwaysCloneWithAuthorName` to control whether the author name is included in the cloned snippet directory by default. This allows users to set a global preference for including the author name, reducing the need to specify the `--include-author` flag repeatedly.

Additionally, improve error handling for the clone command by providing a more user-friendly message when a snippet is not found. Register a new `config set` command to allow users to modify configuration values programmatically.
@ArnavK-09 ArnavK-09 changed the title refactor(clone): simplify directory path by removing author prefix feat: tsci config set && refactor(clone): improve error message, author name customization Apr 23, 2025
Copy link
Copy Markdown
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niceee

@seveibar seveibar merged commit d994e19 into main Apr 23, 2025
6 checks passed
@ArnavK-09 ArnavK-09 deleted the cl branch May 1, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants