@esmx/core 3.0.0-rc.81 → 3.0.0-rc.83
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/module-config.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BuildEnvironment } from './core';
|
|
2
2
|
export interface ModuleConfig {
|
|
3
|
+
lib?: boolean;
|
|
3
4
|
links?: Record<string, string>;
|
|
4
5
|
imports?: ModuleConfigImportMapping;
|
|
5
6
|
scopes?: Record<string, ModuleConfigImportMapping>;
|
|
@@ -13,6 +14,7 @@ export type ModuleConfigExportObjectValue = string | Record<BuildEnvironment, st
|
|
|
13
14
|
export interface ParsedModuleConfig {
|
|
14
15
|
name: string;
|
|
15
16
|
root: string;
|
|
17
|
+
lib: boolean;
|
|
16
18
|
links: Record<string, ParsedModuleConfigLink>;
|
|
17
19
|
environments: {
|
|
18
20
|
client: ParsedModuleConfigEnvironment;
|
package/dist/module-config.mjs
CHANGED
|
@@ -3,6 +3,7 @@ export function parseModuleConfig(name, root, config = {}) {
|
|
|
3
3
|
return {
|
|
4
4
|
name,
|
|
5
5
|
root,
|
|
6
|
+
lib: config.lib ?? false,
|
|
6
7
|
links: getLinks(name, root, config),
|
|
7
8
|
environments: {
|
|
8
9
|
client: getEnvironments(config, "client", name),
|
|
@@ -144,7 +145,7 @@ export function processExportArray(exportArray, env) {
|
|
|
144
145
|
return exports;
|
|
145
146
|
}
|
|
146
147
|
export function getEnvironmentExports(config, env) {
|
|
147
|
-
const exports = createDefaultExports(env);
|
|
148
|
+
const exports = config.lib ? {} : createDefaultExports(env);
|
|
148
149
|
if (config.exports) {
|
|
149
150
|
const userExports = processExportArray(config.exports, env);
|
|
150
151
|
Object.assign(exports, userExports);
|
package/package.json
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"build": "unbuild"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@esmx/import": "3.0.0-rc.
|
|
62
|
+
"@esmx/import": "3.0.0-rc.83",
|
|
63
63
|
"@types/serialize-javascript": "^5.0.4",
|
|
64
64
|
"es-module-lexer": "^1.7.0",
|
|
65
65
|
"find": "^0.3.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"unbuild": "3.6.1",
|
|
78
78
|
"vitest": "3.2.4"
|
|
79
79
|
},
|
|
80
|
-
"version": "3.0.0-rc.
|
|
80
|
+
"version": "3.0.0-rc.83",
|
|
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": "
|
|
103
|
+
"gitHead": "9fda727dc0f62de0f2bfd4bd29c2b3028fd69137"
|
|
104
104
|
}
|
package/src/module-config.ts
CHANGED
|
@@ -2,6 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import type { BuildEnvironment } from './core';
|
|
3
3
|
|
|
4
4
|
export interface ModuleConfig {
|
|
5
|
+
lib?: boolean;
|
|
5
6
|
links?: Record<string, string>;
|
|
6
7
|
imports?: ModuleConfigImportMapping;
|
|
7
8
|
scopes?: Record<string, ModuleConfigImportMapping>;
|
|
@@ -28,6 +29,7 @@ export type ModuleConfigExportObjectValue =
|
|
|
28
29
|
export interface ParsedModuleConfig {
|
|
29
30
|
name: string;
|
|
30
31
|
root: string;
|
|
32
|
+
lib: boolean;
|
|
31
33
|
links: Record<string, ParsedModuleConfigLink>;
|
|
32
34
|
environments: {
|
|
33
35
|
client: ParsedModuleConfigEnvironment;
|
|
@@ -69,6 +71,7 @@ export function parseModuleConfig(
|
|
|
69
71
|
return {
|
|
70
72
|
name,
|
|
71
73
|
root,
|
|
74
|
+
lib: config.lib ?? false,
|
|
72
75
|
links: getLinks(name, root, config),
|
|
73
76
|
environments: {
|
|
74
77
|
client: getEnvironments(config, 'client', name),
|
|
@@ -262,7 +265,7 @@ export function getEnvironmentExports(
|
|
|
262
265
|
config: ModuleConfig,
|
|
263
266
|
env: BuildEnvironment
|
|
264
267
|
): ParsedModuleConfigExports {
|
|
265
|
-
const exports = createDefaultExports(env);
|
|
268
|
+
const exports = config.lib ? {} : createDefaultExports(env);
|
|
266
269
|
|
|
267
270
|
if (config.exports) {
|
|
268
271
|
const userExports = processExportArray(config.exports, env);
|