@storm-software/tsup 0.2.13 → 0.2.14

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/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.2.11-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.2.12-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -40,7 +40,6 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
40
40
 
41
41
  <!-- START doctoc -->
42
42
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
43
-
44
43
  ## Table of Contents
45
44
 
46
45
  - [Storm tsup build package](#storm-tsup-build-package)
@@ -8,10 +8,6 @@ import {
8
8
 
9
9
  // src/options.ts
10
10
  init_esm_shims();
11
- import {
12
- createProjectGraphAsync,
13
- readProjectsConfigurationFromProjectGraph
14
- } from "@nx/devkit";
15
11
 
16
12
  // ../config-tools/dist/get-config.js
17
13
  init_esm_shims();
@@ -1642,9 +1638,6 @@ async function resolveOptions(userOptions) {
1642
1638
  writeDebug(" \u2699\uFE0F Resolving build options", workspaceConfig);
1643
1639
  }
1644
1640
  const stopwatch = getStopwatch("Build options resolution");
1645
- const projectGraph = await createProjectGraphAsync({
1646
- exitOnError: false
1647
- });
1648
1641
  const projectJsonPath = joinPaths(
1649
1642
  workspaceRoot.dir,
1650
1643
  projectRoot,
@@ -1656,12 +1649,6 @@ async function resolveOptions(userOptions) {
1656
1649
  const projectJsonFile = await hf.readFile(projectJsonPath, "utf8");
1657
1650
  const projectJson = JSON.parse(projectJsonFile);
1658
1651
  const projectName = projectJson.name || userOptions.name;
1659
- const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
1660
- if (!projectConfigurations?.projects?.[projectName]) {
1661
- throw new Error(
1662
- "The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
1663
- );
1664
- }
1665
1652
  const options = defu3(userOptions, DEFAULT_BUILD_OPTIONS);
1666
1653
  options.name ??= projectName;
1667
1654
  const packageJsonPath = joinPaths(
@@ -1673,7 +1660,6 @@ async function resolveOptions(userOptions) {
1673
1660
  throw new Error("Cannot find package.json configuration");
1674
1661
  }
1675
1662
  const env = getEnv("esbuild", options);
1676
- const define = defu3(options.define ?? {}, env ?? {});
1677
1663
  const resolvedOptions = {
1678
1664
  name: projectName,
1679
1665
  entry: [joinPaths(workspaceRoot.dir, projectRoot, "src/index.ts")],
@@ -1681,18 +1667,15 @@ async function resolveOptions(userOptions) {
1681
1667
  ...options,
1682
1668
  outDir: options.outputPath || joinPaths(workspaceConfig.workspaceRoot, "dist", options.projectRoot),
1683
1669
  tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : joinPaths(workspaceRoot.dir, projectRoot, "tsconfig.json"),
1684
- env: {
1685
- ...Object.keys(env).filter((key) => env[key] !== void 0).reduce((res, key) => {
1686
- const value = JSON.stringify(env[key]);
1687
- const safeKey = key.replaceAll("(", "").replaceAll(")", "");
1688
- return {
1689
- ...res,
1690
- [`process.env.${safeKey}`]: value,
1691
- [`import.meta.env.${safeKey}`]: value
1692
- };
1693
- }, {})
1694
- },
1695
- define
1670
+ env: Object.keys(env).filter((key) => env[key] !== void 0).reduce((ret, key) => {
1671
+ const value = JSON.stringify(env[key]);
1672
+ const safeKey = key.replaceAll("(", "").replaceAll(")", "");
1673
+ return {
1674
+ ...ret,
1675
+ [`process.env.${safeKey}`]: value,
1676
+ [`import.meta.env.${safeKey}`]: value
1677
+ };
1678
+ }, {})
1696
1679
  };
1697
1680
  if (!resolvedOptions.silent) {
1698
1681
  stopwatch();
@@ -1701,7 +1684,7 @@ async function resolveOptions(userOptions) {
1701
1684
  ` \u2699\uFE0F Build options resolved:
1702
1685
 
1703
1686
  ${formatLogMessage(resolvedOptions)}`,
1704
- workspaceConfig
1687
+ { ...workspaceConfig, logLevel: "all" }
1705
1688
  );
1706
1689
  }
1707
1690
  }
package/dist/index.cjs CHANGED
@@ -3773,7 +3773,6 @@ var DEFAULT_BUILD_OPTIONS = {
3773
3773
 
3774
3774
  // src/options.ts
3775
3775
  init_cjs_shims();
3776
- var import_devkit2 = require("@nx/devkit");
3777
3776
 
3778
3777
  // ../config-tools/dist/get-config.js
3779
3778
  init_cjs_shims();
@@ -5096,9 +5095,6 @@ async function resolveOptions(userOptions) {
5096
5095
  writeDebug(" \u2699\uFE0F Resolving build options", workspaceConfig);
5097
5096
  }
5098
5097
  const stopwatch = getStopwatch("Build options resolution");
5099
- const projectGraph = await (0, import_devkit2.createProjectGraphAsync)({
5100
- exitOnError: false
5101
- });
5102
5098
  const projectJsonPath = joinPaths2(
5103
5099
  workspaceRoot.dir,
5104
5100
  projectRoot,
@@ -5110,12 +5106,6 @@ async function resolveOptions(userOptions) {
5110
5106
  const projectJsonFile = await import_promises6.default.readFile(projectJsonPath, "utf8");
5111
5107
  const projectJson = JSON.parse(projectJsonFile);
5112
5108
  const projectName = projectJson.name || userOptions.name;
5113
- const projectConfigurations = (0, import_devkit2.readProjectsConfigurationFromProjectGraph)(projectGraph);
5114
- if (!projectConfigurations?.projects?.[projectName]) {
5115
- throw new Error(
5116
- "The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
5117
- );
5118
- }
5119
5109
  const options2 = (0, import_defu5.default)(userOptions, DEFAULT_BUILD_OPTIONS);
5120
5110
  options2.name ??= projectName;
5121
5111
  const packageJsonPath = joinPaths2(
@@ -5127,7 +5117,6 @@ async function resolveOptions(userOptions) {
5127
5117
  throw new Error("Cannot find package.json configuration");
5128
5118
  }
5129
5119
  const env = getEnv("esbuild", options2);
5130
- const define = (0, import_defu5.default)(options2.define ?? {}, env ?? {});
5131
5120
  const resolvedOptions = {
5132
5121
  name: projectName,
5133
5122
  entry: [joinPaths2(workspaceRoot.dir, projectRoot, "src/index.ts")],
@@ -5135,18 +5124,15 @@ async function resolveOptions(userOptions) {
5135
5124
  ...options2,
5136
5125
  outDir: options2.outputPath || joinPaths2(workspaceConfig.workspaceRoot, "dist", options2.projectRoot),
5137
5126
  tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : joinPaths2(workspaceRoot.dir, projectRoot, "tsconfig.json"),
5138
- env: {
5139
- ...Object.keys(env).filter((key) => env[key] !== void 0).reduce((res, key) => {
5140
- const value = JSON.stringify(env[key]);
5141
- const safeKey = key.replaceAll("(", "").replaceAll(")", "");
5142
- return {
5143
- ...res,
5144
- [`process.env.${safeKey}`]: value,
5145
- [`import.meta.env.${safeKey}`]: value
5146
- };
5147
- }, {})
5148
- },
5149
- define
5127
+ env: Object.keys(env).filter((key) => env[key] !== void 0).reduce((ret, key) => {
5128
+ const value = JSON.stringify(env[key]);
5129
+ const safeKey = key.replaceAll("(", "").replaceAll(")", "");
5130
+ return {
5131
+ ...ret,
5132
+ [`process.env.${safeKey}`]: value,
5133
+ [`import.meta.env.${safeKey}`]: value
5134
+ };
5135
+ }, {})
5150
5136
  };
5151
5137
  if (!resolvedOptions.silent) {
5152
5138
  stopwatch();
@@ -5155,7 +5141,7 @@ async function resolveOptions(userOptions) {
5155
5141
  ` \u2699\uFE0F Build options resolved:
5156
5142
 
5157
5143
  ${formatLogMessage(resolvedOptions)}`,
5158
- workspaceConfig
5144
+ { ...workspaceConfig, logLevel: "all" }
5159
5145
  );
5160
5146
  }
5161
5147
  }
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  getStopwatch,
3
3
  resolveOptions,
4
4
  writeDebug
5
- } from "./chunk-IZFXKRE2.js";
5
+ } from "./chunk-SUO2SQPL.js";
6
6
  import {
7
7
  DEFAULT_BUILD_OPTIONS
8
8
  } from "./chunk-ZEHMJYA6.js";
package/dist/options.cjs CHANGED
@@ -33,7 +33,6 @@ __export(options_exports, {
33
33
  resolveOptions: () => resolveOptions
34
34
  });
35
35
  module.exports = __toCommonJS(options_exports);
36
- var import_devkit2 = require("@nx/devkit");
37
36
 
38
37
  // ../build-tools/dist/chunk-RPSH5IFV.mjs
39
38
  var import_node_fs = require("fs");
@@ -2322,9 +2321,6 @@ async function resolveOptions(userOptions) {
2322
2321
  writeDebug2(" \u2699\uFE0F Resolving build options", workspaceConfig);
2323
2322
  }
2324
2323
  const stopwatch = getStopwatch("Build options resolution");
2325
- const projectGraph = await (0, import_devkit2.createProjectGraphAsync)({
2326
- exitOnError: false
2327
- });
2328
2324
  const projectJsonPath = joinPaths2(
2329
2325
  workspaceRoot.dir,
2330
2326
  projectRoot,
@@ -2336,12 +2332,6 @@ async function resolveOptions(userOptions) {
2336
2332
  const projectJsonFile = await import_promises6.default.readFile(projectJsonPath, "utf8");
2337
2333
  const projectJson = JSON.parse(projectJsonFile);
2338
2334
  const projectName = projectJson.name || userOptions.name;
2339
- const projectConfigurations = (0, import_devkit2.readProjectsConfigurationFromProjectGraph)(projectGraph);
2340
- if (!projectConfigurations?.projects?.[projectName]) {
2341
- throw new Error(
2342
- "The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
2343
- );
2344
- }
2345
2335
  const options = (0, import_defu5.default)(userOptions, DEFAULT_BUILD_OPTIONS);
2346
2336
  options.name ??= projectName;
2347
2337
  const packageJsonPath = joinPaths2(
@@ -2353,7 +2343,6 @@ async function resolveOptions(userOptions) {
2353
2343
  throw new Error("Cannot find package.json configuration");
2354
2344
  }
2355
2345
  const env = getEnv("esbuild", options);
2356
- const define = (0, import_defu5.default)(options.define ?? {}, env ?? {});
2357
2346
  const resolvedOptions = {
2358
2347
  name: projectName,
2359
2348
  entry: [joinPaths2(workspaceRoot.dir, projectRoot, "src/index.ts")],
@@ -2361,18 +2350,15 @@ async function resolveOptions(userOptions) {
2361
2350
  ...options,
2362
2351
  outDir: options.outputPath || joinPaths2(workspaceConfig.workspaceRoot, "dist", options.projectRoot),
2363
2352
  tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : joinPaths2(workspaceRoot.dir, projectRoot, "tsconfig.json"),
2364
- env: {
2365
- ...Object.keys(env).filter((key) => env[key] !== void 0).reduce((res, key) => {
2366
- const value = JSON.stringify(env[key]);
2367
- const safeKey = key.replaceAll("(", "").replaceAll(")", "");
2368
- return {
2369
- ...res,
2370
- [`process.env.${safeKey}`]: value,
2371
- [`import.meta.env.${safeKey}`]: value
2372
- };
2373
- }, {})
2374
- },
2375
- define
2353
+ env: Object.keys(env).filter((key) => env[key] !== void 0).reduce((ret, key) => {
2354
+ const value = JSON.stringify(env[key]);
2355
+ const safeKey = key.replaceAll("(", "").replaceAll(")", "");
2356
+ return {
2357
+ ...ret,
2358
+ [`process.env.${safeKey}`]: value,
2359
+ [`import.meta.env.${safeKey}`]: value
2360
+ };
2361
+ }, {})
2376
2362
  };
2377
2363
  if (!resolvedOptions.silent) {
2378
2364
  stopwatch();
@@ -2381,7 +2367,7 @@ async function resolveOptions(userOptions) {
2381
2367
  ` \u2699\uFE0F Build options resolved:
2382
2368
 
2383
2369
  ${formatLogMessage2(resolvedOptions)}`,
2384
- workspaceConfig
2370
+ { ...workspaceConfig, logLevel: "all" }
2385
2371
  );
2386
2372
  }
2387
2373
  }
package/dist/options.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveOptions
3
- } from "./chunk-IZFXKRE2.js";
3
+ } from "./chunk-SUO2SQPL.js";
4
4
  import "./chunk-ZEHMJYA6.js";
5
5
  import "./chunk-5522FPAL.js";
6
6
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/tsup",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "type": "module",
5
5
  "description": "A package containing bundled patches for tsup.",
6
6
  "repository": {
@@ -104,8 +104,8 @@
104
104
  "files": ["assets/**/*", "dist/**/*"],
105
105
  "keywords": ["tsup", "storm", "storm-ops", "storm-software"],
106
106
  "dependencies": {
107
- "@storm-software/build-tools": "^0.158.15",
108
- "@storm-software/config-tools": "^1.188.15"
107
+ "@storm-software/build-tools": "^0.158.16",
108
+ "@storm-software/config-tools": "^1.188.16"
109
109
  },
110
110
  "devDependencies": {
111
111
  "@types/node": "^22.10.2",
@@ -114,5 +114,5 @@
114
114
  },
115
115
  "publishConfig": { "access": "public" },
116
116
  "sideEffects": false,
117
- "gitHead": "99cbe99b61fdfd4950fefc959a347ab232e788da"
117
+ "gitHead": "3d3ff971d19a1152c39c5cf03e8ed30d79516188"
118
118
  }