react-peer-chat 0.8.2 → 0.8.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.
package/.env ADDED
@@ -0,0 +1 @@
1
+ GITHUB_TOKEN=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
package/.release-it.js ADDED
@@ -0,0 +1,86 @@
1
+ const COMMIT_HASH_LENGTH = 7;
2
+
3
+ const typeMap = {
4
+ feat: "Features",
5
+ fix: "Bug Fixes",
6
+ chore: "Chores",
7
+ perf: "Performance Improvements",
8
+ revert: "Reverts",
9
+ docs: "Documentation",
10
+ style: "Styles",
11
+ refactor: "Code Refactoring",
12
+ test: "Tests",
13
+ build: "Build System",
14
+ ci: "Continuous Integration",
15
+ };
16
+
17
+ module.exports = {
18
+ git: {
19
+ commit: true,
20
+ tag: true,
21
+ push: true,
22
+ commitMessage: "release: ${version}",
23
+ tagName: "v${version}",
24
+ },
25
+ github: {
26
+ release: true,
27
+ },
28
+ hooks: {
29
+ "after:bump": "pnpm run compile",
30
+ },
31
+ npm: {
32
+ publish: false,
33
+ },
34
+ plugins: {
35
+ "@release-it/conventional-changelog": {
36
+ preset: "conventionalcommits",
37
+ infile: "CHANGELOG.md",
38
+ writerOpts: {
39
+ transform: (commit, context) => {
40
+ const notes = commit.notes.map((note) => ({ ...note, title: "BREAKING CHANGES" }));
41
+ const type = typeMap[commit.type] || "Other";
42
+ const scope = commit.scope === "*" ? "" : commit.scope;
43
+ const shortHash = typeof commit.hash === "string" ? commit.hash.substring(0, COMMIT_HASH_LENGTH) : commit.shortHash;
44
+ const issues = [];
45
+
46
+ let message = commit.subject || "";
47
+ if (message) {
48
+ if (!/[.!?]$/.test(message)) message += ".";
49
+ message += " ";
50
+ }
51
+ if (commit.body) message += commit.body.trim();
52
+
53
+ let url = context.repository ? `${context.host}/${context.owner}/${context.repository}` : context.repoUrl;
54
+ if (url) {
55
+ url = `${url}/issues/`;
56
+ // Issue URLs
57
+ message = message.replace(/#([0-9]+)/g, (_, issue) => {
58
+ issues.push(issue);
59
+ return `[#${issue}](${url}${issue})`;
60
+ });
61
+ }
62
+
63
+ if (context.host) {
64
+ // User URLs
65
+ message = message.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
66
+ if (username.includes("/")) return `@${username}`;
67
+ return `[@${username}](${context.host}/${username})`;
68
+ });
69
+ }
70
+
71
+ // remove references that already appear in the subject/body
72
+ const references = commit.references.filter((reference) => !issues.includes(reference.issue));
73
+
74
+ return {
75
+ notes,
76
+ type,
77
+ scope,
78
+ shortHash,
79
+ subject: message,
80
+ references,
81
+ };
82
+ },
83
+ },
84
+ },
85
+ },
86
+ };
package/README.md CHANGED
@@ -33,7 +33,7 @@ To install `react-peer-chat`:
33
33
 
34
34
  ## Usage
35
35
 
36
- `react-peer-chat` provides two primary methods to integrate chat functionality into your React apps: through the `<Chat>` component and the `useSpeech` hook.
36
+ `react-peer-chat` provides two primary methods to integrate chat functionality into your React apps: through the `<Chat>` component and the `useChat` hook.
37
37
 
38
38
  It also exports a `clearChat` function that clears the text chat from the browser's session storage when called.
39
39
 
@@ -353,4 +353,4 @@ type Children = (childrenOptions: ChildrenOptions) => ReactNode;
353
353
 
354
354
  ## Author
355
355
 
356
- [Sahil Aggarwal](https://www.github.com/SahilAggarwal2004)
356
+ [Sahil Aggarwal](https://github.com/SahilAggarwal2004)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-peer-chat",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "An easy to use react component for impleting peer-to-peer chatting.",
5
5
  "license": "MIT",
6
6
  "author": "Sahil Aggarwal <aggarwalsahil2004@gmail.com>",
@@ -22,12 +22,14 @@
22
22
  "main": "dist/index.js",
23
23
  "types": "dist/index.d.ts",
24
24
  "dependencies": {
25
- "peerjs": "^1.5.4"
25
+ "peerjs": "^1.5.5"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/react": "^19.0.10",
29
- "tsup": "^8.4.0",
30
- "typescript": "^5.8.2"
28
+ "@release-it/conventional-changelog": "^10.0.4",
29
+ "@types/react": "^19.2.7",
30
+ "release-it": "^19.2.2",
31
+ "tsup": "^8.5.1",
32
+ "typescript": "^5.9.3"
31
33
  },
32
34
  "peerDependencies": {
33
35
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
@@ -52,6 +54,8 @@
52
54
  "scripts": {
53
55
  "build": "pnpm i && pnpm run compile",
54
56
  "compile": "tsup",
55
- "dev": "tsup --watch"
57
+ "dev": "tsup --watch",
58
+ "dry-release": "release-it --ci --dry-run",
59
+ "release": "release-it --ci"
56
60
  }
57
61
  }
@@ -0,0 +1,2 @@
1
+ onlyBuiltDependencies:
2
+ - esbuild