worker-timers 7.0.38 → 7.0.42
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const worker = "(()=>{\"use strict\";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:\"call\",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener(\"message\",(
|
|
1
|
+
export declare const worker = "(()=>{\"use strict\";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:\"call\",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener(\"message\",(i=>{let{data:s}=i;try{if(\"clear\"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if(\"interval\"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id \"'.concat(t,'\".'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if(\"timeout\"!==i)throw new Error('The given type \"'.concat(i,'\" is not supported'));(e=>{const r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id \"'.concat(e,'\".'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if(\"set\"!==s.method)throw new Error('The given method \"'.concat(s.method,'\" is not supported'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if(\"interval\"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,\"interval\"))})(i,a,n);else{if(\"timeout\"!==d)throw new Error('The given type \"'.concat(d,'\" is not supported'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,\"timeout\"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();";
|
|
2
2
|
//# sourceMappingURL=worker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../src/worker/worker.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../src/worker/worker.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,28CAA26C,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This is the minified and stringified code of the worker-timers-worker package.
|
|
2
|
-
export const worker = `(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(
|
|
2
|
+
export const worker = `(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if("interval"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id "'.concat(t,'".'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if("timeout"!==i)throw new Error('The given type "'.concat(i,'" is not supported'));(e=>{const r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id "'.concat(e,'".'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if("set"!==s.method)throw new Error('The given method "'.concat(s.method,'" is not supported'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);else{if("timeout"!==d)throw new Error('The given type "'.concat(d,'" is not supported'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();`; // tslint:disable-line:max-line-length
|
|
3
3
|
//# sourceMappingURL=worker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../src/worker/worker.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../src/worker/worker.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,MAAM,GAAG,w6CAAw6C,CAAC,CAAC,sCAAsC"}
|
package/build/es5/bundle.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('worker-timers-broker')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', 'worker-timers-broker'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.workerTimers = {}, global.workerTimersBroker));
|
|
5
|
-
}(this, (function (exports, workerTimersBroker) { 'use strict';
|
|
5
|
+
})(this, (function (exports, workerTimersBroker) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var workerTimers = null;
|
|
8
8
|
var createLoadWorkerTimers = function createLoadWorkerTimers(load, worker) {
|
|
@@ -48,4 +48,4 @@
|
|
|
48
48
|
|
|
49
49
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
50
|
|
|
51
|
-
}))
|
|
51
|
+
}));
|
package/package.json
CHANGED
|
@@ -15,57 +15,57 @@
|
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@babel/runtime": "^7.
|
|
18
|
+
"@babel/runtime": "^7.16.3",
|
|
19
19
|
"tslib": "^2.3.1",
|
|
20
|
-
"worker-timers-broker": "^6.0.
|
|
21
|
-
"worker-timers-worker": "^7.0.
|
|
20
|
+
"worker-timers-broker": "^6.0.63",
|
|
21
|
+
"worker-timers-worker": "^7.0.30"
|
|
22
22
|
},
|
|
23
23
|
"description": "A replacement for setInterval() and setTimeout() which works in unfocused windows.",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@babel/core": "^7.
|
|
26
|
-
"@babel/plugin-external-helpers": "^7.
|
|
27
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
28
|
-
"@babel/preset-env": "^7.
|
|
29
|
-
"@commitlint/cli": "^
|
|
30
|
-
"@commitlint/config-angular": "^
|
|
25
|
+
"@babel/core": "^7.16.0",
|
|
26
|
+
"@babel/plugin-external-helpers": "^7.16.0",
|
|
27
|
+
"@babel/plugin-transform-runtime": "^7.16.0",
|
|
28
|
+
"@babel/preset-env": "^7.16.0",
|
|
29
|
+
"@commitlint/cli": "^14.1.0",
|
|
30
|
+
"@commitlint/config-angular": "^14.1.0",
|
|
31
31
|
"@rollup/plugin-babel": "^5.3.0",
|
|
32
32
|
"@rollup/plugin-replace": "^3.0.0",
|
|
33
|
-
"babel-loader": "^8.2.
|
|
33
|
+
"babel-loader": "^8.2.3",
|
|
34
34
|
"chai": "^4.3.4",
|
|
35
35
|
"commitizen": "^4.2.4",
|
|
36
36
|
"cz-conventional-changelog": "^3.3.0",
|
|
37
37
|
"eslint": "^7.32.0",
|
|
38
|
-
"eslint-config-holy-grail": "^50.1.
|
|
38
|
+
"eslint-config-holy-grail": "^50.1.18",
|
|
39
39
|
"grunt": "^1.4.1",
|
|
40
40
|
"grunt-cli": "^1.4.3",
|
|
41
41
|
"grunt-contrib-clean": "^2.0.0",
|
|
42
42
|
"grunt-replace": "^2.0.2",
|
|
43
43
|
"grunt-sh": "^0.2.0",
|
|
44
|
-
"grunt-webpack": "^
|
|
45
|
-
"husky": "^7.0.
|
|
46
|
-
"karma": "^6.3.
|
|
44
|
+
"grunt-webpack": "^5.0.0",
|
|
45
|
+
"husky": "^7.0.4",
|
|
46
|
+
"karma": "^6.3.8",
|
|
47
47
|
"karma-chrome-launcher": "^3.1.0",
|
|
48
|
-
"karma-firefox-launcher": "^2.1.
|
|
48
|
+
"karma-firefox-launcher": "^2.1.2",
|
|
49
49
|
"karma-mocha": "^2.0.1",
|
|
50
50
|
"karma-safari-launcher": "^1.0.0",
|
|
51
51
|
"karma-sauce-launcher": "^4.3.6",
|
|
52
52
|
"karma-sinon-chai": "^2.0.2",
|
|
53
53
|
"karma-webpack": "^5.0.0",
|
|
54
54
|
"load-grunt-config": "^4.0.1",
|
|
55
|
-
"memfs": "^3.
|
|
56
|
-
"mocha": "^9.1.
|
|
57
|
-
"prettier": "^2.
|
|
55
|
+
"memfs": "^3.3.0",
|
|
56
|
+
"mocha": "^9.1.3",
|
|
57
|
+
"prettier": "^2.4.1",
|
|
58
58
|
"pretty-quick": "^3.1.1",
|
|
59
|
-
"rollup": "^2.
|
|
59
|
+
"rollup": "^2.60.0",
|
|
60
60
|
"sinon": "^11.1.2",
|
|
61
61
|
"sinon-chai": "^3.7.0",
|
|
62
|
-
"terser-webpack-plugin": "^5.2.
|
|
63
|
-
"ts-loader": "^9.2.
|
|
64
|
-
"tsconfig-holy-grail": "^11.1.
|
|
62
|
+
"terser-webpack-plugin": "^5.2.5",
|
|
63
|
+
"ts-loader": "^9.2.6",
|
|
64
|
+
"tsconfig-holy-grail": "^11.1.19",
|
|
65
65
|
"tslint": "^6.1.3",
|
|
66
66
|
"tslint-config-holy-grail": "^53.2.25",
|
|
67
|
-
"typescript": "^4.4.
|
|
68
|
-
"webpack": "^5.
|
|
67
|
+
"typescript": "^4.4.4",
|
|
68
|
+
"webpack": "^5.64.0"
|
|
69
69
|
},
|
|
70
70
|
"files": [
|
|
71
71
|
"build/es2019/",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"test": "grunt lint && grunt test"
|
|
97
97
|
},
|
|
98
98
|
"types": "build/es2019/module.d.ts",
|
|
99
|
-
"version": "7.0.
|
|
99
|
+
"version": "7.0.42"
|
|
100
100
|
}
|
package/src/worker/worker.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This is the minified and stringified code of the worker-timers-worker package.
|
|
2
|
-
export const worker = `(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(
|
|
2
|
+
export const worker = `(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if("interval"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id "'.concat(t,'".'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if("timeout"!==i)throw new Error('The given type "'.concat(i,'" is not supported'));(e=>{const r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id "'.concat(e,'".'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if("set"!==s.method)throw new Error('The given method "'.concat(s.method,'" is not supported'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);else{if("timeout"!==d)throw new Error('The given type "'.concat(d,'" is not supported'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();`; // tslint:disable-line:max-line-length
|