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.
Files changed (2) hide show
  1. package/package.json +11 -11
  2. 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.37",
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/*.js -s build/test --page-request-timeout 6000 --app-init-delay 10000 --app \"vite\"",
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.2",
39
- "ava": "^5.1.1",
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",
42
- "npm-pkgbuild": "^11.1.14",
43
- "semantic-release": "^20.1.0",
44
- "svelte": "^3.55.1",
45
- "testcafe": "^2.3.0",
46
- "vite": "^4.0.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.6.2"
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(/(command|ctrl|meta|alt|shift)\+([a-zA-Z0-9])/i);
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(/(command|ctrl|meta|alt|shift)\+([a-zA-Z0-9])/i);
197
+ let m = s.match(KEYBOARD_MODIFIERS);
194
198
  if (m) {
195
199
  if (event.key == m[2]) {
196
200
  return true;