worldstate-emitter 2.1.1 → 2.1.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.
@@ -0,0 +1 @@
1
+ npx --no -- commitlint --edit $1
@@ -0,0 +1 @@
1
+ npx lint-staged
@@ -30,7 +30,7 @@ export default class Worldstate {
30
30
  constructor(eventEmitter, locale) {
31
31
  this.#emitter = eventEmitter;
32
32
  this.#locale = locale;
33
- logger.silly('starting up worldstate listener...');
33
+ logger.debug('starting up worldstate listener...');
34
34
  if (locale) {
35
35
  logger.debug(`only listening for ${locale}...`);
36
36
  }
@@ -134,7 +134,7 @@ export default class Worldstate {
134
134
  emit(id, packet) {
135
135
  if (debugEvents.includes(packet.key)) logger.warn(packet.key);
136
136
 
137
- logger.silly(`ws:update:event - emitting ${packet.id}`);
137
+ logger.debug(`ws:update:event - emitting ${packet.id}`);
138
138
  delete packet.cycleStart;
139
139
  this.#emitter.emit(id, packet);
140
140
  }
@@ -146,7 +146,7 @@ export default class Worldstate {
146
146
  * @throws {Error} when the platform or locale aren't tracked and aren't updated
147
147
  */
148
148
  get(language = 'en') {
149
- logger.warn(`getting worldstate ${language}...`);
149
+ logger.debug(`getting worldstate ${language}...`);
150
150
  if (this.#worldStates?.[language]) {
151
151
  return this.#worldStates?.[language]?.data;
152
152
  }
package/package.json CHANGED
@@ -1,98 +1,68 @@
1
1
  {
2
2
  "name": "worldstate-emitter",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "Event emitter for worldstate & other warframe events",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "c8 mocha",
8
- "lint": "eslint .",
9
- "lint:fix": "eslint . --fix",
10
- "coverage": "npm test && npm run report | coveralls",
11
- "build:docs": "jsdoc -c jsdoc-config.json -d docs",
12
- "dev": "nodemon test/tester.js",
13
- "postinstall": "install-peerdeps @wfcd/eslint-config@latest -S",
14
- "report": "c8 report --reporter=text-lcov",
15
- "validate": "npm ls"
16
- },
17
- "directories": {
18
- "test": "test/specs"
19
- },
20
- "repository": {
21
- "type": "git",
22
- "url": "git+https://github.com/wfcd/worldstate-emitter.git"
23
- },
24
5
  "keywords": [
25
6
  "warframe",
26
7
  "worldstate",
27
8
  "event",
28
9
  "emitter"
29
10
  ],
30
- "author": "tobiah <tobiah@protonmail.com>",
31
- "license": "Apache-2.0",
11
+ "homepage": "https://wfcd.github.io/worldstate-emitter/",
32
12
  "bugs": {
33
13
  "url": "https://github.com/wfcd/worldstate-emitter/issues"
34
14
  },
35
- "homepage": "https://wfcd.github.io/worldstate-emitter/",
36
- "dependencies": {
37
- "cron": "^3.1.6",
38
- "rss-feed-emitter": "^3.2.2",
39
- "twitter": "^1.7.1"
40
- },
41
- "devDependencies": {
42
- "@wfcd/eslint-config": "latest",
43
- "c8": "^9.1.0",
44
- "chai": "^4.3.4",
45
- "coveralls": "^3.1.0",
46
- "install-peerdeps": "^3.0.3",
47
- "mocha": "^10.0.0",
48
- "nodemon": "^3.0.3"
49
- },
50
- "peerDependencies": {
51
- "warframe-worldstate-data": "^2.x",
52
- "warframe-worldstate-parser": "^3.x"
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/wfcd/worldstate-emitter.git"
53
18
  },
54
- "optionalDependencies": {
55
- "colors": "^1.4.0",
56
- "winston": "^3.3.3"
19
+ "license": "Apache-2.0",
20
+ "author": "tobiah <tobiah@protonmail.com>",
21
+ "type": "module",
22
+ "main": "index.js",
23
+ "directories": {
24
+ "test": "test/specs"
57
25
  },
58
- "engines": {
59
- "node": ">= 18.19.0"
26
+ "scripts": {
27
+ "build:docs": "jsdoc -c jsdoc-config.json -d docs",
28
+ "coverage": "npm test && npm run report | coveralls",
29
+ "dev": "nodemon test/tester.js",
30
+ "lint": "eslint .",
31
+ "lint:fix": "eslint . --fix",
32
+ "prepare": "husky && install-peerdeps @wfcd/eslint-config@latest -S",
33
+ "report": "c8 report --reporter=text-lcov",
34
+ "test": "c8 mocha",
35
+ "validate": "npm ls"
60
36
  },
61
- "eslintIgnore": [
62
- ".github/**",
63
- "docs/**",
64
- "resources/**",
65
- "types/**"
37
+ "pre-commit": [
38
+ "lint",
39
+ "test",
40
+ "validate"
66
41
  ],
67
- "eslintConfig": {
68
- "extends": "@wfcd/eslint-config/esm",
69
- "parser": "@babel/eslint-parser",
70
- "parserOptions": {
71
- "sourceType": "module",
72
- "ecmaVersion": 6,
73
- "ecmaFeatures": {
74
- "modules": true
75
- }
76
- },
42
+ "commitlint": {
43
+ "extends": [
44
+ "@commitlint/config-conventional"
45
+ ],
77
46
  "rules": {
78
- "no-underscore-dangle": "off"
47
+ "body-max-line-length": [
48
+ 0
49
+ ]
79
50
  }
80
51
  },
81
- "babel": {
82
- "presets": [
83
- "@babel/preset-env"
52
+ "lint-staged": {
53
+ "*.js": [
54
+ "eslint --cache --fix",
55
+ "npm test"
84
56
  ],
85
- "plugins": [
86
- "@babel/plugin-transform-class-properties",
87
- "@babel/plugin-transform-private-methods"
57
+ "package*.json": [
58
+ "prettier --write",
59
+ "npm dedupe",
60
+ "npx sort-package-json"
61
+ ],
62
+ "*.{json,yml,yaml}": [
63
+ "prettier --write"
88
64
  ]
89
65
  },
90
- "pre-commit": [
91
- "lint",
92
- "test",
93
- "validate"
94
- ],
95
- "prettier": "@wfcd/eslint-config/prettier",
96
66
  "nodemonConfig": {
97
67
  "delay": 5000,
98
68
  "env": {
@@ -101,10 +71,40 @@
101
71
  "SEMLAR_TIMEOUT": 300000
102
72
  }
103
73
  },
74
+ "babel": {
75
+ "plugins": [
76
+ "@babel/plugin-transform-class-properties",
77
+ "@babel/plugin-transform-private-methods"
78
+ ],
79
+ "presets": [
80
+ "@babel/preset-env"
81
+ ]
82
+ },
83
+ "prettier": "@wfcd/eslint-config/prettier",
84
+ "eslintConfig": {
85
+ "parser": "@babel/eslint-parser",
86
+ "parserOptions": {
87
+ "ecmaFeatures": {
88
+ "modules": true
89
+ },
90
+ "ecmaVersion": 6,
91
+ "sourceType": "module"
92
+ },
93
+ "extends": "@wfcd/eslint-config/esm",
94
+ "rules": {
95
+ "no-underscore-dangle": "off"
96
+ }
97
+ },
98
+ "eslintIgnore": [
99
+ ".github/**",
100
+ "docs/**",
101
+ "resources/**",
102
+ "types/**"
103
+ ],
104
104
  "mocha": {
105
- "timeout": 20000,
106
105
  "exit": true,
107
- "spec": "test/specs/**/*.spec.js"
106
+ "spec": "test/specs/**/*.spec.js",
107
+ "timeout": 20000
108
108
  },
109
109
  "c8": {
110
110
  "reporter": [
@@ -113,5 +113,34 @@
113
113
  ],
114
114
  "skip-full": true
115
115
  },
116
- "type": "module"
116
+ "dependencies": {
117
+ "cron": "^3.1.6",
118
+ "rss-feed-emitter": "^3.2.2",
119
+ "twitter": "^1.7.1"
120
+ },
121
+ "devDependencies": {
122
+ "@commitlint/cli": "^19.2.1",
123
+ "@commitlint/config-conventional": "^19.1.0",
124
+ "@wfcd/eslint-config": "latest",
125
+ "c8": "^9.1.0",
126
+ "chai": "^4.3.4",
127
+ "coveralls": "^3.1.0",
128
+ "husky": "^9.0.11",
129
+ "install-peerdeps": "^3.0.3",
130
+ "lint-staged": "^15.2.2",
131
+ "mocha": "^10.0.0",
132
+ "nodemon": "^3.0.3",
133
+ "prettier": "^3.2.5"
134
+ },
135
+ "peerDependencies": {
136
+ "warframe-worldstate-data": "^2.x",
137
+ "warframe-worldstate-parser": "^3.x"
138
+ },
139
+ "optionalDependencies": {
140
+ "colors": "^1.4.0",
141
+ "winston": "^3.3.3"
142
+ },
143
+ "engines": {
144
+ "node": ">= 18.19.0"
145
+ }
117
146
  }