@marko/language-tools 2.2.1 → 2.2.2

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/dist/index.js CHANGED
@@ -1538,7 +1538,7 @@ function getComponentFilename(from) {
1538
1538
  nameNoExt = nameNoExt.slice(0, -2);
1539
1539
  }
1540
1540
  const isEntry = nameNoExt === "index";
1541
- const fileMatch = `(${nameNoExt.replace(/\./g, "\\.")}\\.${isEntry ? "|" : ""})`;
1541
+ const fileMatch = `(${nameNoExt.replace(/[.*+?^$[\]()|\\:!{}]/g, "\\$&")}\\.${isEntry ? "|" : ""})`;
1542
1542
  const componentMatch = new RegExp(
1543
1543
  `^${fileMatch}component(-browser)?\\.\\w+$`
1544
1544
  );
package/dist/index.mjs CHANGED
@@ -1506,7 +1506,7 @@ function getComponentFilename(from) {
1506
1506
  nameNoExt = nameNoExt.slice(0, -2);
1507
1507
  }
1508
1508
  const isEntry = nameNoExt === "index";
1509
- const fileMatch = `(${nameNoExt.replace(/\./g, "\\.")}\\.${isEntry ? "|" : ""})`;
1509
+ const fileMatch = `(${nameNoExt.replace(/[.*+?^$[\]()|\\:!{}]/g, "\\$&")}\\.${isEntry ? "|" : ""})`;
1510
1510
  const componentMatch = new RegExp(
1511
1511
  `^${fileMatch}component(-browser)?\\.\\w+$`
1512
1512
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@marko/language-tools",
3
3
  "description": "Marko Language Tools",
4
- "version": "2.2.1",
4
+ "version": "2.2.2",
5
5
  "bugs": "https://github.com/marko-js/language-server/issues/new?template=Bug_report.md",
6
6
  "peerDependencies": {
7
7
  "@marko/compiler": "^5.28.4"