@storm-software/unbuild 0.28.0 → 0.28.1

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.27.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.28.0-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 -->
package/bin/unbuild.cjs CHANGED
@@ -2989,17 +2989,23 @@ async function resolveOptions(options, config) {
2989
2989
  tsconfig,
2990
2990
  clean: false,
2991
2991
  entries: entries.reduce((ret, entry) => {
2992
- const entryPath = (0, import_node_path6.dirname)(entry);
2992
+ let entryPath = (0, import_node_path6.dirname)(entry.replace(options.projectRoot, ""));
2993
+ if (entryPath.startsWith(".")) {
2994
+ entryPath = entryPath.substring(1);
2995
+ }
2996
+ if (entryPath.startsWith("/")) {
2997
+ entryPath = entryPath.substring(1);
2998
+ }
2993
2999
  ret.push({
2994
3000
  builder: "mkdist",
2995
- input: `.${entryPath.replace(options.projectRoot, "")}`,
3001
+ input: `./${entryPath}`,
2996
3002
  outDir: joinPaths((0, import_node_path6.relative)(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
2997
3003
  declaration: options.emitTypes !== false ? "compatible" : false,
2998
3004
  format: "esm"
2999
3005
  });
3000
3006
  ret.push({
3001
3007
  builder: "mkdist",
3002
- input: `.${entryPath.replace(options.projectRoot, "")}`,
3008
+ input: `./${entryPath}`,
3003
3009
  outDir: joinPaths((0, import_node_path6.relative)(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
3004
3010
  declaration: options.emitTypes !== false ? "compatible" : false,
3005
3011
  format: "cjs",
@@ -3131,18 +3137,26 @@ async function generatePackageJson(options) {
3131
3137
  packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
3132
3138
  packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
3133
3139
  packageJson.exports ??= {};
3134
- const files = await new import_glob4.Glob("**/*.{ts,tsx}", {
3135
- absolute: false,
3136
- cwd: options.sourceRoot,
3137
- root: options.sourceRoot
3138
- }).walk();
3139
- files.forEach((file) => {
3140
- addPackageJsonExport(file, packageJson.type, options.sourceRoot);
3141
- const split = file.split(".");
3142
- split.pop();
3143
- const entry = split.join(".").replaceAll("\\", "/");
3144
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
3145
- });
3140
+ await Promise.all(options.entries.reduce((ret, entry) => {
3141
+ const entryPath = typeof entry === "string" ? entry : entry.input;
3142
+ if (!ret.includes(entryPath)) {
3143
+ ret.push(entryPath);
3144
+ }
3145
+ return ret;
3146
+ }, []).map(async (entryPath) => {
3147
+ const files = await new import_glob4.Glob("**/*.{ts,tsx}", {
3148
+ absolute: false,
3149
+ cwd: entryPath,
3150
+ root: entryPath
3151
+ }).walk();
3152
+ files.forEach((file) => {
3153
+ addPackageJsonExport(file, packageJson.type, options.sourceRoot);
3154
+ const split = file.split(".");
3155
+ split.pop();
3156
+ const entry = split.join(".").replaceAll("\\", "/");
3157
+ packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
3158
+ });
3159
+ }));
3146
3160
  packageJson.main ??= "./dist/index.cjs";
3147
3161
  packageJson.module ??= "./dist/index.mjs";
3148
3162
  packageJson.types ??= "./dist/index.d.ts";
package/bin/unbuild.js CHANGED
@@ -2964,17 +2964,23 @@ async function resolveOptions(options, config) {
2964
2964
  tsconfig,
2965
2965
  clean: false,
2966
2966
  entries: entries.reduce((ret, entry) => {
2967
- const entryPath = dirname3(entry);
2967
+ let entryPath = dirname3(entry.replace(options.projectRoot, ""));
2968
+ if (entryPath.startsWith(".")) {
2969
+ entryPath = entryPath.substring(1);
2970
+ }
2971
+ if (entryPath.startsWith("/")) {
2972
+ entryPath = entryPath.substring(1);
2973
+ }
2968
2974
  ret.push({
2969
2975
  builder: "mkdist",
2970
- input: `.${entryPath.replace(options.projectRoot, "")}`,
2976
+ input: `./${entryPath}`,
2971
2977
  outDir: joinPaths(relative4(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
2972
2978
  declaration: options.emitTypes !== false ? "compatible" : false,
2973
2979
  format: "esm"
2974
2980
  });
2975
2981
  ret.push({
2976
2982
  builder: "mkdist",
2977
- input: `.${entryPath.replace(options.projectRoot, "")}`,
2983
+ input: `./${entryPath}`,
2978
2984
  outDir: joinPaths(relative4(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
2979
2985
  declaration: options.emitTypes !== false ? "compatible" : false,
2980
2986
  format: "cjs",
@@ -3106,18 +3112,26 @@ async function generatePackageJson(options) {
3106
3112
  packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
3107
3113
  packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
3108
3114
  packageJson.exports ??= {};
3109
- const files = await new Glob2("**/*.{ts,tsx}", {
3110
- absolute: false,
3111
- cwd: options.sourceRoot,
3112
- root: options.sourceRoot
3113
- }).walk();
3114
- files.forEach((file) => {
3115
- addPackageJsonExport(file, packageJson.type, options.sourceRoot);
3116
- const split = file.split(".");
3117
- split.pop();
3118
- const entry = split.join(".").replaceAll("\\", "/");
3119
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
3120
- });
3115
+ await Promise.all(options.entries.reduce((ret, entry) => {
3116
+ const entryPath = typeof entry === "string" ? entry : entry.input;
3117
+ if (!ret.includes(entryPath)) {
3118
+ ret.push(entryPath);
3119
+ }
3120
+ return ret;
3121
+ }, []).map(async (entryPath) => {
3122
+ const files = await new Glob2("**/*.{ts,tsx}", {
3123
+ absolute: false,
3124
+ cwd: entryPath,
3125
+ root: entryPath
3126
+ }).walk();
3127
+ files.forEach((file) => {
3128
+ addPackageJsonExport(file, packageJson.type, options.sourceRoot);
3129
+ const split = file.split(".");
3130
+ split.pop();
3131
+ const entry = split.join(".").replaceAll("\\", "/");
3132
+ packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
3133
+ });
3134
+ }));
3121
3135
  packageJson.main ??= "./dist/index.cjs";
3122
3136
  packageJson.module ??= "./dist/index.mjs";
3123
3137
  packageJson.types ??= "./dist/index.d.ts";
package/dist/build.cjs CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkS2WZ2PGWcjs = require('./chunk-S2WZ2PGW.cjs');
8
+ var _chunkQBOQBJ36cjs = require('./chunk-QBOQBJ36.cjs');
9
9
  require('./chunk-5E3NJ26L.cjs');
10
10
  require('./chunk-Y2DOCJBE.cjs');
11
11
  require('./chunk-V627S7QU.cjs');
@@ -21,4 +21,4 @@ require('./chunk-YDYGZTJK.cjs');
21
21
 
22
22
 
23
23
 
24
- exports.build = _chunkS2WZ2PGWcjs.build; exports.cleanOutputPath = _chunkS2WZ2PGWcjs.cleanOutputPath; exports.copyBuildAssets = _chunkS2WZ2PGWcjs.copyBuildAssets; exports.executeUnbuild = _chunkS2WZ2PGWcjs.executeUnbuild; exports.generatePackageJson = _chunkS2WZ2PGWcjs.generatePackageJson; exports.resolveOptions = _chunkS2WZ2PGWcjs.resolveOptions;
24
+ exports.build = _chunkQBOQBJ36cjs.build; exports.cleanOutputPath = _chunkQBOQBJ36cjs.cleanOutputPath; exports.copyBuildAssets = _chunkQBOQBJ36cjs.copyBuildAssets; exports.executeUnbuild = _chunkQBOQBJ36cjs.executeUnbuild; exports.generatePackageJson = _chunkQBOQBJ36cjs.generatePackageJson; exports.resolveOptions = _chunkQBOQBJ36cjs.resolveOptions;
package/dist/build.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  executeUnbuild,
6
6
  generatePackageJson,
7
7
  resolveOptions
8
- } from "./chunk-54R2TCTI.js";
8
+ } from "./chunk-ZE7ZBVLJ.js";
9
9
  import "./chunk-VC7N2YVM.js";
10
10
  import "./chunk-K2D7TQ7G.js";
11
11
  import "./chunk-C5IHRWT3.js";
@@ -2222,17 +2222,23 @@ async function resolveOptions(options, config) {
2222
2222
  tsconfig,
2223
2223
  clean: false,
2224
2224
  entries: entries.reduce((ret, entry) => {
2225
- const entryPath = _path.dirname.call(void 0, entry);
2225
+ let entryPath = _path.dirname.call(void 0, entry.replace(options.projectRoot, ""));
2226
+ if (entryPath.startsWith(".")) {
2227
+ entryPath = entryPath.substring(1);
2228
+ }
2229
+ if (entryPath.startsWith("/")) {
2230
+ entryPath = entryPath.substring(1);
2231
+ }
2226
2232
  ret.push({
2227
2233
  builder: "mkdist",
2228
- input: `.${entryPath.replace(options.projectRoot, "")}`,
2234
+ input: `./${entryPath}`,
2229
2235
  outDir: _chunkFG6XQ26Mcjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkFG6XQ26Mcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
2230
2236
  declaration: options.emitTypes !== false ? "compatible" : false,
2231
2237
  format: "esm"
2232
2238
  });
2233
2239
  ret.push({
2234
2240
  builder: "mkdist",
2235
- input: `.${entryPath.replace(options.projectRoot, "")}`,
2241
+ input: `./${entryPath}`,
2236
2242
  outDir: _chunkFG6XQ26Mcjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkFG6XQ26Mcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
2237
2243
  declaration: options.emitTypes !== false ? "compatible" : false,
2238
2244
  format: "cjs",
@@ -2364,18 +2370,26 @@ async function generatePackageJson(options) {
2364
2370
  packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
2365
2371
  packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
2366
2372
  packageJson.exports ??= {};
2367
- const files = await new (0, _glob.Glob)("**/*.{ts,tsx}", {
2368
- absolute: false,
2369
- cwd: options.sourceRoot,
2370
- root: options.sourceRoot
2371
- }).walk();
2372
- files.forEach((file) => {
2373
- addPackageJsonExport(file, packageJson.type, options.sourceRoot);
2374
- const split = file.split(".");
2375
- split.pop();
2376
- const entry = split.join(".").replaceAll("\\", "/");
2377
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
2378
- });
2373
+ await Promise.all(options.entries.reduce((ret, entry) => {
2374
+ const entryPath = typeof entry === "string" ? entry : entry.input;
2375
+ if (!ret.includes(entryPath)) {
2376
+ ret.push(entryPath);
2377
+ }
2378
+ return ret;
2379
+ }, []).map(async (entryPath) => {
2380
+ const files = await new (0, _glob.Glob)("**/*.{ts,tsx}", {
2381
+ absolute: false,
2382
+ cwd: entryPath,
2383
+ root: entryPath
2384
+ }).walk();
2385
+ files.forEach((file) => {
2386
+ addPackageJsonExport(file, packageJson.type, options.sourceRoot);
2387
+ const split = file.split(".");
2388
+ split.pop();
2389
+ const entry = split.join(".").replaceAll("\\", "/");
2390
+ packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
2391
+ });
2392
+ }));
2379
2393
  packageJson.main ??= "./dist/index.cjs";
2380
2394
  packageJson.module ??= "./dist/index.mjs";
2381
2395
  packageJson.types ??= "./dist/index.d.ts";
@@ -2221,17 +2221,23 @@ async function resolveOptions(options, config) {
2221
2221
  tsconfig,
2222
2222
  clean: false,
2223
2223
  entries: entries.reduce((ret, entry) => {
2224
- const entryPath = dirname2(entry);
2224
+ let entryPath = dirname2(entry.replace(options.projectRoot, ""));
2225
+ if (entryPath.startsWith(".")) {
2226
+ entryPath = entryPath.substring(1);
2227
+ }
2228
+ if (entryPath.startsWith("/")) {
2229
+ entryPath = entryPath.substring(1);
2230
+ }
2225
2231
  ret.push({
2226
2232
  builder: "mkdist",
2227
- input: `.${entryPath.replace(options.projectRoot, "")}`,
2233
+ input: `./${entryPath}`,
2228
2234
  outDir: joinPaths(relative3(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
2229
2235
  declaration: options.emitTypes !== false ? "compatible" : false,
2230
2236
  format: "esm"
2231
2237
  });
2232
2238
  ret.push({
2233
2239
  builder: "mkdist",
2234
- input: `.${entryPath.replace(options.projectRoot, "")}`,
2240
+ input: `./${entryPath}`,
2235
2241
  outDir: joinPaths(relative3(joinPaths(config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist"),
2236
2242
  declaration: options.emitTypes !== false ? "compatible" : false,
2237
2243
  format: "cjs",
@@ -2363,18 +2369,26 @@ async function generatePackageJson(options) {
2363
2369
  packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
2364
2370
  packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
2365
2371
  packageJson.exports ??= {};
2366
- const files = await new Glob2("**/*.{ts,tsx}", {
2367
- absolute: false,
2368
- cwd: options.sourceRoot,
2369
- root: options.sourceRoot
2370
- }).walk();
2371
- files.forEach((file) => {
2372
- addPackageJsonExport(file, packageJson.type, options.sourceRoot);
2373
- const split = file.split(".");
2374
- split.pop();
2375
- const entry = split.join(".").replaceAll("\\", "/");
2376
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
2377
- });
2372
+ await Promise.all(options.entries.reduce((ret, entry) => {
2373
+ const entryPath = typeof entry === "string" ? entry : entry.input;
2374
+ if (!ret.includes(entryPath)) {
2375
+ ret.push(entryPath);
2376
+ }
2377
+ return ret;
2378
+ }, []).map(async (entryPath) => {
2379
+ const files = await new Glob2("**/*.{ts,tsx}", {
2380
+ absolute: false,
2381
+ cwd: entryPath,
2382
+ root: entryPath
2383
+ }).walk();
2384
+ files.forEach((file) => {
2385
+ addPackageJsonExport(file, packageJson.type, options.sourceRoot);
2386
+ const split = file.split(".");
2387
+ split.pop();
2388
+ const entry = split.join(".").replaceAll("\\", "/");
2389
+ packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
2390
+ });
2391
+ }));
2378
2392
  packageJson.main ??= "./dist/index.cjs";
2379
2393
  packageJson.module ??= "./dist/index.mjs";
2380
2394
  packageJson.types ??= "./dist/index.d.ts";
package/dist/index.cjs CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkS2WZ2PGWcjs = require('./chunk-S2WZ2PGW.cjs');
8
+ var _chunkQBOQBJ36cjs = require('./chunk-QBOQBJ36.cjs');
9
9
 
10
10
 
11
11
 
@@ -35,4 +35,4 @@ require('./chunk-YDYGZTJK.cjs');
35
35
 
36
36
 
37
37
 
38
- exports.build = _chunkS2WZ2PGWcjs.build; exports.clean = _chunk5E3NJ26Lcjs.clean; exports.cleanDirectories = _chunk5E3NJ26Lcjs.cleanDirectories; exports.cleanOutputPath = _chunkS2WZ2PGWcjs.cleanOutputPath; exports.copyBuildAssets = _chunkS2WZ2PGWcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkV627S7QUcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkS2WZ2PGWcjs.executeUnbuild; exports.generatePackageJson = _chunkS2WZ2PGWcjs.generatePackageJson; exports.getDefaultBuildPlugins = _chunkY2DOCJBEcjs.getDefaultBuildPlugins; exports.loadConfig = _chunkV627S7QUcjs.loadConfig; exports.resolveOptions = _chunkS2WZ2PGWcjs.resolveOptions;
38
+ exports.build = _chunkQBOQBJ36cjs.build; exports.clean = _chunk5E3NJ26Lcjs.clean; exports.cleanDirectories = _chunk5E3NJ26Lcjs.cleanDirectories; exports.cleanOutputPath = _chunkQBOQBJ36cjs.cleanOutputPath; exports.copyBuildAssets = _chunkQBOQBJ36cjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkV627S7QUcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkQBOQBJ36cjs.executeUnbuild; exports.generatePackageJson = _chunkQBOQBJ36cjs.generatePackageJson; exports.getDefaultBuildPlugins = _chunkY2DOCJBEcjs.getDefaultBuildPlugins; exports.loadConfig = _chunkV627S7QUcjs.loadConfig; exports.resolveOptions = _chunkQBOQBJ36cjs.resolveOptions;
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  executeUnbuild,
6
6
  generatePackageJson,
7
7
  resolveOptions
8
- } from "./chunk-54R2TCTI.js";
8
+ } from "./chunk-ZE7ZBVLJ.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.28.0",
3
+ "version": "0.28.1",
4
4
  "type": "module",
5
5
  "description": "A package containing `unbuild` utilities for building Storm Software libraries and applications",
6
6
  "repository": {
@@ -171,9 +171,9 @@
171
171
  "@nx/devkit": "^20.3.1",
172
172
  "@nx/js": "^20.3.1",
173
173
  "@rollup/pluginutils": "^5.1.4",
174
- "@storm-software/build-tools": "0.133.0",
175
- "@storm-software/config": "1.97.4",
176
- "@storm-software/config-tools": "1.140.0",
174
+ "@storm-software/build-tools": "0.133.1",
175
+ "@storm-software/config": "1.97.5",
176
+ "@storm-software/config-tools": "1.140.1",
177
177
  "@swc/core": "1.7.26",
178
178
  "@types/node": "^22.10.2",
179
179
  "commander": "^12.1.0",