yarn-version 8.3.1 → 8.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yarn-version",
3
- "version": "8.3.1",
3
+ "version": "8.4.0",
4
4
  "description": "yarn berry versioning using conventional commits",
5
5
  "keywords": [
6
6
  "semantic-release",
@@ -39,7 +39,8 @@
39
39
  "lint": "yarn run lint:eslint",
40
40
  "lint:eslint": "yarn ../.. run eslint --quiet packages/yarn-version",
41
41
  "start": "yarn clean:build && rollup --config rollup.config.mjs --watch",
42
- "test": "yarn ../../ run test -- packages/yarn-version"
42
+ "test": "vitest run",
43
+ "test:watch": "vitest"
43
44
  },
44
45
  "pob": {
45
46
  "bundler": "rollup-esbuild",
@@ -58,26 +59,24 @@
58
59
  },
59
60
  "prettier": "@pob/root/prettier-config",
60
61
  "dependencies": {
61
- "@conventional-changelog/git-client": "1.0.1",
62
+ "@conventional-changelog/git-client": "2.5.1",
62
63
  "@npmcli/map-workspaces": "5.0.0",
63
64
  "@octokit/rest": "22.0.0",
64
65
  "@pob/pretty-pkg": "13.1.0",
65
66
  "commander": "14.0.1",
66
- "conventional-changelog-conventionalcommits": "8.0.0",
67
- "conventional-changelog-core": "8.0.0",
67
+ "conventional-changelog-conventionalcommits": "9.1.0",
68
68
  "conventional-changelog-preset-loader": "5.0.0",
69
- "conventional-changelog-writer": "8.0.0",
70
- "conventional-commits-filter": "5.0.0",
71
- "conventional-commits-parser": "6.1.0",
69
+ "conventional-changelog-writer": "8.2.0",
72
70
  "nightingale": "16.2.0",
73
- "semver": "7.7.2"
71
+ "semver": "7.7.3"
74
72
  },
75
73
  "devDependencies": {
76
- "@pob/rollup-esbuild": "7.2.0",
77
- "@types/node": "22.18.10",
74
+ "@pob/rollup-esbuild": "7.3.0",
75
+ "@types/node": "22.18.12",
78
76
  "@types/npmcli__map-workspaces": "3.0.4",
79
- "conventional-recommended-bump": "10.0.0",
80
- "type-fest": "5.0.1",
81
- "typescript": "5.9.3"
77
+ "conventional-recommended-bump": "11.2.0",
78
+ "type-fest": "5.1.0",
79
+ "typescript": "5.9.3",
80
+ "vitest": "3.2.4"
82
81
  }
83
82
  }
@@ -99,6 +99,14 @@ interface BumpedWorkspace extends ChangedWorkspace, NoVersionToUpdateWorkspace {
99
99
  newTag: string | null;
100
100
  }
101
101
 
102
+ const todayInYYYYMMDD = (): string => {
103
+ // sv-SEis used for yyyy-mm-dd format
104
+ const dateFormatter = Intl.DateTimeFormat("sv-SE", {
105
+ timeZone: "UTC",
106
+ });
107
+ return dateFormatter.format(new Date());
108
+ };
109
+
102
110
  export const versionCommandAction = async (
103
111
  options: VersionCommandOptions,
104
112
  { nightingaleHandler = new ConsoleHandler(Level.INFO) } = {},
@@ -636,26 +644,31 @@ export const versionCommandAction = async (
636
644
  workspace,
637
645
  { newTag, hasChanged, bumpReason, bumpForDependenciesReasons },
638
646
  ]) => {
639
- const workspaceRelativePath =
640
- rootWorkspace === workspace
641
- ? undefined
642
- : path.relative(rootWorkspace.cwd, workspace.cwd);
647
+ // const workspaceRelativePath =
648
+ // rootWorkspace === workspace
649
+ // ? undefined
650
+ // : path.relative(rootWorkspace.cwd, workspace.cwd);
651
+
652
+ const commits = commitsByWorkspace?.get(workspace);
643
653
 
644
654
  let changelog = await generateChangelog(
645
655
  rootWorkspace,
646
656
  workspace.pkg,
647
657
  conventionalCommitConfig,
658
+ previousTagByWorkspace.get(workspace) || null,
648
659
  isMonorepoVersionIndependent ? newTag : rootNewTag,
649
- {
650
- path: workspaceRelativePath,
651
- previousTag: previousTagByWorkspace.get(workspace) || undefined,
652
- verbose: options.verbose,
653
- tagPrefix: options.tagVersionPrefix,
654
- lernaPackage:
655
- rootWorkspace === workspace
656
- ? undefined
657
- : getWorkspaceName(workspace),
658
- },
660
+ commits,
661
+ todayInYYYYMMDD(),
662
+ // {
663
+ // path: workspaceRelativePath,
664
+ // previousTag: previousTagByWorkspace.get(workspace) || undefined,
665
+ // verbose: options.verbose,
666
+ // tagPrefix: options.tagVersionPrefix,
667
+ // lernaPackage:
668
+ // rootWorkspace === workspace
669
+ // ? undefined
670
+ // : getWorkspaceName(workspace),
671
+ // },
659
672
  );
660
673
 
661
674
  if (bumpForDependenciesReasons && workspace !== rootWorkspace) {
@@ -1,7 +1,11 @@
1
- declare module "conventional-changelog-core" {
2
- export default function conventionalChangelogCore(
3
- options: any,
4
- context?: any,
5
- ): Readable;
6
- }
1
+ // declare module "conventional-changelog-core" {
2
+ // export default function conventionalChangelogCore(
3
+ // options: any,
4
+ // context?: any,
5
+ // gitRawCommitsOpts?: any,
6
+ // parserOpts?: any,
7
+ // writerOpts?: any,
8
+ // gitRawExecOpts?: any,
9
+ // ): Readable;
10
+ // }
7
11
  declare module "@pob/pretty-pkg";