@bleedingdev/modern-js-server-utils 3.9.0-ultramodern.27 → 3.9.0-ultramodern.28

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.
@@ -153,7 +153,7 @@ const compileServerSources = async (appDirectory, config, options)=>{
153
153
  '.mjs': 'esm',
154
154
  '.cjs': 'cjs'
155
155
  };
156
- const createLibs = (entries)=>{
156
+ const createLibs = (entries, emitDeclarations)=>{
157
157
  const libs = Object.keys(entries).filter((extension)=>entries[extension].length > 0).map((extension)=>({
158
158
  format: formats[extension],
159
159
  bundle: false,
@@ -170,7 +170,7 @@ const compileServerSources = async (appDirectory, config, options)=>{
170
170
  }
171
171
  }
172
172
  }));
173
- if (declaration) {
173
+ if (emitDeclarations) {
174
174
  libs[0].redirect = {
175
175
  dts: {
176
176
  extension: 'module' === moduleType
@@ -191,12 +191,13 @@ const compileServerSources = async (appDirectory, config, options)=>{
191
191
  const build = async ()=>{
192
192
  if (0 === sources.size) return;
193
193
  const { createRslib } = await import("@rslib/core");
194
+ let emitDeclarations = declaration;
194
195
  for(;;){
195
196
  const reached = new Set();
196
197
  const rslib = await createRslib({
197
198
  cwd: appDirectory,
198
199
  config: {
199
- lib: createLibs(groupEntries(appDirectory, sources)),
200
+ lib: createLibs(groupEntries(appDirectory, sources), emitDeclarations),
200
201
  source: {
201
202
  tsconfigPath: resolvedConfigPath,
202
203
  ...compilerOptions.experimentalDecorators ? {
@@ -241,6 +242,7 @@ const compileServerSources = async (appDirectory, config, options)=>{
241
242
  }
242
243
  });
243
244
  await rslib.build();
245
+ emitDeclarations = false;
244
246
  if (0 === reached.size) return;
245
247
  for (const file of reached)sources.add(file);
246
248
  }
@@ -111,7 +111,7 @@ const compileServerSources = async (appDirectory, config, options)=>{
111
111
  '.mjs': 'esm',
112
112
  '.cjs': 'cjs'
113
113
  };
114
- const createLibs = (entries)=>{
114
+ const createLibs = (entries, emitDeclarations)=>{
115
115
  const libs = Object.keys(entries).filter((extension)=>entries[extension].length > 0).map((extension)=>({
116
116
  format: formats[extension],
117
117
  bundle: false,
@@ -128,7 +128,7 @@ const compileServerSources = async (appDirectory, config, options)=>{
128
128
  }
129
129
  }
130
130
  }));
131
- if (declaration) {
131
+ if (emitDeclarations) {
132
132
  libs[0].redirect = {
133
133
  dts: {
134
134
  extension: 'module' === moduleType
@@ -149,12 +149,13 @@ const compileServerSources = async (appDirectory, config, options)=>{
149
149
  const build = async ()=>{
150
150
  if (0 === sources.size) return;
151
151
  const { createRslib } = await import("@rslib/core");
152
+ let emitDeclarations = declaration;
152
153
  for(;;){
153
154
  const reached = new Set();
154
155
  const rslib = await createRslib({
155
156
  cwd: appDirectory,
156
157
  config: {
157
- lib: createLibs(groupEntries(appDirectory, sources)),
158
+ lib: createLibs(groupEntries(appDirectory, sources), emitDeclarations),
158
159
  source: {
159
160
  tsconfigPath: resolvedConfigPath,
160
161
  ...compilerOptions.experimentalDecorators ? {
@@ -199,6 +200,7 @@ const compileServerSources = async (appDirectory, config, options)=>{
199
200
  }
200
201
  });
201
202
  await rslib.build();
203
+ emitDeclarations = false;
202
204
  if (0 === reached.size) return;
203
205
  for (const file of reached)sources.add(file);
204
206
  }
@@ -112,7 +112,7 @@ const compileServerSources = async (appDirectory, config, options)=>{
112
112
  '.mjs': 'esm',
113
113
  '.cjs': 'cjs'
114
114
  };
115
- const createLibs = (entries)=>{
115
+ const createLibs = (entries, emitDeclarations)=>{
116
116
  const libs = Object.keys(entries).filter((extension)=>entries[extension].length > 0).map((extension)=>({
117
117
  format: formats[extension],
118
118
  bundle: false,
@@ -129,7 +129,7 @@ const compileServerSources = async (appDirectory, config, options)=>{
129
129
  }
130
130
  }
131
131
  }));
132
- if (declaration) {
132
+ if (emitDeclarations) {
133
133
  libs[0].redirect = {
134
134
  dts: {
135
135
  extension: 'module' === moduleType
@@ -150,12 +150,13 @@ const compileServerSources = async (appDirectory, config, options)=>{
150
150
  const build = async ()=>{
151
151
  if (0 === sources.size) return;
152
152
  const { createRslib } = await import("@rslib/core");
153
+ let emitDeclarations = declaration;
153
154
  for(;;){
154
155
  const reached = new Set();
155
156
  const rslib = await createRslib({
156
157
  cwd: appDirectory,
157
158
  config: {
158
- lib: createLibs(groupEntries(appDirectory, sources)),
159
+ lib: createLibs(groupEntries(appDirectory, sources), emitDeclarations),
159
160
  source: {
160
161
  tsconfigPath: resolvedConfigPath,
161
162
  ...compilerOptions.experimentalDecorators ? {
@@ -200,6 +201,7 @@ const compileServerSources = async (appDirectory, config, options)=>{
200
201
  }
201
202
  });
202
203
  await rslib.build();
204
+ emitDeclarations = false;
203
205
  if (0 === reached.size) return;
204
206
  for (const file of reached)sources.add(file);
205
207
  }
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "modern",
18
18
  "modern.js"
19
19
  ],
20
- "version": "3.9.0-ultramodern.27",
20
+ "version": "3.9.0-ultramodern.28",
21
21
  "types": "./dist/types/index.d.ts",
22
22
  "main": "./dist/cjs/index.js",
23
23
  "exports": {
@@ -38,12 +38,12 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.27",
41
+ "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.28",
42
42
  "@rslib/core": "1.0.2",
43
43
  "@swc/helpers": "^0.5.23"
44
44
  },
45
45
  "devDependencies": {
46
- "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.0-ultramodern.27",
46
+ "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.0-ultramodern.28",
47
47
  "@scripts/rstest-config": "2.66.0",
48
48
  "@types/node": "^26.6.2",
49
49
  "@typescript/native-preview": "7.0.0-dev.20260707.2"