@nuxt/bridge-edge 3.0.0-27386974.00e8a6e → 3.0.0-27388331.8ea6b65

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.
@@ -766,6 +766,18 @@ async function scanForComposables(dir, autoImports) {
766
766
  }));
767
767
  }
768
768
 
769
+ function escapeStringRegexp(string) {
770
+ if (typeof string !== 'string') {
771
+ throw new TypeError('Expected a string');
772
+ }
773
+
774
+ // Escape characters with special meaning either inside or outside character sets.
775
+ // Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
776
+ return string
777
+ .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
778
+ .replace(/-/g, '\\x2d');
779
+ }
780
+
769
781
  function createAutoImportContext(opts) {
770
782
  return {
771
783
  autoImports: [],
@@ -787,7 +799,7 @@ function updateAutoImportContext(ctx) {
787
799
  }
788
800
  }
789
801
  ctx.autoImports = ctx.autoImports.filter((i) => i.disabled !== true);
790
- ctx.matchRE = new RegExp(`\\b(${ctx.autoImports.map((i) => i.as).join("|")})\\b`, "g");
802
+ ctx.matchRE = new RegExp(`\\b(${ctx.autoImports.map((i) => escapeStringRegexp(i.as)).join("|")})\\b`, "g");
791
803
  ctx.map.clear();
792
804
  for (const autoImport of ctx.autoImports) {
793
805
  ctx.map.set(autoImport.as, autoImport);
@@ -3,7 +3,7 @@ import { defineNuxtModule, addPluginTemplate } from '@nuxt/kit';
3
3
  import hash from 'hash-sum';
4
4
  import { resolve } from 'pathe';
5
5
 
6
- const version = "3.0.0-27386974.00e8a6e";
6
+ const version = "3.0.0-27388331.8ea6b65";
7
7
 
8
8
  const middlewareTemplate = {
9
9
  filename: "middleware.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/bridge-edge",
3
- "version": "3.0.0-27386974.00e8a6e",
3
+ "version": "3.0.0-27388331.8ea6b65",
4
4
  "repository": "nuxt/framework",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,10 +19,10 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@babel/plugin-transform-typescript": "^7.16.8",
22
- "@nuxt/kit": "npm:@nuxt/kit-edge@3.0.0-27386974.00e8a6e",
23
- "@nuxt/nitro": "npm:@nuxt/nitro-edge@3.0.0-27386974.00e8a6e",
22
+ "@nuxt/kit": "npm:@nuxt/kit-edge@3.0.0-27388331.8ea6b65",
23
+ "@nuxt/nitro": "npm:@nuxt/nitro-edge@3.0.0-27388331.8ea6b65",
24
24
  "@nuxt/postcss8": "^1.1.3",
25
- "@nuxt/schema": "npm:@nuxt/schema-edge@3.0.0-27386974.00e8a6e",
25
+ "@nuxt/schema": "npm:@nuxt/schema-edge@3.0.0-27388331.8ea6b65",
26
26
  "@vitejs/plugin-legacy": "^1.6.4",
27
27
  "@vue/composition-api": "^1.4.4",
28
28
  "@vueuse/head": "^0.7.5",
@@ -42,7 +42,7 @@
42
42
  "mlly": "^0.4.1",
43
43
  "murmurhash-es": "^0.1.1",
44
44
  "node-fetch": "^3.2.0",
45
- "nuxi": "npm:nuxi-edge@3.0.0-27386974.00e8a6e",
45
+ "nuxi": "npm:nuxi-edge@3.0.0-27388331.8ea6b65",
46
46
  "p-debounce": "^4.0.0",
47
47
  "pathe": "^0.2.0",
48
48
  "postcss": "^8",