diff --git a/README.md b/README.md index 5462669..b612861 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,9 @@ npm install -g repopack # Or using yarn yarn global add repopack +# Or using Homebrew (macOS) +brew install repopack + # Then run in any project directory repopack ``` diff --git a/repopack-instruction.md b/repopack-instruction.md index 90e1a33..5b80998 100644 --- a/repopack-instruction.md +++ b/repopack-instruction.md @@ -7,3 +7,136 @@ # Generate Comprehensive Output - Include all content without abbreviation, unless specified otherwise - Optimize for handling large codebases while maintaining output quality + +# GitHub Release Note Guidelines +Here are some examples of release notes that follow the guidelines: + +v0.1.40 +````md +This release introduces improvements to file handling and output formatting, enhancing Repopack's functionality and user experience. + +## Improvements + +### Enhanced Markdown Support (#86, #95) + +- Improved code block formatting in Markdown output: + - Added language identifiers to code blocks for better syntax highlighting + - Extended support for various file extensions to improve language detection +- Dynamic output file extension: + - The extension of the output file now changes based on the selected style (e.g., `.md` for Markdown, `.xml` for XML) + - This behavior only applies when no specific output file path is provided by the user + +### Enhanced Exclusion of Package Manager Lock Files (#90, #94) + +- Improved exclusion of common package manager lock files: + - npm: `package-lock.json` + - Yarn: `yarn.lock` + - pnpm: `pnpm-lock.yaml` + - These files are now automatically excluded from the packed output, including those in subdirectories + +## How to Update + +To update to the latest version, run: + +```bash +npm update -g repopack +``` + +--- + +We value your feedback and contributions in making Repopack better! If you encounter any issues or have suggestions, please share them through our GitHub issues. +```` + +v0.1.38 +````md +This release introduces a new Markdown output style, providing users with an additional option for formatting their repository content. + +## What's New + +### Markdown Output Style (#86, #87) + +- Added new 'markdown' output style option + - Users can now generate output in Markdown format, alongside existing plain text and XML options + +## How to Use + +To use the new Markdown output style, use the `--style markdown` option: + +```bash +repopack --style markdown +``` + +Or update your `repopack.config.json`: + +```json +{ + "output": { + "style": "markdown" + } +} +``` + +--- + +To update, simply run: +```bash +npm update -g repopack +``` + +As always, we appreciate your feedback and contributions to make Repopack even better! If you encounter any issues or have suggestions regarding this new feature, please let us know through our GitHub issues. +```` + +v0.1.36 +````md +This release introduces a new configuration option that allows users to control the security check feature, providing more flexibility in how Repopack handles sensitive information detection. + +## What's New + +### Configurable Security Check (#74, #75) + +- Added new configuration option `security.enableSecurityCheck` (default: `true`) + - Users can now disable the security check when needed, such as when working with cryptographic libraries or known false positives + +## How to Use + +To **disable** the security check, add the following to your `repopack.config.json`: + +```json +{ + "security": { + "enableSecurityCheck": false + } +} +``` + +**Note:** Disabling the security check may expose sensitive information. Use this option with caution and only when necessary. + +--- + +To update, simply run: +```bash +npm update -g repopack +``` + +As always, we appreciate your feedback and contributions to make Repopack even better! If you encounter any issues or have suggestions regarding this new feature, please let us know through our GitHub issues. +```` + +v0.1.32 +````md +This release focuses on improving performance and user experience, particularly when processing large repositories. + +## Bug Fixes +### Fixed an issue where the application appeared to hang (#63, #65) + +- Fixed an issue where the application appeared to hang during the security check process on large repositories. +- Reduced the impact on the event loop to prevent hanging when processing a large number of files. +- Implemented more frequent console updates during file processing and security checks. + +--- +To update, simply run: +``` +npm update -g repopack +``` + +As always, we appreciate your feedback and contributions to make Repopack even better! +```` diff --git a/src/cli/actions/initActionRunner.ts b/src/cli/actions/initActionRunner.ts index fb0e025..989e8c8 100644 --- a/src/cli/actions/initActionRunner.ts +++ b/src/cli/actions/initActionRunner.ts @@ -3,7 +3,7 @@ import path from 'node:path'; import * as prompts from '@clack/prompts'; import pc from 'picocolors'; import type { RepopackConfigFile, RepopackOutputStyle } from '../../config/configTypes.js'; -import { defaultConfig } from '../../config/defaultConfig.js'; +import { defaultConfig, defaultFilePathMap } from '../../config/defaultConfig.js'; import { getGlobalDirectory } from '../../config/globalDirectory.js'; import { logger } from '../../shared/logger.js'; @@ -77,27 +77,31 @@ export async function createConfigFile(rootDir: string, isGlobal: boolean): Prom const options = await prompts.group( { - outputFilePath: () => { + outputStyle: () => { if (isCancelled) { return; } - return prompts.text({ - message: 'Output file path:', - initialValue: defaultConfig.output.filePath, - validate: (value) => (value.length === 0 ? 'Output file path is required' : undefined), - }); - }, - - outputStyle: () => { return prompts.select({ message: 'Output style:', options: [ { value: 'plain', label: 'Plain', hint: 'Simple text format' }, { value: 'xml', label: 'XML', hint: 'Structured XML format' }, + { value: 'markdown', label: 'Markdown', hint: 'Markdown format' }, ], initialValue: defaultConfig.output.style, }); }, + outputFilePath: ({ results }) => { + if (isCancelled) { + return; + } + const defaultFilePath = defaultFilePathMap[results.outputStyle as RepopackOutputStyle]; + return prompts.text({ + message: 'Output file path:', + initialValue: defaultFilePath, + validate: (value) => (value.length === 0 ? 'Output file path is required' : undefined), + }); + }, }, { onCancel: onCancelOperation, diff --git a/src/core/security/securityCheckRunner.ts b/src/core/security/securityCheckRunner.ts index ca14fb3..17d7f26 100644 --- a/src/core/security/securityCheckRunner.ts +++ b/src/core/security/securityCheckRunner.ts @@ -25,6 +25,11 @@ export const runSecurityCheck = async ( async (rawFile, index) => { const secretLintResult = await runSecretLint(rawFile.path, rawFile.content, secretLintConfig); + progressCallback(`Running security check... (${index + 1}/${rawFiles.length}) ${pc.dim(rawFile.path)}`); + + // Sleep for a short time to prevent blocking the event loop + await sleep(1); + if (secretLintResult.messages.length > 0) { return { filePath: rawFile.path, @@ -32,11 +37,6 @@ export const runSecurityCheck = async ( }; } - progressCallback(`Running security check... (${index + 1}/${rawFiles.length}) ${pc.dim(rawFile.path)}`); - - // Sleep for a short time to prevent blocking the event loop - await sleep(1); - return null; }, {