From 3c76f0e27902595964cc5481a69c31383538617b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 8 Nov 2025 13:26:13 +0000 Subject: [PATCH 1/3] Initial plan From 03ebc565ff644d276e502ed832df3d0249b44be6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 8 Nov 2025 13:33:59 +0000 Subject: [PATCH 2/3] Re-enable README.md and LICENSE file checks in packageFiles validation Co-authored-by: Apollon77 <11976694+Apollon77@users.noreply.github.com> --- build/tests/packageFiles/index.js | 30 ++++++++++------------- src/tests/packageFiles/index.ts | 40 ++++++++++++++++--------------- 2 files changed, 34 insertions(+), 36 deletions(-) diff --git a/build/tests/packageFiles/index.js b/build/tests/packageFiles/index.js index 201c42a3..e7bdf826 100644 --- a/build/tests/packageFiles/index.js +++ b/build/tests/packageFiles/index.js @@ -323,21 +323,17 @@ function validatePackageFiles(adapterDir) { } }); }); - // describe(`Check additional files`, () => { - // it("README.md exists", () => { - // expect( - // fs.existsSync(path.join(adapterDir, "README.md")), - // `README.md is missing in the adapter dir. Please create it!`, - // ).to.be.true; - // }); - // it("LICENSE exists or is present in the README.md", () => { - // const licenseExists = fs.existsSync(path.join(adapterDir, "LICENSE")); - // if (licenseExists) return; - // const readmeContent = fs.readFileSync(path.join(adapterDir, "README.md"), "utf8"); - // expect(readmeContent).to.match( - // /## LICENSE/i, - // `The license should be in a file "LICENSE" or be included in "README.md" as a 2nd level headline!`, - // ); - // }); - // }); + describe(`Check additional files`, () => { + it('README.md exists', () => { + (0, chai_1.expect)(fs.existsSync(path.join(adapterDir, 'README.md')), `README.md is missing in the adapter dir. Please create it!`).to.be.true; + }); + it('LICENSE exists or is present in the README.md', () => { + const licenseExists = fs.existsSync(path.join(adapterDir, 'LICENSE')); + if (licenseExists) { + return; + } + const readmeContent = fs.readFileSync(path.join(adapterDir, 'README.md'), 'utf8'); + (0, chai_1.expect)(readmeContent).to.match(/## LICENSE/i, `The license should be in a file "LICENSE" or be included in "README.md" as a 2nd level headline!`); + }); + }); } diff --git a/src/tests/packageFiles/index.ts b/src/tests/packageFiles/index.ts index aeb4060d..0c8654cd 100644 --- a/src/tests/packageFiles/index.ts +++ b/src/tests/packageFiles/index.ts @@ -336,23 +336,25 @@ export function validatePackageFiles(adapterDir: string): void { }); }); - // describe(`Check additional files`, () => { - // it("README.md exists", () => { - // expect( - // fs.existsSync(path.join(adapterDir, "README.md")), - // `README.md is missing in the adapter dir. Please create it!`, - // ).to.be.true; - // }); - - // it("LICENSE exists or is present in the README.md", () => { - // const licenseExists = fs.existsSync(path.join(adapterDir, "LICENSE")); - // if (licenseExists) return; - - // const readmeContent = fs.readFileSync(path.join(adapterDir, "README.md"), "utf8"); - // expect(readmeContent).to.match( - // /## LICENSE/i, - // `The license should be in a file "LICENSE" or be included in "README.md" as a 2nd level headline!`, - // ); - // }); - // }); + describe(`Check additional files`, () => { + it('README.md exists', () => { + expect( + fs.existsSync(path.join(adapterDir, 'README.md')), + `README.md is missing in the adapter dir. Please create it!`, + ).to.be.true; + }); + + it('LICENSE exists or is present in the README.md', () => { + const licenseExists = fs.existsSync(path.join(adapterDir, 'LICENSE')); + if (licenseExists) { + return; + } + + const readmeContent = fs.readFileSync(path.join(adapterDir, 'README.md'), 'utf8'); + expect(readmeContent).to.match( + /## LICENSE/i, + `The license should be in a file "LICENSE" or be included in "README.md" as a 2nd level headline!`, + ); + }); + }); } From 61fa41cb21b9b03729898a3446ea9eaaa3a2e533 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 8 Nov 2025 13:48:46 +0000 Subject: [PATCH 3/3] Add changelog entry and enhance copilot instructions for changelog requirements Co-authored-by: Apollon77 <11976694+Apollon77@users.noreply.github.com> --- .github/copilot-instructions.md | 12 +++++++++++- CHANGELOG.md | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 76cbf5d6..d31f17fb 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -27,7 +27,17 @@ 2. Run `npm run build` to compile to `build/` directory 3. Run `npm test` to validate changes 4. Run `npm run lint` to ensure code quality -5. Built files in `build/` are what get published to npm +5. **ALWAYS** add a changelog entry to `CHANGELOG.md` under the "**WORK IN PROGRESS**" section for any user-facing changes +6. Built files in `build/` are what get published to npm + +### Changelog Guidelines +- **REQUIRED**: Add an entry to `CHANGELOG.md` for all feature additions, bug fixes, or behavioral changes +- Format: `* (@username/@copilot) Description of change` +- Add entries under the `## **WORK IN PROGRESS**` section +- Be concise and describe the change from a user's perspective +- Examples: + - `* (@Apollon77/@copilot) Add validation for JSON files in admin/ and admin/i18n/ directories` + - `* (@Apollon77/@copilot) Re-enabled validation checks for README.md and LICENSE files in packageFiles tests` ## Project Structure diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e63bb30..5ace79dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ## **WORK IN PROGRESS** * (@Apollon77/@copilot) Add validation for JSON files in admin/ and admin/i18n/ directories * (@Apollon77/@copilot) Logs npm and installation errors to console for easier debugging +* (@Apollon77/@copilot) Re-enabled validation checks for README.md and LICENSE files in packageFiles tests ## 5.1.1 (2025-08-31) * (@Apollon77) Downgrades chai-as-promised type dependency to same major as main dependency