diff --git a/.github/actions/run-fixtures-test/action.yml b/.github/actions/run-fixtures-test/action.yml index d733fe7041..ad9774b1cb 100644 --- a/.github/actions/run-fixtures-test/action.yml +++ b/.github/actions/run-fixtures-test/action.yml @@ -21,7 +21,7 @@ runs: uses: dtolnay/rust-toolchain@nightly - name: Install git-cliff - run: cargo install --path git-cliff/ + run: cargo install --path git-cliff/ --profile dev shell: bash - name: Set git config diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dd9f6e00c..cd55987c1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,25 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: --tests --verbose -- -W clippy::pedantic + args: > + --all-targets --verbose -- -W clippy::pedantic + -A clippy::needless_raw_string_hashes + -A clippy::unreadable_literal + -A clippy::redundant_else + -A clippy::items_after_statements + -A clippy::missing_errors_doc + -A clippy::module_name_repetitions + -A clippy::uninlined_format_args + -A clippy::manual_string_new + -A clippy::must_use_candidate + -A clippy::too_many_lines + -A clippy::wildcard_imports + -A clippy::missing_panics_doc + -A clippy::inefficient_to_string + -A clippy::redundant_closure_for_method_calls + -A clippy::map_unwrap_or + -A clippy::struct_excessive_bools + -A clippy::unnecessary_wraps rustfmt: name: Formatting diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b00e6d74a3..5c3e962753 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -35,11 +35,6 @@ jobs: type=raw,value=latest type=semver,pattern={{version}} - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 @@ -73,7 +68,6 @@ jobs: with: context: ./ file: ./Dockerfile - platforms: linux/amd64,linux/arm64 builder: ${{ steps.buildx.outputs.name }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c8e5b8e73..78152b805d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ [![animation](https://raw.githubusercontent.com/orhun/git-cliff/main/website/static/img/git-cliff-anim.gif)](https://git-cliff.org) +## [2.6.1](https://github.com/orhun/git-cliff/compare/v2.6.0..v2.6.1) - 2024-09-27 + +### 🐛 Bug Fixes + +- *(npm)* Add missing `--use-branch-tags` flag to TS options ([#874](https://github.com/orhun/git-cliff/issues/874)) - ([e21fb1d](https://github.com/orhun/git-cliff/commit/e21fb1d3895d893fd6a371ecd48aa4632cf4231d)) +- *(remote)* Avoid setting multiple remotes ([#885](https://github.com/orhun/git-cliff/issues/885)) - ([a344c68](https://github.com/orhun/git-cliff/commit/a344c68238cf3bb87d4f7eb9be46e97cc964eed9)) + +### 📚 Documentation + +- *(website)* Add conversion to pdf to tips-and-tricks ([#889](https://github.com/orhun/git-cliff/issues/889)) - ([58dc108](https://github.com/orhun/git-cliff/commit/58dc1087ed86794c2f678707f2fbb8199167b0c3)) +- *(website)* Add get_env filter example for GitLab CI - ([dfe4459](https://github.com/orhun/git-cliff/commit/dfe4459c5cadd465dec4ea860580ecf82b2b8860)) + +### ⚙️ Miscellaneous Tasks + +- *(ci)* Update pedantic lint command ([#890](https://github.com/orhun/git-cliff/issues/890)) - ([8d10edb](https://github.com/orhun/git-cliff/commit/8d10edb7450aaf189fbce5f78a72274739f73ba9)) +- *(docker)* Disable building arm64 docker images temporarily ([#879](https://github.com/orhun/git-cliff/issues/879)) - ([cde2a8e](https://github.com/orhun/git-cliff/commit/cde2a8e3222f5e8f8bdd9ae841fd0e5c42f68846)) +- *(fixtures)* Build binaries using dev profile ([#886](https://github.com/orhun/git-cliff/issues/886)) - ([a394f88](https://github.com/orhun/git-cliff/commit/a394f88f1d1742dfa3d30887bcb387361de306bc)) + +## New Contributors ❤️ + +* @Krensi made their first contribution in [#889](https://github.com/orhun/git-cliff/pull/889) + ## [2.6.0](https://github.com/orhun/git-cliff/compare/v2.5.0..v2.6.0) - 2024-09-22 ### ⛰️ Features @@ -42,7 +64,6 @@ ## New Contributors ❤️ -* @nejcgalof made their first contribution in [#853](https://github.com/orhun/git-cliff/pull/853) * @pplmx made their first contribution in [#824](https://github.com/orhun/git-cliff/pull/824) ## [2.5.0](https://github.com/orhun/git-cliff/compare/v2.4.0..v2.5.0) - 2024-08-24 @@ -103,7 +124,6 @@ * @oberrich made their first contribution in [#809](https://github.com/orhun/git-cliff/pull/809) * @tisonkun made their first contribution in [#599](https://github.com/orhun/git-cliff/pull/599) * @DerTiedemann made their first contribution in [#758](https://github.com/orhun/git-cliff/pull/758) -* @DaniPopes made their first contribution in [#709](https://github.com/orhun/git-cliff/pull/709) * @artrz made their first contribution in [#779](https://github.com/orhun/git-cliff/pull/779) * @myl7 made their first contribution in [#776](https://github.com/orhun/git-cliff/pull/776) * @pawamoy made their first contribution in [#774](https://github.com/orhun/git-cliff/pull/774) diff --git a/Cargo.lock b/Cargo.lock index 5ad1d893bb..1840d2d1e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -860,7 +860,7 @@ checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "git-cliff" -version = "2.6.0" +version = "2.6.1" dependencies = [ "clap", "clap_complete", @@ -884,7 +884,7 @@ dependencies = [ [[package]] name = "git-cliff-core" -version = "2.6.0" +version = "2.6.1" dependencies = [ "bincode 2.0.0-rc.3", "cacache", @@ -2758,18 +2758,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", diff --git a/git-cliff-core/Cargo.toml b/git-cliff-core/Cargo.toml index efa3fad1fa..71cd0fc8d6 100644 --- a/git-cliff-core/Cargo.toml +++ b/git-cliff-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "git-cliff-core" -version = "2.6.0" # managed by release.sh +version = "2.6.1" # managed by release.sh description = "Core library of git-cliff" authors = ["git-cliff contributors "] license = "MIT OR Apache-2.0" @@ -49,7 +49,7 @@ log.workspace = true secrecy.workspace = true dirs.workspace = true lazy_static.workspace = true -thiserror = "1.0.63" +thiserror = "1.0.64" serde = { version = "1.0.210", features = ["derive"] } serde_json = "1.0.128" bincode = "2.0.0-rc.3" diff --git a/git-cliff-core/src/changelog.rs b/git-cliff-core/src/changelog.rs index 9649bf8767..a505a127a5 100644 --- a/git-cliff-core/src/changelog.rs +++ b/git-cliff-core/src/changelog.rs @@ -96,7 +96,7 @@ impl<'a> Changelog<'a> { /// Processes a single commit and returns/logs the result. fn process_commit( - commit: Commit<'a>, + commit: &Commit<'a>, git_config: &GitConfig, ) -> Option> { match commit.process(git_config) { @@ -122,7 +122,7 @@ impl<'a> Changelog<'a> { .commits .iter() .cloned() - .filter_map(|commit| Self::process_commit(commit, &self.config.git)) + .filter_map(|commit| Self::process_commit(&commit, &self.config.git)) .flat_map(|commit| { if self.config.git.split_commits.unwrap_or(false) { commit @@ -131,10 +131,10 @@ impl<'a> Changelog<'a> { .filter_map(|line| { let mut c = commit.clone(); c.message = line.to_string(); - if !c.message.is_empty() { - Self::process_commit(c, &self.config.git) - } else { + if c.message.is_empty() { None + } else { + Self::process_commit(&c, &self.config.git) } }) .collect() diff --git a/git-cliff-core/src/commit.rs b/git-cliff-core/src/commit.rs index c5414fce7b..0f349efa36 100644 --- a/git-cliff-core/src/commit.rs +++ b/git-cliff-core/src/commit.rs @@ -349,18 +349,18 @@ impl Commit<'_> { }; self.group = parser.group.clone().map(regex_replace); self.scope = parser.scope.clone().map(regex_replace); - self.default_scope = parser.default_scope.clone(); + self.default_scope.clone_from(&parser.default_scope); return Ok(self); } } } } - if !filter { - Ok(self) - } else { + if filter { Err(AppError::GroupError(String::from( "Commit does not belong to any group", ))) + } else { + Ok(self) } } @@ -425,38 +425,36 @@ impl Serialize for Commit<'_> { let mut commit = serializer.serialize_struct("Commit", 9)?; commit.serialize_field("id", &self.id)?; - match &self.conv { - Some(conv) => { - commit.serialize_field("message", conv.description())?; - commit.serialize_field("body", &conv.body())?; - commit.serialize_field("footers", &SerializeFooters(self))?; - commit.serialize_field( - "group", - self.group.as_ref().unwrap_or(&conv.type_().to_string()), - )?; - commit.serialize_field( - "breaking_description", - &conv.breaking_description(), - )?; - commit.serialize_field("breaking", &conv.breaking())?; - commit.serialize_field( - "scope", - &self - .scope - .as_deref() - .or_else(|| conv.scope().map(|v| v.as_str())) - .or(self.default_scope.as_deref()), - )?; - } - None => { - commit.serialize_field("message", &self.message)?; - commit.serialize_field("group", &self.group)?; - commit.serialize_field( - "scope", - &self.scope.as_deref().or(self.default_scope.as_deref()), - )?; - } + if let Some(conv) = &self.conv { + commit.serialize_field("message", conv.description())?; + commit.serialize_field("body", &conv.body())?; + commit.serialize_field("footers", &SerializeFooters(self))?; + commit.serialize_field( + "group", + self.group.as_ref().unwrap_or(&conv.type_().to_string()), + )?; + commit.serialize_field( + "breaking_description", + &conv.breaking_description(), + )?; + commit.serialize_field("breaking", &conv.breaking())?; + commit.serialize_field( + "scope", + &self + .scope + .as_deref() + .or_else(|| conv.scope().map(|v| v.as_str())) + .or(self.default_scope.as_deref()), + )?; + } else { + commit.serialize_field("message", &self.message)?; + commit.serialize_field("group", &self.group)?; + commit.serialize_field( + "scope", + &self.scope.as_deref().or(self.default_scope.as_deref()), + )?; } + commit.serialize_field("links", &self.links)?; commit.serialize_field("author", &self.author)?; commit.serialize_field("committer", &self.committer)?; diff --git a/git-cliff-core/src/config.rs b/git-cliff-core/src/config.rs index fd0000d9c2..2266bb3444 100644 --- a/git-cliff-core/src/config.rs +++ b/git-cliff-core/src/config.rs @@ -146,6 +146,29 @@ pub struct RemoteConfig { pub bitbucket: Remote, } +impl RemoteConfig { + /// Returns `true` if any remote is set. + pub fn is_any_set(&self) -> bool { + #[cfg(feature = "github")] + if self.github.is_set() { + return true; + } + #[cfg(feature = "gitlab")] + if self.gitlab.is_set() { + return true; + } + #[cfg(feature = "gitea")] + if self.gitea.is_set() { + return true; + } + #[cfg(feature = "bitbucket")] + if self.bitbucket.is_set() { + return true; + } + false + } +} + /// A single remote. #[derive(Debug, Default, Clone, Serialize, Deserialize)] pub struct Remote { @@ -260,21 +283,17 @@ impl Bump { /// /// This function also logs the returned value. pub fn get_initial_tag(&self) -> String { - match self.initial_tag.clone() { - Some(tag) => { - warn!( - "No releases found, using initial tag '{tag}' as the next \ - version." - ); - tag - } - None => { - warn!( - "No releases found, using {DEFAULT_INITIAL_TAG} as the next \ - version." - ); - DEFAULT_INITIAL_TAG.into() - } + if let Some(tag) = self.initial_tag.clone() { + warn!( + "No releases found, using initial tag '{tag}' as the next version." + ); + tag + } else { + warn!( + "No releases found, using {DEFAULT_INITIAL_TAG} as the next \ + version." + ); + DEFAULT_INITIAL_TAG.into() } } } @@ -308,7 +327,7 @@ pub struct CommitParser { pub pattern: Option, } -/// TextProcessor, e.g. for modifying commit messages. +/// `TextProcessor`, e.g. for modifying commit messages. #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TextProcessor { /// Regex for matching a text to replace. diff --git a/git-cliff-core/src/error.rs b/git-cliff-core/src/error.rs index c9342fce64..255d99c20d 100644 --- a/git-cliff-core/src/error.rs +++ b/git-cliff-core/src/error.rs @@ -71,7 +71,7 @@ pub enum Error { /// value matchers. #[error("Field error: `{0}`")] FieldError(String), - /// Error that may occur while parsing a SemVer version or version + /// Error that may occur while parsing a `SemVer` version or version /// requirement. #[error("Semver error: `{0}`")] SemverError(#[from] semver::Error), @@ -84,7 +84,7 @@ pub enum Error { #[error("HTTP client with middleware error: `{0}`")] #[cfg(feature = "remote")] HttpClientMiddlewareError(#[from] reqwest_middleware::Error), - /// A possible error when converting a HeaderValue from a string or byte + /// A possible error when converting a `HeaderValue` from a string or byte /// slice. #[error("HTTP header error: `{0}`")] #[cfg(feature = "remote")] diff --git a/git-cliff-core/src/remote/gitlab.rs b/git-cliff-core/src/remote/gitlab.rs index facf31159e..52b2d590c9 100644 --- a/git-cliff-core/src/remote/gitlab.rs +++ b/git-cliff-core/src/remote/gitlab.rs @@ -135,7 +135,7 @@ pub struct GitLabMergeRequest { pub id: i64, /// Iid pub iid: i64, - /// ProjectId + /// Project Id pub project_id: i64, /// Title pub title: String, @@ -153,7 +153,7 @@ pub struct GitLabMergeRequest { pub merge_commit_sha: Option, /// Squash Commit Sha pub squash_commit_sha: Option, - /// WebUrl + /// Web Url pub web_url: String, /// Labels pub labels: Vec, diff --git a/git-cliff-core/src/repo.rs b/git-cliff-core/src/repo.rs index 0517f344e8..8fe1f08731 100644 --- a/git-cliff-core/src/repo.rs +++ b/git-cliff-core/src/repo.rs @@ -137,32 +137,32 @@ impl Repository { (Some(include_pattern), Some(exclude_pattern)) => { // check if the commit has any changed files that match any of the // include patterns and non of the exclude patterns. - return changed_files.iter().any(|path| { + changed_files.iter().any(|path| { include_pattern .iter() .any(|pattern| pattern.matches_path(path)) && !exclude_pattern .iter() .any(|pattern| pattern.matches_path(path)) - }); + }) } (Some(include_pattern), None) => { // check if the commit has any changed files that match the include // patterns. - return changed_files.iter().any(|path| { + changed_files.iter().any(|path| { include_pattern .iter() .any(|pattern| pattern.matches_path(path)) - }); + }) } (None, Some(exclude_pattern)) => { // check if the commit has at least one changed file that does not // match all exclude patterns. - return changed_files.iter().any(|path| { + changed_files.iter().any(|path| { !exclude_pattern .iter() .any(|pattern| pattern.matches_path(path)) - }); + }) } (None, None) => true, } @@ -249,10 +249,10 @@ impl Repository { return 0; } let name = entry.name().expect("failed to get entry name"); - let entry_path = if dir != "," { - format!("{dir}/{name}") - } else { + let entry_path = if dir == "," { name.to_string() + } else { + format!("{dir}/{name}") }; changed_files.push(entry_path.into()); 0 @@ -301,8 +301,8 @@ impl Repository { } /// Returns the commit object of the given ID. - pub fn find_commit(&self, id: String) -> Option { - if let Ok(oid) = Oid::from_str(&id) { + pub fn find_commit(&self, id: &str) -> Option { + if let Ok(oid) = Oid::from_str(id) { if let Ok(commit) = self.inner.find_commit(oid) { return Some(commit); } @@ -310,12 +310,12 @@ impl Repository { None } - /// Decide whether to include tag + /// Decide whether to include tag. /// /// `head_commit` is the `latest` commit to generate changelog. It can be a /// branch head or a detached head. `tag_commit` is a tagged commit. If the - /// commit is in the descendant graph of the head_commit or is the - /// head_commit itself, Changelog should include the tag. + /// commit is in the descendant graph of the `head_commit` or is the + /// `head_commit` itself, Changelog should include the tag. fn should_include_tag( &self, head_commit: &Commit, diff --git a/git-cliff-core/src/template.rs b/git-cliff-core/src/template.rs index 4cbe4966e6..0d280082a3 100644 --- a/git-cliff-core/src/template.rs +++ b/git-cliff-core/src/template.rs @@ -171,7 +171,7 @@ impl Template { Ok(v) } Err(e) => { - return if let Some(source1) = e.source() { + if let Some(source1) = e.source() { if let Some(source2) = source1.source() { Err(Error::TemplateRenderDetailedError( source1.to_string(), @@ -182,7 +182,7 @@ impl Template { } } else { Err(Error::TemplateError(e)) - }; + } } } } diff --git a/git-cliff/Cargo.toml b/git-cliff/Cargo.toml index 5be83bd446..49f1f27414 100644 --- a/git-cliff/Cargo.toml +++ b/git-cliff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "git-cliff" -version = "2.6.0" # managed by release.sh +version = "2.6.1" # managed by release.sh description = "A highly customizable changelog generator ⛰️" authors = ["git-cliff contributors "] license = "MIT OR Apache-2.0" @@ -59,7 +59,7 @@ rand = { version = "0.8.4", optional = true } url.workspace = true [dependencies.git-cliff-core] -version = "2.6.0" # managed by release.sh +version = "2.6.1" # managed by release.sh path = "../git-cliff-core" [dev-dependencies] diff --git a/git-cliff/src/bin/completions.rs b/git-cliff/src/bin/completions.rs index ee0c5fa01c..d4cd4d5b79 100644 --- a/git-cliff/src/bin/completions.rs +++ b/git-cliff/src/bin/completions.rs @@ -9,7 +9,7 @@ use std::io::Result; /// Shell completions can be created with: /// `cargo run --bin git-cliff-completions` -/// in a directory specified by the environment variable OUT_DIR. +/// in a directory specified by the environment variable `OUT_DIR`. /// See fn main() -> Result<()> { let out_dir = env::var("OUT_DIR").expect("OUT_DIR is not set"); diff --git a/git-cliff/src/bin/mangen.rs b/git-cliff/src/bin/mangen.rs index acd91b38ee..1d0d670430 100644 --- a/git-cliff/src/bin/mangen.rs +++ b/git-cliff/src/bin/mangen.rs @@ -8,7 +8,7 @@ use std::path::PathBuf; /// Man page can be created with: /// `cargo run --bin git-cliff-mangen` -/// in a directory specified by the environment variable OUT_DIR. +/// in a directory specified by the environment variable `OUT_DIR`. /// See fn main() -> Result<()> { let out_dir = env::var("OUT_DIR").expect("OUT_DIR is not set"); diff --git a/git-cliff/src/lib.rs b/git-cliff/src/lib.rs index 73715c55ac..b2c29f95d9 100644 --- a/git-cliff/src/lib.rs +++ b/git-cliff/src/lib.rs @@ -123,52 +123,33 @@ fn process_repository<'a>( count && !ignore }); - if !config.remote.github.is_set() { + if !config.remote.is_any_set() { match repository.upstream_remote() { Ok(remote) => { - debug!("No GitHub remote is set, using remote: {}", remote); - config.remote.github.owner = remote.owner; - config.remote.github.repo = remote.repo; - config.remote.github.is_custom = remote.is_custom; - } - Err(e) => { - debug!("Failed to get remote from GitHub repository: {:?}", e); - } - } - } else if !config.remote.gitlab.is_set() { - match repository.upstream_remote() { - Ok(remote) => { - debug!("No GitLab remote is set, using remote: {}", remote); - config.remote.gitlab.owner = remote.owner; - config.remote.gitlab.repo = remote.repo; - config.remote.gitlab.is_custom = remote.is_custom; - } - Err(e) => { - debug!("Failed to get remote from GitLab repository: {:?}", e); - } - } - } else if !config.remote.gitea.is_set() { - match repository.upstream_remote() { - Ok(remote) => { - debug!("No Gitea remote is set, using remote: {}", remote); - config.remote.gitea.owner = remote.owner; - config.remote.gitea.repo = remote.repo; - config.remote.gitea.is_custom = remote.is_custom; - } - Err(e) => { - debug!("Failed to get remote from Gitea repository: {:?}", e); - } - } - } else if !config.remote.bitbucket.is_set() { - match repository.upstream_remote() { - Ok(remote) => { - debug!("No Bitbucket remote is set, using remote: {}", remote); - config.remote.bitbucket.owner = remote.owner; - config.remote.bitbucket.repo = remote.repo; - config.remote.bitbucket.is_custom = remote.is_custom; + if !config.remote.github.is_set() { + debug!("No GitHub remote is set, using remote: {}", remote); + config.remote.github.owner = remote.owner; + config.remote.github.repo = remote.repo; + config.remote.github.is_custom = remote.is_custom; + } else if !config.remote.gitlab.is_set() { + debug!("No GitLab remote is set, using remote: {}", remote); + config.remote.gitlab.owner = remote.owner; + config.remote.gitlab.repo = remote.repo; + config.remote.gitlab.is_custom = remote.is_custom; + } else if !config.remote.gitea.is_set() { + debug!("No Gitea remote is set, using remote: {}", remote); + config.remote.gitea.owner = remote.owner; + config.remote.gitea.repo = remote.repo; + config.remote.gitea.is_custom = remote.is_custom; + } else if !config.remote.bitbucket.is_set() { + debug!("No Bitbucket remote is set, using remote: {}", remote); + config.remote.bitbucket.owner = remote.owner; + config.remote.bitbucket.repo = remote.repo; + config.remote.bitbucket.is_custom = remote.is_custom; + } } Err(e) => { - debug!("Failed to get remote from Bitbucket repository: {:?}", e); + debug!("Failed to get remote from repository: {:?}", e); } } } @@ -268,7 +249,7 @@ fn process_repository<'a>( release.repository = Some(repository.path.to_string_lossy().into_owned()); if let Some(tag) = tags.get(&commit_id) { release.version = Some(tag.name.to_string()); - release.message = tag.message.clone(); + release.message.clone_from(&tag.message); release.commit_id = Some(commit_id); release.timestamp = if args.tag.as_deref() == Some(tag.name.as_str()) { match tag_timestamp { @@ -338,7 +319,7 @@ fn process_repository<'a>( commit_id: Some(commit_id.to_string()), version: Some(tag.name.clone()), timestamp: repository - .find_commit(commit_id.to_string()) + .find_commit(commit_id) .map(|v| v.time().seconds()) .unwrap_or_default(), ..Default::default() diff --git a/git-cliff/src/main.rs b/git-cliff/src/main.rs index baaed1f5b8..90738254e0 100644 --- a/git-cliff/src/main.rs +++ b/git-cliff/src/main.rs @@ -34,7 +34,7 @@ fn main() -> Result<()> { // Run git-cliff let exit_code = match git_cliff::run(args) { - Ok(_) => 0, + Ok(()) => 0, Err(e) => { log::error!("{}", e); 1 diff --git a/npm/git-cliff/eslint.config.js b/npm/git-cliff/eslint.config.js index b59b53c539..856544ba32 100644 --- a/npm/git-cliff/eslint.config.js +++ b/npm/git-cliff/eslint.config.js @@ -9,7 +9,7 @@ export default tseslint.config( { languageOptions: { parserOptions: { - project: "./tsconfig.eslint.json", + project: "./tsconfig.json", }, }, } diff --git a/npm/git-cliff/package.json b/npm/git-cliff/package.json index 8d542bf5e2..83a7794601 100644 --- a/npm/git-cliff/package.json +++ b/npm/git-cliff/package.json @@ -1,6 +1,6 @@ { "name": "git-cliff", - "version": "2.6.0", + "version": "2.6.1", "description": "A highly customizable Changelog Generator that follows Conventional Commit specifications ⛰️", "type": "module", "main": "lib/cjs/index.d.cts", @@ -80,23 +80,23 @@ "execa": "^8.0.1" }, "devDependencies": { - "@eslint/js": "^9.10.0", + "@eslint/js": "^9.11.0", "@types/eslint__js": "^8.42.3", "@types/node": "^20.16.5", - "@typescript-eslint/eslint-plugin": "^8.4.0", - "@typescript-eslint/parser": "^8.4.0", - "eslint": "^9.10.0", - "tsup": "^8.2.4", - "typescript": "^5.5.4", - "typescript-eslint": "^8.4.0" + "@typescript-eslint/eslint-plugin": "^8.6.0", + "@typescript-eslint/parser": "^8.6.0", + "eslint": "^9.11.0", + "tsup": "^8.3.0", + "typescript": "^5.6.2", + "typescript-eslint": "^8.6.0" }, "optionalDependencies": { - "git-cliff-darwin-arm64": "2.6.0", - "git-cliff-darwin-x64": "2.6.0", - "git-cliff-linux-arm64": "2.6.0", - "git-cliff-linux-x64": "2.6.0", - "git-cliff-windows-arm64": "2.6.0", - "git-cliff-windows-x64": "2.6.0" + "git-cliff-darwin-arm64": "2.6.1", + "git-cliff-darwin-x64": "2.6.1", + "git-cliff-linux-arm64": "2.6.1", + "git-cliff-linux-x64": "2.6.1", + "git-cliff-windows-arm64": "2.6.1", + "git-cliff-windows-x64": "2.6.1" }, "packageManager": "yarn@4.1.0", "publishConfig": { diff --git a/npm/git-cliff/src/options.ts b/npm/git-cliff/src/options.ts index addc33025c..53ad452677 100644 --- a/npm/git-cliff/src/options.ts +++ b/npm/git-cliff/src/options.ts @@ -16,6 +16,8 @@ export type Options = Partial<{ unreleased: boolean; /** Sorts the tags topologically */ topoOrder: boolean; + /** Include only the tags that belong to the current branch */ + useBranchTags: boolean; /** Disables the external command execution */ noExec: boolean; /** Prints changelog context as JSON */ diff --git a/npm/git-cliff/yarn.lock b/npm/git-cliff/yarn.lock index 01162d31bc..7745bdf693 100644 --- a/npm/git-cliff/yarn.lock +++ b/npm/git-cliff/yarn.lock @@ -226,10 +226,10 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:9.10.0, @eslint/js@npm:^9.10.0": - version: 9.10.0 - resolution: "@eslint/js@npm:9.10.0" - checksum: 10c0/2ac45a002dc1ccf25be46ea61001ada8d77248d1313ab4e53f3735e5ae00738a757874e41f62ad6fbd49df7dffeece66e5f53ff0d7b78a99ce4c68e8fea66753 +"@eslint/js@npm:9.11.0, @eslint/js@npm:^9.11.0": + version: 9.11.0 + resolution: "@eslint/js@npm:9.11.0" + checksum: 10c0/7403aeba28ba9cae3470d149b334a51375eb7fd850f167555c81cc72fe98e5cc5ac3059ccdbe68eb255a49d7498a7288d25429af0c7d20afeb4b3c0748349bb4 languageName: node linkType: hard @@ -240,12 +240,12 @@ __metadata: languageName: node linkType: hard -"@eslint/plugin-kit@npm:^0.1.0": - version: 0.1.0 - resolution: "@eslint/plugin-kit@npm:0.1.0" +"@eslint/plugin-kit@npm:^0.2.0": + version: 0.2.0 + resolution: "@eslint/plugin-kit@npm:0.2.0" dependencies: levn: "npm:^0.4.1" - checksum: 10c0/fae97cd4efc1c32501c286abba1b5409848ce8c989e1ca6a5bb057a304a2cd721e6e957f6bc35ce95cfd0871e822ed42df3c759fecdad72c30e70802e26f83c7 + checksum: 10c0/00b92bc52ad09b0e2bbbb30591c02a895f0bec3376759562590e8a57a13d096b22f8c8773b6bf791a7cf2ea614123b3d592fd006c51ac5fd0edbb90ea6d8760c languageName: node linkType: hard @@ -529,15 +529,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.4.0, @typescript-eslint/eslint-plugin@npm:^8.4.0": - version: 8.4.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.4.0" +"@typescript-eslint/eslint-plugin@npm:8.6.0, @typescript-eslint/eslint-plugin@npm:^8.6.0": + version: 8.6.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.6.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.4.0" - "@typescript-eslint/type-utils": "npm:8.4.0" - "@typescript-eslint/utils": "npm:8.4.0" - "@typescript-eslint/visitor-keys": "npm:8.4.0" + "@typescript-eslint/scope-manager": "npm:8.6.0" + "@typescript-eslint/type-utils": "npm:8.6.0" + "@typescript-eslint/utils": "npm:8.6.0" + "@typescript-eslint/visitor-keys": "npm:8.6.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -548,66 +548,66 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/c75e9bb176e9e0277c9f9c4c006bc2c31ac91984e555de1390a9bbe876e3b6787d59d96015b3f0cd083fd22c814aea4ed4858910d3afdd24d64ab79815da31e5 + checksum: 10c0/c777f01535b896d3092f9886a67ccf9e50bf9e0f581ffab607c5e95dbf3092299b0d9f3e6041b134d69059a6fa5691785940b81015f73bb9a0e9d1605f6442ea languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.4.0, @typescript-eslint/parser@npm:^8.4.0": - version: 8.4.0 - resolution: "@typescript-eslint/parser@npm:8.4.0" +"@typescript-eslint/parser@npm:8.6.0, @typescript-eslint/parser@npm:^8.6.0": + version: 8.6.0 + resolution: "@typescript-eslint/parser@npm:8.6.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.4.0" - "@typescript-eslint/types": "npm:8.4.0" - "@typescript-eslint/typescript-estree": "npm:8.4.0" - "@typescript-eslint/visitor-keys": "npm:8.4.0" + "@typescript-eslint/scope-manager": "npm:8.6.0" + "@typescript-eslint/types": "npm:8.6.0" + "@typescript-eslint/typescript-estree": "npm:8.6.0" + "@typescript-eslint/visitor-keys": "npm:8.6.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/19f3358e5bc4bbad693183eefe1a90ea64be054a934bc2c8a972ff4738b94580b55ad4955af5797db42298628caa59b3ba3f9fd960582b5fc2c836da3a4578a5 + checksum: 10c0/3f280d289b486359194d422d89df9896b3f10a6d45cdf851d1d5f3200489271a31ab503c127cb5656f9b0ad6d795dd708b960f21fb105750aac19f41f8f815d1 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.4.0": - version: 8.4.0 - resolution: "@typescript-eslint/scope-manager@npm:8.4.0" +"@typescript-eslint/scope-manager@npm:8.6.0": + version: 8.6.0 + resolution: "@typescript-eslint/scope-manager@npm:8.6.0" dependencies: - "@typescript-eslint/types": "npm:8.4.0" - "@typescript-eslint/visitor-keys": "npm:8.4.0" - checksum: 10c0/95188c663df7db106529c6b93c4c7c61647ed34ab6dd48114e41ddf49140ff606c5501ce2ae451a988ec49b5d3874ea96ff212fc102802327b10affd2ff80a37 + "@typescript-eslint/types": "npm:8.6.0" + "@typescript-eslint/visitor-keys": "npm:8.6.0" + checksum: 10c0/37092ef70171c06854ac67ebfb2255063890c1c6133654e6b15b6adb6d2ab83de4feafd1599f4d02ed71a018226fcb3a389021758ec045e1904fb1798e90b4fe languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.4.0": - version: 8.4.0 - resolution: "@typescript-eslint/type-utils@npm:8.4.0" +"@typescript-eslint/type-utils@npm:8.6.0": + version: 8.6.0 + resolution: "@typescript-eslint/type-utils@npm:8.6.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:8.4.0" - "@typescript-eslint/utils": "npm:8.4.0" + "@typescript-eslint/typescript-estree": "npm:8.6.0" + "@typescript-eslint/utils": "npm:8.6.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/ae51100594d9ca61c7577b5aed0bd10c1959725df5c38cd9653eed1fd3dbdfff9146b6e48f3409994b4c8d781b9d95025c36b30f73a5a1b3dbdee6d142cecc87 + checksum: 10c0/914b4637caa40c102117655a9b4451e0db611a61309ed39d6c57522655463c059f4dfd4e2d7ffdefcc9ab7533be21fb877b740c58f5be11f3530aa29f3d2cb62 languageName: node linkType: hard -"@typescript-eslint/types@npm:8.4.0": - version: 8.4.0 - resolution: "@typescript-eslint/types@npm:8.4.0" - checksum: 10c0/15e09ced84827c349553530a31822f06ae5bad456c03d561b7d0c64b6ad9b5d7ca795e030bd93e65d5a2cd41bfde36ed08dcd2ff9feaa8b60a67080827f47ecb +"@typescript-eslint/types@npm:8.6.0": + version: 8.6.0 + resolution: "@typescript-eslint/types@npm:8.6.0" + checksum: 10c0/e7051d212252f7d1905b5527b211e335db4ec5bb1d3a52d73c8d2de6ddf5cbc981f2c92ca9ffcef35f7447bda635ea1ccce5f884ade7f243d14f2a254982c698 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.4.0": - version: 8.4.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.4.0" +"@typescript-eslint/typescript-estree@npm:8.6.0": + version: 8.6.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.6.0" dependencies: - "@typescript-eslint/types": "npm:8.4.0" - "@typescript-eslint/visitor-keys": "npm:8.4.0" + "@typescript-eslint/types": "npm:8.6.0" + "@typescript-eslint/visitor-keys": "npm:8.6.0" debug: "npm:^4.3.4" fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" @@ -617,31 +617,31 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/170702b024121cff9268f53de8054796b0ce025f9a78d6f2bc850a360e5f3f7032ba3ee9d4b7392726308273a5f3ade5ab31b1788b504b514bc15afc07302b37 + checksum: 10c0/33ab8c03221a797865301f09d1d198c67f8b0e3dbf0d13e41f699dc2740242303a9fcfd7b38302cef318541fdedd832fd6e8ba34a5041a57e9114fa134045385 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.4.0": - version: 8.4.0 - resolution: "@typescript-eslint/utils@npm:8.4.0" +"@typescript-eslint/utils@npm:8.6.0": + version: 8.6.0 + resolution: "@typescript-eslint/utils@npm:8.6.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.4.0" - "@typescript-eslint/types": "npm:8.4.0" - "@typescript-eslint/typescript-estree": "npm:8.4.0" + "@typescript-eslint/scope-manager": "npm:8.6.0" + "@typescript-eslint/types": "npm:8.6.0" + "@typescript-eslint/typescript-estree": "npm:8.6.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - checksum: 10c0/8c9c36b3aa23f9bcc28cc4b10f0fa2996f1bc6cdd75135f08c2ef734baa30dbd2a8b92f344b90518e1fd07a486936734789fc7e90b780221a7707dad8e9c9364 + checksum: 10c0/5b615106342dfdf09f5a73e2554cc0c4d979c262a9a4548eb76ec7045768e0ff0bf0316cf8a5eb5404689cd476fcd335fc84f90eb985557559e42aeee33d687e languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.4.0": - version: 8.4.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.4.0" +"@typescript-eslint/visitor-keys@npm:8.6.0": + version: 8.6.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.6.0" dependencies: - "@typescript-eslint/types": "npm:8.4.0" + "@typescript-eslint/types": "npm:8.6.0" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10c0/339199b7fbb9ac83b530d03ab25f6bc5ceb688c9cd0ae460112cd14ee78ca7284a845aef5620cdf70170980123475ec875e85ebf595c60255ba3c0d6fe48c714 + checksum: 10c0/9bd5d5daee9de7e009fdd1b64b1eca685a699d1b2639373bc279c97e25e769fff56fffef708ef66a2b19bc8bb201d36daf9e7084f0e0872178bfcf9d923b41f3 languageName: node linkType: hard @@ -755,13 +755,6 @@ __metadata: languageName: node linkType: hard -"array-union@npm:^2.1.0": - version: 2.1.0 - resolution: "array-union@npm:2.1.0" - checksum: 10c0/429897e68110374f39b771ec47a7161fc6a8fc33e196857c0a396dc75df0b5f65e4d046674db764330b6bb66b39ef48dd7c53b6a2ee75cfb0681e0c1a7033962 - languageName: node - linkType: hard - "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -940,19 +933,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4": - version: 4.3.4 - resolution: "debug@npm:4.3.4" - dependencies: - ms: "npm:2.1.2" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736 - languageName: node - linkType: hard - -"debug@npm:^4.3.5": +"debug@npm:4, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -971,15 +952,6 @@ __metadata: languageName: node linkType: hard -"dir-glob@npm:^3.0.1": - version: 3.0.1 - resolution: "dir-glob@npm:3.0.1" - dependencies: - path-type: "npm:^4.0.0" - checksum: 10c0/dcac00920a4d503e38bb64001acb19df4efc14536ada475725e12f52c16777afdee4db827f55f13a908ee7efc0cb282e2e3dbaeeb98c0993dd93d1802d3bf00c - languageName: node - linkType: hard - "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -1124,14 +1096,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.3.0": - version: 3.3.0 - resolution: "eslint-visitor-keys@npm:3.3.0" - checksum: 10c0/fc6a9b5bdee8d90e35e7564fd9db10fdf507a2c089a4f0d4d3dd091f7f4ac6790547c8b1b7a760642ef819f875ef86dd5bcb8cdf01b0775f57a699f4e6a20a18 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.4.3": +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 @@ -1145,16 +1110,16 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^9.10.0": - version: 9.10.0 - resolution: "eslint@npm:9.10.0" +"eslint@npm:^9.11.0": + version: 9.11.0 + resolution: "eslint@npm:9.11.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.11.0" "@eslint/config-array": "npm:^0.18.0" "@eslint/eslintrc": "npm:^3.1.0" - "@eslint/js": "npm:9.10.0" - "@eslint/plugin-kit": "npm:^0.1.0" + "@eslint/js": "npm:9.11.0" + "@eslint/plugin-kit": "npm:^0.2.0" "@humanwhocodes/module-importer": "npm:^1.0.1" "@humanwhocodes/retry": "npm:^0.3.0" "@nodelib/fs.walk": "npm:^1.2.8" @@ -1190,7 +1155,7 @@ __metadata: optional: true bin: eslint: bin/eslint.js - checksum: 10c0/7357f3995b15043eea83c8c0ab16c385ce3f28925c1b11cfcd6b2ede8faab3d91ede84a68173dd5f6e3e176e177984e6218de58b7b8388e53e2881f1ec07c836 + checksum: 10c0/3438a78172bc667dc87bc4ad864671bd93231c82c9d366899ea3a77fc3444c8cdd158e7fe3ca1cfe4cb566045b1b36c0ccae9fc20efeb4b187f1a534075a1177 languageName: node linkType: hard @@ -1285,19 +1250,6 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.9": - version: 3.2.12 - resolution: "fast-glob@npm:3.2.12" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.4" - checksum: 10c0/08604fb8ef6442ce74068bef3c3104382bb1f5ab28cf75e4ee904662778b60ad620e1405e692b7edea598ef445f5d387827a965ba034e1892bf54b1dfde97f26 - languageName: node - linkType: hard - "fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" @@ -1334,6 +1286,18 @@ __metadata: languageName: node linkType: hard +"fdir@npm:^6.3.0": + version: 6.3.0 + resolution: "fdir@npm:6.3.0" + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + checksum: 10c0/be91cd6ab2edbc6df457a69b79672ee9345996986821918ef01908ce9619b8cbecd9c6c13d4ca5d0aeb548b162050d68c599f45bb3fbff194a91e16f25e646b5 + languageName: node + linkType: hard + "file-entry-cache@npm:^8.0.0": version: 8.0.0 resolution: "file-entry-cache@npm:8.0.0" @@ -1440,44 +1404,44 @@ __metadata: languageName: node linkType: hard -"git-cliff-darwin-arm64@npm:2.5.0": - version: 2.5.0 - resolution: "git-cliff-darwin-arm64@npm:2.5.0" +"git-cliff-darwin-arm64@npm:2.6.0": + version: 2.6.0 + resolution: "git-cliff-darwin-arm64@npm:2.6.0" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"git-cliff-darwin-x64@npm:2.5.0": - version: 2.5.0 - resolution: "git-cliff-darwin-x64@npm:2.5.0" +"git-cliff-darwin-x64@npm:2.6.0": + version: 2.6.0 + resolution: "git-cliff-darwin-x64@npm:2.6.0" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"git-cliff-linux-arm64@npm:2.5.0": - version: 2.5.0 - resolution: "git-cliff-linux-arm64@npm:2.5.0" +"git-cliff-linux-arm64@npm:2.6.0": + version: 2.6.0 + resolution: "git-cliff-linux-arm64@npm:2.6.0" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"git-cliff-linux-x64@npm:2.5.0": - version: 2.5.0 - resolution: "git-cliff-linux-x64@npm:2.5.0" +"git-cliff-linux-x64@npm:2.6.0": + version: 2.6.0 + resolution: "git-cliff-linux-x64@npm:2.6.0" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"git-cliff-windows-arm64@npm:2.5.0": - version: 2.5.0 - resolution: "git-cliff-windows-arm64@npm:2.5.0" +"git-cliff-windows-arm64@npm:2.6.0": + version: 2.6.0 + resolution: "git-cliff-windows-arm64@npm:2.6.0" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"git-cliff-windows-x64@npm:2.5.0": - version: 2.5.0 - resolution: "git-cliff-windows-x64@npm:2.5.0" +"git-cliff-windows-x64@npm:2.6.0": + version: 2.6.0 + resolution: "git-cliff-windows-x64@npm:2.6.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -1486,22 +1450,22 @@ __metadata: version: 0.0.0-use.local resolution: "git-cliff@workspace:." dependencies: - "@eslint/js": "npm:^9.10.0" + "@eslint/js": "npm:^9.11.0" "@types/eslint__js": "npm:^8.42.3" "@types/node": "npm:^20.16.5" - "@typescript-eslint/eslint-plugin": "npm:^8.4.0" - "@typescript-eslint/parser": "npm:^8.4.0" - eslint: "npm:^9.10.0" + "@typescript-eslint/eslint-plugin": "npm:^8.6.0" + "@typescript-eslint/parser": "npm:^8.6.0" + eslint: "npm:^9.11.0" execa: "npm:^8.0.1" - git-cliff-darwin-arm64: "npm:2.5.0" - git-cliff-darwin-x64: "npm:2.5.0" - git-cliff-linux-arm64: "npm:2.5.0" - git-cliff-linux-x64: "npm:2.5.0" - git-cliff-windows-arm64: "npm:2.5.0" - git-cliff-windows-x64: "npm:2.5.0" - tsup: "npm:^8.2.4" - typescript: "npm:^5.5.4" - typescript-eslint: "npm:^8.4.0" + git-cliff-darwin-arm64: "npm:2.6.0" + git-cliff-darwin-x64: "npm:2.6.0" + git-cliff-linux-arm64: "npm:2.6.0" + git-cliff-linux-x64: "npm:2.6.0" + git-cliff-windows-arm64: "npm:2.6.0" + git-cliff-windows-x64: "npm:2.6.0" + tsup: "npm:^8.3.0" + typescript: "npm:^5.6.2" + typescript-eslint: "npm:^8.6.0" dependenciesMeta: git-cliff-darwin-arm64: optional: true @@ -1560,20 +1524,6 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.1.0": - version: 11.1.0 - resolution: "globby@npm:11.1.0" - dependencies: - array-union: "npm:^2.1.0" - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.2.9" - ignore: "npm:^5.2.0" - merge2: "npm:^1.4.1" - slash: "npm:^3.0.0" - checksum: 10c0/b39511b4afe4bd8a7aead3a27c4ade2b9968649abab0a6c28b1a90141b96ca68ca5db1302f7c7bd29eab66bf51e13916b8e0a3d0ac08f75e1e84a39b35691189 - languageName: node - linkType: hard - "graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" @@ -1645,14 +1595,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.2.0": - version: 5.2.4 - resolution: "ignore@npm:5.2.4" - checksum: 10c0/7c7cd90edd9fea6e037f9b9da4b01bf0a86b198ce78345f9bbd983929d68ff14830be31111edc5d70c264921f4962404d75b7262b4d9cc3bc12381eccbd03096 - languageName: node - linkType: hard - -"ignore@npm:^5.3.1": +"ignore@npm:^5.2.0, ignore@npm:^5.3.1": version: 5.3.2 resolution: "ignore@npm:5.3.2" checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 @@ -1903,15 +1846,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^6.0.0": - version: 6.0.0 - resolution: "lru-cache@npm:6.0.0" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10c0/cb53e582785c48187d7a188d3379c181b5ca2a9c78d2bce3e7dee36f32761d1c42983da3fe12b55cb74e1779fa94cdc2e5367c028a9b35317184ede0c07a30a9 - languageName: node - linkType: hard - "make-fetch-happen@npm:^13.0.0": version: 13.0.0 resolution: "make-fetch-happen@npm:13.0.0" @@ -1938,7 +1872,7 @@ __metadata: languageName: node linkType: hard -"merge2@npm:^1.3.0, merge2@npm:^1.4.1": +"merge2@npm:^1.3.0": version: 1.4.1 resolution: "merge2@npm:1.4.1" checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb @@ -1978,16 +1912,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.1": - version: 9.0.3 - resolution: "minimatch@npm:9.0.3" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/85f407dcd38ac3e180f425e86553911d101455ca3ad5544d6a7cec16286657e4f8a9aa6695803025c55e31e35a91a2252b5dc8e7d527211278b8b65b4dbd5eac - languageName: node - linkType: hard - -"minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.1, minimatch@npm:^9.0.4": version: 9.0.5 resolution: "minimatch@npm:9.0.5" dependencies: @@ -2089,13 +2014,6 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.2": - version: 2.1.2 - resolution: "ms@npm:2.1.2" - checksum: 10c0/a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc - languageName: node - linkType: hard - "ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" @@ -2290,13 +2208,6 @@ __metadata: languageName: node linkType: hard -"path-type@npm:^4.0.0": - version: 4.0.0 - resolution: "path-type@npm:4.0.0" - checksum: 10c0/666f6973f332f27581371efaf303fd6c272cc43c2057b37aa99e3643158c7e4b2626549555d88626e99ea9e046f82f32e41bbde5f1508547e9a11b149b52387c - languageName: node - linkType: hard - "picocolors@npm:^1.0.1": version: 1.1.0 resolution: "picocolors@npm:1.1.0" @@ -2311,6 +2222,13 @@ __metadata: languageName: node linkType: hard +"picomatch@npm:^4.0.2": + version: 4.0.2 + resolution: "picomatch@npm:4.0.2" + checksum: 10c0/7c51f3ad2bb42c776f49ebf964c644958158be30d0a510efd5a395e8d49cb5acfed5b82c0c5b365523ce18e6ab85013c9ebe574f60305892ec3fa8eee8304ccc + languageName: node + linkType: hard + "pirates@npm:^4.0.1": version: 4.0.6 resolution: "pirates@npm:4.0.6" @@ -2495,18 +2413,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5": - version: 7.6.0 - resolution: "semver@npm:7.6.0" - dependencies: - lru-cache: "npm:^6.0.0" - bin: - semver: bin/semver.js - checksum: 10c0/fbfe717094ace0aa8d6332d7ef5ce727259815bd8d8815700853f4faf23aacbd7192522f0dc5af6df52ef4fa85a355ebd2f5d39f554bd028200d6cf481ab9b53 - languageName: node - linkType: hard - -"semver@npm:^7.6.0": +"semver@npm:^7.3.5, semver@npm:^7.6.0": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -2545,13 +2452,6 @@ __metadata: languageName: node linkType: hard -"slash@npm:^3.0.0": - version: 3.0.0 - resolution: "slash@npm:3.0.0" - checksum: 10c0/e18488c6a42bdfd4ac5be85b2ced3ccd0224773baae6ad42cfbb9ec74fc07f9fa8396bd35ee638084ead7a2a0818eb5e7151111544d4731ce843019dab4be47b - languageName: node - linkType: hard - "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" @@ -2732,6 +2632,16 @@ __metadata: languageName: node linkType: hard +"tinyglobby@npm:^0.2.1": + version: 0.2.6 + resolution: "tinyglobby@npm:0.2.6" + dependencies: + fdir: "npm:^6.3.0" + picomatch: "npm:^4.0.2" + checksum: 10c0/d7b5eb4c5b9c341f961c1d3c30624f9a1e22b27b48a79a65b48120245a77c143827f75f5854628fef1a4bd4bc3cfaf06ce76497f3a574e3f933229c5e556e5fe + languageName: node + linkType: hard + "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -2775,9 +2685,9 @@ __metadata: languageName: node linkType: hard -"tsup@npm:^8.2.4": - version: 8.2.4 - resolution: "tsup@npm:8.2.4" +"tsup@npm:^8.3.0": + version: 8.3.0 + resolution: "tsup@npm:8.3.0" dependencies: bundle-require: "npm:^5.0.0" cac: "npm:^6.7.14" @@ -2786,7 +2696,6 @@ __metadata: debug: "npm:^4.3.5" esbuild: "npm:^0.23.0" execa: "npm:^5.1.1" - globby: "npm:^11.1.0" joycon: "npm:^3.1.1" picocolors: "npm:^1.0.1" postcss-load-config: "npm:^6.0.1" @@ -2794,6 +2703,7 @@ __metadata: rollup: "npm:^4.19.0" source-map: "npm:0.8.0-beta.0" sucrase: "npm:^3.35.0" + tinyglobby: "npm:^0.2.1" tree-kill: "npm:^1.2.2" peerDependencies: "@microsoft/api-extractor": ^7.36.0 @@ -2812,7 +2722,7 @@ __metadata: bin: tsup: dist/cli-default.js tsup-node: dist/cli-node.js - checksum: 10c0/0fa967ae0feb483528ae52fd9988d7931a092b3645a456e23b62ac03a0556da6f569fb2a77b3baf50ff1d12b9afac38aa9d29f15eb82c8a2b4faeda8362858da + checksum: 10c0/7f7132e48fca2284fd721077c6462c440dabdc95bcacf2e9837f81d2ca9771f804ff4f8b81a743e8fc6c3def856cf3ae99421c0568a7f030196abdc9e12e97e8 languageName: node linkType: hard @@ -2825,37 +2735,37 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^8.4.0": - version: 8.4.0 - resolution: "typescript-eslint@npm:8.4.0" +"typescript-eslint@npm:^8.6.0": + version: 8.6.0 + resolution: "typescript-eslint@npm:8.6.0" dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.4.0" - "@typescript-eslint/parser": "npm:8.4.0" - "@typescript-eslint/utils": "npm:8.4.0" + "@typescript-eslint/eslint-plugin": "npm:8.6.0" + "@typescript-eslint/parser": "npm:8.6.0" + "@typescript-eslint/utils": "npm:8.6.0" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/266ef73fdc1f7fa19228b8653d61ad143261ccd35f7d5d647092ed0e1512de2d4e3d1b9e1f2520658708cc0c1d7925c4ec97f23440c180a3bf1716e81d65123f + checksum: 10c0/d009170af1cffece3a63784c3f6d6f5074fd42d198540f3140dd0fed4f37b1888d59abb5992624099834cae2ea4863b6c526b5f11ecbfd105f41a87e300305db languageName: node linkType: hard -"typescript@npm:^5.5.4": - version: 5.5.4 - resolution: "typescript@npm:5.5.4" +"typescript@npm:^5.6.2": + version: 5.6.2 + resolution: "typescript@npm:5.6.2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/422be60f89e661eab29ac488c974b6cc0a660fb2228003b297c3d10c32c90f3bcffc1009b43876a082515a3c376b1eefcce823d6e78982e6878408b9a923199c + checksum: 10c0/3ed8297a8c7c56b7fec282532503d1ac795239d06e7c4966b42d4330c6cf433a170b53bcf93a130a7f14ccc5235de5560df4f1045eb7f3550b46ebed16d3c5e5 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.5.4#optional!builtin": - version: 5.5.4 - resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin::version=5.5.4&hash=d69c25" +"typescript@patch:typescript@npm%3A^5.6.2#optional!builtin": + version: 5.6.2 + resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin::version=5.6.2&hash=d69c25" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/10dd9881baba22763de859e8050d6cb6e2db854197495c6f1929b08d1eb2b2b00d0b5d9b0bcee8472f1c3f4a7ef6a5d7ebe0cfd703f853aa5ae465b8404bc1ba + checksum: 10c0/e6c1662e4852e22fe4bbdca471dca3e3edc74f6f1df043135c44a18a7902037023ccb0abdfb754595ca9028df8920f2f8492c00fc3cbb4309079aae8b7de71cd languageName: node linkType: hard diff --git a/website/docs/integration/gitlab.md b/website/docs/integration/gitlab.md index 1db4f64da2..5ca6b28a92 100644 --- a/website/docs/integration/gitlab.md +++ b/website/docs/integration/gitlab.md @@ -94,6 +94,16 @@ For example: https://gitlab.com/{{ remote.gitlab.owner }}/{{ remote.gitlab.repo }}/-/tags/{{ version }} ``` +:::tip + +If you are using GitLab CI, you can use [`CI_PROJECT_URL`](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html) environment variable instead: + +```jinja2 +{{ get_env(name="CI_PROJECT_URL") }}/-/tags/{{ version }} +``` + +::: + ### Commit authors For each commit, GitLab related values are added as a nested object (named `gitlab`) to the [template context](/docs/templating/context): diff --git a/website/docs/tips-and-tricks.md b/website/docs/tips-and-tricks.md index 59960d08ce..7649ac7ccb 100644 --- a/website/docs/tips-and-tricks.md +++ b/website/docs/tips-and-tricks.md @@ -84,3 +84,21 @@ commit_parsers = [ { field = "github.pr_labels", pattern = ".*", group = " 🌀 Miscellaneous" }, ] ``` + +## Use GitLab CI variables + +```jinja2 +{{ get_env(name="CI_PROJECT_URL") }}/-/tags/{{ version }} +``` + +## Convert markdown output to PDF + +```bash +pandoc --from=gfm --to=pdf -o CHANGELOG.pdf CHANGELOG.md +``` + +To support unicode characters, use `xelatex` as PDF engine and a font family which includes the needed unicode characters: + +```bash +pandoc --from=gfm --to=pdf --pdf-engine=xelatex -o CHANGELOG.pdf CHANGELOG.md --variable mainfont="Segoe UI Emoji" +```