fastify-rabbitmq 1.6.0 → 2.0.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/lib/cjs/index.js CHANGED
@@ -61,8 +61,8 @@ var validation_js_1 = require("./validation.js");
61
61
  __exportStar(require("./types.js"), exports);
62
62
  var decorateFastifyInstance = function (fastify, options, connection) {
63
63
  var _a = options.namespace, namespace = _a === void 0 ? '' : _a;
64
- if (typeof namespace !== 'undefined') {
65
- fastify.log.debug('[fastify-rabbitmq] Namespace: %s', namespace);
64
+ if (typeof namespace !== 'undefined' && namespace !== '') {
65
+ fastify.log.debug('[fastify-rabbitmq] Namespace Attempt: %s', namespace);
66
66
  }
67
67
  if (typeof namespace !== 'undefined' && namespace !== '') {
68
68
  if (typeof fastify.rabbitmq === 'undefined') {
package/lib/esm/index.js CHANGED
@@ -5,8 +5,8 @@ import { validateOpts } from './validation.js';
5
5
  export * from './types.js';
6
6
  const decorateFastifyInstance = (fastify, options, connection) => {
7
7
  const { namespace = '' } = options;
8
- if (typeof namespace !== 'undefined') {
9
- fastify.log.debug('[fastify-rabbitmq] Namespace: %s', namespace);
8
+ if (typeof namespace !== 'undefined' && namespace !== '') {
9
+ fastify.log.debug('[fastify-rabbitmq] Namespace Attempt: %s', namespace);
10
10
  }
11
11
  if (typeof namespace !== 'undefined' && namespace !== '') {
12
12
  if (typeof fastify.rabbitmq === 'undefined') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastify-rabbitmq",
3
- "version": "1.6.0",
3
+ "version": "2.0.0",
4
4
  "description": "A Fastify RabbitMQ Plugin Developed in Pure TypeScript.",
5
5
  "module": "./lib/esm/index.js",
6
6
  "main": "./lib/cjs/index.js",
@@ -17,7 +17,7 @@
17
17
  "lib/"
18
18
  ],
19
19
  "engines": {
20
- "node": "^18 || ^20"
20
+ "node": ">=20.0.0"
21
21
  },
22
22
  "scripts": {
23
23
  "clean": "rm -rf lib coverage",
@@ -27,18 +27,17 @@
27
27
  "lint": "npmPkgJsonLint . && ts-standard | snazzy",
28
28
  "lint:fix": "npmPkgJsonLint . && ts-standard --fix | snazzy",
29
29
  "pack": "npm pack",
30
- "publish": "clean-publish",
31
30
  "prepublishOnly": "npm run clean && npm run build && npm run pack",
32
- "test": "jest",
33
- "test:open": "jest --detectOpenHandles",
34
- "test:ci": "jest --ci",
35
- "test:coverage": "jest --coverage",
31
+ "test": "vitest run",
32
+ "test:verbose": "vitest run --reporter verbose",
33
+ "test:watch": "vitest watch",
34
+ "test:coverage": "vitest --coverage",
36
35
  "typedoc": "typedoc",
37
36
  "typedoc:watch": "typedoc -watch",
38
37
  "semantic-release": "semantic-release",
39
38
  "semantic-release:dry-run": "semantic-release --dry-run",
40
- "update": "npx npm-check-updates -u && npm run update:post-update",
41
- "update:post-update": "npm install && npm run test:ci"
39
+ "update": "npx npm-check-updates -u --enginesNode && npm run update:post-update",
40
+ "update:post-update": "npm install && npm run test"
42
41
  },
43
42
  "repository": {
44
43
  "type": "git",
@@ -60,33 +59,33 @@
60
59
  "dependencies": {
61
60
  "@fastify/error": "^3.4.1",
62
61
  "fastify-plugin": "^4.5.1",
63
- "rabbitmq-client": "^4.5.0"
62
+ "rabbitmq-client": "^4.5.1"
64
63
  },
65
64
  "devDependencies": {
66
65
  "@semantic-release/changelog": "^6.0.3",
67
- "@semantic-release/commit-analyzer": "^11.1.0",
68
66
  "@semantic-release/git": "^10.0.1",
69
- "@semantic-release/release-notes-generator": "^12.1.0",
70
- "@the-rabbit-hole/semantic-release-config": "^1.4.0",
71
- "clean-publish": "^4.2.0",
72
- "@types/jest": "^29.5.11",
73
- "@types/node": "^20.10.5",
74
- "@types/randomstring": "^1.1.11",
75
- "@typescript-eslint/parser": "^6.16.0",
76
- "fastify": "^4.25.2",
77
- "jest": "^29.7.0",
78
- "jest-ts-webcompat-resolver": "^1.0.0",
79
- "npm-check-updates": "^16.14.12",
67
+ "@the-rabbit-hole/semantic-release-config": "^1.5.0",
68
+ "@types/node": "^20.11.24",
69
+ "@types/randomstring": "^1.1.12",
70
+ "@typescript-eslint/parser": "^7.1.0",
71
+ "@vitest/coverage-v8": "^1.3.1",
72
+ "@vitest/ui": "^1.3.1",
73
+ "fastify": "^4.26.1",
74
+ "npm-check-updates": "^16.14.15",
80
75
  "npm-package-json-lint": "^7.1.0",
81
76
  "pre-commit": "^1.2.2",
82
- "semantic-release": "^22.0.12",
77
+ "semantic-release": "^23.0.2",
83
78
  "snazzy": "^9.0.0",
84
- "ts-jest": "^29.1.1",
85
79
  "ts-node": "^10.9.2",
86
80
  "ts-standard": "^12.0.2",
87
- "tsd": "^0.30.1",
88
- "typedoc": "^0.25.4",
89
- "typescript": "^5.3.3"
81
+ "tsd": "^0.30.7",
82
+ "typedoc": "^0.25.9",
83
+ "typescript": "^5.3.3",
84
+ "vitest": "^1.3.1"
90
85
  },
91
- "pre-commit": []
86
+ "precommit": [
87
+ "test",
88
+ "build",
89
+ "lint:fix"
90
+ ]
92
91
  }