ko-co 1.5.2 → 2.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/CHANGELOG.md +10 -0
- package/LICENSE.txt +1 -1
- package/README.md +2 -2
- package/ko-co.cjs +1 -1
- package/ko-co.js +1 -1
- package/package.json +12 -24
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## 2.0.0 - 2026-12-06
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- The CommonJS version is no longer using the Universal Module Definition (UMD), dropping support for AMD loading and the `window.koco` browser global.
|
|
10
|
+
|
|
11
|
+
### Removed
|
|
12
|
+
|
|
13
|
+
- Removed support for ES5 environments; the library now targets `ES2015`.
|
|
14
|
+
|
|
5
15
|
## 1.5.2 - 2024-05-26
|
|
6
16
|
|
|
7
17
|
The package repository has moved and it's now reflected in the package metadata; this version contains no functionality changes.
|
package/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017 -
|
|
3
|
+
Copyright (c) 2017 - 2026 Luke Phillips
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ npm install ko-co
|
|
|
92
92
|
|
|
93
93
|
### Building
|
|
94
94
|
|
|
95
|
-
You can
|
|
95
|
+
You can use esbuild to generate minified CommonJS and ESM bundles:
|
|
96
96
|
|
|
97
97
|
``` sh
|
|
98
98
|
npm run build
|
|
@@ -106,7 +106,7 @@ This module also has a robust test suite:
|
|
|
106
106
|
npm test
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
This includes a code quality
|
|
109
|
+
This includes a code quality powered by Oxlint.
|
|
110
110
|
|
|
111
111
|
## License
|
|
112
112
|
|
package/ko-co.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var d=(o,e)=>{for(var r in e)a(o,r,{get:e[r],enumerable:!0})},l=(o,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of E(e))!f.call(o,t)&&t!==r&&a(o,t,{get:()=>e[t],enumerable:!(n=s(e,t))||n.enumerable});return o};var w=o=>l(a({},"__esModule",{value:!0}),o);var p={};d(p,{addSupportForTheKonamiCode:()=>v});module.exports=w(p);var c=["arrowup","arrowup","arrowdown","arrowdown","arrowleft","arrowright","arrowleft","arrowright","b","a"],m=[...c,"enter"];function C(o,e,r={}){let n,t=!0,u=!0;typeof window.CustomEvent=="function"?n=new window.CustomEvent(e,{detail:r,bubbles:t,cancelable:u}):(n=document.createEvent("CustomEvent"),n.initCustomEvent(e,t,u,r)),o.dispatchEvent(n)}function v({requireEnterPress:o=!1,allowedTimeBetweenKeys:e=0}={}){let r=c,n=null,t=0;o&&(r=m);function u(i){if(n&&clearTimeout(n),r[t]!==i.key.toLowerCase()){n=null,t=0;return}if(++t,r.length===t){n=null,t=0,C(i.target,"konamicode",{});return}e>0&&(n=setTimeout(function(){n=null,t=0},e))}return document.addEventListener("keydown",u,!0),function(){document.removeEventListener("keydown",u,!0)}}
|
package/ko-co.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a=["arrowup","arrowup","arrowdown","arrowdown","arrowleft","arrowright","arrowleft","arrowright","b","a"],c=[...a,"enter"];function s(u,o,n={}){let e,t=!0,r=!0;typeof window.CustomEvent=="function"?e=new window.CustomEvent(o,{detail:n,bubbles:t,cancelable:r}):(e=document.createEvent("CustomEvent"),e.initCustomEvent(o,t,r,n)),u.dispatchEvent(e)}function f({requireEnterPress:u=!1,allowedTimeBetweenKeys:o=0}={}){let n=a,e=null,t=0;u&&(n=c);function r(i){if(e&&clearTimeout(e),n[t]!==i.key.toLowerCase()){e=null,t=0;return}if(++t,n.length===t){e=null,t=0,s(i.target,"konamicode",{});return}o>0&&(e=setTimeout(function(){e=null,t=0},o))}return document.addEventListener("keydown",r,!0),function(){document.removeEventListener("keydown",r,!0)}}export{f as addSupportForTheKonamiCode};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name" : "ko-co",
|
|
3
3
|
|
|
4
|
-
"version" : "
|
|
4
|
+
"version" : "2.0.0",
|
|
5
5
|
|
|
6
6
|
"type" : "module",
|
|
7
7
|
|
|
@@ -29,26 +29,9 @@
|
|
|
29
29
|
|
|
30
30
|
"devDependencies" :
|
|
31
31
|
{
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"@rollup/plugin-commonjs" : "25.0.7",
|
|
36
|
-
"@rollup/plugin-babel" : "6.0.4",
|
|
37
|
-
"mocha" : "10.4.0",
|
|
38
|
-
"sinon" : "18.0.0",
|
|
39
|
-
"eslint" : "8.57.0",
|
|
40
|
-
"eslint-plugin-import" : "2.29.1",
|
|
41
|
-
"eslint-plugin-promise" : "6.1.1",
|
|
42
|
-
"@stylistic/eslint-plugin-js" : "1.8.1",
|
|
43
|
-
"eslint-config-protect-me-from-my-stupidity" : "10.1.0",
|
|
44
|
-
"karma" : "6.4.3",
|
|
45
|
-
"karma-mocha" : "2.0.1",
|
|
46
|
-
"karma-spec-reporter" : "0.0.36",
|
|
47
|
-
"karma-rollup-preprocessor" : "7.0.8",
|
|
48
|
-
"karma-chrome-launcher" : "3.2.0",
|
|
49
|
-
"@babel/core" : "7.24.5",
|
|
50
|
-
"@babel/preset-env" : "7.24.5",
|
|
51
|
-
"timeout-as-promise" : "1.0.0"
|
|
32
|
+
"oxlint" : "1.96.0",
|
|
33
|
+
"esbuild" : "0.28.2",
|
|
34
|
+
"jsdom" : "31.0.1"
|
|
52
35
|
},
|
|
53
36
|
|
|
54
37
|
"main" : "ko-co.cjs",
|
|
@@ -78,13 +61,18 @@
|
|
|
78
61
|
|
|
79
62
|
"scripts" :
|
|
80
63
|
{
|
|
81
|
-
"test:lint" : "
|
|
82
|
-
"test:unit" : "
|
|
64
|
+
"test:lint" : "oxlint --deny-warnings",
|
|
65
|
+
"test:unit" : "node --test",
|
|
83
66
|
"test" : "npm run test:lint && npm run test:unit",
|
|
84
|
-
"build" : "
|
|
67
|
+
"build" : "node build.js",
|
|
85
68
|
"prepack" : "npm run test && npm run build"
|
|
86
69
|
},
|
|
87
70
|
|
|
71
|
+
"allowScripts" :
|
|
72
|
+
{
|
|
73
|
+
"esbuild" : true
|
|
74
|
+
},
|
|
75
|
+
|
|
88
76
|
"license" : "MIT",
|
|
89
77
|
|
|
90
78
|
"types" : "ko-co.d.ts"
|