node-pluginsmanager 3.2.0 → 3.3.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.
@@ -11,6 +11,7 @@ const node_os_1 = require("node:os");
11
11
  const promises_1 = require("node:fs/promises");
12
12
  // externals
13
13
  const check_version_modules_1 = __importDefault(require("check-version-modules"));
14
+ const check_node_engine_1 = __importDefault(require("check-node-engine"));
14
15
  // locals
15
16
  const rmdirp_1 = __importDefault(require("./utils/rmdirp"));
16
17
  const checkAbsoluteDirectory_1 = __importDefault(require("./checkers/checkAbsoluteDirectory"));
@@ -102,11 +103,16 @@ class PluginsManager extends node_events_1.default {
102
103
  return (0, checkAbsoluteDirectory_1.default)("checkModules/directory", this.directory).then(() => {
103
104
  return (0, checkOrchestrator_1.default)("checkModules/plugin", plugin);
104
105
  }).then(() => {
105
- return (0, check_version_modules_1.default)((0, node_path_1.join)(this.directory, plugin.name, "package.json"), {
106
- "failAtMajor": true,
107
- "failAtMinor": true,
108
- "failAtPatch": false,
109
- "dev": false
106
+ const packageFile = (0, node_path_1.join)(this.directory, plugin.name, "package.json");
107
+ // start with node engine checker to compare minimal node version used
108
+ return (0, check_node_engine_1.default)(packageFile).then(() => {
109
+ // then check used packages versions
110
+ return (0, check_version_modules_1.default)(packageFile, {
111
+ "failAtMajor": false, // can break and be a huge source of dev
112
+ "failAtMinor": true, // mandatory, most important updates
113
+ "failAtPatch": false, // not critical
114
+ "dev": false
115
+ });
110
116
  }).then((analyze) => {
111
117
  return analyze.result ? Promise.resolve() : Promise.reject(new Error("\"" + plugin.name + "\" plugin has obsoletes modules"));
112
118
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "node-pluginsmanager",
4
- "version": "3.2.0",
4
+ "version": "3.3.0",
5
5
  "description": "A plugins manager.",
6
6
 
7
7
  "type": "commonjs",
@@ -19,8 +19,6 @@
19
19
 
20
20
  "scripts": {
21
21
 
22
- "prepare": "npx husky || true",
23
-
24
22
  "lint-back": "npx eslint --config .eslintrc-back.js --ext .ts,.cts,.mts ./lib/src/**/*",
25
23
  "lint-tests": "npx eslint --config .eslintrc-tests.js --ext .js,.cjs,.mjs ./test/**/*.js",
26
24
  "lint": "npm run lint-back && npm run lint-tests",
@@ -31,12 +29,13 @@
31
29
  "build-back": "npm run clean-back && npx tsc --project ./tsconfig.json",
32
30
  "build": "npm run build-back",
33
31
 
32
+ "check-node-engine": "npx check-node-engine",
34
33
  "check-requires": "npx used-deps-analyzer ./package.json ./lib/src --no-dev",
35
34
  "check-updates": "npx check-version-modules --no-fail-at-major --fail-at-minor --fail-at-patch",
36
35
  "unit-tests": "npx mocha",
37
36
  "unit-tests-local": "npx nyc --reporter=html --reporter=text mocha",
38
37
 
39
- "tests": "npm run lint && npm run check-requires && npm run check-updates && npm run build && npm run unit-tests-local"
38
+ "tests": "npm run lint && npm run check-node-engine && npm run check-requires && npm run check-updates && npm run build && npm run unit-tests-local"
40
39
 
41
40
  },
42
41
 
@@ -44,36 +43,30 @@
44
43
  "/lib/cjs"
45
44
  ],
46
45
  "engines": {
47
- "node": ">=22.22.0"
46
+ "node": ">=22.22.3"
48
47
  },
49
48
 
50
49
  "dependencies": {
51
- "check-version-modules": "2.3.0"
50
+ "check-node-engine": "1.0.0",
51
+ "check-version-modules": "2.5.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/express": "5.0.6",
55
- "@types/node": "25.6.0",
55
+ "@types/node": "25.9.1",
56
56
  "@types/socket.io": "3.0.2",
57
57
  "@types/ws": "8.18.1",
58
58
  "eslint-plugin-personnallinter": "git+ssh://git@github.com/Psychopoulet/eslint-plugin-personnallinter",
59
59
  "express": "5.2.1",
60
60
  "husky": "9.1.7",
61
- "mocha": "11.7.5",
62
- "node-pluginsmanager-plugin": "7.1.0",
61
+ "mocha": "11.7.6",
62
+ "node-pluginsmanager-plugin": "7.2.0",
63
63
  "nyc": "18.0.0",
64
64
  "proxyquire": "2.1.3",
65
65
  "rimraf": "6.1.3",
66
66
  "socket.io": "4.8.3",
67
67
  "typescript": "5.9.3",
68
68
  "used-deps-analyzer": "0.3.0",
69
- "ws": "8.20.0"
70
- },
71
-
72
- "husky": {
73
- "hooks": {
74
- "pre-commit": "npm run lint",
75
- "pre-push": "npm run build && npm run unit-tests-local"
76
- }
69
+ "ws": "8.21.0"
77
70
  },
78
71
 
79
72
  "keywords": [