@storm-software/config-tools 1.22.1 → 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,33 +1,34 @@
1
-
2
-
3
- ## 1.22.0 (2024-01-26)
1
+ ## 1.23.0 (2024-01-27)
4
2
 
5
3
 
6
4
  ### 🚀 Features
7
5
 
8
- - **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))
9
7
 
10
8
 
11
9
  ### ❤️ Thank You
12
10
 
13
11
  - Patrick Sullivan
14
12
 
13
+ ## 1.22.2 (2024-01-27)
15
14
 
16
15
 
16
+ ### 🩹 Fixes
17
17
 
18
+ - **config-tools:** Resolved issue with stdio prefernce in `run` function ([81ac8a91](https://github.com/storm-software/storm-ops/commit/81ac8a91))
18
19
 
19
20
 
21
+ ### ❤️ Thank You
20
22
 
23
+ - Patrick Sullivan
21
24
 
22
25
 
23
-
24
-
25
- ## 1.21.0 (2024-01-26)
26
+ ## 1.22.0 (2024-01-26)
26
27
 
27
28
 
28
29
  ### 🚀 Features
29
30
 
30
- - **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))
31
32
 
32
33
 
33
34
  ### ❤️ Thank You
@@ -35,23 +36,17 @@
35
36
  - Patrick Sullivan
36
37
 
37
38
 
39
+ ## 1.21.0 (2024-01-26)
38
40
 
39
41
 
42
+ ### 🚀 Features
40
43
 
44
+ - **config-tools:** Added the `externalPackagePatterns` option to Storm config ([78f5c9d4](https://github.com/storm-software/storm-ops/commit/78f5c9d4))
41
45
 
42
46
 
47
+ ### ❤️ Thank You
43
48
 
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
49
+ - Patrick Sullivan
55
50
 
56
51
 
57
52
  ## 1.20.21 (2024-01-25)
@@ -66,25 +61,6 @@
66
61
 
67
62
  - Patrick Sullivan
68
63
 
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
64
 
89
65
  ## 1.20.10 (2024-01-24)
90
66
 
@@ -113,19 +89,6 @@
113
89
  - Patrick Sullivan
114
90
 
115
91
 
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
92
  ## 1.20.0 (2024-01-21)
130
93
 
131
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.1",
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
  };