@frsource/release-it-config 1.0.0 → 1.0.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+
2
+
3
+ ## [1.0.1](https://github.com/FRSOURCE/toolkit/compare/@frsource/release-it-config-v1.0.0...${npm.name}-v1.0.1) (2024-04-18)
4
+
5
+ # 1.0.0 (2024-04-18)
@@ -3,13 +3,13 @@ const nodePath = require("path");
3
3
  /**
4
4
  * Configuration for independent package in monorepo workspace
5
5
  * @param {Object} options
6
- * @param {string} options.name name of the package in the monorepo, e.g. `my-package`
7
- * @param {string} [options.path=`packages/${options.name}`] path of the package relative to the monorepo root, without starting slash. Always use "/" as delimiter. Will default to `packages/${options.name}`
6
+ * @param {string} options.pkgName name of the package in the monorepo, e.g. `@frsource/my-package`
7
+ * @param {string} [options.path=`packages/${options.pkgName}`] path of the package relative to the monorepo root, without starting slash. Always use "/" as delimiter. Will default to `packages/${options.pkgName}` (package scope in `options.pkgName` will be omitted)
8
8
  * @param {string} [options.buildCmd="pnpm build"] command that should be used to build the package, defaults to `pnpm build`
9
9
  */
10
10
  module.exports = ({
11
- name,
12
- path = `packages/${name}`,
11
+ pkgName,
12
+ path = `packages/${pkgName.substring(pkgName.lastIndexOf("/") + 1)}`,
13
13
  buildCmd = "pnpm build",
14
14
  }) => {
15
15
  if (path.startsWith("/")) path = path.substring(1);
@@ -19,6 +19,7 @@ module.exports = ({
19
19
  return {
20
20
  npm: {
21
21
  publishPath: "package-pack.tgz",
22
+ publish: true,
22
23
  },
23
24
  git: {
24
25
  requireBranch: "main",
@@ -26,18 +27,20 @@ module.exports = ({
26
27
  requireCommitsFail: false, // if there are no new commits release-it will stop the release process, but without throwing and error
27
28
  requireCleanWorkingDir: true,
28
29
  commitsPath: ".",
29
- commitMessage: "chore: release ${npm.name} ${version}",
30
+ commitMessage: "chore(release): ${npm.name} v${version}",
30
31
  tagName: "${npm.name}-v${version}",
31
32
  tagMatch: "${npm.name}-v[0-9]*.[0-9]*.[0-9]*",
32
33
  getLatestTagFromAllRefs: false, // https://github.com/release-it/release-it/blob/main/docs/git.md#use-all-refs-to-determine-latest-tag
33
34
  },
34
35
  github: {
35
36
  release: true,
37
+ releaseName: `${pkgName}@\${version}`,
36
38
  comments: {
37
- submit: true,
39
+ submit: false, // hitting the secondary rate limit issues, see:
40
+ // https://github.com/FRSOURCE/toolkit/actions/runs/8730568392/job/23954615077#step:8:38
38
41
  issue:
39
- ":rocket: _This issue has been resolved in ${npm.name}@${version}. See [${releaseName}](${releaseUrl}) for release notes._",
40
- pr: ":rocket: _This pull request is included in ${npm.name}@${version}. See [${releaseName}](${releaseUrl}) for release notes._",
42
+ ":rocket: _This issue has been resolved in [${releaseName} (click for release notes)](${releaseUrl})._",
43
+ pr: ":rocket: _This pull request is included in [${releaseName} (click for release notes)](${releaseUrl})._",
41
44
  },
42
45
  },
43
46
  plugins: {
@@ -45,13 +48,16 @@ module.exports = ({
45
48
  gitRawCommitsOpts: {
46
49
  path,
47
50
  },
51
+ preset: "angular",
52
+ infile: "CHANGELOG.md",
48
53
  },
49
54
  },
50
55
  hooks: {
51
56
  "before:bump": buildCmd,
52
- "after:bump": `pnpm install && git add ${"../".repeat(
53
- nestingLevel
54
- )}pnpm-lock.yaml`,
57
+ "after:bump": [
58
+ "pnpm install",
59
+ `git add ${"../".repeat(nestingLevel)}pnpm-lock.yaml`,
60
+ ],
55
61
  "before:npm:release": "mv $(pnpm pack) package-pack.tgz",
56
62
  "after:npm:release": "rm package-pack.tgz",
57
63
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frsource/release-it-config",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "index.cjs",
5
5
  "type": "module",
6
6
  "dependencies": {