worldstate-emitter 2.1.0 → 2.1.2

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
package/handlers/RSS.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import RssFeedEmitter from 'rss-feed-emitter';
2
- import feeds from '../resources/rssFeeds.json' assert { type: 'json' };
3
2
 
3
+ import feeds from '../resources/rssFeeds.json' assert { type: 'json' };
4
4
  import { logger } from '../utilities/index.js';
5
5
 
6
6
  /**
@@ -1,4 +1,5 @@
1
1
  import Twitter from 'twitter';
2
+
2
3
  import toWatch from '../resources/tweeters.json' assert { type: 'json' };
3
4
  import { logger } from '../utilities/index.js';
4
5
  import { twiClientInfo, TWITTER_TIMEOUT } from '../utilities/env.js';
@@ -1,9 +1,11 @@
1
1
  import wsData from 'warframe-worldstate-data';
2
+
2
3
  import WSCache from '../utilities/WSCache.js';
3
4
  import { logger, lastUpdated } from '../utilities/index.js';
4
- import parseNew from './events/parse.js';
5
5
  import Cache from '../utilities/Cache.js';
6
6
 
7
+ import parseNew from './events/parse.js';
8
+
7
9
  const { locales } = wsData;
8
10
 
9
11
  const debugEvents = ['arbitration', 'kuva', 'nightwave'];
@@ -1,6 +1,7 @@
1
+ import { logger } from '../../utilities/index.js';
2
+
1
3
  import checkOverrides from './checkOverrides.js';
2
4
  import objectLike from './objectLike.js';
3
- import { logger } from '../../utilities/index.js';
4
5
 
5
6
  /**
6
7
  * arrayLike are all just arrays of objectLike
@@ -1,4 +1,5 @@
1
1
  import { logger, groupBy } from '../../utilities/index.js';
2
+
2
3
  import objectLike from './objectLike.js';
3
4
 
4
5
  /**
@@ -1,3 +1,5 @@
1
+ import { lastUpdated } from '../../utilities/index.js';
2
+
1
3
  import checkOverrides from './checkOverrides.js';
2
4
  import kuvaProcessing from './kuva.js';
3
5
  import arrayLike from './arrayLike.js';
@@ -5,7 +7,6 @@ import objectLike from './objectLike.js';
5
7
  import nightwave from './nightwave.js';
6
8
  import cycleLike from './cycleLike.js';
7
9
  import * as eKeyOverrides from './eKeyOverrides.js';
8
- import { lastUpdated } from '../../utilities/index.js';
9
10
 
10
11
  /**
11
12
  * @typedef {Object} Deps
package/index.js CHANGED
@@ -3,7 +3,6 @@ import EventEmitter from 'node:events';
3
3
  import RSS from './handlers/RSS.js';
4
4
  import Worldstate from './handlers/Worldstate.js';
5
5
  import Twitter from './handlers/Twitter.js';
6
-
7
6
  import { logger } from './utilities/index.js';
8
7
 
9
8
  export default class WorldstateEmitter extends EventEmitter {
package/package.json CHANGED
@@ -1,98 +1,63 @@
1
1
  {
2
2
  "name": "worldstate-emitter",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
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@^1.3.3 -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": "^1.3.3",
43
- "c8": "^9.1.0",
44
- "chai": "^4.3.4",
45
- "coveralls": "^3.1.0",
46
- "install-peerdeps": "^2.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"
53
- },
54
- "optionalDependencies": {
55
- "colors": "^1.4.0",
56
- "winston": "^3.3.3"
57
- },
58
- "engines": {
59
- "node": ">= 18.19.0"
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/wfcd/worldstate-emitter.git"
60
18
  },
61
- "eslintIgnore": [
62
- ".github/**",
63
- "docs/**",
64
- "resources/**",
65
- "types/**"
66
- ],
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
- },
77
- "rules": {
78
- "no-underscore-dangle": "off"
79
- }
19
+ "license": "Apache-2.0",
20
+ "author": "tobiah <tobiah@protonmail.com>",
21
+ "type": "module",
22
+ "main": "index.js",
23
+ "directories": {
24
+ "test": "test/specs"
80
25
  },
81
- "babel": {
82
- "presets": [
83
- "@babel/preset-env"
84
- ],
85
- "plugins": [
86
- "@babel/plugin-transform-class-properties",
87
- "@babel/plugin-transform-private-methods"
88
- ]
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"
89
36
  },
90
37
  "pre-commit": [
91
38
  "lint",
92
39
  "test",
93
40
  "validate"
94
41
  ],
95
- "prettier": "@wfcd/eslint-config/prettier",
42
+ "commitlint": {
43
+ "extends": [
44
+ "@commitlint/config-conventional"
45
+ ]
46
+ },
47
+ "lint-staged": {
48
+ "*.js": [
49
+ "eslint --cache --fix",
50
+ "npm test"
51
+ ],
52
+ "package*.json": [
53
+ "prettier --write",
54
+ "npm dedupe",
55
+ "npx sort-package-json"
56
+ ],
57
+ "*.{json,yml,yaml}": [
58
+ "prettier --write"
59
+ ]
60
+ },
96
61
  "nodemonConfig": {
97
62
  "delay": 5000,
98
63
  "env": {
@@ -101,10 +66,40 @@
101
66
  "SEMLAR_TIMEOUT": 300000
102
67
  }
103
68
  },
69
+ "babel": {
70
+ "plugins": [
71
+ "@babel/plugin-transform-class-properties",
72
+ "@babel/plugin-transform-private-methods"
73
+ ],
74
+ "presets": [
75
+ "@babel/preset-env"
76
+ ]
77
+ },
78
+ "prettier": "@wfcd/eslint-config/prettier",
79
+ "eslintConfig": {
80
+ "parser": "@babel/eslint-parser",
81
+ "parserOptions": {
82
+ "ecmaFeatures": {
83
+ "modules": true
84
+ },
85
+ "ecmaVersion": 6,
86
+ "sourceType": "module"
87
+ },
88
+ "extends": "@wfcd/eslint-config/esm",
89
+ "rules": {
90
+ "no-underscore-dangle": "off"
91
+ }
92
+ },
93
+ "eslintIgnore": [
94
+ ".github/**",
95
+ "docs/**",
96
+ "resources/**",
97
+ "types/**"
98
+ ],
104
99
  "mocha": {
105
- "timeout": 20000,
106
100
  "exit": true,
107
- "spec": "test/specs/**/*.spec.js"
101
+ "spec": "test/specs/**/*.spec.js",
102
+ "timeout": 20000
108
103
  },
