@qualcomm-ui/changesets-cli 1.0.4 → 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/README.md CHANGED
@@ -75,6 +75,22 @@ qui-changesets check-versions [options]
75
75
  | ----------------- | ---------------------------------------------------------------- | ------------------------ |
76
76
  | `--config <path>` | Path to the changesets config file, relative to the project root | `.changeset/config.json` |
77
77
 
78
+ ### `check-jsdoc-since-tags`
79
+
80
+ Checks for unresolved JSDoc `@since next-release` tags without modifying files. With no directories, it scans package source directories. Pass one or more directories to scan those trees directly. Output includes the file and the declaration that owns the tag.
81
+
82
+ ```sh
83
+ qui-changesets check-jsdoc-since-tags [directories...]
84
+ ```
85
+
86
+ ### `update-jsdoc-since-tags`
87
+
88
+ Replaces JSDoc `@since next-release` tags. With no directories, it updates package source directories whose current `package.json` version differs from the Changesets base branch. Pass `--diff-ref` to compare against another Git ref such as a commit SHA, tag, local branch, or remote-tracking branch like `origin/main`. Pass one or more directories to update those trees directly. Pass `--version` to use an explicit version; otherwise each custom directory must be inside a package with a current version.
89
+
90
+ ```sh
91
+ qui-changesets update-jsdoc-since-tags [directories...] [--diff-ref <git-ref>] [--version <version>]
92
+ ```
93
+
78
94
  ### `create-github-releases`
79
95
 
80
96
  Creates GitHub releases for published packages by parsing their changelogs.
@@ -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;AAgBA,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,IAAM,qBAAqB;AAAA,EACzB,0BAA0B,CACxB,aACA,qBACA,YACG;AACH,QAAI,CAAC,QAAQ,MAAM;AACjB,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,QAAI,oBAAoB,WAAW,GAAG;AACpC,aAAO;AAAA,IACT;AAEA,UAAM,OAAO,oBAAoB,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,IAAI;AAC7D,WAAO;AAAA,mCAA8D,IAAI;AAAA,EAC3E;AAAA,EAEA,gBAAgB,CACd,WACA,OACA,YACG;AACH,QAAI,CAAC,SAAS,MAA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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,IAAM,qBAAqB;AAAA,EACzB,0BAA0B,CACxB,aACA,qBACA,YACG;AACH,QAAI,CAAC,QAAQ,MAAM;AACjB,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,QAAI,oBAAoB,WAAW,GAAG;AACpC,aAAO;AAAA,IACT;AAEA,UAAM,OAAO,oBAEV,IAAI,CAAC,MAAM,GAAG,EAAE,IAAI,IAAI,EAAE,UAAU,EAAE,EACtC,KAAK,IAAI;AACZ,WAAO;AAA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ACF;AAEA,IAAO,8BAAQ;",
6
6
  "names": ["line", "commit"]
7
7
  }
@@ -4,6 +4,7 @@ interface ChangesetInfo {
4
4
  }
5
5
  interface DependencyUpdated {
6
6
  name: string;
7
+ newVersion: string;
7
8
  }
8
9
  interface ChangelogOptions {
9
10
  repo: string;
@@ -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;CACb;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAA;CACb;AAgBD,QAAA,MAAM,kBAAkB;4CAEP,OAAO,uBACC,iBAAiB,EAAE,WAC/B,gBAAgB;gCAgBd,aAAa,SACjB,MAAM,WACJ,gBAAgB;CAyD5B,CAAA;AAED,eAAe,kBAAkB,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"}