mtrl-addons 0.1.1 → 0.1.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/build.js CHANGED
@@ -76,39 +76,17 @@ const buildApp = async () => {
76
76
  console.log("Generating TypeScript declarations...");
77
77
  const tscProcess = Bun.spawn(["tsc", "--project", "tsconfig.build.json"], {
78
78
  cwd: __dirname,
79
- stdout: "pipe",
80
- stderr: "pipe",
81
79
  });
82
80
 
83
- const [stdout, stderr] = await Promise.all([
84
- new Response(tscProcess.stdout).text(),
85
- new Response(tscProcess.stderr).text(),
86
- ]);
87
-
88
81
  const tscExitCode = await tscProcess.exited;
89
-
90
- if (stderr && stderr.includes("error TS")) {
91
- console.warn(
92
- "⚠️ TypeScript warnings/errors (declarations may still be generated):"
93
- );
94
- console.warn(stderr);
95
- }
96
-
97
- // Check if declaration files were actually generated
98
- const declarationFiles = [
99
- join(DIST_DIR, "index.d.ts"),
100
- join(DIST_DIR, "components/index.d.ts"),
101
- join(DIST_DIR, "core/index.d.ts"),
102
- ];
103
-
104
- const declarationsGenerated = declarationFiles.some((file) =>
105
- existsSync(file)
106
- );
107
-
108
- if (!declarationsGenerated) {
109
- console.error(
110
- "❌ TypeScript declaration generation failed - no declaration files created"
111
- );
82
+ if (tscExitCode !== 0) {
83
+ console.error(" TypeScript declaration generation failed");
84
+ // Check if declaration files were actually generated despite errors
85
+ const declarationFile = join(DIST_DIR, "index.d.ts");
86
+ if (existsSync(declarationFile)) {
87
+ console.log("⚠️ Declaration files were generated despite errors");
88
+ return true;
89
+ }
112
90
  return false;
113
91
  }
114
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mtrl-addons",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Additional components and utilities for the mtrl system, featuring forms, specialized elements, and extended functionality for modern applications",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -7,8 +7,17 @@
7
7
  "rootDir": "src",
8
8
  "skipLibCheck": true,
9
9
  "noEmitOnError": false,
10
+ "moduleResolution": "node",
11
+ "allowSyntheticDefaultImports": true,
12
+ "resolveJsonModule": true,
10
13
  "typeRoots": ["./node_modules/@types", "./src/types"]
11
14
  },
12
15
  "include": ["src/**/*.ts", "src/types/**/*.d.ts"],
13
- "exclude": ["node_modules", "dist", "**/*.test.ts", "test/**/*"]
16
+ "exclude": [
17
+ "node_modules",
18
+ "dist",
19
+ "**/*.test.ts",
20
+ "test/**/*",
21
+ "../mtrl/**/*"
22
+ ]
14
23
  }