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AE,EAAW,eAAE,EAAgB,OAAQ,EAAc,MAAO,GAAgB,EAC9F,EAAmB,MACvB,CACE,QAAS,EAAY,QACrB,KAAM,OAAO,CAAE,WAAU,WAAU,SACnC,QACA,aACA,cACA,aACA,YAAa,GAAc,EAC3B,QACA,SACA,mBAAqB,cAAc,CAAE,WAAW,EAAO,SAAW,CAAC,GAAG,aAExE,CAAE,KAAM,EAAY,cAAa,iBAAgB,OAAQ,EAAc,MAAO,IAchF,OAXA,MAAM,cAAe,EAAiB,SACtC,MAAM,WAAY,EAAiB,UACnC,MAAM,YAAa,EAAiB,OACpC,MAAM,iBAAkB,EAAiB,YACzC,MAAM,kBAAmB,EAAiB,aAC1C,MAAM,iBAAkB,EAAiB,YACzC,MAAM,WAAY,EAAiB,MACnC,MAAM,qBAAsB,EAAiB,gBAC7C,MAAM,YAAa,EAAiB,OACpC,MAAM,aAAc,EAAiB,QAE9B,OAAO,EAAe,EAAkB,EACjD","file":"/npm/@semantic-release/release-notes-generator@14.1.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/@semantic-release/release-notes-generator@14.1.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { format } from \"url\";\nimport { find, merge } from \"lodash-es\";\nimport { CommitParser } from \"conventional-commits-parser\";\nimport writer from \"./wrappers/conventional-changelog-writer.js\";\nimport { filterRevertedCommitsSync } from \"conventional-commits-filter\";\nimport { readPackageUp } from \"read-package-up\";\nimport debugFactory from \"debug\";\nimport loadChangelogConfig from \"./lib/load-changelog-config.js\";\nimport HOSTS_CONFIG from \"./lib/hosts-config.js\";\n\nconst debug = debugFactory(\"semantic-release:release-notes-generator\");\n\n/**\n * Generate the changelog for all the commits in `options.commits`.\n *\n * @param {Object} pluginConfig The plugin configuration.\n * @param {String} pluginConfig.preset conventional-changelog preset ('angular', 'atom', 'codemirror', 'ember', 'eslint', 'express', 'jquery', 'jscs', 'jshint').\n * @param {String} pluginConfig.config Requireable npm package with a custom conventional-changelog preset\n * @param {Object} pluginConfig.parserOpts Additional `conventional-changelog-parser` options that will overwrite ones loaded by `preset` or `config`.\n * @param {Object} pluginConfig.writerOpts Additional `conventional-changelog-writer` options that will overwrite ones loaded by `preset` or `config`.\n * @param {Object} context The semantic-release context.\n * @param {Array<Object>} context.commits The commits to analyze.\n * @param {Object} context.lastRelease The last release with `gitHead` corresponding to the commit hash used to make the last release and `gitTag` corresponding to the git tag associated with `gitHead`.\n * @param {Object} context.nextRelease The next release with `gitHead` corresponding to the commit hash used to make the  release, the release `version` and `gitTag` corresponding to the git tag associated with `gitHead`.\n * @param {Object} context.options.repositoryUrl The git repository URL.\n *\n * @returns {String} The changelog for all the commits in `context.commits`.\n */\nexport async function generateNotes(pluginConfig, context) {\n  const { commits, lastRelease, nextRelease, options, cwd } = context;\n  const repositoryUrl = options.repositoryUrl.replace(/\\.git$/i, \"\");\n  const { commitOpts, parserOpts, writerOpts } = await loadChangelogConfig(pluginConfig, context);\n\n  const [match, auth, host, path] = /^(?!.+:\\/\\/)(?:(?<auth>.*)@)?(?<host>.*?):(?<path>.*)$/.exec(repositoryUrl) || [];\n  let { hostname, port, pathname, protocol } = new URL(\n    match ? `ssh://${auth ? `${auth}@` : \"\"}${host}/${path}` : repositoryUrl\n  );\n  port = protocol.includes(\"ssh\") ? \"\" : port;\n  protocol = protocol && /http[^s]/.test(protocol) ? \"http\" : \"https\";\n  const [, owner, repository] = /^\\/(?<owner>[^/]+)?\\/?(?<repository>.+)?$/.exec(pathname) || [];\n\n  const { issue, commit, referenceActions, issuePrefixes } =\n    find(HOSTS_CONFIG, (conf) => conf.hostname === hostname) || HOSTS_CONFIG.default;\n  const parser = new CommitParser({ referenceActions, issuePrefixes, ...parserOpts });\n  const parsedCommits = filterRevertedCommitsSync(\n    commits\n      .filter(({ message, hash }) => {\n        if (!message.trim()) {\n          debug(\"Skip commit %s with empty message\", hash);\n          return false;\n        }\n\n        if (commitOpts && commitOpts.ignore && new RegExp(commitOpts.ignore).test(message) && !commitOpts.merges) {\n          debug(\"Skip commit %s by ignore option\", hash);\n          return false;\n        }\n\n        return true;\n      })\n      .map((rawCommit) => ({\n        ...rawCommit,\n        ...parser.parse(rawCommit.message),\n      }))\n  );\n  const previousTag = lastRelease.gitTag || lastRelease.gitHead;\n  const currentTag = nextRelease.gitTag || nextRelease.gitHead;\n  const { host: hostConfig, linkCompare, linkReferences, commit: commitConfig, issue: issueConfig } = pluginConfig;\n  const changelogContext = merge(\n    {\n      version: nextRelease.version,\n      host: format({ protocol, hostname, port }),\n      owner,\n      repository,\n      previousTag,\n      currentTag,\n      linkCompare: currentTag && previousTag,\n      issue,\n      commit,\n      packageData: ((await readPackageUp({ normalize: false, cwd })) || {}).packageJson,\n    },\n    { host: hostConfig, linkCompare, linkReferences, commit: commitConfig, issue: issueConfig }\n  );\n\n  debug(\"version: %o\", changelogContext.version);\n  debug(\"host: %o\", changelogContext.hostname);\n  debug(\"owner: %o\", changelogContext.owner);\n  debug(\"repository: %o\", changelogContext.repository);\n  debug(\"previousTag: %o\", changelogContext.previousTag);\n  debug(\"currentTag: %o\", changelogContext.currentTag);\n  debug(\"host: %o\", changelogContext.host);\n  debug(\"linkReferences: %o\", changelogContext.linkReferences);\n  debug(\"issue: %o\", changelogContext.issue);\n  debug(\"commit: %o\", changelogContext.commit);\n\n  return writer(parsedCommits, changelogContext, writerOpts);\n}\n"]}