@esmx/core 3.0.0-rc.78 → 3.0.0-rc.80

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/core.d.ts CHANGED
@@ -3,8 +3,7 @@ import { type App } from './app';
3
3
  import { type ManifestJson } from './manifest-json';
4
4
  import { type ModuleConfig, type ParsedModuleConfig } from './module-config';
5
5
  import { type PackConfig, type ParsedPackConfig } from './pack-config';
6
- import type { ImportmapMode } from './render-context';
7
- import type { RenderContext, RenderContextOptions } from './render-context';
6
+ import type { ImportmapMode, RenderContext, RenderContextOptions } from './render-context';
8
7
  import type { Middleware } from './utils/middleware';
9
8
  import { type ProjectPath } from './utils/resolve-path';
10
9
  /**
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { type EsmxOptions, type COMMAND, type BuildEnvironment, type ImportMap, type SpecifierMap, type ScopesMap, Esmx } from './core';
2
- export type { ModuleConfig, ModuleConfigImportMapping, ModuleConfigExportExports, ModuleConfigExportExport, ModuleConfigExportObject, ParsedModuleConfig, ParsedModuleConfigExports, ParsedModuleConfigExport, ParsedModuleConfigEnvironment, ParsedModuleConfigLink } from './module-config';
3
- export type { PackConfig, ParsedPackConfig } from './pack-config';
4
1
  export { type App, createApp } from './app';
5
- export { type RenderContextOptions, type ServerRenderHandle, type RenderFiles, RenderContext } from './render-context';
6
- export { isImmutableFile, type Middleware, createMiddleware, mergeMiddlewares } from './utils/middleware';
2
+ export { type BuildEnvironment, type COMMAND, Esmx, type EsmxOptions, type ImportMap, type ScopesMap, type SpecifierMap } from './core';
7
3
  export type { ManifestJson, ManifestJsonChunk, ManifestJsonChunks, ManifestJsonExport, ManifestJsonExports } from './manifest-json';
4
+ export type { ModuleConfig, ModuleConfigExportExport, ModuleConfigExportExports, ModuleConfigExportObject, ModuleConfigImportMapping, ParsedModuleConfig, ParsedModuleConfigEnvironment, ParsedModuleConfigExport, ParsedModuleConfigExports, ParsedModuleConfigLink } from './module-config';
5
+ export type { PackConfig, ParsedPackConfig } from './pack-config';
6
+ export { RenderContext, type RenderContextOptions, type RenderFiles, type ServerRenderHandle } from './render-context';
7
+ export { createMiddleware, isImmutableFile, type Middleware, mergeMiddlewares } from './utils/middleware';
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
+ export { createApp } from "./app.mjs";
1
2
  export {
2
3
  Esmx
3
4
  } from "./core.mjs";
4
- export { createApp } from "./app.mjs";
5
5
  export {
6
6
  RenderContext
7
7
  } from "./render-context.mjs";
8
8
  export {
9
- isImmutableFile,
10
9
  createMiddleware,
10
+ isImmutableFile,
11
11
  mergeMiddlewares
12
12
  } from "./utils/middleware.mjs";
@@ -8,8 +8,8 @@ import {
8
8
  getEnvironmentScopes,
9
9
  getEnvironments,
10
10
  getLinks,
11
- parseModuleConfig,
12
11
  parsedExportValue,
12
+ parseModuleConfig,
13
13
  processExportArray,
14
14
  processObjectExport,
15
15
  processStringExport,
@@ -1,5 +1,4 @@
1
- import fs from "node:fs";
2
- import { globSync } from "node:fs";
1
+ import fs, { globSync } from "node:fs";
3
2
  import path from "node:path";
4
3
  import { gzipSync } from "node:zlib";
5
4
  function getGzipSize(filePath) {
package/package.json CHANGED
@@ -59,7 +59,7 @@
59
59
  "build": "unbuild"
60
60
  },
61
61
  "dependencies": {
62
- "@esmx/import": "3.0.0-rc.78",
62
+ "@esmx/import": "3.0.0-rc.80",
63
63
  "@types/serialize-javascript": "^5.0.4",
64
64
  "es-module-lexer": "^1.7.0",
65
65
  "find": "^0.3.0",
@@ -67,9 +67,9 @@
67
67
  "serialize-javascript": "^6.0.2"
68
68
  },
69
69
  "devDependencies": {
70
- "@biomejs/biome": "1.9.4",
70
+ "@biomejs/biome": "2.3.7",
71
71
  "@types/find": "^0.2.4",
72
- "@types/node": "^24.10.0",
72
+ "@types/node": "^24.0.0",
73
73
  "@types/send": "^1.2.1",
74
74
  "@types/write": "^2.0.4",
75
75
  "@vitest/coverage-v8": "3.2.4",
@@ -77,7 +77,7 @@
77
77
  "unbuild": "3.6.1",
78
78
  "vitest": "3.2.4"
79
79
  },
80
- "version": "3.0.0-rc.78",
80
+ "version": "3.0.0-rc.80",
81
81
  "type": "module",
82
82
  "private": false,
83
83
  "exports": {
@@ -100,5 +100,5 @@
100
100
  "template",
101
101
  "public"
102
102
  ],
103
- "gitHead": "aa44e33ab3e05817977c0fda6148abff8351651f"
103
+ "gitHead": "3fca699d5b4daa50c2c53f4adea0e8a71e14765b"
104
104
  }
package/src/app.ts CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  type RenderContextOptions,
7
7
  type ServerRenderHandle
8
8
  } from './render-context';
9
- import { type Middleware, createMiddleware } from './utils/middleware';
9
+ import { createMiddleware, type Middleware } from './utils/middleware';
10
10
 
11
11
  /**
12
12
  * Application instance interface.
package/src/cli/index.ts CHANGED
@@ -6,6 +6,7 @@ try {
6
6
  } catch {
7
7
  // ignore errors
8
8
  }
9
+
9
10
  import { cli } from './cli';
10
11
 
11
12
  cli(process.argv.slice(2)[0] || '');
package/src/core.ts CHANGED
@@ -8,7 +8,7 @@ import type { ImportMap, ScopesMap, SpecifierMap } from '@esmx/import';
8
8
 
9
9
  import serialize from 'serialize-javascript';
10
10
  import { type App, createApp } from './app';
11
- import { type ManifestJson, getManifestList } from './manifest-json';
11
+ import { getManifestList, type ManifestJson } from './manifest-json';
12
12
  import {
13
13
  type ModuleConfig,
14
14
  type ParsedModuleConfig,
@@ -19,8 +19,11 @@ import {
19
19
  type ParsedPackConfig,
20
20
  parsePackConfig
21
21
  } from './pack-config';
22
- import type { ImportmapMode } from './render-context';
23
- import type { RenderContext, RenderContextOptions } from './render-context';
22
+ import type {
23
+ ImportmapMode,
24
+ RenderContext,
25
+ RenderContextOptions
26
+ } from './render-context';
24
27
  import { type CacheHandle, createCache } from './utils/cache';
25
28
  import { generateSizeReport } from './utils/file-size-stats';
26
29
  import { createClientImportMap, createImportMap } from './utils/import-map';
package/src/index.ts CHANGED
@@ -1,45 +1,45 @@
1
+ export { type App, createApp } from './app';
1
2
  export {
2
- type EsmxOptions,
3
- type COMMAND,
4
3
  type BuildEnvironment,
4
+ type COMMAND,
5
+ Esmx,
6
+ type EsmxOptions,
5
7
  type ImportMap,
6
- type SpecifierMap,
7
8
  type ScopesMap,
8
- Esmx
9
+ type SpecifierMap
9
10
  } from './core';
11
+ export type {
12
+ ManifestJson,
13
+ ManifestJsonChunk,
14
+ ManifestJsonChunks,
15
+ ManifestJsonExport,
16
+ ManifestJsonExports
17
+ } from './manifest-json';
10
18
  export type {
11
19
  ModuleConfig,
12
- ModuleConfigImportMapping,
13
- ModuleConfigExportExports,
14
20
  ModuleConfigExportExport,
21
+ ModuleConfigExportExports,
15
22
  ModuleConfigExportObject,
23
+ ModuleConfigImportMapping,
16
24
  ParsedModuleConfig,
17
- ParsedModuleConfigExports,
18
- ParsedModuleConfigExport,
19
25
  ParsedModuleConfigEnvironment,
26
+ ParsedModuleConfigExport,
27
+ ParsedModuleConfigExports,
20
28
  ParsedModuleConfigLink
21
29
  } from './module-config';
22
30
  export type {
23
31
  PackConfig,
24
32
  ParsedPackConfig
25
33
  } from './pack-config';
26
- export { type App, createApp } from './app';
27
34
  export {
35
+ RenderContext,
28
36
  type RenderContextOptions,
29
- type ServerRenderHandle,
30
37
  type RenderFiles,
31
- RenderContext
38
+ type ServerRenderHandle
32
39
  } from './render-context';
33
40
  export {
41
+ createMiddleware,
34
42
  isImmutableFile,
35
43
  type Middleware,
36
- createMiddleware,
37
44
  mergeMiddlewares
38
45
  } from './utils/middleware';
39
- export type {
40
- ManifestJson,
41
- ManifestJsonChunk,
42
- ManifestJsonChunks,
43
- ManifestJsonExport,
44
- ManifestJsonExports
45
- } from './manifest-json';
@@ -1,7 +1,6 @@
1
1
  import path from 'node:path';
2
2
  import { describe, expect, it } from 'vitest';
3
3
  import {
4
- type ModuleConfig,
5
4
  addPackageExportsToScopes,
6
5
  createDefaultExports,
7
6
  getEnvironmentExports,
@@ -9,8 +8,9 @@ import {
9
8
  getEnvironmentScopes,
10
9
  getEnvironments,
11
10
  getLinks,
12
- parseModuleConfig,
11
+ type ModuleConfig,
13
12
  parsedExportValue,
13
+ parseModuleConfig,
14
14
  processExportArray,
15
15
  processObjectExport,
16
16
  processStringExport,
@@ -1,5 +1,4 @@
1
- import fs from 'node:fs';
2
- import { globSync } from 'node:fs';
1
+ import fs, { globSync } from 'node:fs';
3
2
  import path from 'node:path';
4
3
  import { gzipSync } from 'node:zlib';
5
4
 
@@ -1,4 +1,5 @@
1
1
  import { assert, describe, test } from 'vitest';
2
+ import type { GetImportMapOptions, ImportMapManifest } from './import-map';
2
3
  import {
3
4
  compressImportMap,
4
5
  createImportMap,
@@ -6,7 +7,6 @@ import {
6
7
  createScopesMap,
7
8
  fixImportMapNestedScopes
8
9
  } from './import-map';
9
- import type { GetImportMapOptions, ImportMapManifest } from './import-map';
10
10
 
11
11
  describe('createImportsMap', () => {
12
12
  test('should return empty object for empty manifests', () => {
@@ -1,6 +1,5 @@
1
- import { pathWithoutIndex } from './path-without-index';
2
-
3
1
  import type { ImportMap, ScopesMap, SpecifierMap } from '@esmx/import';
2
+ import { pathWithoutIndex } from './path-without-index';
4
3
 
5
4
  export interface ImportMapManifest {
6
5
  name: string;
@@ -1,5 +1,4 @@
1
1
  import type { IncomingMessage, ServerResponse } from 'node:http';
2
- import path from 'node:path';
3
2
  import send from 'send';
4
3
  import type { Esmx } from '../core';
5
4
 
@@ -2,9 +2,8 @@ import type fs from 'node:fs';
2
2
  import fsp from 'node:fs/promises';
3
3
  import path from 'node:path';
4
4
  import type { ImportMap, SpecifierMap } from '@esmx/import';
5
- import type { ParsedModuleConfig } from '../module-config';
6
-
7
5
  import * as esmLexer from 'es-module-lexer';
6
+ import type { ParsedModuleConfig } from '../module-config';
8
7
 
9
8
  /**
10
9
  * Get the list of statically imported module names from JS code. Maybe cannot handle multiple concurrent calls, not tested.