worker-timers 7.0.40 → 7.0.44

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 Christoph Guttandin
3
+ Copyright (c) 2022 Christoph Guttandin
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -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\",(({data:i})=>{try{if(\"clear\"===i.method){const{id:r,params:{timerId:o,timerType:s}}=i;if(\"interval\"===s)(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\"!==s)throw new Error('The given type \"'.concat(s,'\" 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\"!==i.method)throw new Error('The given method \"'.concat(i.method,'\" is not supported'));{const{params:{delay:s,now:n,timerId:a,timerType:d}}=i;if(\"interval\"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,\"interval\"))})(s,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\"))})(s,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:i.id,result:null})}}))})();";
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,s8CAAs6C,CAAC"}
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",(({data:i})=>{try{if("clear"===i.method){const{id:r,params:{timerId:o,timerType:s}}=i;if("interval"===s)(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"!==s)throw new Error('The given type "'.concat(s,'" 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"!==i.method)throw new Error('The given method "'.concat(i.method,'" is not supported'));{const{params:{delay:s,now:n,timerId:a,timerType:d}}=i;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(s,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"))})(s,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:i.id,result:null})}}))})();`; // tslint:disable-line:max-line-length
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,m6CAAm6C,CAAC,CAAC,sCAAsC"}
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/package.json CHANGED
@@ -15,57 +15,56 @@
15
15
  }
16
16
  ],
17
17
  "dependencies": {
18
- "@babel/runtime": "^7.15.4",
18
+ "@babel/runtime": "^7.16.7",
19
19
  "tslib": "^2.3.1",
20
- "worker-timers-broker": "^6.0.61",
21
- "worker-timers-worker": "^7.0.28"
20
+ "worker-timers-broker": "^6.0.65",
21
+ "worker-timers-worker": "^7.0.32"
22
22
  },
23
23
  "description": "A replacement for setInterval() and setTimeout() which works in unfocused windows.",
24
24
  "devDependencies": {
25
- "@babel/core": "^7.15.5",
26
- "@babel/plugin-external-helpers": "^7.14.5",
27
- "@babel/plugin-transform-runtime": "^7.15.0",
28
- "@babel/preset-env": "^7.15.6",
29
- "@commitlint/cli": "^13.1.0",
30
- "@commitlint/config-angular": "^13.1.0",
25
+ "@babel/core": "^7.16.7",
26
+ "@babel/plugin-external-helpers": "^7.16.7",
27
+ "@babel/plugin-transform-runtime": "^7.16.7",
28
+ "@babel/preset-env": "^7.16.7",
29
+ "@commitlint/cli": "^16.0.1",
30
+ "@commitlint/config-angular": "^16.0.0",
31
31
  "@rollup/plugin-babel": "^5.3.0",
32
- "@rollup/plugin-replace": "^3.0.0",
33
- "babel-loader": "^8.2.2",
32
+ "@rollup/plugin-replace": "^3.0.1",
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.9",
38
+ "eslint-config-holy-grail": "^50.1.23",
39
39
  "grunt": "^1.4.1",
40
40
  "grunt-cli": "^1.4.3",
41
41
  "grunt-contrib-clean": "^2.0.0",
42
- "grunt-replace": "^2.0.2",
43
42
  "grunt-sh": "^0.2.0",
44
- "grunt-webpack": "^4.0.3",
45
- "husky": "^7.0.2",
46
- "karma": "^6.3.4",
43
+ "husky": "^7.0.4",
44
+ "karma": "^6.3.9",
47
45
  "karma-chrome-launcher": "^3.1.0",
48
- "karma-firefox-launcher": "^2.1.1",
46
+ "karma-firefox-launcher": "^2.1.2",
49
47
  "karma-mocha": "^2.0.1",
50
48
  "karma-safari-launcher": "^1.0.0",
51
49
  "karma-sauce-launcher": "^4.3.6",
52
50
  "karma-sinon-chai": "^2.0.2",
53
51
  "karma-webpack": "^5.0.0",
54
52
  "load-grunt-config": "^4.0.1",
55
- "memfs": "^3.3.0",
56
- "mocha": "^9.1.1",
57
- "prettier": "^2.4.1",
58
- "pretty-quick": "^3.1.1",
59
- "rollup": "^2.57.0",
53
+ "memfs": "^3.4.1",
54
+ "mocha": "^9.1.3",
55
+ "prettier": "^2.5.1",
56
+ "pretty-quick": "^3.1.3",
57
+ "rollup": "^2.62.0",
60
58
  "sinon": "^11.1.2",
61
59
  "sinon-chai": "^3.7.0",
62
- "terser-webpack-plugin": "^5.2.4",
60
+ "terser-webpack-plugin": "^5.3.0",
63
61
  "ts-loader": "^9.2.6",
64
- "tsconfig-holy-grail": "^11.1.13",
62
+ "tsconfig-holy-grail": "^11.1.22",
65
63
  "tslint": "^6.1.3",
66
- "tslint-config-holy-grail": "^53.2.25",
67
- "typescript": "^4.4.3",
68
- "webpack": "^5.53.0"
64
+ "tslint-config-holy-grail": "^53.2.26",
65
+ "typescript": "^4.5.4",
66
+ "webpack": "^5.65.0",
67
+ "webpack-cli": "^4.9.1"
69
68
  },
70
69
  "files": [
71
70
  "build/es2019/",
@@ -96,5 +95,5 @@
96
95
  "test": "grunt lint && grunt test"
97
96
  },
98
97
  "types": "build/es2019/module.d.ts",
99
- "version": "7.0.40"
98
+ "version": "7.0.44"
100
99
  }
@@ -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",(({data:i})=>{try{if("clear"===i.method){const{id:r,params:{timerId:o,timerType:s}}=i;if("interval"===s)(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"!==s)throw new Error('The given type "'.concat(s,'" 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"!==i.method)throw new Error('The given method "'.concat(i.method,'" is not supported'));{const{params:{delay:s,now:n,timerId:a,timerType:d}}=i;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(s,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"))})(s,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:i.id,result:null})}}))})();`; // tslint:disable-line:max-line-length
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