@qualcomm-ui/changesets-cli 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/changelog-formatter.cjs +1 -1
- package/dist/changelog-formatter.cjs.map +2 -2
- package/dist/changelog-formatter.d.ts +1 -0
- package/dist/changelog-formatter.d.ts.map +1 -1
- package/dist/cli.cjs +3464 -3438
- package/dist/cli.cjs.map +4 -4
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -47,7 +47,7 @@ var changelogFunctions = {
|
|
|
47
47
|
if (dependenciesUpdated.length === 0) {
|
|
48
48
|
return "";
|
|
49
49
|
}
|
|
50
|
-
const deps = dependenciesUpdated.map((d) => d.name).join(", ");
|
|
50
|
+
const deps = dependenciesUpdated.map((d) => `${d.name}@${d.newVersion}`).join(", ");
|
|
51
51
|
return `### Miscellaneous Chores
|
|
52
52
|
* **deps:** update dependencies [${deps}]`;
|
|
53
53
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/changelog-formatter.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\ninterface ChangesetInfo {\n commit?: string\n summary: string\n}\n\ninterface DependencyUpdated {\n name: string\n}\n\ninterface ChangelogOptions {\n repo: string\n}\n\nconst typeMap: Record<string, string> = {\n build: \"Build System\",\n chore: \"Miscellaneous Chores\",\n ci: \"Continuous Integration\",\n docs: \"Documentation\",\n feat: \"Features\",\n fix: \"Bug Fixes\",\n perf: \"Performance Improvements\",\n refactor: \"Code Refactoring\",\n style: \"Styles\",\n styles: \"Styles\",\n test: \"Tests\",\n}\n\nconst changelogFunctions = {\n getDependencyReleaseLine: (\n _changesets: unknown,\n dependenciesUpdated: DependencyUpdated[],\n options: ChangelogOptions,\n ) => {\n if (!options.repo) {\n throw new Error(\n 'Please provide a repo to this changelog generator like this:\\n\"changelog\": [\"./changelog.js\", { \"repo\": \"org/repo\" }]',\n )\n }\n if (dependenciesUpdated.length === 0) {\n return \"\"\n }\n\n const deps = dependenciesUpdated.map((d) => d.name).join(\", \")\n return `### Miscellaneous Chores\\n* **deps:** update dependencies [${deps}]`\n },\n\n getReleaseLine: (\n changeset: ChangesetInfo,\n _type: string,\n options: ChangelogOptions,\n ) => {\n if (!options?.repo) {\n throw new Error(\n 'Please provide a repo to this changelog generator like this:\\n\"changelog\": [\"./changelog.js\", { \"repo\": \"org/repo\" }]',\n )\n }\n\n let commitFromSummary: string | undefined\n\n const cleanedSummary = changeset.summary\n .split(\"\\n\")\n .filter((line) => !line.trim().toLowerCase().startsWith(\"signed-off-by:\"))\n .join(\"\\n\")\n .replace(/^\\s*commit:\\s*([^\\s]+)/im, (_, commit) => {\n commitFromSummary = commit\n return \"\"\n })\n .trim()\n\n const prMatch = cleanedSummary.match(/\\(#(\\d+)\\)/)\n const prNumber = prMatch?.[1]\n\n const typeMatch = cleanedSummary.match(\n /^(feat|fix|refactor|chore|perf|test|docs|styles?|ci|build)\\s*(\\(.+?\\))?!?:\\s*/i,\n )\n const conventionalType = typeMatch?.[1]?.toLowerCase()\n const scope = typeMatch?.[2]?.replace(\"(\", \"\").replace(\")\", \"\")\n const isBreaking =\n cleanedSummary.includes(\"!:\") ||\n cleanedSummary.toLowerCase().includes(\"breaking\")\n const summary = cleanedSummary\n .replace(\n /^(feat|fix|refactor|chore|perf|test|docs|styles?|ci|build)\\s*(\\(.+?\\))?!?:\\s*/i,\n \"\",\n )\n .replace(/\\s*\\(#\\d+\\)\\s*$/, \"\")\n .trim()\n\n const section = isBreaking\n ? \"BREAKING CHANGES\"\n : typeMap[conventionalType ?? \"\"] || \"Miscellaneous\"\n\n let line = `### ${section}\\n* ${scope ? `[${scope}]: ` : \"\"}${summary}`\n\n if (prNumber) {\n line += ` ([#${prNumber}](${options.repo}/issues/${prNumber}))`\n }\n\n const commit = commitFromSummary || changeset.commit\n if (commit) {\n const shortCommit = commit.slice(0, 7)\n line += ` ([${shortCommit}](${options.repo}/commit/${commit}))`\n }\n\n return line\n },\n}\n\nexport default changelogFunctions\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\ninterface ChangesetInfo {\n commit?: string\n summary: string\n}\n\ninterface DependencyUpdated {\n name: string\n newVersion: string\n}\n\ninterface ChangelogOptions {\n repo: string\n}\n\nconst typeMap: Record<string, string> = {\n build: \"Build System\",\n chore: \"Miscellaneous Chores\",\n ci: \"Continuous Integration\",\n docs: \"Documentation\",\n feat: \"Features\",\n fix: \"Bug Fixes\",\n perf: \"Performance Improvements\",\n refactor: \"Code Refactoring\",\n style: \"Styles\",\n styles: \"Styles\",\n test: \"Tests\",\n}\n\nconst changelogFunctions = {\n getDependencyReleaseLine: (\n _changesets: unknown,\n dependenciesUpdated: DependencyUpdated[],\n options: ChangelogOptions,\n ) => {\n if (!options.repo) {\n throw new Error(\n 'Please provide a repo to this changelog generator like this:\\n\"changelog\": [\"./changelog.js\", { \"repo\": \"org/repo\" }]',\n )\n }\n if (dependenciesUpdated.length === 0) {\n return \"\"\n }\n\n const deps = dependenciesUpdated\n // TODO: link to changelog?\n .map((d) => `${d.name}@${d.newVersion}`)\n .join(\", \")\n return `### Miscellaneous Chores\\n* **deps:** update dependencies [${deps}]`\n },\n\n getReleaseLine: (\n changeset: ChangesetInfo,\n _type: string,\n options: ChangelogOptions,\n ) => {\n if (!options?.repo) {\n throw new Error(\n 'Please provide a repo to this changelog generator like this:\\n\"changelog\": [\"./changelog.js\", { \"repo\": \"org/repo\" }]',\n )\n }\n\n let commitFromSummary: string | undefined\n\n const cleanedSummary = changeset.summary\n .split(\"\\n\")\n .filter((line) => !line.trim().toLowerCase().startsWith(\"signed-off-by:\"))\n .join(\"\\n\")\n .replace(/^\\s*commit:\\s*([^\\s]+)/im, (_, commit) => {\n commitFromSummary = commit\n return \"\"\n })\n .trim()\n\n const prMatch = cleanedSummary.match(/\\(#(\\d+)\\)/)\n const prNumber = prMatch?.[1]\n\n const typeMatch = cleanedSummary.match(\n /^(feat|fix|refactor|chore|perf|test|docs|styles?|ci|build)\\s*(\\(.+?\\))?!?:\\s*/i,\n )\n const conventionalType = typeMatch?.[1]?.toLowerCase()\n const scope = typeMatch?.[2]?.replace(\"(\", \"\").replace(\")\", \"\")\n const isBreaking =\n cleanedSummary.includes(\"!:\") ||\n cleanedSummary.toLowerCase().includes(\"breaking\")\n const summary = cleanedSummary\n .replace(\n /^(feat|fix|refactor|chore|perf|test|docs|styles?|ci|build)\\s*(\\(.+?\\))?!?:\\s*/i,\n \"\",\n )\n .replace(/\\s*\\(#\\d+\\)\\s*$/, \"\")\n .trim()\n\n const section = isBreaking\n ? \"BREAKING CHANGES\"\n : typeMap[conventionalType ?? \"\"] || \"Miscellaneous\"\n\n let line = `### ${section}\\n* ${scope ? `[${scope}]: ` : \"\"}${summary}`\n\n if (prNumber) {\n line += ` ([#${prNumber}](${options.repo}/issues/${prNumber}))`\n }\n\n const commit = commitFromSummary || changeset.commit\n if (commit) {\n const shortCommit = commit.slice(0, 7)\n line += ` ([${shortCommit}](${options.repo}/commit/${commit}))`\n }\n\n return line\n },\n}\n\nexport default changelogFunctions\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA,IAAM,UAAkC;AAAA,EACtC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AACR;AAEA,I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KAAK,QAAQ,EAAE,GAAG,OAAO;AAErE,QAAI,UAAU;AACZ,cAAQ,OAAO,QAAQ,KAAK,QAAQ,IAAI,WAAW,QAAQ;AAAA,IAC7D;AAEA,UAAM,SAAS,qBAAqB,UAAU;AAC9C,QAAI,QAAQ;AACV,YAAM,cAAc,OAAO,MAAM,GAAG,CAAC;AACrC,cAAQ,MAAM,WAAW,KAAK,QAAQ,IAAI,WAAW,MAAM;AAAA,IAC7D;AAEA,WAAO;AAAA,EACT;AACF;AAEA,IAAO,8BAAQ;",
|
|
6
6
|
"names": ["line", "commit"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog-formatter.d.ts","sourceRoot":"","sources":["../src/changelog-formatter.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"changelog-formatter.d.ts","sourceRoot":"","sources":["../src/changelog-formatter.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAA;CACb;AAgBD,QAAA,MAAM,kBAAkB;4CAEP,OAAO,uBACC,iBAAiB,EAAE,WAC/B,gBAAgB;gCAmBd,aAAa,SACjB,MAAM,WACJ,gBAAgB;CAyD5B,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|