@jakubmazanec/changesets-changelog 1.0.3-next.8fca4dc → 1.0.3

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.
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Jakub Mazanec
3
+ Copyright (c) 2023 Jakub Mazanec
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
6
  associated documentation files (the "Software"), to deal in the Software without restriction,
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ <div align="center">
2
+
3
+ # @jakubmazanec/changesets-changelog
4
+
5
+ Changelog for projects using Changesets.
6
+
7
+ </div>
8
+
9
+ ## Installation
10
+
11
+ ```sh
12
+ npm install @jakubmazanec/changesets-changelog
13
+ ```
14
+
15
+ #### Prerequisites
16
+
17
+ - Node.js 16 or later
18
+
19
+ ## Usage
20
+
21
+ 🚧 This section is under development. Please check back later for updates.
22
+
23
+ ## Documentation
24
+
25
+ See [API reference](./docs) for auto-generated documentation.
26
+
27
+ ## Contributing
28
+
29
+ If you want to contribute, see [CONTRIBUTING](./CONTRIBUTING.md) for details.
30
+
31
+ ## License
32
+
33
+ This package is licensed under the MIT license. See [LICENSE](./LICENSE.md) for details.
@@ -9,7 +9,7 @@ async function getDependencyReleaseLine(changesets, updatedDependencies, options
9
9
  throw new Error('Please provide a repository in Changesets changelog setting, e.g.: "changelog": ["@jakubmazanec/changesets-changelog", { "repository": "org/repo" }]');
10
10
  }
11
11
  if (!updatedDependencies.length) {
12
- return "";
12
+ return '';
13
13
  }
14
14
  const changesetLink = `- Updated dependencies [${(await Promise.all(changesets.map(async (changeset)=>{
15
15
  if (changeset.commit) {
@@ -20,12 +20,12 @@ async function getDependencyReleaseLine(changesets, updatedDependencies, options
20
20
  return links.commit;
21
21
  }
22
22
  return undefined;
23
- }))).filter((_)=>_).join(", ")}]:`;
23
+ }))).filter((_)=>_).join(', ')}]:`;
24
24
  let updatedDepenenciesLines = updatedDependencies.map((dependency)=>` - ${dependency.name}@${dependency.newVersion}`);
25
25
  return [
26
26
  changesetLink,
27
27
  ...updatedDepenenciesLines
28
- ].join("\n");
28
+ ].join('\n');
29
29
  }
30
30
 
31
31
  //# sourceMappingURL=getDependencyReleaseLine.js.map
@@ -16,15 +16,15 @@ async function getReleaseLine(changeset, type, options) {
16
16
  if (!Number.isNaN(pullRequest)) {
17
17
  pullRequestFromSummary = pullRequest;
18
18
  }
19
- return "";
19
+ return '';
20
20
  }).replace(/^\s*commit:\s*(\S+)/gim, (_, commit)=>{
21
21
  commitFromSummary = commit;
22
- return "";
22
+ return '';
23
23
  }).replace(/^\s*(?:author|user):\s*@?(\S+)/gim, (_, user)=>{
24
24
  usersFromSummary.push(user);
25
- return "";
25
+ return '';
26
26
  }).trim();
27
- let [firstLine, ...lines] = replacedChangelog.split("\n").map((line)=>line.trimEnd());
27
+ let [firstLine, ...lines] = replacedChangelog.split('\n').map((line)=>line.trimEnd());
28
28
  let commitLink;
29
29
  let pullRequestLink;
30
30
  let usersLink;
@@ -55,14 +55,14 @@ async function getReleaseLine(changeset, type, options) {
55
55
  usersLink = links1.user ?? undefined;
56
56
  }
57
57
  if (usersFromSummary.length) {
58
- usersLink = usersFromSummary.map((userFromSummary)=>`[@${userFromSummary}](https://github.com/${userFromSummary})`).join(", ");
58
+ usersLink = usersFromSummary.map((userFromSummary)=>`[@${userFromSummary}](https://github.com/${userFromSummary})`).join(', ');
59
59
  }
60
60
  let prefix = [
61
- pullRequestLink ? ` ${pullRequestLink}` : "",
62
- commitLink ? ` ${commitLink}` : "",
63
- usersLink ? ` (${usersLink})` : ""
64
- ].join("");
65
- return `\n\n-${prefix ? `${prefix} –` : ""} ${firstLine}\n${lines.map((line)=>` ${line}`).join("\n")}`;
61
+ pullRequestLink ? ` ${pullRequestLink}` : '',
62
+ commitLink ? ` ${commitLink}` : '',
63
+ usersLink ? ` (${usersLink})` : ''
64
+ ].join('');
65
+ return `\n\n-${prefix ? `${prefix} –` : ''} ${firstLine}\n${lines.map((line)=>` ${line}`).join('\n')}`;
66
66
  }
67
67
 
68
68
  //# sourceMappingURL=getReleaseLine.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jakubmazanec/changesets-changelog",
3
- "version": "1.0.3-next.8fca4dc",
3
+ "version": "1.0.3",
4
4
  "description": "Changelog for projects using Changesets.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,18 +33,8 @@
33
33
  "@changesets/types": "^5.2.0",
34
34
  "@types/node": "^16.18.3"
35
35
  },
36
- "peerDependencies": {
37
- "eslint": "^8.19.0",
38
- "prettier": "^2.7.1",
39
- "typescript": "^4.7.4"
40
- },
41
- "peerDependenciesMeta": {
42
- "prettier": {
43
- "optional": true
44
- }
45
- },
46
- "packageManager": "npm@8.19.2",
36
+ "packageManager": "npm@8.19.4",
47
37
  "engines": {
48
- "node": ">=16.18.1"
38
+ "node": ">=16.20.0"
49
39
  }
50
40
  }