@storm-software/workspace-tools 1.62.0 → 1.62.2
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 +26 -0
- package/index.js +17 -14
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +17 -14
- package/src/executors/tsup-browser/executor.js +17 -14
- package/src/executors/tsup-neutral/executor.js +17 -14
- package/src/executors/tsup-node/executor.js +17 -14
- package/src/utils/index.js +17 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## 1.62.2 (2024-02-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🩹 Fixes
|
|
5
|
+
|
|
6
|
+
- **workspace-tools:** Remove `entry` from the tsconfig for dts build ([628a4034](https://github.com/storm-software/storm-ops/commit/628a4034))
|
|
7
|
+
|
|
8
|
+
- **workspace-tools:** Removed updated workspace root from compiler config ([f6c09bad](https://github.com/storm-software/storm-ops/commit/f6c09bad))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Patrick Sullivan
|
|
14
|
+
|
|
15
|
+
## 1.62.1 (2024-02-26)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### 🩹 Fixes
|
|
19
|
+
|
|
20
|
+
- **workspace-tools:** Resolve issue with bad entry path ([9dc79475](https://github.com/storm-software/storm-ops/commit/9dc79475))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### ❤️ Thank You
|
|
24
|
+
|
|
25
|
+
- Patrick Sullivan
|
|
26
|
+
|
|
1
27
|
## 1.62.0 (2024-02-26)
|
|
2
28
|
|
|
3
29
|
|
package/index.js
CHANGED
|
@@ -484125,7 +484125,14 @@ var import_typescript = __toESM(require_typescript());
|
|
|
484125
484125
|
// packages/workspace-tools/src/utils/file-path-utils.ts
|
|
484126
484126
|
var import_node_path4 = require("node:path");
|
|
484127
484127
|
var removeExtension = (filePath) => {
|
|
484128
|
-
|
|
484128
|
+
const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
484129
|
+
if (result.startsWith("./")) {
|
|
484130
|
+
return result.substring(2);
|
|
484131
|
+
}
|
|
484132
|
+
if (result.startsWith(".") || result.startsWith("/")) {
|
|
484133
|
+
return result.substring(1);
|
|
484134
|
+
}
|
|
484135
|
+
return result;
|
|
484129
484136
|
};
|
|
484130
484137
|
function findFileName(filePath) {
|
|
484131
484138
|
return filePath?.split(filePath?.includes(import_node_path4.sep) ? import_node_path4.sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
|
|
@@ -484166,6 +484173,7 @@ var applyDefaultOptions = (options8) => {
|
|
|
484166
484173
|
return options8;
|
|
484167
484174
|
};
|
|
484168
484175
|
var runTsupBuild = async (context, config, options8) => {
|
|
484176
|
+
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
|
|
484169
484177
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
484170
484178
|
ret[key2] = options8.env?.[key2];
|
|
484171
484179
|
return ret;
|
|
@@ -484173,7 +484181,7 @@ var runTsupBuild = async (context, config, options8) => {
|
|
|
484173
484181
|
options8.plugins?.push(
|
|
484174
484182
|
(0, import_esbuild_decorators.esbuildDecorators)({
|
|
484175
484183
|
tsconfig: options8.tsConfig,
|
|
484176
|
-
cwd:
|
|
484184
|
+
cwd: workspaceRoot
|
|
484177
484185
|
})
|
|
484178
484186
|
);
|
|
484179
484187
|
options8.plugins?.push(environmentPlugin(stormEnv));
|
|
@@ -484193,8 +484201,7 @@ var runTsupBuild = async (context, config, options8) => {
|
|
|
484193
484201
|
...stormEnv
|
|
484194
484202
|
},
|
|
484195
484203
|
dtsTsConfig: getNormalizedTsConfig(
|
|
484196
|
-
|
|
484197
|
-
config.workspaceRoot ?? ".",
|
|
484204
|
+
workspaceRoot,
|
|
484198
484205
|
options8.outputPath,
|
|
484199
484206
|
createTypeScriptCompilationOptions(
|
|
484200
484207
|
(0, import_normalize_options.normalizeOptions)(
|
|
@@ -484204,9 +484211,9 @@ var runTsupBuild = async (context, config, options8) => {
|
|
|
484204
484211
|
main: context.main,
|
|
484205
484212
|
transformers: []
|
|
484206
484213
|
},
|
|
484207
|
-
|
|
484214
|
+
workspaceRoot,
|
|
484208
484215
|
context.sourceRoot,
|
|
484209
|
-
|
|
484216
|
+
workspaceRoot
|
|
484210
484217
|
),
|
|
484211
484218
|
context.projectName
|
|
484212
484219
|
)
|
|
@@ -484229,7 +484236,7 @@ ${options8.banner}
|
|
|
484229
484236
|
const getConfigFns = [options8.getConfig];
|
|
484230
484237
|
const tsupConfig = (0, import_tsup.defineConfig)(
|
|
484231
484238
|
getConfigFns.map(
|
|
484232
|
-
(getConfigFn) => getConfig(
|
|
484239
|
+
(getConfigFn) => getConfig(workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
|
|
484233
484240
|
)
|
|
484234
484241
|
);
|
|
484235
484242
|
if (_isFunction2(tsupConfig)) {
|
|
@@ -484245,19 +484252,14 @@ ${options8.banner}
|
|
|
484245
484252
|
);
|
|
484246
484253
|
}
|
|
484247
484254
|
};
|
|
484248
|
-
function getNormalizedTsConfig(
|
|
484255
|
+
function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
|
|
484249
484256
|
const config = (0, import_typescript.readConfigFile)(options8.tsConfig, import_typescript.sys.readFile).config;
|
|
484250
484257
|
const tsConfig = (0, import_typescript.parseJsonConfigFileContent)(
|
|
484251
484258
|
{
|
|
484252
484259
|
...config,
|
|
484253
484260
|
compilerOptions: {
|
|
484254
484261
|
...config?.compilerOptions,
|
|
484255
|
-
entry: {
|
|
484256
|
-
[removeExtension(context.main).replace(workspaceRoot, "").replace(context.sourceRoot, "")]: context.main
|
|
484257
|
-
},
|
|
484258
484262
|
outDir: outputPath,
|
|
484259
|
-
rootDir: workspaceRoot,
|
|
484260
|
-
baseUrl: workspaceRoot,
|
|
484261
484263
|
noEmit: false,
|
|
484262
484264
|
esModuleInterop: true,
|
|
484263
484265
|
downlevelIteration: true,
|
|
@@ -484266,7 +484268,8 @@ function getNormalizedTsConfig(context, workspaceRoot, outputPath, options8) {
|
|
|
484266
484268
|
declaration: true,
|
|
484267
484269
|
declarationMap: true,
|
|
484268
484270
|
declarationDir: (0, import_devkit3.joinPathFragments)(workspaceRoot, "tmp", ".tsup", "declaration")
|
|
484269
|
-
}
|
|
484271
|
+
},
|
|
484272
|
+
include: ["**/*"]
|
|
484270
484273
|
},
|
|
484271
484274
|
import_typescript.sys,
|
|
484272
484275
|
(0, import_node_path5.dirname)(options8.tsConfig)
|