109
104
  "c8": {
110
105
  "reporter": [
@@ -113,5 +108,34 @@
113
108
  ],
114
109
  "skip-full": true
115
110
  },
116
- "type": "module"
111
+ "dependencies": {
112
+ "cron": "^3.1.6",
113
+ "rss-feed-emitter": "^3.2.2",
114
+ "twitter": "^1.7.1"
115
+ },
116
+ "devDependencies": {
117
+ "@commitlint/cli": "^19.2.1",
118
+ "@commitlint/config-conventional": "^19.1.0",
119
+ "@wfcd/eslint-config": "latest",
120
+ "c8": "^9.1.0",
121
+ "chai": "^4.3.4",
122
+ "coveralls": "^3.1.0",
123
+ "husky": "^9.0.11",
124
+ "install-peerdeps": "^3.0.3",
125
+ "lint-staged": "^15.2.2",
126
+ "mocha": "^10.0.0",
127
+ "nodemon": "^3.0.3",
128
+ "prettier": "^3.2.5"
129
+ },
130
+ "peerDependencies": {
131
+ "warframe-worldstate-data": "^2.x",
132
+ "warframe-worldstate-parser": "^3.x"
133
+ },
134
+ "optionalDependencies": {
135
+ "colors": "^1.4.0",
136
+ "winston": "^3.3.3"
137
+ },
138
+ "engines": {
139
+ "node": ">= 18.19.0"
140
+ }
117
141
  }
@@ -1,5 +1,7 @@
1
1
  import { EventEmitter } from 'node:events';
2
+
2
3
  import { CronJob } from 'cron';
4
+
3
5
  import { logger } from './index.js';
4
6
 
5
7
  export default class CronCache extends EventEmitter {
@@ -1,4 +1,5 @@
1
1
  import Worldstate from 'warframe-worldstate-parser';
2
+
2
3
  import { logger } from './index.js';
3
4
 
4
5
  /**
@@ -1,6 +1,7 @@
1
1
  import 'colors';
2
2
 
3
3
  import { transports, createLogger, format } from 'winston';
4
+
4
5
  import { LOG_LEVEL } from './env.js';
5
6
 
6
7
  let tempLogger;