amqp-extension 2.0.0 → 2.0.1

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/.eslintrc CHANGED
@@ -3,7 +3,7 @@
3
3
  "@tada5hi/eslint-config-typescript"
4
4
  ],
5
5
  "parserOptions": {
6
- "project": "./tsconfig.json"
6
+ "project": "./tsconfig.eslint.json"
7
7
  },
8
8
  "ignorePatterns": ["**/dist/*", "**/*.d.ts", "**/test/*"],
9
9
  "globals": {
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.0.1](https://github.com/Tada5hi/amqp-extension/compare/v2.0.0...v2.0.1) (2023-11-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bump (dev-) dependencies & resolved linting issues ([25b74ce](https://github.com/Tada5hi/amqp-extension/commit/25b74ceb3b83581b1f67bc7b09c6c68029e87252))
7
+
1
8
  # [2.0.0](https://github.com/Tada5hi/amqp-extension/compare/v1.1.1...v2.0.0) (2023-02-03)
2
9
 
3
10
 
@@ -6,5 +6,5 @@
6
6
  */
7
7
 
8
8
  module.exports = {
9
- extends: ['@commitlint/config-angular'],
9
+ extends: ['@tada5hi/commitlint-config'],
10
10
  };
@@ -1,4 +1,4 @@
1
- import { Config, ConfigInput } from './type';
1
+ import type { Config, ConfigInput } from './type';
2
2
  export declare function setConfig(key: string | ConfigInput, value?: ConfigInput): Config;
3
3
  export declare function hasConfig(key?: string): boolean;
4
4
  export declare function getConfig(key?: string | ConfigInput): Config;
@@ -1,6 +1,6 @@
1
- import { Options } from 'amqplib';
2
- import { ExchangeOptions } from '../exchange';
3
- import { ConsumeOptions, PublishOptions } from '../type';
1
+ import type { Options } from 'amqplib';
2
+ import type { ExchangeOptions } from '../exchange';
3
+ import type { ConsumeOptions, PublishOptions } from '../type';
4
4
  export type Config = {
5
5
  alias: string;
6
6
  connection: Options.Connect | string;
@@ -1,3 +1,3 @@
1
- import { Config, ConfigInput } from './type';
1
+ import type { Config, ConfigInput } from './type';
2
2
  export declare function getConfigKey(alias?: string): string;
3
3
  export declare function extendConfig(input: ConfigInput): Config;
@@ -1,7 +1,7 @@
1
- import RabbitMQ, { Connection, Options } from 'amqplib';
2
- import { ConfigInput } from '../config';
1
+ import type { Connection, Options } from 'amqplib';
2
+ import type { ConfigInput } from '../config';
3
3
  export declare function clearConnections(): Promise<void>;
4
4
  export declare function hasConnection(key?: string): boolean;
5
5
  export declare function getConnections(): Record<string, Connection>;
6
6
  export declare function useConnection(key: string | ConfigInput): Promise<Connection>;
7
- export declare function createConnection(config: Options.Connect | string): Promise<RabbitMQ.Connection>;
7
+ export declare function createConnection(config: Options.Connect | string): Promise<Connection>;
@@ -1,3 +1,3 @@
1
- import { ConsumeOptions } from '../type';
2
- import { ConsumeHandlers } from './type';
1
+ import type { ConsumeOptions } from '../type';
2
+ import type { ConsumeHandlers } from './type';
3
3
  export declare function consume(options: ConsumeOptions, handlers: ConsumeHandlers): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import type { Channel, ConsumeMessage } from 'amqplib';
2
- import { ConsumeHandlerAnyKey } from './static';
2
+ import type { ConsumeHandlerAnyKey } from './static';
3
3
  export { ConsumeMessage, };
4
4
  export type ConsumeMessageHandler = (message: ConsumeMessage, channel: Channel) => Promise<void>;
5
5
  export type ConsumeHandlerAnyKeyType = typeof ConsumeHandlerAnyKey;
@@ -1,3 +1,3 @@
1
- import { Options } from 'amqplib';
2
- import { ConsumeOptions } from '../type';
1
+ import type { Options } from 'amqplib';
2
+ import type { ConsumeOptions } from '../type';
3
3
  export declare function buildDriverConsumeOptions(options: ConsumeOptions): Options.Consume;
@@ -8,4 +8,4 @@ var ExchangeType;
8
8
  ExchangeType["DIRECT"] = "direct";
9
9
  ExchangeType["TOPIC"] = "topic";
10
10
  ExchangeType["MATCH"] = "match";
11
- })(ExchangeType = exports.ExchangeType || (exports.ExchangeType = {}));
11
+ })(ExchangeType || (exports.ExchangeType = ExchangeType = {}));
@@ -1,5 +1,5 @@
1
- import { Options } from 'amqplib';
2
- import { ExchangeType } from './constants';
1
+ import type { Options } from 'amqplib';
2
+ import type { ExchangeType } from './constants';
3
3
  export type ExchangeOptions = {
4
4
  name: string;
5
5
  type: `${ExchangeType}`;
@@ -1,5 +1,5 @@
1
- import { Options } from 'amqplib';
1
+ import type { Options } from 'amqplib';
2
2
  import { ExchangeType } from './constants';
3
- import { ExchangeOptions } from './type';
3
+ import type { ExchangeOptions } from './type';
4
4
  export declare function isDefaultExchange(exchange?: `${ExchangeType}`): boolean;
5
5
  export declare function buildDriverExchangeOptions(options: ExchangeOptions): Options.AssertExchange;
@@ -1,2 +1,2 @@
1
- import { PublishOptionsExtended } from './type';
1
+ import type { PublishOptionsExtended } from './type';
2
2
  export declare function publish(options: PublishOptionsExtended): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { PublishOptions } from '../type';
1
+ import type { PublishOptions } from '../type';
2
2
  export type PublishOptionsExtended<T = any> = {
3
3
  /**
4
4
  * Alias for: messageId
@@ -1,3 +1,3 @@
1
- import { Options } from 'amqplib';
2
- import { PublishOptionsExtended } from './type';
1
+ import type { Options } from 'amqplib';
2
+ import type { PublishOptionsExtended } from './type';
3
3
  export declare function buildDriverPublishOptions(options: PublishOptionsExtended): Options.Publish;
package/dist/type.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Options } from 'amqplib';
2
- import { ConfigInput } from './config';
3
- import { ExchangeOptions } from './exchange';
1
+ import type { Options } from 'amqplib';
2
+ import type { ConfigInput } from './config';
3
+ import type { ExchangeOptions } from './exchange';
4
4
  type CommonOptions = {
5
5
  /**
6
6
  * Config key or object.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amqp-extension",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "An amqp extension with functions and utility functions to consume and publish queue messages.",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -35,37 +35,25 @@
35
35
  },
36
36
  "homepage": "https://github.com/Tada5hi/amqp-extension#readme",
37
37
  "dependencies": {
38
- "@types/amqplib": "^0.10.1",
38
+ "@types/amqplib": "^0.10.3",
39
39
  "amqplib": "^0.10.3",
40
- "smob": "^0.1.0",
41
- "uuid": "^9.0.0"
40
+ "smob": "^1.4.1",
41
+ "uuid": "^9.0.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@commitlint/cli": "^17.4.2",
45
- "@commitlint/config-angular": "^17.4.2",
46
- "@commitlint/config-conventional": "^17.4.2",
47
- "@commitlint/cz-commitlint": "^17.4.2",
48
- "@semantic-release/changelog": "^6.0.1",
49
- "@semantic-release/git": "^10.0.1",
50
- "@semantic-release/release-notes-generator": "^10.0.3",
51
- "@tada5hi/eslint-config-typescript": "^1.1.1",
52
- "@tada5hi/tsconfig": "^0.4.0",
53
- "@types/jest": "^27.4.1",
54
- "@types/node": "^18.11.9",
44
+ "@tada5hi/commitlint-config": "^1.1.3",
45
+ "@tada5hi/eslint-config-typescript": "^1.2.6",
46
+ "@tada5hi/semantic-release": "^0.3.0",
47
+ "@tada5hi/tsconfig": "^0.5.0",
48
+ "@types/jest": "^29.5.7",
49
+ "@types/node": "^20.8.10",
55
50
  "@types/uuid": "^8.3.4",
56
- "codecov": "^3.8.3",
57
- "coveralls": "^3.1.0",
58
51
  "cross-env": "^7.0.3",
59
- "eslint": "^8.33.0",
60
- "husky": "^8.0.2",
61
- "jest": "^27.5.1",
62
- "semantic-release": "^19.0.5",
63
- "ts-jest": "^27.1.4",
64
- "typescript": "^4.9.5"
65
- },
66
- "config": {
67
- "commitizen": {
68
- "path": "@commitlint/cz-commitlint"
69
- }
52
+ "eslint": "^8.53.0",
53
+ "husky": "^8.0.3",
54
+ "jest": "^29.7.0",
55
+ "semantic-release": "^22.0.7",
56
+ "ts-jest": "^29.1.1",
57
+ "typescript": "^5.2.2"
70
58
  }
71
59
  }
package/release.config.js CHANGED
@@ -1,10 +1,3 @@
1
1
  module.exports = {
2
- "plugins": [
3
- "@semantic-release/commit-analyzer",
4
- "@semantic-release/release-notes-generator",
5
- "@semantic-release/changelog",
6
- "@semantic-release/npm",
7
- "@semantic-release/git",
8
- "@semantic-release/github"
9
- ]
2
+ "extends": "@tada5hi/semantic-release"
10
3
  }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": ["./tsconfig.json"],
3
+ "include": [
4
+ "src/**/*.ts",
5
+ "release.config.js",
6
+ "commitlint.config.js"
7
+ ],
8
+ "exclude": [
9
+ "node_modules/**/*"
10
+ ]
11
+ }