From 3f12441e3093b1a325c723e7b259863d5d04dd0d Mon Sep 17 00:00:00 2001 From: Harel M Date: Sun, 29 Sep 2024 09:53:05 +0300 Subject: [PATCH] Auto changelog release (#199) * Removes unwanted bind call and add a test * Added changelog automatic support * Update contributing guide for release * Revert unwanted fixes for this PR --- .github/workflows/create-bump-version-pr.yml | 4 + CHANGELOG.md | 2 + CONTRIBUTING.md | 12 +- package-lock.json | 109 ++++++++++++++++++- package.json | 8 +- 5 files changed, 124 insertions(+), 11 deletions(-) diff --git a/.github/workflows/create-bump-version-pr.yml b/.github/workflows/create-bump-version-pr.yml index 613907ce..62b8e769 100644 --- a/.github/workflows/create-bump-version-pr.yml +++ b/.github/workflows/create-bump-version-pr.yml @@ -29,6 +29,10 @@ jobs: cd projects/ngx-maplibre-gl/ npm version --commit-hooks false --git-tag-version false ${{ inputs.version }} + - name: Update CHANGELOG.md + run: | + npm run changelog + - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index af18ed1c..9b077524 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. + + ### [18.1.1](https://github.com/maplibre/ngx-maplibre-gl/compare/v18.1.0...v18.1.1) (2024-08-27) - Fix an issue related to clustering caused by the signals migration: [#188](https://github.com/maplibre/ngx-maplibre-gl/issues/188) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 97c6cc02..8184f5e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,16 +30,10 @@ https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit ## Release a new version -IMPORTANT: ngx-maplibre-gl does not follow - It uses the main version of angular as the major and usualy the maplibre-gl version as the minor. +IMPORTANT: ngx-maplibre-gl does not follow semver - It uses the main version of angular as the major and usualy the maplibre-gl version as the minor. -Check if tests are OK (`npm run test` and `npm run e2e` or take a look at ci if your changes are pushed). +Run the create-bump-version-PR workflow to update the version and changelog. -Change the version in both package.json files - the version should match the supported angular version - -Manually edit `CHANGELOG.md` if necessary. - -If everything is OK, push the changes - -Run the create-bump-version-PR workflow to update the version +Manually edit `CHANGELOG.md` to add the new version name and release data, also edit the version content if needed. Once merged to main, a new version should be created automatically. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 5bc78be3..33bc5d40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,6 +51,7 @@ "@typescript-eslint/eslint-plugin": "^8.2.0", "@typescript-eslint/parser": "^8.2.0", "angular-cli-ghpages": "^2.0.1", + "auto-changelog": "^2.5.0", "commitizen": "^4.3.0", "cypress": "^13.13.3", "eslint": "^8.57.0", @@ -8247,6 +8248,35 @@ "node": ">= 4.0.0" } }, + "node_modules/auto-changelog": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/auto-changelog/-/auto-changelog-2.5.0.tgz", + "integrity": "sha512-UTnLjT7I9U2U/xkCUH5buDlp8C7g0SGChfib+iDrJkamcj5kaMqNKHNfbKJw1kthJUq8sUo3i3q2S6FzO/l/wA==", + "dev": true, + "dependencies": { + "commander": "^7.2.0", + "handlebars": "^4.7.7", + "import-cwd": "^3.0.0", + "node-fetch": "^2.6.1", + "parse-github-url": "^1.0.3", + "semver": "^7.3.5" + }, + "bin": { + "auto-changelog": "src/index.js" + }, + "engines": { + "node": ">=8.3" + } + }, + "node_modules/auto-changelog/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, "node_modules/autoprefixer": { "version": "10.4.20", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", @@ -13398,6 +13428,18 @@ "node": ">=0.10.0" } }, + "node_modules/import-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-3.0.0.tgz", + "integrity": "sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==", + "dev": true, + "dependencies": { + "import-from": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -13423,6 +13465,18 @@ "node": ">=4" } }, + "node_modules/import-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz", + "integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -17586,6 +17640,26 @@ "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", "dev": true }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -18238,6 +18312,18 @@ "node": ">=6" } }, + "node_modules/parse-github-url": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.3.tgz", + "integrity": "sha512-tfalY5/4SqGaV/GIGzWyHnFjlpTPTNpENR9Ea2lLldSJ8EWXMsvacWucqY3m3I4YPtas15IxTLQVQ5NSYXPrww==", + "dev": true, + "bin": { + "parse-github-url": "cli.js" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -19409,7 +19495,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "optional": true, "engines": { "node": ">=8" } @@ -21221,6 +21306,12 @@ "node": ">= 4.0.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, "node_modules/tree-dump": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.0.2.tgz", @@ -21864,6 +21955,12 @@ "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", "dev": true }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, "node_modules/webpack": { "version": "5.93.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.93.0.tgz", @@ -22232,6 +22329,16 @@ "node": ">=0.8.0" } }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 48a0ffb7..95e4013c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,10 @@ { "name": "ngx-maplibre-gl-srcs", "version": "18.1.1", + "repository": { + "type": "git", + "url": "https://github.com/maplibre/ngx-maplibre-gl.git" + }, "scripts": { "ng": "ng", "start": "ng serve showcase", @@ -13,7 +17,8 @@ "e2e": "ng run showcase:cypress-run", "cypress:open": "ng run showcase:cypress-open", "docs": "typedoc", - "serve:ssr:showcase": "node dist/showcase/server/server.mjs" + "serve:ssr:showcase": "node dist/showcase/server/server.mjs", + "changelog": "auto-changelog --unreleased-only" }, "private": true, "engines": { @@ -63,6 +68,7 @@ "@typescript-eslint/eslint-plugin": "^8.2.0", "@typescript-eslint/parser": "^8.2.0", "angular-cli-ghpages": "^2.0.1", + "auto-changelog": "^2.5.0", "commitizen": "^4.3.0", "cypress": "^13.13.3", "eslint": "^8.57.0",