@ecopages/ecopages-jsx 0.3.0 → 0.3.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecopages/ecopages-jsx",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "JSX integration plugin for Ecopages",
5
5
  "keywords": [
6
6
  "ecopages",
@@ -34,12 +34,13 @@
34
34
  "directory": "packages/integrations/ecopages-jsx"
35
35
  },
36
36
  "dependencies": {
37
- "@ecopages/mdx": "0.3.0",
37
+ "@ecopages/file-system": "0.3.1",
38
+ "@ecopages/mdx": "0.3.1",
38
39
  "@mdx-js/mdx": "^3.1.1",
39
40
  "vfile": "^6.0.3"
40
41
  },
41
42
  "peerDependencies": {
42
- "@ecopages/core": "0.3.0",
43
+ "@ecopages/core": "0.3.1",
43
44
  "@ecopages/jsx": "^0.4.0",
44
45
  "@ecopages/radiant": "^0.4.0"
45
46
  }
@@ -1,14 +1,14 @@
1
- import { existsSync, readFileSync } from 'node:fs';
1
+ import { fileSystem } from '@ecopages/file-system';
2
2
  import { CUSTOM_ELEMENT_SSR_PRELOAD_CACHE_SCOPES, invalidateCustomElementScriptPreload, } from '@ecopages/core/integration';
3
3
  const CUSTOM_ELEMENT_TAG_PATTERN = /@customElement\s*\(\s*['"`]([^'"`]+)['"`]/u;
4
4
  /**
5
5
  * Reads the custom-element tag name from a registered script module source file.
6
6
  */
7
7
  export function resolveRadiantCustomElementTag(scriptPath) {
8
- if (!existsSync(scriptPath)) {
8
+ if (!fileSystem.exists(scriptPath)) {
9
9
  return undefined;
10
10
  }
11
- const content = readFileSync(scriptPath, 'utf8');
11
+ const content = fileSystem.readFileSync(scriptPath);
12
12
  const match = content.match(CUSTOM_ELEMENT_TAG_PATTERN);
13
13
  return match?.[1];
14
14
  }