svelte-command 1.1.37 → 1.1.38
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/package.json +11 -11
- package/src/command.mjs +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-command",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.38",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"prepare": "vite build",
|
|
25
25
|
"start": "vite",
|
|
26
26
|
"test": "npm run test:ava && npm run test:cafe",
|
|
27
|
-
"test:cafe": "testcafe $BROWSER:headless tests/cafe
|
|
27
|
+
"test:cafe": "testcafe --experimental-esm $BROWSER:headless tests/cafe/*.*js -s build/test --page-request-timeout 5000 --app-init-delay 8000 --app vite",
|
|
28
28
|
"test:ava": "ava --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs",
|
|
29
29
|
"docs": "documentation readme --section=API ./src/**/*.mjs",
|
|
30
30
|
"lint": "npm run lint:docs",
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
36
36
|
"@semantic-release/exec": "^6.0.3",
|
|
37
37
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
38
|
-
"@sveltejs/vite-plugin-svelte": "^2.0.
|
|
39
|
-
"ava": "^5.
|
|
38
|
+
"@sveltejs/vite-plugin-svelte": "^2.0.3",
|
|
39
|
+
"ava": "^5.2.0",
|
|
40
40
|
"documentation": "^14.0.1",
|
|
41
|
-
"mf-styling": "^1.7.
|
|
42
|
-
"npm-pkgbuild": "^11.
|
|
43
|
-
"semantic-release": "^20.1.
|
|
44
|
-
"svelte": "^3.
|
|
45
|
-
"testcafe": "^2.
|
|
46
|
-
"vite": "^4.
|
|
41
|
+
"mf-styling": "^1.7.49",
|
|
42
|
+
"npm-pkgbuild": "^11.5.18",
|
|
43
|
+
"semantic-release": "^20.1.3",
|
|
44
|
+
"svelte": "^3.57.0",
|
|
45
|
+
"testcafe": "^2.4.0",
|
|
46
|
+
"vite": "^4.2.1"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
49
|
"mf-hosting-cloudflare": "^1.0.5",
|
|
50
|
-
"mf-hosting-frontend": "^1.
|
|
50
|
+
"mf-hosting-frontend": "^1.7.0"
|
|
51
51
|
},
|
|
52
52
|
"repository": {
|
|
53
53
|
"type": "git",
|
package/src/command.mjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
const KEYBOARD_MODIFIERS = /(command|ctrl|meta|alt|shift)\+([a-zA-Z0-9])/i;
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
*
|
|
4
7
|
*/
|
|
@@ -173,7 +176,8 @@ export class Command extends BasicCommand {
|
|
|
173
176
|
const s = this.shortcuts;
|
|
174
177
|
|
|
175
178
|
if (s) {
|
|
176
|
-
let m = s.match(
|
|
179
|
+
let m = s.match(KEYBOARD_MODIFIERS);
|
|
180
|
+
|
|
177
181
|
if (m) {
|
|
178
182
|
const c = modifier2char[m[1]];
|
|
179
183
|
if (c) {
|
|
@@ -190,7 +194,7 @@ export class Command extends BasicCommand {
|
|
|
190
194
|
const s = this.shortcuts;
|
|
191
195
|
|
|
192
196
|
if (s) {
|
|
193
|
-
let m = s.match(
|
|
197
|
+
let m = s.match(KEYBOARD_MODIFIERS);
|
|
194
198
|
if (m) {
|
|
195
199
|
if (event.key == m[2]) {
|
|
196
200
|
return true;
|