-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ESLINTJS-55 Create solution for release notes
- Loading branch information
Showing
3 changed files
with
136 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## 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 | ||
|
||
## 2024-10-18, Version 2.0.4 | ||
|
||
- [[ESLINTJS-62](https://sonarsource.atlassian.net/browse/ESLINTJS-62)] - Improve S3776: Do not increase complexity on short-circuiting and null coalescing | ||
|
||
## 2024-09-23, Version 2.0.3 | ||
|
||
- [[ESLINTJS-56](https://sonarsource.atlassian.net/browse/ESLINTJS-56)] - Improve the performances of package manifest search | ||
- [[ESLINTJS-53](https://sonarsource.atlassian.net/browse/ESLINTJS-53)] - Support ESLint 9 | ||
- [[ESLINTJS-50](https://sonarsource.atlassian.net/browse/ESLINTJS-50)] - "sonarjs/prefer-enum-initializers" fails with newer versions of typescript-eslint | ||
- [[ESLINTJS-49](https://sonarsource.atlassian.net/browse/ESLINTJS-49)] - Rule `no-implicit-dependencies` doesn't work | ||
|
||
## 2024-08-30, Version 2.0.2 | ||
|
||
- [[ESLINTJS-52](https://sonarsource.atlassian.net/browse/ESLINTJS-52)] - Argument of type 'Config' is not assignable to parameter of type 'ConfigWithExtends' | ||
- [[ESLINTJS-51](https://sonarsource.atlassian.net/browse/ESLINTJS-51)] - The public APIs wrongly expose the internal helpers | ||
|
||
## 2024-08-23, Version 2.0.1 | ||
|
||
- [[ESLINTJS-48](https://sonarsource.atlassian.net/browse/ESLINTJS-48)] - Add all the missing declared dependencies that prevent the plugin to be installed using yarn + pnpm | ||
- [[ESLINTJS-47](https://sonarsource.atlassian.net/browse/ESLINTJS-47)] - `jsx-ast-utils` is missing from the list of dependencies of the package | ||
- [[ESLINTJS-46](https://sonarsource.atlassian.net/browse/ESLINTJS-46)] - The plugin emits a warning when used with ESLint 8 | ||
|
||
## 2024-08-22, Version 2.0.0 | ||
|
||
- [[JS-194](https://sonarsource.atlassian.net/browse/JS-194)] - Provide eslint configurations based on Sonar way profile | ||
- [[JS-191](https://sonarsource.atlassian.net/browse/JS-191)] - Expose all rules from SonarJS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { readFile, writeFile } from 'node:fs/promises'; | ||
import { dirname, join } from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
|
||
/** | ||
* This script updates the changelog for the eslint plugin located in | ||
* packages/jsts/src/rules/CHANGELOG.md | ||
* | ||
* Just run the script with the new version that needs to be added | ||
* | ||
* node tools/update-changelog.js 3.0.0 | ||
* | ||
* This is not yet automatized in the CI but should be added to the | ||
* eslint-plugin-sonarjs release action. Until then, we need to run | ||
* this manually | ||
*/ | ||
|
||
const version = process.argv[2]; | ||
|
||
const response = await fetch( | ||
encodeURI( | ||
`https://sonarsource.atlassian.net/rest/api/2/search?jql=fixVersion=${version} and project="ESLINTJS"`, | ||
), | ||
); | ||
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`; | ||
json.issues.forEach(issue => { | ||
newVersionStr += `* \[[${issue.key}](https://sonarsource.atlassian.net/browse/${issue.key})] - ${issue.fields.summary}\n`; | ||
}); | ||
newVersionStr += '\n'; | ||
|
||
await writeFile(changelogPath, newVersionStr + changelog); |