@silgi/module-builder 0.6.8 → 0.7.0

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.
@@ -1,11 +1,11 @@
1
1
  import { existsSync, promises } from 'node:fs';
2
2
  import { mkdir, writeFile } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
- import { fileURLToPath, pathToFileURL } from 'node:url';
4
+ import { pathToFileURL } from 'node:url';
5
5
  import { defineCommand } from 'citty';
6
6
  import { consola } from 'consola';
7
7
  import defu from 'defu';
8
- import { createJiti } from 'dev-jiti';
8
+ import { createJiti } from 'jiti';
9
9
  import { createRegExp, anyOf } from 'magic-regexp';
10
10
  import { resolvePath, findExports, findTypeExports } from 'mlly';
11
11
  import { resolve, basename, normalize, dirname } from 'pathe';
@@ -15,9 +15,8 @@ import { pkgDir } from 'silgi/runtime/meta';
15
15
  import { parse } from 'tsconfck';
16
16
  import { convertCompilerOptionsFromJson } from 'typescript';
17
17
  import { scanExports } from 'unimport';
18
- import { v as version, n as name } from '../shared/silgi-module-builder.DhkaS4ZS.mjs';
18
+ import { v as version, n as name } from '../shared/silgi-module-builder.DYtfi5a_.mjs';
19
19
 
20
- const srcDir = fileURLToPath(new URL("src", import.meta.url));
21
20
  const subpaths = [
22
21
  "runtime",
23
22
  "types"
@@ -54,7 +53,7 @@ const build = defineCommand({
54
53
  const { build } = await import('unbuild');
55
54
  const cwd = resolve(context.args.cwd || context.args.rootDir || ".");
56
55
  const packageData = await readPackageJSON(cwd);
57
- const jiti = createJiti(cwd);
56
+ const jiti = createJiti(cwd, { fsCache: false, moduleCache: false });
58
57
  const outDir = context.args.outDir || "dist";
59
58
  const rootPkg = await readPackageJSON(join(pkgDir, "package.json"));
60
59
  const isDataFolder = existsSync(join(cwd, "src", "data"));
@@ -237,11 +236,11 @@ const build = defineCommand({
237
236
  stubOptions: {
238
237
  jiti: {
239
238
  alias: {
240
- [`${packageData.name}/runtime/*`]: resolve(srcDir, "../runtime/*"),
239
+ [`${packageData.name}/runtime/*`]: resolve(cwd, "src/runtime/*"),
241
240
  ...Object.fromEntries(
242
241
  subpaths.map((subpath) => [
243
242
  `${packageData.name}/${subpath}`,
244
- resolve(srcDir, `${subpath}/index.ts`)
243
+ resolve(cwd, `${subpath}/index.ts`)
245
244
  ])
246
245
  )
247
246
  }
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
  import { consola } from 'consola';
4
- import { v as version, d as description, n as name } from './shared/silgi-module-builder.DhkaS4ZS.mjs';
4
+ import { v as version, d as description, n as name } from './shared/silgi-module-builder.DYtfi5a_.mjs';
5
5
 
6
6
  const _rDefault = (r) => r && typeof r === "object" && "default" in r ? r.default : r;
7
7
  const main = defineCommand({
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import 'node:url';
6
6
  import 'citty';
7
7
  import 'consola';
8
8
  import 'defu';
9
- import 'dev-jiti';
9
+ import 'jiti';
10
10
  import 'magic-regexp';
11
11
  import 'mlly';
12
12
  import 'pathe';
@@ -16,4 +16,4 @@ import 'silgi/runtime/meta';
16
16
  import 'tsconfck';
17
17
  import 'typescript';
18
18
  import 'unimport';
19
- import './shared/silgi-module-builder.DhkaS4ZS.mjs';
19
+ import './shared/silgi-module-builder.DYtfi5a_.mjs';
@@ -1,5 +1,5 @@
1
1
  const name = "@silgi/module-builder";
2
- const version = "0.6.8";
2
+ const version = "0.7.0";
3
3
  const description = "Complete solution for building Silgi modules";
4
4
 
5
5
  export { description as d, name as n, version as v };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silgi/module-builder",
3
3
  "type": "module",
4
- "version": "0.6.8",
4
+ "version": "0.7.0",
5
5
  "private": false,
6
6
  "description": "Complete solution for building Silgi modules",
7
7
  "exports": {
@@ -18,19 +18,19 @@
18
18
  "citty": "^0.1.6",
19
19
  "consola": "^3.4.2",
20
20
  "defu": "^6.1.4",
21
- "dev-jiti": "^2.4.2",
21
+ "jiti": "^2.4.2",
22
22
  "magic-regexp": "^0.10.0",
23
23
  "mlly": "^1.7.4",
24
24
  "pathe": "^2.0.3",
25
25
  "pkg-types": "^2.1.0",
26
- "silgi": "^0.37.39",
26
+ "silgi": "^0.39.0",
27
27
  "tsconfck": "^3.1.5",
28
28
  "unbuild": "^3.5.0",
29
29
  "unimport": "^5.0.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@antfu/eslint-config": "^4.13.0",
33
- "@types/node": "^22.15.16",
33
+ "@types/node": "^22.15.17",
34
34
  "eslint": "^9.26.0",
35
35
  "typescript": "^5.8.3"
36
36
  },