diff --git a/packages/jsts/src/rules/CHANGELOG.md b/packages/jsts/src/rules/CHANGELOG.md index 81f8df0e621..967049b11d1 100644 --- a/packages/jsts/src/rules/CHANGELOG.md +++ b/packages/jsts/src/rules/CHANGELOG.md @@ -1,8 +1,16 @@ +## 2024-12-05, Version 3.0.1 + +- [[ESLINTJS-64](https://sonarsource.atlassian.net/browse/ESLINTJS-64)] - Fix `Usage` section of the documentation +- [[ESLINTJS-61](https://sonarsource.atlassian.net/browse/ESLINTJS-61)] - Allow for wider margin of Typescript versions +- [[ESLINTJS-55](https://sonarsource.atlassian.net/browse/ESLINTJS-55)] - Create solution for release notes + ## 2024-12-02, Version 3.0.0 -- [[ESLINTJS-65](https://sonarsource.atlassian.net/browse/ESLINTJS-65)] - Remove decorated rules from ESLint plugin -- [[ESLINTJS-58](https://sonarsource.atlassian.net/browse/ESLINTJS-58)] - Change homepage to point to README.md in rules folder -- [[ESLINTJS-57](https://sonarsource.atlassian.net/browse/ESLINTJS-57)] - Remove "sonar-" from eslint-plugin-sonarjs rule names +- [[JS-359](https://sonarsource.atlassian.net/browse/JS-359)] - Create rule S6418 (`no-hardcoded-secrets`): Hard-coded secrets are security-sensitive + +* [[ESLINTJS-65](https://sonarsource.atlassian.net/browse/ESLINTJS-65)] - Remove decorated rules from ESLint plugin +* [[ESLINTJS-58](https://sonarsource.atlassian.net/browse/ESLINTJS-58)] - Change homepage to point to README.md in rules folder +* [[ESLINTJS-57](https://sonarsource.atlassian.net/browse/ESLINTJS-57)] - Remove "sonar-" from eslint-plugin-sonarjs rule names ## 2024-10-18, Version 2.0.4 diff --git a/tools/update-changelog.js b/tools/update-changelog.js index c906b1cbbe3..8091e0cc0ba 100644 --- a/tools/update-changelog.js +++ b/tools/update-changelog.js @@ -33,21 +33,23 @@ import { fileURLToPath } from 'node:url'; const version = process.argv[2]; +export const DIRNAME = dirname(fileURLToPath(import.meta.url)); +const changelogPath = join(DIRNAME, '..', 'packages', 'jsts', 'src', 'rules', 'CHANGELOG.md'); +const changelog = await readFile(changelogPath, 'utf8').catch(() => ''); + +const startDate = changelog.match(/^## (\d+-\d+-\d+)/)[1]; + const response = await fetch( encodeURI( - `https://sonarsource.atlassian.net/rest/api/2/search?jql=fixVersion=${version} and project="ESLINTJS"`, + `https://sonarsource.atlassian.net/rest/api/2/search?jql=(project = ESLINTJS AND fixversion = ${version}) OR (project = JS AND labels = eslint-plugin AND resolutiondate > '${startDate}') `, ), ); if (!response.ok) { throw new Error(`Response status: ${response.status}`); } -export const DIRNAME = dirname(fileURLToPath(import.meta.url)); -const changelogPath = join(DIRNAME, '..', 'packages', 'jsts', 'src', 'rules', 'CHANGELOG.md'); -const changelog = await readFile(changelogPath, 'utf8').catch(() => ''); - const json = await response.json(); -let newVersionStr = `## ${json.issues[0].fields.fixVersions[0].releaseDate}, Version ${version}\n\n`; +let newVersionStr = `## ${new Date().toISOString().split('T')[0]}, Version ${version}\n\n`; json.issues.forEach(issue => { newVersionStr += `* \[[${issue.key}](https://sonarsource.atlassian.net/browse/${issue.key})] - ${issue.fields.summary}\n`; });