@storm-software/config-tools 1.22.2 → 1.23.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/CHANGELOG.md CHANGED
@@ -1,35 +1,34 @@
1
-
2
-
3
-
4
-
5
- ## 1.22.0 (2024-01-26)
1
+ ## 1.23.0 (2024-01-27)
6
2
 
7
3
 
8
4
  ### 🚀 Features
9
5
 
10
- - **workspace-tools:** Added custom `npm-publish` executor ([3e6292dd](https://github.com/storm-software/storm-ops/commit/3e6292dd))
6
+ - **config-tools:** Added the `preid` config option and removed `preMajor` ([0d8756dc](https://github.com/storm-software/storm-ops/commit/0d8756dc))
11
7
 
12
8
 
13
9
  ### ❤️ Thank You
14
10
 
15
11
  - Patrick Sullivan
16
12
 
13
+ ## 1.22.2 (2024-01-27)
17
14
 
18
15
 
16
+ ### 🩹 Fixes
19
17
 
18
+ - **config-tools:** Resolved issue with stdio prefernce in `run` function ([81ac8a91](https://github.com/storm-software/storm-ops/commit/81ac8a91))
20
19
 
21
20
 
21
+ ### ❤️ Thank You
22
22
 
23
+ - Patrick Sullivan
23
24
 
24
25
 
25
-
26
-
27
- ## 1.21.0 (2024-01-26)
26
+ ## 1.22.0 (2024-01-26)
28
27
 
29
28
 
30
29
  ### 🚀 Features
31
30
 
32
- - **config-tools:** Added the `externalPackagePatterns` option to Storm config ([78f5c9d4](https://github.com/storm-software/storm-ops/commit/78f5c9d4))
31
+ - **workspace-tools:** Added custom `npm-publish` executor ([3e6292dd](https://github.com/storm-software/storm-ops/commit/3e6292dd))
33
32
 
34
33
 
35
34
  ### ❤️ Thank You
@@ -37,23 +36,17 @@
37
36
  - Patrick Sullivan
38
37
 
39
38
 
39
+ ## 1.21.0 (2024-01-26)
40
40
 
41
41
 
42
+ ### 🚀 Features
42
43
 
44
+ - **config-tools:** Added the `externalPackagePatterns` option to Storm config ([78f5c9d4](https://github.com/storm-software/storm-ops/commit/78f5c9d4))
43
45
 
44
46
 
47
+ ### ❤️ Thank You
45
48
 
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
49
+ - Patrick Sullivan
57
50
 
58
51
 
59
52
  ## 1.20.21 (2024-01-25)
@@ -68,25 +61,6 @@
68
61
 
69
62
  - Patrick Sullivan
70
63
 
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
64
 
91
65
  ## 1.20.10 (2024-01-24)
92
66
 
@@ -115,19 +89,6 @@
115
89
  - Patrick Sullivan
116
90
 
117
91
 
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
92
  ## 1.20.0 (2024-01-21)
132
93
 
133
94
 
package/declarations.d.ts CHANGED
@@ -184,3 +184,19 @@ export { writeSystem };
184
184
  */
185
185
  declare function getStopwatch(name: string): () => void;
186
186
  export { getStopwatch };
187
+
188
+ declare const LARGE_BUFFER: number;
189
+
190
+ /**
191
+ * Run a command line process
192
+ *
193
+ * @remarks
194
+ * A wrapper around execa to run our command line processes
195
+ *
196
+ * @param config - The Storm configuration object
197
+ * @param command - The command to run
198
+ * @param cwd - The current working directory
199
+ * @returns The result of the command
200
+ */
201
+ declare function run(config: StormConfig, command: string, cwd: string = config.workspaceRoot): any;
202
+ export { run };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/config-tools",
3
- "version": "1.22.2",
3
+ "version": "1.23.0",
4
4
  "private": false,
5
5
  "description": "⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
6
6
  "repository": {
@@ -14,11 +14,11 @@
14
14
  "types": "declarations.d.ts",
15
15
  "dependencies": {
16
16
  "chalk": "4.1.0",
17
- "cosmiconfig": "^9.0.0",
18
- "execa": "^8.0.1",
19
- "find-up": "^7.0.0",
20
- "locate-path": "^7.2.0",
21
- "zod": "^3.22.4"
17
+ "cosmiconfig": "9.0.0",
18
+ "execa": "8.0.1",
19
+ "find-up": "7.0.0",
20
+ "locate-path": "7.2.0",
21
+ "zod": "3.22.4"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"
@@ -72,10 +72,7 @@ export const getConfigEnv = (): Partial<StormConfig> => {
72
72
  },
73
73
  repository: process.env[`${prefix}REPOSITORY`],
74
74
  branch: process.env[`${prefix}BRANCH`],
75
- preMajor:
76
- process.env[`${prefix}PRE_MAJOR`] !== undefined
77
- ? Boolean(process.env[`${prefix}PRE_MAJOR`])
78
- : undefined,
75
+ preid: process.env[`${prefix}PRE_ID`],
79
76
  logLevel:
80
77
  process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== undefined
81
78
  ? Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`]))
@@ -141,8 +141,8 @@ export const setConfigEnv = (config: StormConfig) => {
141
141
  if (config.branch) {
142
142
  process.env[`${prefix}BRANCH`] = config.branch;
143
143
  }
144
- if (config.preMajor) {
145
- process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor);
144
+ if (config.preid) {
145
+ process.env[`${prefix}PRE_ID`] = String(config.preid);
146
146
  }
147
147
  if (config.logLevel) {
148
148
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
package/src/schema.ts CHANGED
@@ -94,10 +94,7 @@ export const StormConfigSchema = z
94
94
  .default("https://stormsoftware.org")
95
95
  .describe("The homepage of the workspace"),
96
96
  branch: z.string().trim().default("main").describe("The branch of the workspace"),
97
- preMajor: z
98
- .boolean()
99
- .default(false)
100
- .describe("An indicator specifying if the package is still in it's pre-major version"),
97
+ preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
101
98
  owner: z
102
99
  .string()
103
100
  .trim()
@@ -25,7 +25,6 @@ export const DEFAULT_STORM_CONFIG: StormConfig = {
25
25
  namespace: "storm-software",
26
26
  license: "Apache License 2.0",
27
27
  homepage: "https://stormsoftware.org",
28
- preMajor: false,
29
28
  owner: "@storm-software/development",
30
29
  worker: "stormie-bot",
31
30
  runtimeDirectory: "node_modules/.storm",
@@ -1,10 +1,30 @@
1
1
  import { execaCommandSync } from "execa";
2
+ import type { StormConfig } from "../types";
2
3
 
3
- // wrapper around execa to run our command line processes
4
- export const run = (command: string) => {
4
+ export const LARGE_BUFFER = 1024 * 1000000;
5
+
6
+ /**
7
+ * Run a command line process
8
+ *
9
+ * @remarks
10
+ * A wrapper around execa to run our command line processes
11
+ *
12
+ * @param config - The Storm configuration object
13
+ * @param command - The command to run
14
+ * @param cwd - The current working directory
15
+ * @returns The result of the command
16
+ */
17
+ export const run = (config: StormConfig, command: string, cwd: string = config.workspaceRoot) => {
5
18
  return execaCommandSync(command, {
6
19
  preferLocal: true,
7
20
  shell: true,
8
- stdio: "inherit"
21
+ cwd,
22
+ env: {
23
+ ...process.env,
24
+ FORCE_COLOR: "true"
25
+ },
26
+ stdio: "inherit",
27
+ maxBuffer: LARGE_BUFFER,
28
+ killSignal: "SIGTERM"
9
29
  });
10
30
  };