@anmiles/queue 2.0.1 → 3.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/.eslintrc.js +0 -5
- package/CHANGELOG.md +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/queue.d.ts +1 -0
- package/dist/lib/queue.d.ts.map +1 -0
- package/dist/lib/queue.js +4 -0
- package/dist/lib/queue.js.map +1 -1
- package/jest.config.js +6 -4
- package/package.json +13 -12
- package/src/lib/queue.ts +1 -0
- package/tsconfig.build.json +7 -0
- package/tsconfig.json +5 -19
package/.eslintrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.0.0](../../tags/v3.0.0) - 2024-01-16
|
|
9
|
+
### Changed
|
|
10
|
+
- Update project configurations
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
8
13
|
## [2.0.1](../../tags/v2.0.1) - 2023-11-12
|
|
9
14
|
### Changed
|
|
10
15
|
- Update dependencies
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/lib/queue.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/lib/queue.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,KAAK,SAAS,CAAC,CAAC,IAAI;IACnB,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,EAAE,MAAM,IAAI,CAAC;CACjB,CAAA;AAED,MAAM,CAAC,OAAO,OAAO,KAAK,CAAC,KAAK,CAAE,SAAQ,QAAQ,CAAC;KAAE,MAAM,IAAI,MAAM,SAAS,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAAC,CAAC;IAChI,OAAO,CAAC,IAAI,CAAU;IACtB,OAAO,CAAC,IAAI,CAAU;IACtB,OAAO,CAAC,QAAQ,CAAS;gBAEb,IAAI,GAAE,KAAK,EAAO,EAAE,EAAE,QAAY,EAAE,GAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO;IAO5E,OAAO,CAAC,GAAG,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;IAUlC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAa9B,KAAK,IAAI,MAAM;CAGf"}
|
package/dist/lib/queue.js
CHANGED
|
@@ -5,8 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const emittery_1 = __importDefault(require("emittery"));
|
|
7
7
|
class Queue extends emittery_1.default {
|
|
8
|
+
done;
|
|
9
|
+
data;
|
|
10
|
+
interval;
|
|
8
11
|
constructor(data = [], { interval = 0 } = {}) {
|
|
9
12
|
super();
|
|
13
|
+
this.done = false;
|
|
10
14
|
this.data = data;
|
|
11
15
|
this.interval = interval;
|
|
12
16
|
}
|
package/dist/lib/queue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../src/lib/queue.ts"],"names":[],"mappings":";;;;;AAAA,wDAAgC;AAOhC,MAAqB,KAAa,SAAQ,kBAAuF;
|
|
1
|
+
{"version":3,"file":"queue.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KAAK;QACJ,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IACzB,CAAC;CACD;AAtCD,wBAsCC"}
|
package/jest.config.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
preset
|
|
2
|
+
preset : 'ts-jest',
|
|
3
|
+
transform : {
|
|
4
|
+
'^.+\\.tsx?$' : 'ts-jest',
|
|
5
|
+
},
|
|
6
|
+
|
|
3
7
|
clearMocks : true,
|
|
4
8
|
|
|
5
9
|
roots : [ '<rootDir>/src' ],
|
|
6
10
|
testMatch : [ '<rootDir>/src/**/__tests__/*.test.ts' ],
|
|
7
|
-
|
|
8
|
-
'^.+\\.ts$' : 'ts-jest',
|
|
9
|
-
},
|
|
11
|
+
|
|
10
12
|
collectCoverageFrom : [
|
|
11
13
|
'<rootDir>/src/**/*.ts',
|
|
12
14
|
'!<rootDir>/src/**/*.d.ts',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anmiles/queue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Queue dispatcher that sequentially processes incoming items",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"queue",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"main": "dist/index.js",
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "rimraf dist && tsc",
|
|
20
|
-
"lint": "eslint --ext .js,.ts .",
|
|
19
|
+
"build": "rimraf dist && tsc -p ./tsconfig.build.json",
|
|
20
|
+
"lint": "eslint --ext .js,.ts --ignore-path .gitignore .",
|
|
21
21
|
"lint:fix": "npm run lint -- --fix",
|
|
22
22
|
"test": "jest --verbose",
|
|
23
23
|
"test:coverage": "npm test -- --coverage",
|
|
@@ -30,19 +30,20 @@
|
|
|
30
30
|
"emittery": "^0.13.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@anmiles/eslint-config": "^
|
|
34
|
-
"@anmiles/sleep": "^
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@typescript-eslint/
|
|
38
|
-
"eslint": "^
|
|
33
|
+
"@anmiles/eslint-config": "^5.0.0",
|
|
34
|
+
"@anmiles/sleep": "^3.0.0",
|
|
35
|
+
"@anmiles/tsconfig": "^2.0.0",
|
|
36
|
+
"@types/jest": "^29.5.11",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
38
|
+
"@typescript-eslint/parser": "^6.19.0",
|
|
39
|
+
"eslint": "^8.56.0",
|
|
39
40
|
"eslint-plugin-align-assignments": "^1.1.2",
|
|
40
|
-
"eslint-plugin-import": "^2.29.
|
|
41
|
-
"eslint-plugin-jest": "^27.6.
|
|
41
|
+
"eslint-plugin-import": "^2.29.1",
|
|
42
|
+
"eslint-plugin-jest": "^27.6.3",
|
|
42
43
|
"jest": "^29.7.0",
|
|
43
44
|
"nyc": "^15.1.0",
|
|
44
45
|
"rimraf": "^5.0.5",
|
|
45
46
|
"ts-jest": "^29.1.1",
|
|
46
|
-
"typescript": "^5.
|
|
47
|
+
"typescript": "^5.3.3"
|
|
47
48
|
}
|
|
48
49
|
}
|
package/src/lib/queue.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"module": "CommonJS",
|
|
4
|
-
"target": "ES2019",
|
|
5
|
-
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"resolveJsonModule": true,
|
|
2
|
+
"extends": "./node_modules/@anmiles/tsconfig/tsconfig.json",
|
|
8
3
|
|
|
4
|
+
"compilerOptions": {
|
|
9
5
|
"rootDir": "./src",
|
|
10
6
|
"outDir": "./dist",
|
|
11
|
-
|
|
12
|
-
"allowJs": false,
|
|
13
|
-
"sourceMap": true,
|
|
14
|
-
"declaration": true,
|
|
15
|
-
"noImplicitAny": true,
|
|
16
|
-
"esModuleInterop": true,
|
|
17
|
-
"strictNullChecks": true,
|
|
18
|
-
"allowSyntheticDefaultImports": true,
|
|
19
7
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"coverage/",
|
|
24
|
-
"dist/",
|
|
8
|
+
|
|
9
|
+
"include": [
|
|
10
|
+
"src",
|
|
25
11
|
],
|
|
26
12
|
}
|