@storm-software/projen 0.12.2 → 0.13.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/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  # Changelog for Storm Ops - Projen
4
4
 
5
+ ## [0.13.1](https://github.com/storm-software/storm-ops/releases/tag/projen%400.13.1) (2025-05-06)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **eslint:** Regenerate type definitions
10
+ ([aa082a323](https://github.com/storm-software/storm-ops/commit/aa082a323))
11
+ - **monorepo:** Regenerate README markdown files
12
+ ([ed5072712](https://github.com/storm-software/storm-ops/commit/ed5072712))
13
+
14
+ ## [0.13.0](https://github.com/storm-software/storm-ops/releases/tag/projen%400.13.0) (2025-05-06)
15
+
16
+ ### Features
17
+
18
+ - **workspace-tools:** Update the release executor to replace workspace
19
+ configurations
20
+ ([7d2aa456c](https://github.com/storm-software/storm-ops/commit/7d2aa456c))
21
+
22
+ ### Miscellaneous
23
+
24
+ - **monorepo:** Regenerate README markdown files
25
+ ([96f241a4d](https://github.com/storm-software/storm-ops/commit/96f241a4d))
26
+ - **monorepo:** Regenerate README markdown files
27
+ ([17bbe7e16](https://github.com/storm-software/storm-ops/commit/17bbe7e16))
28
+
5
29
  ## [0.12.2](https://github.com/storm-software/storm-ops/releases/tag/projen%400.12.2) (2025-05-06)
6
30
 
7
31
  ### 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.12.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)
24
+ [![Version](https://img.shields.io/badge/version-0.12.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 -->
@@ -2693,15 +2693,12 @@ _chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
2693
2693
 
2694
2694
 
2695
2695
 
2696
-
2697
- var _columnify = require('columnify'); var _columnify2 = _interopRequireDefault(_columnify);
2696
+ // ../workspace-tools/src/utils/pnpm-deps-update.ts
2697
+ _chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
2698
2698
 
2699
2699
 
2700
2700
 
2701
- var _npmrunpath = require('npm-run-path');
2702
2701
 
2703
- // ../workspace-tools/src/utils/pnpm-deps-update.ts
2704
- _chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
2705
2702
 
2706
2703
 
2707
2704
  var _prettier = require('prettier');
@@ -13,7 +13,7 @@ init_esm_shims();
13
13
  import {
14
14
  addDependenciesToPackageJson as addDependenciesToPackageJson4,
15
15
  formatFiles as formatFiles9,
16
- readJsonFile as readJsonFile5,
16
+ readJsonFile as readJsonFile4,
17
17
  runTasksInSerial
18
18
  } from "@nx/devkit";
19
19
 
@@ -2691,18 +2691,15 @@ var executor_default6 = withRunExecutor(
2691
2691
 
2692
2692
  // ../workspace-tools/src/executors/npm-publish/executor.ts
2693
2693
  init_esm_shims();
2694
- import {
2695
- detectPackageManager,
2696
- readJsonFile
2697
- } from "@nx/devkit";
2698
- import columnify from "columnify";
2699
- import { exec, execSync as execSync3 } from "node:child_process";
2700
- import { existsSync as existsSync8 } from "node:fs";
2701
- import { relative as relative3 } from "node:path";
2702
- import { env as appendLocalEnv } from "npm-run-path";
2694
+ import { execSync as execSync3 } from "node:child_process";
2695
+ import { readFile as readFile6 } from "node:fs/promises";
2703
2696
 
2704
2697
  // ../workspace-tools/src/utils/pnpm-deps-update.ts
2705
2698
  init_esm_shims();
2699
+ import {
2700
+ createProjectGraphAsync as createProjectGraphAsync3,
2701
+ readCachedProjectGraph as readCachedProjectGraph2
2702
+ } from "@nx/devkit";
2706
2703
  import { existsSync as existsSync7 } from "node:fs";
2707
2704
  import { readFile as readFile5, writeFile as writeFile2 } from "node:fs/promises";
2708
2705
  import { format } from "prettier";
@@ -4095,8 +4092,8 @@ var DEFAULT_COMMIT_QUESTIONS = {
4095
4092
  init_esm_shims();
4096
4093
 
4097
4094
  // ../workspace-tools/src/generators/release-version/generator.ts
4098
- import { exec as exec2, execSync as execSync4 } from "node:child_process";
4099
- import { relative as relative4 } from "node:path";
4095
+ import { exec, execSync as execSync4 } from "node:child_process";
4096
+ import { relative as relative3 } from "node:path";
4100
4097
  import { IMPLICIT_DEFAULT_RELEASE_GROUP } from "nx/src/command-line/release/config/config";
4101
4098
  import {
4102
4099
  getFirstGitCommit,
@@ -4507,10 +4504,10 @@ import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/proj
4507
4504
  init_esm_shims();
4508
4505
  import {
4509
4506
  output as output2,
4510
- readJsonFile as readJsonFile2,
4507
+ readJsonFile,
4511
4508
  workspaceRoot as workspaceRoot2
4512
4509
  } from "@nx/devkit";
4513
- import { existsSync as existsSync9 } from "node:fs";
4510
+ import { existsSync as existsSync8 } from "node:fs";
4514
4511
  import { join as join4 } from "node:path";
4515
4512
  import {
4516
4513
  getNpmLockfileDependencies,
@@ -4535,15 +4532,15 @@ var PNPM_LOCK_PATH = join4(workspaceRoot2, PNPM_LOCK_FILE);
4535
4532
  init_esm_shims();
4536
4533
  import {
4537
4534
  joinPathFragments as joinPathFragments6,
4538
- readJsonFile as readJsonFile3
4535
+ readJsonFile as readJsonFile2
4539
4536
  } from "@nx/devkit";
4540
- import { existsSync as existsSync10 } from "node:fs";
4537
+ import { existsSync as existsSync9 } from "node:fs";
4541
4538
 
4542
4539
  // ../workspace-tools/src/utils/plugin-helpers.ts
4543
4540
  init_esm_shims();
4544
- import { readJsonFile as readJsonFile4 } from "@nx/devkit";
4541
+ import { readJsonFile as readJsonFile3 } from "@nx/devkit";
4545
4542
  import defu6 from "defu";
4546
- import { existsSync as existsSync11 } from "node:fs";
4543
+ import { existsSync as existsSync10 } from "node:fs";
4547
4544
  import { dirname, join as join5 } from "node:path";
4548
4545
 
4549
4546
  // ../workspace-tools/src/utils/typia-transform.ts
@@ -4565,7 +4562,7 @@ var generator_default6 = withRunGenerator(
4565
4562
  );
4566
4563
  function addProjenDeps(tree, options) {
4567
4564
  return () => {
4568
- const packageJson = readJsonFile5(`${options.directory}/package.json`);
4565
+ const packageJson = readJsonFile4(`${options.directory}/package.json`);
4569
4566
  packageJson.dependencies["projen"] ??= "^0.91.6";
4570
4567
  if (packageJson) {
4571
4568
  addDependenciesToPackageJson4(
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NG74QN4S.js');
2
2
 
3
3
 
4
- var _chunkTDEJ37AFjs = require('./chunk-TDEJ37AF.js');
4
+ var _chunkEJF5PU5Gjs = require('./chunk-EJF5PU5G.js');
5
5
  require('./chunk-NNSWWAGP.js');
6
6
  require('./chunk-BG73ZJER.js');
7
7
 
8
8
 
9
- exports.initGeneratorFn = _chunkTDEJ37AFjs.initGeneratorFn;
9
+ exports.initGeneratorFn = _chunkEJF5PU5Gjs.initGeneratorFn;
@@ -1,7 +1,7 @@
1
1
  import "./chunk-ZVRRJOP5.mjs";
2
2
  import {
3
3
  initGeneratorFn
4
- } from "./chunk-H3Y52P6T.mjs";
4
+ } from "./chunk-PH65VVUZ.mjs";
5
5
  import "./chunk-PEM26WKS.mjs";
6
6
  import "./chunk-SHIGQSVE.mjs";
7
7
  export {
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  var _chunkDUNMCAJEjs = require('./chunk-DUNMCAJE.js');
5
5
 
6
6
 
7
- var _chunkTDEJ37AFjs = require('./chunk-TDEJ37AF.js');
7
+ var _chunkEJF5PU5Gjs = require('./chunk-EJF5PU5G.js');
8
8
  require('./chunk-NNSWWAGP.js');
9
9
 
10
10
 
@@ -16,10 +16,10 @@ var _chunkBG73ZJERjs = require('./chunk-BG73ZJER.js');
16
16
  // index.ts
17
17
  var index_exports = {};
18
18
  _chunkBG73ZJERjs.__export.call(void 0, index_exports, {
19
- initGeneratorFn: () => _chunkTDEJ37AFjs.initGeneratorFn
19
+ initGeneratorFn: () => _chunkEJF5PU5Gjs.initGeneratorFn
20
20
  });
21
21
  _chunkBG73ZJERjs.init_cjs_shims.call(void 0, );
22
22
  _chunkBG73ZJERjs.__reExport.call(void 0, index_exports, _chunkBG73ZJERjs.__toESM.call(void 0, _chunkDUNMCAJEjs.require_components.call(void 0, )));
23
23
 
24
24
 
25
- exports.initGeneratorFn = _chunkTDEJ37AFjs.initGeneratorFn;
25
+ exports.initGeneratorFn = _chunkEJF5PU5Gjs.initGeneratorFn;
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-NVTKHBEW.mjs";
5
5
  import {
6
6
  initGeneratorFn
7
- } from "./chunk-H3Y52P6T.mjs";
7
+ } from "./chunk-PH65VVUZ.mjs";
8
8
  import "./chunk-PEM26WKS.mjs";
9
9
  import {
10
10
  __export,
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkTDEJ37AFjs = require('../../../chunk-TDEJ37AF.js');
4
+ var _chunkEJF5PU5Gjs = require('../../../chunk-EJF5PU5G.js');
5
5
  require('../../../chunk-NNSWWAGP.js');
6
6
  require('../../../chunk-BG73ZJER.js');
7
7
 
8
8
 
9
9
 
10
- exports.default = _chunkTDEJ37AFjs.generator_default; exports.initGeneratorFn = _chunkTDEJ37AFjs.initGeneratorFn;
10
+ exports.default = _chunkEJF5PU5Gjs.generator_default; exports.initGeneratorFn = _chunkEJF5PU5Gjs.initGeneratorFn;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generator_default,
3
3
  initGeneratorFn
4
- } from "../../../chunk-H3Y52P6T.mjs";
4
+ } from "../../../chunk-PH65VVUZ.mjs";
5
5
  import "../../../chunk-PEM26WKS.mjs";
6
6
  import "../../../chunk-SHIGQSVE.mjs";
7
7
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/projen",
3
- "version": "0.12.2",
3
+ "version": "0.13.1",
4
4
  "type": "commonjs",
5
5
  "description": "Tools for managing Projen configuration automation within a Nx workspace.",
6
6
  "repository": {
@@ -32,28 +32,16 @@
32
32
  "types": "./dist/index.d.mts",
33
33
  "default": "./dist/index.mjs"
34
34
  },
35
- "require": {
36
- "types": "./dist/index.d.ts",
37
- "default": "./dist/index.js"
38
- },
39
- "default": {
40
- "types": "./dist/index.d.ts",
41
- "default": "./dist/index.js"
42
- }
35
+ "require": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
36
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
43
37
  },
44
38
  "./index": {
45
39
  "import": {
46
40
  "types": "./dist/index.d.mts",
47
41
  "default": "./dist/index.mjs"
48
42
  },
49
- "require": {
50
- "types": "./dist/index.d.ts",
51
- "default": "./dist/index.js"
52
- },
53
- "default": {
54
- "types": "./dist/index.d.ts",
55
- "default": "./dist/index.js"
56
- }
43
+ "require": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
44
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
57
45
  },
58
46
  "./executors": {
59
47
  "import": {
@@ -135,15 +123,9 @@
135
123
  "untyped": "1.5.2"
136
124
  },
137
125
  "peerDependenciesMeta": {
138
- "@nx/devkit": {
139
- "optional": false
140
- },
141
- "nx": {
142
- "optional": false
143
- },
144
- "projen": {
145
- "optional": false
146
- }
126
+ "@nx/devkit": { "optional": false },
127
+ "nx": { "optional": false },
128
+ "projen": { "optional": false }
147
129
  },
148
130
  "dependencies": {
149
131
  "@aws/pdk": "^0.25.17",
@@ -157,9 +139,7 @@
157
139
  "tsup": "8.4.0",
158
140
  "untyped": "^1.5.2"
159
141
  },
160
- "publishConfig": {
161
- "access": "public"
162
- },
142
+ "publishConfig": { "access": "public" },
163
143
  "executors": "./executors.json",
164
144
  "generators": "./generators.json"
165
- }
145
+ }
package/.eslintrc.json DELETED
@@ -1,40 +0,0 @@
1
- {
2
- "extends": ["../../.eslintrc.json"],
3
- "ignorePatterns": ["!**/*"],
4
- "overrides": [
5
- {
6
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7
- "parserOptions": {
8
- "project": ["packages/pulumi-tools/tsconfig.*?.json"]
9
- },
10
- "rules": {}
11
- },
12
- {
13
- "files": ["*.ts", "*.tsx"],
14
- "rules": {}
15
- },
16
- {
17
- "files": ["*.js", "*.jsx"],
18
- "rules": {}
19
- },
20
- {
21
- "files": ["*.json"],
22
- "parser": "jsonc-eslint-parser",
23
- "rules": {
24
- "@nx/dependency-checks": [
25
- "error",
26
- {
27
- "ignoredFiles": ["{projectRoot}/eslint.config.{js,cjs,mjs}"]
28
- }
29
- ]
30
- }
31
- },
32
- {
33
- "files": ["./package.json", "./executors.json", "./generators.json"],
34
- "parser": "jsonc-eslint-parser",
35
- "rules": {
36
- "@nx/nx-plugin-checks": "error"
37
- }
38
- }
39
- ]
40
- }
package/generators.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./src/generators/init/generator";
2
- export { type InitGeneratorSchema } from "./src/generators/init/schema.d";
package/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./generators";
2
- export * from "./src/components";
package/project.json DELETED
@@ -1,57 +0,0 @@
1
- {
2
- "name": "projen",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "packages/projen/src",
5
- "projectType": "library",
6
- "implicitDependencies": ["workspace-tools", "config-tools", "config"],
7
- "targets": {
8
- "build-untyped": {
9
- "executor": "nx:run-commands",
10
- "dependsOn": ["clean", "^build"],
11
- "inputs": [
12
- "{projectRoot}/src/**/untyped.ts",
13
- "{projectRoot}/src/**/*.untyped.ts"
14
- ],
15
- "outputs": [
16
- "{projectRoot}/src/**/schema.d.ts",
17
- "{projectRoot}/src/**/*.schema.d.ts",
18
- "{projectRoot}/src/**/schema.md",
19
- "{projectRoot}/src/**/*.schema.md",
20
- "{projectRoot}/src/**/schema.json",
21
- "{projectRoot}/src/**/*.schema.json"
22
- ],
23
- "options": {
24
- "commands": [
25
- "node dist/packages/untyped/bin/untyped.cjs generate --entry=\"packages/projen/**/{untyped.ts,*.untyped.ts}\" "
26
- ]
27
- }
28
- },
29
- "build-base": {
30
- "executor": "nx:run-commands",
31
- "dependsOn": ["build-untyped", "clean", "^build"],
32
- "options": {
33
- "command": "tsup-node --config=tsup.config.ts",
34
- "cwd": "{projectRoot}"
35
- }
36
- },
37
- "build": {
38
- "executor": "nx:run-commands",
39
- "dependsOn": ["build-base", "build-untyped"],
40
- "options": {
41
- "commands": [
42
- "pnpm copyfiles LICENSE dist/packages/projen",
43
- "pnpm copyfiles --up=2 ./packages/projen/*.md ./packages/projen/executors.json ./packages/projen/generators.json ./packages/projen/package.json dist/packages/projen",
44
- "pnpm copyfiles --up=3 \"./packages/projen/dist/**/*\" dist/packages/projen/dist",
45
- "pnpm copyfiles --up=3 \"./packages/projen/src/**/*schema.d.ts\" dist/packages/projen/dist/src",
46
- "pnpm copyfiles --up=3 \"./packages/projen/src/**/*schema.json\" dist/packages/projen/dist/src",
47
- "pnpm copyfiles --up=3 \"./packages/projen/src/**/*.md\" dist/packages/projen/docs/api",
48
- "pnpm copyfiles --up=4 \"./packages/projen/src/generators/*/files/**/*\" dist/packages/projen/dist/src/generators"
49
- ]
50
- }
51
- },
52
-
53
- "nx-release-publish": {
54
- "executor": "@storm-software/workspace-tools:npm-publish"
55
- }
56
- }
57
- }
File without changes
@@ -1,659 +0,0 @@
1
- import {
2
- NX_DEFAULT_BUILD_OUTPUTS as BASE_NX_DEFAULT_BUILD_OUTPUTS,
3
- NxWorkspace
4
- } from "@aws/pdk/monorepo/components/nx-workspace";
5
- import { Nx } from "@aws/pdk/monorepo/nx-types";
6
- import { ProjectUtils } from "@aws/pdk/monorepo/utils";
7
- import { asUndefinedIfEmpty } from "@aws/pdk/monorepo/utils/common";
8
- import { NxJsonConfiguration } from "@nx/devkit";
9
- import { StormWorkspaceConfig } from "@storm-software/config";
10
- import { joinPaths } from "@storm-software/config-tools/utilities/correct-paths";
11
- import { readFileSync } from "node:fs";
12
- import { JsonFile, Project } from "projen";
13
- import { Obj } from "projen/lib/util";
14
-
15
- /**
16
- * Default NX outputs to cache
17
- */
18
- export const NX_DEFAULT_BUILD_OUTPUTS: string[] = [
19
- ...BASE_NX_DEFAULT_BUILD_OUTPUTS,
20
- "{workspaceRoot}/dist/{projectRoot}"
21
- ];
22
-
23
- /**
24
- * Component which manages the workspace specific NX Config for the root monorepo.
25
- */
26
- export class StormNxWorkspace extends NxWorkspace {
27
- /**
28
- * Retrieves the singleton instance associated with project root.
29
- *
30
- * @param scope project instance.
31
- */
32
- static override of(scope: Project): NxWorkspace | undefined {
33
- return scope.root.components.find(c =>
34
- ProjectUtils.isNamedInstanceOf(c, NxWorkspace)
35
- ) as NxWorkspace | undefined;
36
- }
37
-
38
- /**
39
- * Raw nx.json file to support overrides that aren't handled
40
- * directly.
41
- *
42
- * **Attention:** any overrides applied here will not be visible
43
- * in the properties and only included in final synthesized output,
44
- * and likely to override native handling.
45
- * @advanced
46
- */
47
- public override readonly nxJson: JsonFile;
48
-
49
- /**
50
- * Automatically infer NxProject targets based on project type.
51
- * @experimental
52
- */
53
- public override autoInferProjectTargets = true;
54
-
55
- /**
56
- * List of cacheable operations.
57
- */
58
- public override cacheableOperations: string[] = [
59
- "lint-sherif",
60
- "lint-knip",
61
- "lint-ls",
62
- "lint",
63
- "format-readme",
64
- "format-toml",
65
- "format-prettier",
66
- "format",
67
- "clean",
68
- "build-base",
69
- "build",
70
- "test",
71
- "e2e",
72
- "docs",
73
- "nx-release-publish"
74
- ];
75
-
76
- /**
77
- * Some presets use the extends property to hide some default options in a separate json file.
78
- * The json file specified in the extends property is located in your node_modules folder.
79
- * The Nx preset files are specified in the nx package.
80
- *
81
- * @default "@storm-software/workspace-tools/config/base.json"
82
- */
83
- public override extends = "@storm-software/workspace-tools/config/base.json";
84
-
85
- /**
86
- * Plugins for extending the project graph
87
- */
88
- public nxPlugins: NxJsonConfiguration["plugins"] = [
89
- {
90
- plugin: "@nx/eslint/plugin",
91
- exclude: ["packages/**/__fixtures__/**/*"],
92
- options: {
93
- targetName: "lint",
94
- useFlatConfig: true
95
- }
96
- },
97
- "@storm-software/workspace-tools/plugins/typescript",
98
- "@storm-software/workspace-tools/plugins/typescript/untyped",
99
- "@storm-software/workspace-tools/plugins/typescript/tsup"
100
- ];
101
-
102
- /**
103
- * Default options for `nx affected`
104
- */
105
- public override affected: Nx.INxAffectedConfig = {
106
- defaultBase: "main"
107
- };
108
-
109
- /**
110
- * Named inputs
111
- * @see https://nx.dev/reference/nx-json#inputs-&-namedinputs
112
- */
113
- public override namedInputs: Nx.INamedInputs = {
114
- // https://nx.dev/more-concepts/customizing-inputs#defaults
115
- sharedGlobals: [
116
- "{workspaceRoot}/.github/**/*",
117
- "{workspaceRoot}/assets/**/*",
118
- "{workspaceRoot}/tsconfig.*.json",
119
- "{workspaceRoot}/.npmrc",
120
- "{workspaceRoot}/.npmignore",
121
- "{workspaceRoot}/package.json",
122
- "{workspaceRoot}/pnpm-workspace.yaml",
123
- "{workspaceRoot}/pnpm-lock.yaml",
124
- "{workspaceRoot}/package-lock.yaml",
125
- "{workspaceRoot}/yarn-lock.yaml",
126
- "{workspaceRoot}/bun.lockb",
127
- "{workspaceRoot}/LICENSE",
128
- "{workspaceRoot}/.gitattributes",
129
- "{workspaceRoot}/.gitignore",
130
- "{workspaceRoot}/nx.json",
131
- "{workspaceRoot}/.nxignore",
132
- "{workspaceRoot}/storm-workspace.json",
133
- "{workspaceRoot}/storm-workspace.*.json",
134
- "{workspaceRoot}/.storm-workspace/config.json",
135
- "{workspaceRoot}/.storm-workspace/config.*.json",
136
- "{workspaceRoot}/storm-workspace.yaml",
137
- "{workspaceRoot}/storm-workspace.*.yaml",
138
- "{workspaceRoot}/.storm-workspace/config.yaml",
139
- "{workspaceRoot}/.storm-workspace/config.*.yaml",
140
- "{workspaceRoot}/storm-workspace.toml",
141
- "{workspaceRoot}/storm-workspace.*.toml",
142
- "{workspaceRoot}/.storm-workspace/config.toml",
143
- "{workspaceRoot}/.storm-workspace/config.*.toml",
144
- "{workspaceRoot}/storm-workspace.config.js",
145
- "{workspaceRoot}/.storm-workspace/config.js",
146
- "{workspaceRoot}/.storm-workspace/config.*.js",
147
- "{workspaceRoot}/storm-workspace.config.ts",
148
- "{workspaceRoot}/.storm-workspace/config.ts",
149
- "{workspaceRoot}/.storm-workspace/config.*.ts",
150
- "{workspaceRoot}/.env",
151
- "{workspaceRoot}/.env.local"
152
- ],
153
- default: ["sharedGlobals", "{projectRoot}/**/*"],
154
- production: [
155
- "{projectRoot}/**/*",
156
- "!{projectRoot}/tools/**/*",
157
- "!{projectRoot}/scripts/**/*",
158
- "!{projectRoot}/node_modules/**/*",
159
- "!{projectRoot}/api-extractor.json",
160
- "!{projectRoot}/tsdoc.json",
161
- "!{projectRoot}/typedoc.json",
162
- "!{projectRoot}/.eslint-doc-generatorrc.js",
163
- "!{projectRoot}/.eslint-doc-generatorrc.json",
164
- "!{projectRoot}/.storybook/**/*",
165
- "!{projectRoot}/tsconfig.storybook.json",
166
- "!{projectRoot}/jest.config.ts",
167
- "!{projectRoot}/tsconfig.spec.json",
168
- "!{projectRoot}/src/test-setup.[jt]s",
169
- "!{projectRoot}/test-setup.[jt]s",
170
- "!{projectRoot}/tsconfig.spec.json",
171
- "!{projectRoot}/.eslintignore",
172
- "!{projectRoot}/.eslintrc.json",
173
- "!{projectRoot}/.eslintrc.cjs",
174
- "!{projectRoot}/eslint.config.js",
175
- "!{projectRoot}/eslint.config.cjs",
176
- "!{projectRoot}/eslint.config.mjs",
177
- "!{projectRoot}/biome.toml",
178
- "!{projectRoot}/biome.json",
179
- "!{projectRoot}/lefthook.yaml",
180
- "!{projectRoot}/.markdownlint.json",
181
- "!{projectRoot}/.markdownlint-cli2.cjs",
182
- "!{projectRoot}/.prettierrc",
183
- "!{projectRoot}/.prettierignore",
184
- "!{projectRoot}/docs/**/*",
185
- "!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
186
- "!{projectRoot}/benches/**/*",
187
- "!{projectRoot}/e2e/**/*",
188
- "!{projectRoot}/tests/**/*",
189
- "!{projectRoot}/testing/**/*",
190
- "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
191
- "!{projectRoot}/tsconfig.spec.json"
192
- ],
193
- testing: [
194
- "sharedGlobals",
195
- "{workspaceRoot}/jest.config.ts",
196
- "{workspaceRoot}/jest.preset.js",
197
- "{workspaceRoot}/benches/**/*",
198
- "{workspaceRoot}/e2e/**/*",
199
- "{workspaceRoot}/tests/**/*",
200
- "{workspaceRoot}/testing/**/*",
201
- "{workspaceRoot}/coverage/**/*",
202
- "{projectRoot}/project.json",
203
- "{projectRoot}/README.md",
204
- "{projectRoot}/CHANGELOG.md",
205
- "{projectRoot}/.env",
206
- "{projectRoot}/.env.local",
207
- "{projectRoot}/jest.config.ts",
208
- "{projectRoot}/tsconfig.spec.json",
209
- "{projectRoot}/src/test-setup.[jt]s",
210
- "{projectRoot}/test-setup.[jt]s",
211
- "{projectRoot}/tsconfig.spec.json",
212
- "{workspaceRoot}/jest.config.ts",
213
- "{workspaceRoot}/jest.preset.js",
214
- "{workspaceRoot}/benches/**/*",
215
- "{workspaceRoot}/e2e/**/*",
216
- "{workspaceRoot}/tests/**/*",
217
- "{workspaceRoot}/testing/**/*",
218
- "{workspaceRoot}/coverage/**/*",
219
- "{projectRoot}/benches/**/*",
220
- "{projectRoot}/e2e/**/*",
221
- "{projectRoot}/tests/**/*",
222
- "{projectRoot}/testing/**/*",
223
- "{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
224
- "{projectRoot}/tsconfig.spec.json"
225
- ],
226
- linting: [
227
- "sharedGlobals",
228
- "{workspaceRoot}/.eslintignore",
229
- "{workspaceRoot}/eslintrc.json",
230
- "{workspaceRoot}/.eslintrc.json",
231
- "{workspaceRoot}/.eslintrc.cjs",
232
- "{workspaceRoot}/eslint.config.js",
233
- "{workspaceRoot}/eslint.config.cjs",
234
- "{workspaceRoot}/eslint.config.mjs",
235
- "{workspaceRoot}/biome.toml",
236
- "{workspaceRoot}/biome.json",
237
- "{workspaceRoot}/lefthook.yaml",
238
- "{workspaceRoot}/.markdownlint.json",
239
- "{workspaceRoot}/.markdownlint-cli2.cjs",
240
- "{workspaceRoot}/.prettierrc",
241
- "{workspaceRoot}/prettier.config.js",
242
- "{workspaceRoot}/.prettierignore",
243
- "{projectRoot}/project.json",
244
- "{projectRoot}/README.md",
245
- "{projectRoot}/CHANGELOG.md",
246
- "{projectRoot}/.env",
247
- "{projectRoot}/.env.local",
248
- "{projectRoot}/.eslintignore",
249
- "{projectRoot}/.eslintrc",
250
- "{projectRoot}/.eslintrc.json",
251
- "{projectRoot}/.eslintrc.cjs",
252
- "{projectRoot}/eslint.config.js",
253
- "{projectRoot}/eslint.config.cjs",
254
- "{projectRoot}/eslint.config.mjs",
255
- "{projectRoot}/biome.toml",
256
- "{projectRoot}/biome.json",
257
- "{projectRoot}/lefthook.yaml",
258
- "{projectRoot}/.markdownlint.json",
259
- "{projectRoot}/.markdownlint-cli2.cjs",
260
- "{projectRoot}/.prettierrc",
261
- "{projectRoot}/.prettierignore"
262
- ],
263
- documentation: [
264
- "sharedGlobals",
265
- "{workspaceRoot}/api-extractor.json",
266
- "{workspaceRoot}/tsdoc.json",
267
- "{workspaceRoot}/typedoc.json",
268
- "{workspaceRoot}/.eslint-doc-generatorrc.js",
269
- "{workspaceRoot}/.eslint-doc-generatorrc.json",
270
- "{workspaceRoot}/contentlayer.config.ts",
271
- "{workspaceRoot}/*.md",
272
- "{workspaceRoot}/*.mdx",
273
- "{workspaceRoot}/docs/**/*",
274
- "{workspaceRoot}/.storybook/**/*",
275
- "{projectRoot}/project.json",
276
- "{projectRoot}/README.md",
277
- "{projectRoot}/CHANGELOG.md",
278
- "{projectRoot}/.env",
279
- "{projectRoot}/.env.local",
280
- "{projectRoot}/api-extractor.json",
281
- "{projectRoot}/tsdoc.json",
282
- "{projectRoot}/typedoc.json",
283
- "{projectRoot}/.eslint-doc-generatorrc.js",
284
- "{projectRoot}/.eslint-doc-generatorrc.json",
285
- "{projectRoot}/contentlayer.config.ts",
286
- "{projectRoot}/.storybook/**/*",
287
- "{projectRoot}/tsconfig.storybook.json",
288
- "{projectRoot}/README.md",
289
- "{projectRoot}/docs/**/*",
290
- "{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
291
- "!{projectRoot}/benches/**/*",
292
- "!{projectRoot}/e2e/**/*",
293
- "!{projectRoot}/tests/**/*",
294
- "!{projectRoot}/testing/**/*",
295
- "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
296
- "!{projectRoot}/tsconfig.spec.json"
297
- ],
298
- rust: [
299
- "sharedGlobals",
300
- "{workspaceRoot}/Cargo.toml",
301
- "{workspaceRoot}/Cargo.lock",
302
- "{workspaceRoot}/.cargo/config.toml",
303
- "{workspaceRoot}/rust-toolchain",
304
- "{workspaceRoot}/rustfmt.toml",
305
- "{workspaceRoot}/deny.toml",
306
- "{projectRoot}/Cargo.toml",
307
- "{projectRoot}/.cargo/config.toml",
308
- "{projectRoot}/project.json",
309
- "{projectRoot}/README.md",
310
- "{projectRoot}/CHANGELOG.md",
311
- "{projectRoot}/.env",
312
- "{projectRoot}/.env.local",
313
- "{projectRoot}/**/*.rs",
314
- "{projectRoot}/**/*.proto",
315
- "{projectRoot}/**/*.acid",
316
- "{projectRoot}/**/*.acidic",
317
- "{projectRoot}/**/*.prisma",
318
- "{projectRoot}/src/**/*.json",
319
- "{projectRoot}/src/**/*.jsonc",
320
- "{projectRoot}/src/**/*.yaml",
321
- "{projectRoot}/src/**/*.yml",
322
- "{projectRoot}/src/**/*.toml",
323
- "!{projectRoot}/README.md",
324
- "!{projectRoot}/docs/**/*",
325
- "!{projectRoot}/benches/**/*",
326
- "!{projectRoot}/e2e/**/*",
327
- "!{projectRoot}/tests/**/*",
328
- "!{projectRoot}/testing/**/*"
329
- ],
330
- typescript: [
331
- "sharedGlobals",
332
- "!{projectRoot}/tsconfig.spec.json",
333
- "!{projectRoot}/tsconfig.storybook.json",
334
- "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
335
- "!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
336
- "!{projectRoot}/node_modules/**/*",
337
- "!{projectRoot}/benches/**/*",
338
- "!{projectRoot}/e2e/**/*",
339
- "!{projectRoot}/tests/**/*",
340
- "!{projectRoot}/testing/**/*",
341
- "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
342
- "!{projectRoot}/tsconfig.spec.json",
343
- "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
344
- "!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
345
- "!{projectRoot}/node_modules/**/*",
346
- "{projectRoot}/package.json",
347
- "{projectRoot}/tsconfig.json",
348
- "{projectRoot}/tsconfig.*.json",
349
- "{projectRoot}/project.json",
350
- "{projectRoot}/README.md",
351
- "{projectRoot}/CHANGELOG.md",
352
- "{projectRoot}/.env",
353
- "{projectRoot}/.env.*",
354
- "{projectRoot}/README.md",
355
- "{projectRoot}/docs/**/*",
356
- "{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
357
- "{projectRoot}/**/*.proto",
358
- "{projectRoot}/**/*.acid",
359
- "{projectRoot}/**/*.acidic",
360
- "{projectRoot}/**/*.prisma",
361
- "{projectRoot}/src/**/*.cts",
362
- "{projectRoot}/src/**/*.mts",
363
- "{projectRoot}/src/**/*.ts",
364
- "{projectRoot}/src/**/*.tsx",
365
- "{projectRoot}/src/**/*.graphql",
366
- "{projectRoot}/src/**/*.gql",
367
- "{projectRoot}/src/**/*.js",
368
- "{projectRoot}/src/**/*.cjs",
369
- "{projectRoot}/src/**/*.mjs",
370
- "{projectRoot}/src/**/*.jsx",
371
- "{projectRoot}/src/**/*.json",
372
- "{projectRoot}/src/**/*.jsonc",
373
- "{projectRoot}/src/**/*.yaml",
374
- "{projectRoot}/src/**/*.yml",
375
- "{projectRoot}/src/**/*.toml",
376
- "{projectRoot}/src/**/*.md",
377
- "{projectRoot}/src/**/*.mdx",
378
- "{projectRoot}/build.*.[jt]s?(x)",
379
- "{projectRoot}/tsup.*.[jt]s?(x)",
380
- "{projectRoot}/contentlayer.*.[jt]s?(x)",
381
- "{projectRoot}/bin/**/*",
382
- "{projectRoot}/tools/**/*",
383
- "{projectRoot}/helpers/**/*",
384
- "{projectRoot}/scripts/**/*"
385
- ]
386
- };
387
-
388
- /**
389
- * Dependencies between different target names across all projects
390
- *
391
- * @see https://nx.dev/reference/nx-json#target-defaults
392
- */
393
- public override targetDefaults: Nx.ITargetDefaults = {
394
- "lint-ls": {
395
- outputs: ["{projectRoot}/**/*"],
396
- inputs: ["linting", "default", "^production"],
397
- dependsOn: ["^lint-ls"],
398
- executor: "nx:run-commands",
399
- options: {
400
- command:
401
- 'pnpm exec ls-lint --config="./node_modules/@storm-software/linting-tools/ls-lint/.ls-lint.yml" ',
402
- color: true
403
- }
404
- },
405
- "lint-sherif": {
406
- outputs: ["{projectRoot}/package.json"],
407
- inputs: ["{workspaceRoot}/package.json", "{projectRoot}/package.json"],
408
- executor: "nx:run-commands",
409
- options: {
410
- command: "pnpm exec sherif -i react -i react-dom -i typescript"
411
- }
412
- },
413
- "lint-knip": {
414
- inputs: ["linting", "default", "^production"],
415
- executor: "nx:run-commands",
416
- options: {
417
- command: "pnpm exec knip"
418
- }
419
- },
420
- lint: {
421
- outputs: ["{projectRoot}"],
422
- inputs: ["linting", "default", "^production"],
423
- dependsOn: ["lint-ls", "lint-sherif", "lint-knip", "lint-docs", "^lint"],
424
- executor: "nx:run-commands",
425
- options: {
426
- command: 'echo Linted the project files in "{projectRoot}" '
427
- }
428
- },
429
- "format-toml": {
430
- inputs: ["linting", "{projectRoot}/**/*.toml"],
431
- outputs: ["{projectRoot}/**/*.toml"],
432
- dependsOn: ["^format-toml"],
433
- executor: "nx:run-commands",
434
- options: {
435
- command:
436
- 'pnpm exec taplo format --colors="always" --config="./node_modules/@storm-software/linting-tools/taplo/config.toml" --cache-path="./tmp/taplo/{projectRoot}"',
437
- color: true
438
- }
439
- },
440
- "format-readme": {
441
- inputs: [
442
- "linting",
443
- "documentation",
444
- "{projectRoot}/{README.md,package.json,Cargo.toml,executors.json,generators.json}",
445
- "default",
446
- "^production"
447
- ],
448
- outputs: ["{projectRoot}/README.md"],
449
- dependsOn: ["^format-readme"],
450
- executor: "nx:run-commands",
451
- options: {
452
- command:
453
- 'pnpm exec storm-git readme-gen --templates="./tools/readme-templates" --project="{projectName}"',
454
- color: true
455
- }
456
- },
457
- "format-prettier": {
458
- inputs: ["linting", "default", "^production"],
459
- dependsOn: ["^format-prettier"],
460
- executor: "nx:run-commands",
461
- options: {
462
- command:
463
- 'pnpm exec prettier "{projectRoot}/**/*" --write --ignore-unknown --no-error-on-unmatched-pattern --config="./node_modules/@storm-software/prettier/config.json" --ignore-path="./node_modules/@storm-software/prettier/.prettierignore" --cache --cache-location="./tmp/prettier/{projectRoot}" ',
464
- color: true
465
- }
466
- },
467
- format: {
468
- inputs: ["linting", "default", "^production"],
469
- outputs: ["{projectRoot}"],
470
- dependsOn: ["format-toml", "format-readme", "format-prettier", "^format"],
471
- executor: "nx:run-commands",
472
- options: {
473
- command: 'echo Formatted the project files in "{projectRoot}" '
474
- }
475
- },
476
- clean: {
477
- inputs: ["default", "^production"],
478
- outputs: NX_DEFAULT_BUILD_OUTPUTS,
479
- dependsOn: ["^clean"],
480
- executor: "nx:run-commands",
481
- options: {
482
- commands: [
483
- "pnpm exec rimraf --glob {projectRoot}/dist",
484
- "pnpm exec rimraf dist/{projectRoot}"
485
- ]
486
- }
487
- },
488
- "build-untyped": {
489
- dependsOn: ["^build"]
490
- },
491
- "build-base": {
492
- dependsOn: ["build-untyped", "^build"]
493
- },
494
- "build-local": {
495
- inputs: ["default", "^production"],
496
- dependsOn: ["build-base", "build-untyped", "^build"]
497
- },
498
- build: {
499
- inputs: ["default", "^production"],
500
- outputs: NX_DEFAULT_BUILD_OUTPUTS,
501
- dependsOn: ["build-base", "build-untyped", "^build"]
502
- },
503
- rebuild: {
504
- inputs: ["default", "^production"],
505
- executor: "nx:run-commands",
506
- dependsOn: ["clean", "^build"],
507
- options: {
508
- command: "pnpm exec nx run {projectName}:build",
509
- color: true,
510
- cwd: "{workspaceRoot}"
511
- }
512
- },
513
- docs: {
514
- outputs: ["{options.outputPath}"],
515
- inputs: ["linting", "documentation", "default", "^production"],
516
- dependsOn: ["build", "format-readme", "lint-docs", "^docs"]
517
- },
518
- test: {
519
- inputs: ["testing", "default", "^production"],
520
- dependsOn: ["build", "^test"]
521
- },
522
- e2e: {
523
- inputs: ["testing", "default", "^production"],
524
- dependsOn: ["test", "^e2e"]
525
- },
526
- "nx-release-publish": {
527
- inputs: ["default", "^production"],
528
- dependsOn: ["build", "^nx-release-publish"]
529
- }
530
- };
531
-
532
- /**
533
- * Configuration for Nx releases
534
- */
535
- public release: Obj<any> = {};
536
-
537
- /**
538
- * The number of parallel tasks to run.
539
- *
540
- * @defaultValue 5
541
- */
542
- public parallel = 5;
543
-
544
- /**
545
- * Should the daemon be used to run tasks?
546
- *
547
- * @defaultValue true
548
- */
549
- public useDaemonProcess = true;
550
-
551
- /**
552
- * Set this to false to disable adding inference plugins when generating new projects
553
- *
554
- * @defaultValue true
555
- */
556
- public useInferencePlugins = true;
557
-
558
- /**
559
- * The default base branch for new projects.
560
- *
561
- * @defaultValue "main"
562
- */
563
- public defaultBase = "main";
564
-
565
- /**
566
- * The CLI configuration for the workspace.
567
- */
568
- public cli: NxJsonConfiguration["cli"] | undefined;
569
-
570
- constructor(project: Project) {
571
- super(project);
572
-
573
- let StormWorkspaceConfig!: StormWorkspaceConfig;
574
- if (project.root.outdir) {
575
- const StormWorkspaceConfigJson = readFileSync(
576
- joinPaths(project.root.outdir, "storm-workspace.json"),
577
- "utf8"
578
- );
579
- StormWorkspaceConfig = JSON.parse(StormWorkspaceConfigJson);
580
- }
581
-
582
- if (StormWorkspaceConfig?.namespace) {
583
- this.npmScope = StormWorkspaceConfig?.namespace;
584
- }
585
-
586
- if (StormWorkspaceConfig?.branch) {
587
- this.defaultBase = StormWorkspaceConfig?.branch;
588
- this.affected = {
589
- defaultBase: StormWorkspaceConfig?.branch
590
- };
591
- }
592
-
593
- if (StormWorkspaceConfig?.packageManager) {
594
- this.cli = {
595
- packageManager: StormWorkspaceConfig?.packageManager
596
- };
597
- }
598
-
599
- this.nxJson = new JsonFile(project, "nx.json", {
600
- obj: {
601
- extends: () => this.extends,
602
- npmScope: () => this.npmScope,
603
- affected: () => asUndefinedIfEmpty(this.affected),
604
- workspaceLayout: () => asUndefinedIfEmpty(this.workspaceLayout),
605
- plugins: () => asUndefinedIfEmpty(this.nxPlugins),
606
- namedInputs: () => asUndefinedIfEmpty(this.namedInputs),
607
- targetDefaults: () => asUndefinedIfEmpty(this.targetDefaults),
608
- tasksRunnerOptions: () => asUndefinedIfEmpty(this.tasksRunnerOptions),
609
- parallel: () => this.parallel,
610
- useDaemonProcess: () => this.useDaemonProcess,
611
- useInferencePlugins: () => this.useInferencePlugins,
612
- release: () => asUndefinedIfEmpty(this.release)
613
- }
614
- });
615
- }
616
-
617
- /**
618
- * Adds a release group to the workspace.
619
- *
620
- * @param name The name of the release group
621
- * @param projects The projects in the release group
622
- * @param projectsRelationship The relationship between the projects
623
- * @param releaseTagPattern The release tag pattern
624
- * @param groupPreVersionCommand The command to run before versioning
625
- */
626
- public addReleaseGroup(
627
- name: string,
628
- projects: string[] | string,
629
- projectsRelationship: "fixed" | "independent" = "independent",
630
- releaseTagPattern = "{projectName}@{version}",
631
- groupPreVersionCommand = "pnpm build"
632
- ) {
633
- this.release ??= {
634
- groups: {},
635
- changelog: {
636
- entryWhenNoChanges: false,
637
- renderOptions: {
638
- authors: false,
639
- commitReferences: true,
640
- versionTitleDate: true
641
- }
642
- }
643
- };
644
-
645
- this.release.groups[name] = {
646
- projects,
647
- projectsRelationship,
648
- releaseTagPattern,
649
- version: {
650
- groupPreVersionCommand,
651
- generator: "@storm-software/workspace-tools:release-version",
652
- generatorOptions: {
653
- currentVersionResolver: "git-tag",
654
- specifierSource: "conventional-commits"
655
- }
656
- }
657
- };
658
- }
659
- }
@@ -1,53 +0,0 @@
1
- import {
2
- addDependenciesToPackageJson,
3
- formatFiles,
4
- GeneratorCallback,
5
- readJsonFile,
6
- runTasksInSerial,
7
- type Tree
8
- } from "@nx/devkit";
9
- import { StormWorkspaceConfig } from "@storm-software/config";
10
- import {
11
- initGenerator as baseInitGenerator,
12
- withRunGenerator
13
- } from "@storm-software/workspace-tools";
14
- import type { InitGeneratorSchema } from "./schema";
15
-
16
- export async function initGeneratorFn(
17
- tree: Tree,
18
- options: InitGeneratorSchema,
19
- config: StormWorkspaceConfig
20
- ) {
21
- const task = baseInitGenerator(tree, options);
22
-
23
- await runTasksInSerial(addProjenDeps(tree, options))();
24
-
25
- if (!options.skipFormat) {
26
- await formatFiles(tree);
27
- }
28
-
29
- return task;
30
- }
31
-
32
- export default withRunGenerator<InitGeneratorSchema>(
33
- "Initialize Storm Projen workspace",
34
- initGeneratorFn
35
- );
36
-
37
- function addProjenDeps(
38
- tree: Tree,
39
- options: InitGeneratorSchema
40
- ): GeneratorCallback {
41
- return () => {
42
- const packageJson = readJsonFile(`${options.directory}/package.json`);
43
- packageJson.dependencies["projen"] ??= "^0.91.6";
44
-
45
- if (packageJson) {
46
- addDependenciesToPackageJson(
47
- tree,
48
- packageJson.dependencies || {},
49
- packageJson.devDependencies || {}
50
- )();
51
- }
52
- };
53
- }
@@ -1,25 +0,0 @@
1
- import baseGeneratorSchema from "@storm-software/workspace-tools/base/base-generator.untyped";
2
- import { defineUntypedSchema } from "untyped";
3
-
4
- export default defineUntypedSchema({
5
- ...baseGeneratorSchema,
6
- $schema: {
7
- id: "InitGeneratorSchema",
8
- title: "Init Generator",
9
- description: "A type definition for the Projen init generator schema",
10
- },
11
- directory: {
12
- $schema: {
13
- title: "Directory",
14
- type: "string",
15
- description: "The directory to initialize the workspace in",
16
- },
17
- },
18
- skipFormat: {
19
- $schema: {
20
- title: "Skip Format",
21
- type: "boolean",
22
- description: "Skip formatting the generated files",
23
- },
24
- },
25
- });
package/tsconfig.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "rootDir": "../..",
6
- "target": "ESNext",
7
- "module": "ESNext",
8
- "lib": ["ESNext"],
9
- "skipLibCheck": true,
10
- "skipDefaultLibCheck": true,
11
- "moduleResolution": "Bundler",
12
- "moduleDetection": "force",
13
- "types": ["node"]
14
- },
15
- "include": [
16
- "executors.ts",
17
- "generators.ts",
18
- "index.ts",
19
- "src/**/*.ts",
20
- "src/**/*.d.ts",
21
- "src/**/*.json",
22
- "tsup.config.ts"
23
- ],
24
- "exclude": [
25
- "jest.config.ts",
26
- "src/generators/**/files/**/*",
27
- "src/**/*.spec.ts",
28
- "src/**/*.test.ts"
29
- ]
30
- }
package/tsup.config.ts DELETED
@@ -1,23 +0,0 @@
1
- import { defineConfig } from "tsup";
2
-
3
- export default defineConfig([
4
- {
5
- name: "projen",
6
- target: "node22",
7
- entryPoints: [
8
- "./*.ts",
9
- "./src/components/*.ts",
10
- "./src/executors/*/executor.ts",
11
- "./src/generators/*/generator.ts",
12
- ],
13
- outDir: "dist",
14
- format: ["cjs", "esm"],
15
- platform: "node",
16
- splitting: true,
17
- clean: true,
18
- dts: true,
19
- sourcemap: false,
20
- shims: true,
21
- tsconfig: "./tsconfig.json",
22
- },
23
- ]);
File without changes
File without changes
File without changes