@storm-software/projen 0.9.62 → 0.9.64

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/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  # Changelog for Storm Ops - Projen
4
4
 
5
+ ## [0.9.64](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.64) (2025-04-29)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **monorepo:** Regenerate README markdown files
10
+ ([25750fcd9](https://github.com/storm-software/storm-ops/commit/25750fcd9))
11
+ - **monorepo:** Regenerate README markdown files
12
+ ([87d08a499](https://github.com/storm-software/storm-ops/commit/87d08a499))
13
+
14
+ ## [0.9.63](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.63) (2025-04-28)
15
+
16
+ ### Miscellaneous
17
+
18
+ - **eslint:** Disable markdown eslint rules by default
19
+ ([a84e36deb](https://github.com/storm-software/storm-ops/commit/a84e36deb))
20
+ - **monorepo:** Regenerate README markdown files
21
+ ([adffb8372](https://github.com/storm-software/storm-ops/commit/adffb8372))
22
+
5
23
  ## [0.9.62](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.62) (2025-04-28)
6
24
 
7
25
  ### Bug Fixes
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.9.61-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.9.63-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 Projen Tools](#storm-projen-tools)
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  correctPaths,
3
3
  joinPaths
4
- } from "./chunk-C24G3GOI.mjs";
4
+ } from "./chunk-ONCAPHTE.mjs";
5
5
  import {
6
6
  __dirname,
7
7
  __name,
8
8
  __require,
9
9
  init_esm_shims
10
- } from "./chunk-WOH3JDTU.mjs";
10
+ } from "./chunk-IS6JH24X.mjs";
11
11
 
12
12
  // src/generators/init/generator.ts
13
13
  init_esm_shims();
@@ -1679,7 +1679,6 @@ var DEFAULT_COMPILED_BANNER = `/*****************************************
1679
1679
  *****************************************/
1680
1680
  `;
1681
1681
  var DEFAULT_ENVIRONMENT = "production";
1682
- var DEFAULT_TARGET = "esnext";
1683
1682
  var DEFAULT_ORGANIZATION = "storm-software";
1684
1683
 
1685
1684
  // ../build-tools/src/plugins/index.ts
@@ -1948,9 +1947,7 @@ init_esm_shims();
1948
1947
  var DEFAULT_BUILD_OPTIONS = {
1949
1948
  assets: [],
1950
1949
  platform: "node",
1951
- target: [
1952
- "esnext"
1953
- ],
1950
+ target: "node22",
1954
1951
  format: "esm",
1955
1952
  tsconfig: "tsconfig.json",
1956
1953
  mode: "production",
@@ -1962,6 +1959,7 @@ var DEFAULT_BUILD_OPTIONS = {
1962
1959
  shims: false,
1963
1960
  watch: false,
1964
1961
  bundle: true,
1962
+ distDir: "dist",
1965
1963
  loader: {
1966
1964
  ".aac": "file",
1967
1965
  ".css": "file",
@@ -2107,22 +2105,17 @@ async function resolveContext(userOptions) {
2107
2105
  throw new Error("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.");
2108
2106
  }
2109
2107
  const options = defu4(userOptions, DEFAULT_BUILD_OPTIONS);
2110
- options.name ??= `${projectName}-${options.format}`;
2111
- options.target ??= DEFAULT_TARGET;
2112
2108
  const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
2113
2109
  if (!existsSync5(packageJsonPath)) {
2114
2110
  throw new Error("Cannot find package.json configuration");
2115
2111
  }
2116
2112
  const env = getEnv("esbuild", options);
2117
2113
  const resolvedOptions = {
2114
+ name: projectName,
2118
2115
  ...options,
2119
2116
  tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
2120
- distDir: "dist",
2121
- name: projectName,
2122
2117
  metafile: userOptions.mode === "development",
2123
- ...userOptions,
2124
2118
  clean: false,
2125
- target: userOptions.target || options.target,
2126
2119
  splitting: options.format === "iife" ? false : options.treeshake === void 0 ? options.splitting : true,
2127
2120
  env,
2128
2121
  define: {
@@ -2171,26 +2164,79 @@ async function generatePackageJson(context) {
2171
2164
  if (context.options.entry) {
2172
2165
  packageJson.exports ??= {};
2173
2166
  packageJson.exports["./package.json"] ??= "./package.json";
2174
- packageJson.exports["."] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js`;
2175
2167
  const entryPoints = Array.isArray(context.options.entry) ? context.options.entry : Object.keys(context.options.entry);
2176
- for (const entryPoint of entryPoints) {
2177
- if (context.options.entry[entryPoint]) {
2178
- const entry = context.options.entry[entryPoint].replaceAll("\\", "/").replaceAll(/^(\.\/)*/g, "").replace(/\.([cm])?[jt]s(x)?$/g, "");
2179
- packageJson.exports[`./${entry}`] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entry}.js`;
2168
+ if (entryPoints.length > 0) {
2169
+ const defaultEntry = entryPoints.includes("index") ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entryPoints[0]}`;
2170
+ const isEsm = Array.isArray(context.options.format) ? context.options.format.includes("esm") : context.options.format === "esm";
2171
+ const isCjs = Array.isArray(context.options.format) ? context.options.format.includes("cjs") : context.options.format === "cjs";
2172
+ const isDts = context.options.dts || context.options.experimentalDts;
2173
+ packageJson.exports["."] ??= `${defaultEntry}.${isEsm ? "mjs" : isCjs ? "cjs" : "js"}`;
2174
+ for (const entryPoint of entryPoints) {
2175
+ packageJson.exports[`./${entryPoint}`] ??= {};
2176
+ if (isEsm) {
2177
+ if (isDts) {
2178
+ packageJson.exports[`./${entryPoint}`].import = {
2179
+ types: `./dist/${entryPoint}.d.mts`,
2180
+ default: `./dist/${entryPoint}.mjs`
2181
+ };
2182
+ } else {
2183
+ packageJson.exports[`./${entryPoint}`].import = `./dist/${entryPoint}.mjs`;
2184
+ }
2185
+ if (isDts) {
2186
+ packageJson.exports[`./${entryPoint}`].default = {
2187
+ types: `./dist/${entryPoint}.d.mts`,
2188
+ default: `./dist/${entryPoint}.mjs`
2189
+ };
2190
+ } else {
2191
+ packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.mjs`;
2192
+ }
2193
+ }
2194
+ if (isCjs) {
2195
+ if (isDts) {
2196
+ packageJson.exports[`./${entryPoint}`].require = {
2197
+ types: `./dist/${entryPoint}.d.cts`,
2198
+ default: `./dist/${entryPoint}.cjs`
2199
+ };
2200
+ } else {
2201
+ packageJson.exports[`./${entryPoint}`].require = `./dist/${entryPoint}.cjs`;
2202
+ }
2203
+ if (!isEsm) {
2204
+ if (isDts) {
2205
+ packageJson.exports[`./${entryPoint}`].default = {
2206
+ types: `./dist/${entryPoint}.d.cts`,
2207
+ default: `./dist/${entryPoint}.cjs`
2208
+ };
2209
+ } else {
2210
+ packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.cjs`;
2211
+ }
2212
+ }
2213
+ }
2214
+ if (!isEsm && !isCjs) {
2215
+ if (isDts) {
2216
+ packageJson.exports[`./${entryPoint}`].default = {
2217
+ types: `./dist/${entryPoint}.d.ts`,
2218
+ default: `./dist/${entryPoint}.js`
2219
+ };
2220
+ } else {
2221
+ packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.js`;
2222
+ }
2223
+ }
2180
2224
  }
2181
- }
2182
- if (context.options.format === "esm") {
2183
- packageJson.module = packageJson.type === "module" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.mjs`;
2184
- } else {
2185
- packageJson.main = packageJson.type === "commonjs" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.cjs`;
2186
- }
2187
- packageJson.types = `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.d.ts`;
2188
- packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
2189
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
2190
- ret[key.replace("/index", "")] = packageJson.exports[key];
2225
+ if (isEsm) {
2226
+ packageJson.module = `${defaultEntry}.mjs`;
2227
+ } else {
2228
+ packageJson.main = `${defaultEntry}.cjs`;
2229
+ }
2230
+ if (isDts) {
2231
+ packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
2191
2232
  }
2192
- return ret;
2193
- }, packageJson.exports);
2233
+ packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
2234
+ if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
2235
+ ret[key.replace("/index", "")] = packageJson.exports[key];
2236
+ }
2237
+ return ret;
2238
+ }, packageJson.exports);
2239
+ }
2194
2240
  }
2195
2241
  await writeJsonFile(joinPaths(context.outputPath, "package.json"), packageJson);
2196
2242
  stopwatch();
@@ -2203,7 +2249,7 @@ async function executeTsup(context) {
2203
2249
  const stopwatch = getStopwatch(`${context.options.name} build`);
2204
2250
  await tsup({
2205
2251
  ...context.options,
2206
- outDir: context.outputPath,
2252
+ outDir: context.options.distDir ? joinPaths(context.outputPath, context.options.distDir) : context.outputPath,
2207
2253
  workspaceConfig: context.workspaceConfig
2208
2254
  });
2209
2255
  stopwatch();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __commonJS,
3
3
  init_esm_shims
4
- } from "./chunk-WOH3JDTU.mjs";
4
+ } from "./chunk-IS6JH24X.mjs";
5
5
 
6
6
  // src/components/index.ts
7
7
  var require_components = __commonJS({
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkBBEYLIXNjs = require('./chunk-BBEYLIXN.js');
4
+ var _chunkXIADWDXKjs = require('./chunk-XIADWDXK.js');
5
5
 
6
6
  // ../config-tools/src/utilities/correct-paths.ts
7
- _chunkBBEYLIXNjs.init_cjs_shims.call(void 0, );
7
+ _chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
8
8
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
9
9
  function normalizeWindowsPath(input = "") {
10
10
  if (!input) {
@@ -12,11 +12,11 @@ function normalizeWindowsPath(input = "") {
12
12
  }
13
13
  return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
14
14
  }
15
- _chunkBBEYLIXNjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
15
+ _chunkXIADWDXKjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
16
16
  var _UNC_REGEX = /^[/\\]{2}/;
17
17
  var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
18
18
  var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
19
- var correctPaths = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, function(path) {
19
+ var correctPaths = /* @__PURE__ */ _chunkXIADWDXKjs.__name.call(void 0, function(path) {
20
20
  if (!path || path.length === 0) {
21
21
  return ".";
22
22
  }
@@ -45,7 +45,7 @@ var correctPaths = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, function
45
45
  }
46
46
  return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
47
47
  }, "correctPaths");
48
- var joinPaths = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, function(...segments) {
48
+ var joinPaths = /* @__PURE__ */ _chunkXIADWDXKjs.__name.call(void 0, function(...segments) {
49
49
  let path = "";
50
50
  for (const seg of segments) {
51
51
  if (!seg) {
@@ -126,8 +126,8 @@ function normalizeString(path, allowAboveRoot) {
126
126
  }
127
127
  return res;
128
128
  }
129
- _chunkBBEYLIXNjs.__name.call(void 0, normalizeString, "normalizeString");
130
- var isAbsolute = /* @__PURE__ */ _chunkBBEYLIXNjs.__name.call(void 0, function(p) {
129
+ _chunkXIADWDXKjs.__name.call(void 0, normalizeString, "normalizeString");
130
+ var isAbsolute = /* @__PURE__ */ _chunkXIADWDXKjs.__name.call(void 0, function(p) {
131
131
  return _IS_ABSOLUTE_RE.test(p);
132
132
  }, "isAbsolute");
133
133
 
@@ -39,12 +39,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  mod
40
40
  ));
41
41
 
42
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__aad0536395a8d4adbad069f47cf0551b/node_modules/tsup/assets/esm_shims.js
42
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/assets/esm_shims.js
43
43
  import { fileURLToPath } from "url";
44
44
  import path from "path";
45
45
  var getFilename, getDirname, __dirname;
46
46
  var init_esm_shims = __esm({
47
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__aad0536395a8d4adbad069f47cf0551b/node_modules/tsup/assets/esm_shims.js"() {
47
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/assets/esm_shims.js"() {
48
48
  getFilename = /* @__PURE__ */ __name(() => fileURLToPath(import.meta.url), "getFilename");
49
49
  getDirname = /* @__PURE__ */ __name(() => path.dirname(getFilename()), "getDirname");
50
50
  __dirname = /* @__PURE__ */ getDirname();