sprint-es 0.0.119 → 0.0.121

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/cjs/cli.cjs CHANGED
@@ -193,6 +193,14 @@ async function buildWithEsbuild(srcPath, distPath, external) {
193
193
  const requireFromProject = module$1.createRequire(path.join(projectRoot, "package.json"));
194
194
  const esbuild = requireFromProject("esbuild");
195
195
  const entryPoints = collectEntryPoints(srcPath);
196
+ const forceExternalPlugin = {
197
+ name: "force-external",
198
+ setup(build) {
199
+ build.onResolve({ filter: /^[^./]/ }, (args2) => {
200
+ return { path: args2.path, external: true };
201
+ });
202
+ }
203
+ };
196
204
  await esbuild.build({
197
205
  entryPoints,
198
206
  outdir: distPath,
@@ -200,14 +208,8 @@ async function buildWithEsbuild(srcPath, distPath, external) {
200
208
  platform: "node",
201
209
  format: "cjs",
202
210
  bundle: true,
203
- // bundle=true es necesario para que external funcione
204
211
  sourcemap: true,
205
- external,
206
- // todos los paquetes npm marcados como externos
207
- treeShaking: false,
208
- // no eliminar exports, queremos todos los archivos
209
- packages: "external"
210
- // cualquier paquete de node_modules es externo automáticamente
212
+ plugins: [forceExternalPlugin]
211
213
  });
212
214
  }
213
215
  function generateJWTSecret() {
@@ -449,7 +451,7 @@ async function main() {
449
451
  ...Object.keys(packageJson.peerDependencies ?? {})
450
452
  ];
451
453
  console.log("[Sprint] Compiling with esbuild...");
452
- await buildWithEsbuild(srcPath, distPath, external);
454
+ await buildWithEsbuild(srcPath, distPath);
453
455
  console.log("[Sprint] Compilation completed ✓");
454
456
  console.log("[Sprint] Type checking...");
455
457
  await runCommand(`tsc --project "${tsconfigPath}" --noEmit`, { NODE_ENV: "production" });
package/dist/esm/cli.js CHANGED
@@ -174,6 +174,14 @@ async function buildWithEsbuild(srcPath, distPath, external) {
174
174
  const requireFromProject = createRequire(join(projectRoot, "package.json"));
175
175
  const esbuild = requireFromProject("esbuild");
176
176
  const entryPoints = collectEntryPoints(srcPath);
177
+ const forceExternalPlugin = {
178
+ name: "force-external",
179
+ setup(build) {
180
+ build.onResolve({ filter: /^[^./]/ }, (args2) => {
181
+ return { path: args2.path, external: true };
182
+ });
183
+ }
184
+ };
177
185
  await esbuild.build({
178
186
  entryPoints,
179
187
  outdir: distPath,
@@ -181,14 +189,8 @@ async function buildWithEsbuild(srcPath, distPath, external) {
181
189
  platform: "node",
182
190
  format: "cjs",
183
191
  bundle: true,
184
- // bundle=true es necesario para que external funcione
185
192
  sourcemap: true,
186
- external,
187
- // todos los paquetes npm marcados como externos
188
- treeShaking: false,
189
- // no eliminar exports, queremos todos los archivos
190
- packages: "external"
191
- // cualquier paquete de node_modules es externo automáticamente
193
+ plugins: [forceExternalPlugin]
192
194
  });
193
195
  }
194
196
  function generateJWTSecret() {
@@ -430,7 +432,7 @@ async function main() {
430
432
  ...Object.keys(packageJson.peerDependencies ?? {})
431
433
  ];
432
434
  console.log("[Sprint] Compiling with esbuild...");
433
- await buildWithEsbuild(srcPath, distPath, external);
435
+ await buildWithEsbuild(srcPath, distPath);
434
436
  console.log("[Sprint] Compilation completed ✓");
435
437
  console.log("[Sprint] Type checking...");
436
438
  await runCommand(`tsc --project "${tsconfigPath}" --noEmit`, { NODE_ENV: "production" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprint-es",
3
- "version": "0.0.119",
3
+ "version": "0.0.121",
4
4
  "description": "Sprint - Quickly API",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",