matterbridge-zigbee2mqtt 2.2.1 → 2.2.3-dev.5

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": "matterbridge-zigbee2mqtt",
3
- "version": "2.2.1",
3
+ "version": "2.2.3-dev.5",
4
4
  "description": "Matterbridge zigbee2mqtt plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",
@@ -41,64 +41,10 @@
41
41
  "engines": {
42
42
  "node": ">=18.0.0"
43
43
  },
44
- "scripts": {
45
- "build": "tsc",
46
- "watch": "tsc --watch",
47
- "start": "matterbridge",
48
- "start:bridge": "matterbridge -bridge",
49
- "start:childbridge": "matterbridge -childbridge",
50
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
51
- "test:verbose": "node --experimental-vm-modules node_modules/jest/bin/jest.js --verbose",
52
- "test:watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch",
53
- "test:coverage": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage",
54
- "lint": "eslint --max-warnings=0 .",
55
- "lint:fix": "eslint --fix --max-warnings=0 .",
56
- "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
57
- "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
58
- "clean": "npm install --no-save rimraf && rimraf tsconfig.tsbuildinfo ./dist",
59
- "cleanBuild": "npm run clean && tsc",
60
- "deepClean": "npm install --no-save rimraf && rimraf tsconfig.tsbuildinfo package-lock.json npm-shrinkwrap.json ./dist ./node_modules",
61
- "deepCleanBuild": "npm run deepClean && npm install && npm link matterbridge && npm run build",
62
- "checkDependencies": "npx npm-check-updates",
63
- "updateDependencies": "npx npm-check-updates -u && npm install && npm link matterbridge && npm run cleanBuild",
64
- "prepublishOnly": "npm shrinkwrap",
65
- "npmPack": "npm run deepCleanBuild && npm shrinkwrap && npm pack && npm run deepCleanBuild",
66
- "matterbridge:add": "matterbridge -add .\\",
67
- "matterbridge:remove": "matterbridge -remove .\\",
68
- "matterbridge:enable": "matterbridge -enable .\\",
69
- "matterbridge:disable": "matterbridge -disable .\\",
70
- "matterbridge:list": "matterbridge -list",
71
- "dev:link": "npm link matterbridge",
72
- "dev:unlink": "npm unlink matterbridge",
73
- "dev:install": "npm install --no-save matterbridge",
74
- "dev:uninstall": "npm uninstall matterbridge",
75
- "install": "node link-matterbridge-script.js",
76
- "install:dependencies": "npm install node-ansi-logger moment mqtt && npm install --save-dev rimraf",
77
- "install:typescript": "npm install --save-dev typescript @types/node && npm run install && npm run build",
78
- "install:eslint": "npm install --save-dev eslint @eslint/js @types/eslint__js typescript typescript-eslint",
79
- "install:prettier": "npm install --save-dev prettier eslint-config-prettier eslint-plugin-prettier",
80
- "install:jest": "npm install --save-dev jest ts-jest @types/jest eslint-plugin-jest"
81
- },
82
44
  "dependencies": {
83
45
  "moment": "2.30.1",
84
- "mqtt": "5.10.1",
46
+ "mqtt": "5.10.3",
85
47
  "node-ansi-logger": "3.0.0",
86
48
  "node-persist-manager": "1.0.8"
87
- },
88
- "devDependencies": {
89
- "@eslint/js": "9.12.0",
90
- "@types/eslint__js": "8.42.3",
91
- "@types/jest": "29.5.13",
92
- "@types/node": "22.7.5",
93
- "eslint": "9.12.0",
94
- "eslint-config-prettier": "9.1.0",
95
- "eslint-plugin-jest": "28.8.3",
96
- "eslint-plugin-prettier": "5.2.1",
97
- "jest": "29.7.0",
98
- "prettier": "3.3.3",
99
- "rimraf": "6.0.1",
100
- "ts-jest": "29.2.5",
101
- "typescript": "5.6.3",
102
- "typescript-eslint": "8.8.1"
103
49
  }
104
- }
50
+ }
package/create-release.js DELETED
@@ -1,81 +0,0 @@
1
- /* eslint-disable no-console */
2
-
3
- /*
4
- Add the following scripts to package.json file:
5
- "prepublishOnly": "npm run lint && npm run test && npm run cleanBuild",
6
- "npmPublish": "npm publish",
7
- "gitPublish": "npm run lint && npm run test && npm run cleanBuild && node create-release.js",
8
- "preversion": "npm run lint && npm run test && npm run cleanBuild",
9
- "postversion": "git push && git push --tags && node create-release.js",
10
- "version:patch": "npm version patch",
11
- "version:minor": "npm version minor",
12
- "version:major": "npm version major",
13
- */
14
-
15
- import { execSync } from 'child_process';
16
- import { readFileSync, writeFileSync, unlinkSync } from 'fs';
17
- import path from 'path';
18
- import readline from 'readline';
19
-
20
- // Get the latest tag
21
- let tag = execSync('git describe --tags --abbrev=0').toString().trim();
22
- if (tag.startsWith('v')) {
23
- tag = tag.substring(1);
24
- }
25
-
26
- // Read the changelog file
27
- const changelogPath = path.join(process.cwd(), 'CHANGELOG.md');
28
- const changelog = readFileSync(changelogPath, 'utf8');
29
-
30
- // Extract the relevant section from the changelog
31
- const changelogSection = extractChangelogSection(changelog, tag);
32
-
33
- const title = `Release ${tag}`;
34
- const notes = `Release notes for version ${tag}\n\n## [${tag}] ${changelogSection}`;
35
-
36
- // Log the release details
37
- console.log(`Creating release ${tag} with the following details:\nTitle:\n${title}\nNotes:\n${notes}`);
38
-
39
- // Write the release notes to a temporary file
40
- const notesFilePath = path.join(process.cwd(), 'release-notes.md');
41
- writeFileSync(notesFilePath, notes);
42
-
43
- // Wait for user input before proceeding
44
- await pressAnyKey();
45
-
46
- // Create the release using the temporary file
47
- execSync(`gh release create ${tag} -t "${title}" -F "${notesFilePath}"`, { stdio: 'inherit' });
48
-
49
- // Clean up the temporary file
50
- unlinkSync(notesFilePath);
51
-
52
- /**
53
- * Extracts the relevant section from the changelog for the given tag.
54
- * Assumes that each version section in the changelog starts with a heading like "## [tag]".
55
- * @param {string} changelog - The content of the changelog file.
56
- * @param {string} tag - The tag for which to extract the changelog section.
57
- * @returns {string} - The extracted changelog section.
58
- */
59
- function extractChangelogSection(changelog, tag) {
60
- const regex = new RegExp(`## \\[${tag}\\](.*?)(## \\[|$)`, 's');
61
- const match = changelog.match(regex);
62
- return match ? match[1].trim() : 'No changelog entry found for this version.';
63
- }
64
-
65
- /**
66
- * Waits for the user to press any key.
67
- * @returns {Promise<void>}
68
- */
69
- function pressAnyKey() {
70
- return new Promise((resolve) => {
71
- const rl = readline.createInterface({
72
- input: process.stdin,
73
- output: process.stdout,
74
- });
75
-
76
- rl.question('Press any key to continue...', () => {
77
- rl.close();
78
- resolve();
79
- });
80
- });
81
- }
@@ -1 +0,0 @@
1
- // Nothing to do in production, just a script to link the matterbridge package in development