@absolutejs/absolute 0.19.0-beta.253 → 0.19.0-beta.254

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/dist/cli/index.js +11 -6
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -1009,7 +1009,7 @@ __export(exports_typecheck, {
1009
1009
  });
1010
1010
  import { resolve as resolve7, join as join7 } from "path";
1011
1011
  import { existsSync as existsSync9 } from "fs";
1012
- import { writeFile } from "fs/promises";
1012
+ import { unlink, writeFile } from "fs/promises";
1013
1013
  var run = async (name, command) => {
1014
1014
  const proc = Bun.spawn(command, {
1015
1015
  stderr: "pipe",
@@ -1107,15 +1107,16 @@ Found ${errorCount} error${suffix}.`;
1107
1107
  extends: resolve7("tsconfig.json"),
1108
1108
  include: [`../${svelteDir}/**/*`]
1109
1109
  }, null, "\t"));
1110
- const svelteConfigPath = join7(cacheDir, "svelte.config.js");
1111
- await writeFile(svelteConfigPath, `export default { compilerOptions: { runes: true } };
1110
+ const svelteConfigPath = resolve7("svelte.config.js");
1111
+ const hadSvelteConfig = existsSync9(svelteConfigPath);
1112
+ if (!hadSvelteConfig) {
1113
+ await writeFile(svelteConfigPath, `export default { compilerOptions: { runes: true } };
1112
1114
  `);
1113
- return run("svelte-check", [
1115
+ }
1116
+ const result = await run("svelte-check", [
1114
1117
  svelteBin,
1115
1118
  "--tsconfig",
1116
1119
  resolve7(svelteTsconfigPath),
1117
- "--workspace",
1118
- resolve7(cacheDir),
1119
1120
  "--threshold",
1120
1121
  "error",
1121
1122
  "--compiler-warnings",
@@ -1124,6 +1125,10 @@ Found ${errorCount} error${suffix}.`;
1124
1125
  "human-verbose",
1125
1126
  "--color"
1126
1127
  ]);
1128
+ if (!hadSvelteConfig) {
1129
+ await unlink(svelteConfigPath).catch(() => {});
1130
+ }
1131
+ return result;
1127
1132
  }, typecheck = async (configPath2) => {
1128
1133
  const config = await loadConfig(configPath2);
1129
1134
  const hasSvelte = Boolean(config.svelteDirectory);
package/package.json CHANGED
@@ -265,5 +265,5 @@
265
265
  "typecheck": "bun run src/cli/index.ts typecheck --config example/absolute.config.ts"
266
266
  },
267
267
  "types": "./dist/src/index.d.ts",
268
- "version": "0.19.0-beta.253"
268
+ "version": "0.19.0-beta.254"
269
269
  }