@storm-software/unbuild 0.34.1 → 0.35.0

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.34.1-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.34.2-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,9 +40,10 @@ 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
+
43
44
  ## Table of Contents
44
45
 
45
- - [Storm ESBuild Package](#storm-esbuild-package)
46
+ - [Storm Unbuild Package](#storm-unbuild-package)
46
47
  - [Installing](#installing)
47
48
  - [Building](#building)
48
49
  - [Running unit tests](#running-unit-tests)
@@ -63,23 +64,23 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
63
64
 
64
65
  <!-- END header -->
65
66
 
66
- # Storm ESBuild Package
67
+ # Storm Unbuild Package
67
68
 
68
- This package contains the ESBuild configuration for Storm Software projects.
69
+ This package contains the Unbuild configuration for Storm Software projects.
69
70
 
70
71
  ## Installing
71
72
 
72
73
  Using [pnpm](http://pnpm.io):
73
74
 
74
75
  ```bash
75
- pnpm add -D @storm-software/esbuild
76
+ pnpm add -D @storm-software/unbuild
76
77
  ```
77
78
 
78
79
  <details>
79
80
  <summary>Using npm</summary>
80
81
 
81
82
  ```bash
82
- npm install -D @storm-software/esbuild
83
+ npm install -D @storm-software/unbuild
83
84
  ```
84
85
 
85
86
  </details>
@@ -88,18 +89,18 @@ npm install -D @storm-software/esbuild
88
89
  <summary>Using yarn</summary>
89
90
 
90
91
  ```bash
91
- yarn add -D @storm-software/esbuild
92
+ yarn add -D @storm-software/unbuild
92
93
  ```
93
94
 
94
95
  </details>
95
96
 
96
97
  ## Building
97
98
 
98
- Run `nx build esbuild` to build the library.
99
+ Run `nx build unbuild` to build the library.
99
100
 
100
101
  ## Running unit tests
101
102
 
102
- Run `nx test esbuild` to execute the unit tests via [Jest](https://jestjs.io).
103
+ Run `nx test unbuild` to execute the unit tests via [Jest](https://jestjs.io).
103
104
 
104
105
  <!-- START footer -->
105
106
  <!-- prettier-ignore-start -->
package/bin/unbuild.cjs CHANGED
@@ -1373,7 +1373,7 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
1373
1373
  if ((0, import_node_fs4.existsSync)(projectPackageJsonPath)) {
1374
1374
  const projectPackageJsonContent = await (0, import_promises3.readFile)(projectPackageJsonPath, "utf8");
1375
1375
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
1376
- if (projectPackageJson.private !== false) {
1376
+ if (projectPackageJson.private !== true) {
1377
1377
  localPackages.push(projectPackageJson);
1378
1378
  }
1379
1379
  }
@@ -1791,7 +1791,13 @@ async function resolveOptions(options, config) {
1791
1791
  }
1792
1792
  resolvedOptions.hooks = {
1793
1793
  "rollup:options": /* @__PURE__ */ __name(async (ctx, opts) => {
1794
- opts.plugins = options.plugins ?? await getDefaultBuildPlugins(options, resolvedOptions);
1794
+ if (options.plugins && options.plugins.length > 0) {
1795
+ writeDebug(` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`, config);
1796
+ opts.plugins = options.plugins;
1797
+ } else {
1798
+ writeDebug(` \u{1F9E9} No plugins found in provided build options, using default plugins`, config);
1799
+ opts.plugins = await getDefaultBuildPlugins(options, resolvedOptions);
1800
+ }
1795
1801
  }, "rollup:options")
1796
1802
  };
1797
1803
  stopwatch();
package/bin/unbuild.js CHANGED
@@ -1352,7 +1352,7 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
1352
1352
  if (existsSync3(projectPackageJsonPath)) {
1353
1353
  const projectPackageJsonContent = await readFile3(projectPackageJsonPath, "utf8");
1354
1354
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
1355
- if (projectPackageJson.private !== false) {
1355
+ if (projectPackageJson.private !== true) {
1356
1356
  localPackages.push(projectPackageJson);
1357
1357
  }
1358
1358
  }
@@ -1770,7 +1770,13 @@ async function resolveOptions(options, config) {
1770
1770
  }
1771
1771
  resolvedOptions.hooks = {
1772
1772
  "rollup:options": /* @__PURE__ */ __name(async (ctx, opts) => {
1773
- opts.plugins = options.plugins ?? await getDefaultBuildPlugins(options, resolvedOptions);
1773
+ if (options.plugins && options.plugins.length > 0) {
1774
+ writeDebug(` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`, config);
1775
+ opts.plugins = options.plugins;
1776
+ } else {
1777
+ writeDebug(` \u{1F9E9} No plugins found in provided build options, using default plugins`, config);
1778
+ opts.plugins = await getDefaultBuildPlugins(options, resolvedOptions);
1779
+ }
1774
1780
  }, "rollup:options")
1775
1781
  };
1776
1782
  stopwatch();
package/dist/build.cjs CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkLJ5GM5M6cjs = require('./chunk-LJ5GM5M6.cjs');
8
+ var _chunkGTRAQVBFcjs = require('./chunk-GTRAQVBF.cjs');
9
9
  require('./chunk-3HGUCQU6.cjs');
10
10
  require('./chunk-DL7OBOWN.cjs');
11
11
  require('./chunk-NGL4NRBA.cjs');
@@ -21,4 +21,4 @@ require('./chunk-BGYQAVKQ.cjs');
21
21
 
22
22
 
23
23
 
24
- exports.build = _chunkLJ5GM5M6cjs.build; exports.cleanOutputPath = _chunkLJ5GM5M6cjs.cleanOutputPath; exports.copyBuildAssets = _chunkLJ5GM5M6cjs.copyBuildAssets; exports.executeUnbuild = _chunkLJ5GM5M6cjs.executeUnbuild; exports.generatePackageJson = _chunkLJ5GM5M6cjs.generatePackageJson; exports.resolveOptions = _chunkLJ5GM5M6cjs.resolveOptions;
24
+ exports.build = _chunkGTRAQVBFcjs.build; exports.cleanOutputPath = _chunkGTRAQVBFcjs.cleanOutputPath; exports.copyBuildAssets = _chunkGTRAQVBFcjs.copyBuildAssets; exports.executeUnbuild = _chunkGTRAQVBFcjs.executeUnbuild; exports.generatePackageJson = _chunkGTRAQVBFcjs.generatePackageJson; exports.resolveOptions = _chunkGTRAQVBFcjs.resolveOptions;
package/dist/build.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  executeUnbuild,
6
6
  generatePackageJson,
7
7
  resolveOptions
8
- } from "./chunk-J7JXWCQS.js";
8
+ } from "./chunk-TUGA3ADZ.js";
9
9
  import "./chunk-2E6P5U5P.js";
10
10
  import "./chunk-UYR662XD.js";
11
11
  import "./chunk-WI52QJ54.js";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
  var _chunk3HGUCQU6cjs = require('./chunk-3HGUCQU6.cjs');
4
4
 
@@ -123,7 +123,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
123
123
  if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
124
124
  const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
125
125
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
126
- if (projectPackageJson.private !== false) {
126
+ if (projectPackageJson.private !== true) {
127
127
  localPackages.push(projectPackageJson);
128
128
  }
129
129
  }
@@ -912,7 +912,13 @@ async function resolveOptions(options, config) {
912
912
  }
913
913
  resolvedOptions.hooks = {
914
914
  "rollup:options": /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (ctx, opts) => {
915
- opts.plugins = await _asyncNullishCoalesce(options.plugins, async () => ( await _chunkDL7OBOWNcjs.getDefaultBuildPlugins.call(void 0, options, resolvedOptions)));
915
+ if (options.plugins && options.plugins.length > 0) {
916
+ _chunk5FQVMM7Icjs.writeDebug.call(void 0, ` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`, config);
917
+ opts.plugins = options.plugins;
918
+ } else {
919
+ _chunk5FQVMM7Icjs.writeDebug.call(void 0, ` \u{1F9E9} No plugins found in provided build options, using default plugins`, config);
920
+ opts.plugins = await _chunkDL7OBOWNcjs.getDefaultBuildPlugins.call(void 0, options, resolvedOptions);
921
+ }
916
922
  }, "rollup:options")
917
923
  };
918
924
  stopwatch();
@@ -123,7 +123,7 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
123
123
  if (existsSync(projectPackageJsonPath)) {
124
124
  const projectPackageJsonContent = await readFile2(projectPackageJsonPath, "utf8");
125
125
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
126
- if (projectPackageJson.private !== false) {
126
+ if (projectPackageJson.private !== true) {
127
127
  localPackages.push(projectPackageJson);
128
128
  }
129
129
  }
@@ -912,7 +912,13 @@ async function resolveOptions(options, config) {
912
912
  }
913
913
  resolvedOptions.hooks = {
914
914
  "rollup:options": /* @__PURE__ */ __name(async (ctx, opts) => {
915
- opts.plugins = options.plugins ?? await getDefaultBuildPlugins(options, resolvedOptions);
915
+ if (options.plugins && options.plugins.length > 0) {
916
+ writeDebug(` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`, config);
917
+ opts.plugins = options.plugins;
918
+ } else {
919
+ writeDebug(` \u{1F9E9} No plugins found in provided build options, using default plugins`, config);
920
+ opts.plugins = await getDefaultBuildPlugins(options, resolvedOptions);
921
+ }
916
922
  }, "rollup:options")
917
923
  };
918
924
  stopwatch();
package/dist/index.cjs CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkLJ5GM5M6cjs = require('./chunk-LJ5GM5M6.cjs');
8
+ var _chunkGTRAQVBFcjs = require('./chunk-GTRAQVBF.cjs');
9
9
 
10
10
 
11
11
 
@@ -35,4 +35,4 @@ require('./chunk-BGYQAVKQ.cjs');
35
35
 
36
36
 
37
37
 
38
- exports.build = _chunkLJ5GM5M6cjs.build; exports.clean = _chunk3HGUCQU6cjs.clean; exports.cleanDirectories = _chunk3HGUCQU6cjs.cleanDirectories; exports.cleanOutputPath = _chunkLJ5GM5M6cjs.cleanOutputPath; exports.copyBuildAssets = _chunkLJ5GM5M6cjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkNGL4NRBAcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkLJ5GM5M6cjs.executeUnbuild; exports.generatePackageJson = _chunkLJ5GM5M6cjs.generatePackageJson; exports.getDefaultBuildPlugins = _chunkDL7OBOWNcjs.getDefaultBuildPlugins; exports.loadConfig = _chunkNGL4NRBAcjs.loadConfig; exports.resolveOptions = _chunkLJ5GM5M6cjs.resolveOptions;
38
+ exports.build = _chunkGTRAQVBFcjs.build; exports.clean = _chunk3HGUCQU6cjs.clean; exports.cleanDirectories = _chunk3HGUCQU6cjs.cleanDirectories; exports.cleanOutputPath = _chunkGTRAQVBFcjs.cleanOutputPath; exports.copyBuildAssets = _chunkGTRAQVBFcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkNGL4NRBAcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkGTRAQVBFcjs.executeUnbuild; exports.generatePackageJson = _chunkGTRAQVBFcjs.generatePackageJson; exports.getDefaultBuildPlugins = _chunkDL7OBOWNcjs.getDefaultBuildPlugins; exports.loadConfig = _chunkNGL4NRBAcjs.loadConfig; exports.resolveOptions = _chunkGTRAQVBFcjs.resolveOptions;
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  executeUnbuild,
6
6
  generatePackageJson,
7
7
  resolveOptions
8
- } from "./chunk-J7JXWCQS.js";
8
+ } from "./chunk-TUGA3ADZ.js";
9
9
  import {
10
10
  clean,
11
11
  cleanDirectories
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/unbuild",
3
- "version": "0.34.1",
3
+ "version": "0.35.0",
4
4
  "type": "module",
5
5
  "description": "A package containing `unbuild` utilities for building Storm Software libraries and applications",
6
6
  "repository": {