Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ jobs:
id: release
with:
release-type: node
package-name: repo-description
target-branch: main
token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

## [1.0.1](https://github.com/ioncakephper/repo-description/compare/v1.0.0...v1.0.1) (2025-11-02)


### Bug Fixes

* **ci:** correct npm token secret name capitalization ([10f0b09](https://github.com/ioncakephper/repo-description/commit/10f0b098068a4cc018c0f1e450d21bb139b60319))
* **release:** configure release-please permissions and token ([d1019cb](https://github.com/ioncakephper/repo-description/commit/d1019cbaa588461fdf4d087e918b9e613d260a11))
- **ci:** correct npm token secret name capitalization ([10f0b09](https://github.com/ioncakephper/repo-description/commit/10f0b098068a4cc018c0f1e450d21bb139b60319))
- **release:** configure release-please permissions and token ([d1019cb](https://github.com/ioncakephper/repo-description/commit/d1019cbaa588461fdf4d087e918b9e613d260a11))

## 1.0.0 (2025-11-02)

Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
- [@eslint/js](https://www.npmjs.com/package/%40eslint%2Fjs) — ESLint JavaScript language implementation
- [babel-jest](https://www.npmjs.com/package/babel-jest) — Jest plugin to use babel for transformation.
- [commander](https://www.npmjs.com/package/commander) — the complete solution for node.js command-line programs
- [conventional-changelog-cli](https://www.npmjs.com/package/conventional-changelog-cli) — No description available
- [dotenv](https://www.npmjs.com/package/dotenv) — Loads environment variables from .env file
- [eslint](https://www.npmjs.com/package/eslint) — An AST-based pattern checker for JavaScript.
- [eslint-config-prettier](https://www.npmjs.com/package/eslint-config-prettier) — Turns off all rules that are unnecessary or might conflict with Prettier.
Expand Down Expand Up @@ -273,24 +272,24 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
repo-description/
├── __tests__
│ ├── .gitkeep
│ └── cli.test.js
│ └── cli.test.js # Description unavailable.
├── .qodo
│ ├── agents
│ └── workflows
├── src
│ ├── cli.js
│ ├── describe.js
│ ├── index.js
│ └── utils.js
├── .env # Description unavailable.
│ ├── cli.js # Description unavailable.
│ ├── describe.js # Description unavailable.
│ ├── index.js # Description unavailable.
│ └── utils.js # Description unavailable.
├── .env # Configure... the environment by setting the `GROQ_API_KEY` variable to provide authentication for Groq API access.
├── .gitignore
├── .prettierrc.json # Description unavailable.
├── babel.config.js # Description unavailable.
├── CHANGELOG.md
├── CONTRIBUTING.md # Description unavailable.
├── eslint.config.js # Description unavailable.
├── LICENSE # Description unavailable.
├── md.config.js # Description unavailable.
├── .prettierrc.json # Configure Prettier to enforce single quotes, trailing commas (es5), an 80‑character print width, and a specific ordering of fields in package.json via the prettier‑plugin‑packagejson.
├── babel.config.js # [configure] Babel to use @babel/preset‑env with the target set to the current Node version…
├── CHANGELOG.md # Documenting the project's version history by listing each release’s features, bug fixes, and related metadata in a Keep‑a‑Changelog format.
├── CONTRIBUTING.md # Guide contributors on how to report bugs, suggest enhancements, and submit code via pull requests.
├── eslint.config.js # Configure ESLint with global browser, node, and jest globals, recommended core and Prettier rules, and custom JSON/JSONC and YAML parsers and plugins for those file types.
├── LICENSE # Granting permission to use, copy, modify, merge, publish, distribute, sublicense, and sell the software freely under the MIT License.
├── md.config.js # [Exports] a configuration object that defines default settings (like file descriptions and badge style) and registers the markdown‑magic transform modules used to generate and augment the project’s documentation.
├── package-lock.json # Description unavailable.
├── package.json # Description unavailable.
├── README.md # Description unavailable.
Expand Down
37 changes: 23 additions & 14 deletions md.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,33 @@ module.exports = {
transformDefaults: {
fileTreeExtended: {
descriptions: {
'.env': 'Description unavailable.',
'.prettierrc.json': 'Description unavailable.',
'.vscode\\launch.json': 'Description unavailable.',
'babel.config.js': 'Description unavailable.',
'CONTRIBUTING.md': 'Description unavailable.',
'eslint.config.js': 'Description unavailable.',
LICENSE: 'Description unavailable.',
'md.config.js': 'Description unavailable.',
'.env':
'Configure... the environment by setting the `GROQ_API_KEY` variable to provide authentication for Groq API access.',
'.prettierrc.json':
'Configure Prettier to enforce single quotes, trailing commas (es5), an 80‑character print width, and a specific ordering of fields in package.json via the prettier‑plugin‑packagejson.',
'.vscode/launch.json':
'Configure launch configurations for debugging Node.js programs in VS Code.',
'babel.config.js':
'[configure] Babel to use @babel/preset‑env with the target set to the current Node version…',
'CHANGELOG.md':
"Documenting the project's version history by listing each release’s features, bug fixes, and related metadata in a Keep‑a‑Changelog format.",
'CONTRIBUTING.md':
'Guide contributors on how to report bugs, suggest enhancements, and submit code via pull requests.',
'eslint.config.js':
'Configure ESLint with global browser, node, and jest globals, recommended core and Prettier rules, and custom JSON/JSONC and YAML parsers and plugins for those file types.',
LICENSE:
'Granting permission to use, copy, modify, merge, publish, distribute, sublicense, and sell the software freely under the MIT License.',
'md.config.js':
'[Exports] a configuration object that defines default settings (like file descriptions and badge style) and registers the markdown‑magic transform modules used to generate and augment the project’s documentation.',
'package-lock.json': 'Description unavailable.',
'package.json': 'Description unavailable.',
'README.md': 'Description unavailable.',
'RULES_OF_CONDUCT.md': 'Description unavailable.',
'src\\cli.js': 'Description unavailable.',
'src\\describe.js': 'Description unavailable.',
'src\\index.js': 'Description unavailable.',
'src\\refactor-package.js': 'Description unavailable.',
'src\\utils.js': 'Description unavailable.',
'__tests__\\cli.test.js': 'Description unavailable.',
'src/cli.js': 'Description unavailable.',
'src/describe.js': 'Description unavailable.',
'src/index.js': 'Description unavailable.',
'src/utils.js': 'Description unavailable.',
'__tests__/cli.test.js': 'Description unavailable.',
},
},
BADGES: {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"@babel/preset-env": "^7.28.5",
"@eslint/js": "^9.38.0",
"babel-jest": "^30.2.0",

"eslint": "^9.39.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-jsonc": "^2.21.0",
Expand Down
30 changes: 15 additions & 15 deletions src/describe.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,20 @@ ${content}`;
descriptions[path.relative(repoPath, file)] = await queryGroq(prompt);
}

return descriptions;
const transformDescriptions = (inputDescriptions) => {
const outputDescriptions = {};
for (const key in inputDescriptions) {
if (Object.prototype.hasOwnProperty.call(inputDescriptions, key)) {
const newKey = key.replace(/\\/g, '/');
outputDescriptions[newKey] = inputDescriptions[key];
}
}
return outputDescriptions;
};

const formattedDescriptions = transformDescriptions(descriptions);

return formattedDescriptions;
}

/**
Expand Down Expand Up @@ -158,25 +171,12 @@ async function updateMarkdownMagicConfig(
* @param {boolean} [table=false] - Whether to use a table format for markdown output.
*/
function saveOutput(
inputDescriptions,
descriptions,
outputFile,
format = 'json',
summary = false,
table = false
) {
const transformDescriptions = (inputDescriptions) => {
const outputDescriptions = {};
for (const key in inputDescriptions) {
if (Object.prototype.hasOwnProperty.call(inputDescriptions, key)) {
const newKey = key.replace(/\\/g, '/');
outputDescriptions[newKey] = inputDescriptions[key];
}
}
return outputDescriptions;
};

const descriptions = transformDescriptions(inputDescriptions);

if (format === 'json') {
fs.writeFileSync(outputFile, JSON.stringify(descriptions, null, 2));
} else if (format === 'markdown') {
Expand Down