@storm-software/workspace-tools 1.62.9 → 1.62.11
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 +40 -37
- package/meta.json +1 -1
- package/package.json +2 -3
- package/src/executors/tsup/executor.js +28 -28
- package/src/executors/tsup-browser/executor.js +40 -33
- package/src/executors/tsup-neutral/executor.js +40 -33
- package/src/executors/tsup-node/executor.js +40 -33
- package/src/generators/preset/generator.js +0 -4
- package/src/utils/index.js +40 -33
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## 1.62.11 (2024-02-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🩹 Fixes
|
|
5
|
+
|
|
6
|
+
- **workspace-tools:** Resolved issue with formatting of package name in banner ([0b9165bc](https://github.com/storm-software/storm-ops/commit/0b9165bc))
|
|
7
|
+
|
|
8
|
+
- **workspace-tools:** Clean up the URLs displayed in the file banner ([8c596823](https://github.com/storm-software/storm-ops/commit/8c596823))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Patrick Sullivan
|
|
14
|
+
|
|
15
|
+
## 1.62.10 (2024-02-27)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### 🩹 Fixes
|
|
19
|
+
|
|
20
|
+
- **workspace-tools:** Update all imports to `config-tools` in the package ([85202800](https://github.com/storm-software/storm-ops/commit/85202800))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### ❤️ Thank You
|
|
24
|
+
|
|
25
|
+
- Patrick Sullivan
|
|
26
|
+
|
|
1
27
|
## 1.62.9 (2024-02-27)
|
|
2
28
|
|
|
3
29
|
|
package/index.js
CHANGED
|
@@ -391542,9 +391542,9 @@ var require_normalize_options = __commonJS({
|
|
|
391542
391542
|
}
|
|
391543
391543
|
});
|
|
391544
391544
|
|
|
391545
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
391545
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
391546
391546
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
391547
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
391547
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports2) {
|
|
391548
391548
|
"use strict";
|
|
391549
391549
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
391550
391550
|
var version = "8.0.0";
|
|
@@ -393191,9 +393191,9 @@ var require_resolve_from = __commonJS({
|
|
|
393191
393191
|
}
|
|
393192
393192
|
});
|
|
393193
393193
|
|
|
393194
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
393194
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
393195
393195
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
393196
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
393196
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports2) {
|
|
393197
393197
|
"use strict";
|
|
393198
393198
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
393199
393199
|
function _interopRequireDefault(obj) {
|
|
@@ -393471,9 +393471,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
393471
393471
|
}
|
|
393472
393472
|
});
|
|
393473
393473
|
|
|
393474
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
393474
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
393475
393475
|
var require_chunk_UIX4URMV = __commonJS({
|
|
393476
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
393476
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports2) {
|
|
393477
393477
|
"use strict";
|
|
393478
393478
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
393479
393479
|
function _interopRequireWildcard(obj) {
|
|
@@ -396813,9 +396813,9 @@ var require_dist3 = __commonJS({
|
|
|
396813
396813
|
}
|
|
396814
396814
|
});
|
|
396815
396815
|
|
|
396816
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
396816
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
396817
396817
|
var require_chunk_7G76EW2R = __commonJS({
|
|
396818
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
396818
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports2) {
|
|
396819
396819
|
"use strict";
|
|
396820
396820
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
396821
396821
|
function _interopRequireDefault(obj) {
|
|
@@ -443885,7 +443885,7 @@ ${outro}`;
|
|
|
443885
443885
|
await promises.mkdir(node_path.dirname(fileName), { recursive: true });
|
|
443886
443886
|
return promises.writeFile(fileName, outputFile.type === "asset" ? outputFile.source : outputFile.code);
|
|
443887
443887
|
}
|
|
443888
|
-
function
|
|
443888
|
+
function defineConfig(options8) {
|
|
443889
443889
|
return options8;
|
|
443890
443890
|
}
|
|
443891
443891
|
exports2.blue = blue;
|
|
@@ -443894,7 +443894,7 @@ ${outro}`;
|
|
|
443894
443894
|
exports2.createFilter = createFilter;
|
|
443895
443895
|
exports2.cyan = cyan$1;
|
|
443896
443896
|
exports2.cyan$1 = cyan;
|
|
443897
|
-
exports2.defineConfig =
|
|
443897
|
+
exports2.defineConfig = defineConfig;
|
|
443898
443898
|
exports2.ensureArray = ensureArray$1;
|
|
443899
443899
|
exports2.getAugmentedNamespace = getAugmentedNamespace;
|
|
443900
443900
|
exports2.getNewArray = getNewArray;
|
|
@@ -447898,9 +447898,9 @@ var require_rollup2 = __commonJS({
|
|
|
447898
447898
|
}
|
|
447899
447899
|
});
|
|
447900
447900
|
|
|
447901
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
447901
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/index.js
|
|
447902
447902
|
var require_dist6 = __commonJS({
|
|
447903
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
447903
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/index.js"(exports2) {
|
|
447904
447904
|
"use strict";
|
|
447905
447905
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
447906
447906
|
function _interopRequireDefault(obj) {
|
|
@@ -450463,7 +450463,7 @@ var require_dist6 = __commonJS({
|
|
|
450463
450463
|
}
|
|
450464
450464
|
};
|
|
450465
450465
|
};
|
|
450466
|
-
var
|
|
450466
|
+
var defineConfig = (options8) => options8;
|
|
450467
450467
|
var isTaskkillCmdProcessNotFoundError = (err) => {
|
|
450468
450468
|
return process.platform === "win32" && "cmd" in err && "code" in err && typeof err.cmd === "string" && err.cmd.startsWith("taskkill") && err.code === 128;
|
|
450469
450469
|
};
|
|
@@ -450768,7 +450768,7 @@ var require_dist6 = __commonJS({
|
|
|
450768
450768
|
);
|
|
450769
450769
|
}
|
|
450770
450770
|
exports2.build = build2;
|
|
450771
|
-
exports2.defineConfig =
|
|
450771
|
+
exports2.defineConfig = defineConfig;
|
|
450772
450772
|
}
|
|
450773
450773
|
});
|
|
450774
450774
|
|
|
@@ -476943,23 +476943,30 @@ var getFileBanner = (name, commentStart = "//") => {
|
|
|
476943
476943
|
while (name.length + padding.length < 12) {
|
|
476944
476944
|
padding += " ";
|
|
476945
476945
|
}
|
|
476946
|
+
let titleName = process.env.STORM_NAMESPACE ?? "";
|
|
476947
|
+
if (titleName) {
|
|
476948
|
+
if (titleName?.startsWith("@")) {
|
|
476949
|
+
titleName = titleName.slice(1);
|
|
476950
|
+
}
|
|
476951
|
+
titleName = (titleName.charAt(0).toUpperCase() + titleName.slice(1)).split("-").filter((word) => word && word.length > 0).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
476952
|
+
}
|
|
476946
476953
|
return `
|
|
476947
476954
|
|
|
476948
476955
|
${commentStart} -------------------------------------------------------------------
|
|
476949
476956
|
${commentStart}
|
|
476950
476957
|
${commentStart} ${padding}Storm Software
|
|
476951
|
-
${commentStart} \u26A1 ${
|
|
476958
|
+
${commentStart} \u26A1 ${titleName ? `${titleName} - ` : ""}${name}
|
|
476952
476959
|
${commentStart}
|
|
476953
|
-
${commentStart} This code was released as part of the ${
|
|
476960
|
+
${commentStart} This code was released as part of the ${titleName ? `${titleName} ` : ""}project. ${titleName ? titleName : "This project"}
|
|
476954
476961
|
${commentStart} is maintained by Storm Software under the ${process.env.STORM_LICENSE ?? "Apache License 2.0"}, and is
|
|
476955
476962
|
${commentStart} free for commercial and private use. For more information, please visit
|
|
476956
476963
|
${commentStart} our licensing page.
|
|
476957
476964
|
${commentStart}
|
|
476958
476965
|
${commentStart} Website: ${process.env.STORM_HOMEPAGE ?? "https://stormsoftware.org"}
|
|
476959
476966
|
${commentStart} Repository: ${process.env.STORM_REPOSITORY ?? "https://github.com/storm-software/storm-stack"}
|
|
476960
|
-
${commentStart} Documentation: https://stormsoftware.org/docs
|
|
476961
|
-
${commentStart} Contact: https://stormsoftware.org/contact
|
|
476962
|
-
${commentStart} Licensing: https://stormsoftware.org/licensing
|
|
476967
|
+
${commentStart} Documentation: https://stormsoftware.org/docs${titleName?.startsWith("@") ? `/${titleName.slice(1)}` : ""}
|
|
476968
|
+
${commentStart} Contact: ${process.env.STORM_HOMEPAGE ? process.env.STORM_HOMEPAGE.endsWith("/") ? process.env.STORM_HOMEPAGE.slice(-1) : process.env.STORM_HOMEPAGE : "https://stormsoftware.org"}/contact
|
|
476969
|
+
${commentStart} Licensing: ${process.env.STORM_HOMEPAGE ? process.env.STORM_HOMEPAGE.endsWith("/") ? process.env.STORM_HOMEPAGE.slice(-1) : process.env.STORM_HOMEPAGE : "https://stormsoftware.org"}/licensing
|
|
476963
476970
|
${commentStart}
|
|
476964
476971
|
${commentStart} -------------------------------------------------------------------
|
|
476965
476972
|
|
|
@@ -477016,7 +477023,6 @@ var environmentPlugin = (data) => ({
|
|
|
477016
477023
|
});
|
|
477017
477024
|
|
|
477018
477025
|
// packages/workspace-tools/src/utils/run-tsup-build.ts
|
|
477019
|
-
var import_tsup = __toESM(require_dist6());
|
|
477020
477026
|
var import_typescript = __toESM(require_typescript());
|
|
477021
477027
|
|
|
477022
477028
|
// packages/workspace-tools/src/utils/file-path-utils.ts
|
|
@@ -477039,7 +477045,7 @@ function findFileName(filePath) {
|
|
|
477039
477045
|
var applyDefaultOptions = (options8) => {
|
|
477040
477046
|
options8.entry ??= "{sourceRoot}/index.ts";
|
|
477041
477047
|
options8.outputPath ??= "dist/{projectRoot}";
|
|
477042
|
-
options8.tsConfig ??= "tsconfig.json";
|
|
477048
|
+
options8.tsConfig ??= "{projectRoot}/tsconfig.json";
|
|
477043
477049
|
options8.generatePackageJson ??= true;
|
|
477044
477050
|
options8.splitting ??= true;
|
|
477045
477051
|
options8.treeshake ??= true;
|
|
@@ -477070,7 +477076,8 @@ var applyDefaultOptions = (options8) => {
|
|
|
477070
477076
|
return options8;
|
|
477071
477077
|
};
|
|
477072
477078
|
var runTsupBuild = async (context, config, options8) => {
|
|
477073
|
-
const {
|
|
477079
|
+
const { writeInfo, writeWarning, findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
477080
|
+
const { build: tsup, defineConfig } = await Promise.resolve().then(() => __toESM(require_dist6()));
|
|
477074
477081
|
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
|
|
477075
477082
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
477076
477083
|
ret[key2] = options8.env?.[key2];
|
|
@@ -477085,7 +477092,6 @@ var runTsupBuild = async (context, config, options8) => {
|
|
|
477085
477092
|
options8.plugins?.push(environmentPlugin(stormEnv));
|
|
477086
477093
|
const getConfigOptions = {
|
|
477087
477094
|
...options8,
|
|
477088
|
-
main: context.main,
|
|
477089
477095
|
entry: {
|
|
477090
477096
|
[removeExtension(
|
|
477091
477097
|
context.main?.split(context.main?.includes(import_node_path2.sep) ? import_node_path2.sep : context.main?.includes("/") ? "/" : "\\")?.pop()
|
|
@@ -477117,13 +477123,14 @@ var runTsupBuild = async (context, config, options8) => {
|
|
|
477117
477123
|
)
|
|
477118
477124
|
),
|
|
477119
477125
|
banner: options8.banner ? {
|
|
477120
|
-
js:
|
|
477126
|
+
js: `
|
|
477121
477127
|
|
|
477122
|
-
`,
|
|
477123
|
-
css: `/*
|
|
477124
477128
|
${options8.banner}
|
|
477125
477129
|
|
|
477130
|
+
`,
|
|
477131
|
+
css: `/*
|
|
477126
477132
|
|
|
477133
|
+
${options8.banner}
|
|
477127
477134
|
|
|
477128
477135
|
*/`
|
|
477129
477136
|
} : void 0,
|
|
@@ -477132,18 +477139,18 @@ ${options8.banner}
|
|
|
477132
477139
|
if (options8.getConfig) {
|
|
477133
477140
|
writeInfo(config, "\u26A1 Running the Build process");
|
|
477134
477141
|
const getConfigFns = [options8.getConfig];
|
|
477135
|
-
const tsupConfig =
|
|
477142
|
+
const tsupConfig = defineConfig(
|
|
477136
477143
|
getConfigFns.map(
|
|
477137
477144
|
(getConfigFn) => getConfig(workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
|
|
477138
477145
|
)
|
|
477139
477146
|
);
|
|
477140
477147
|
if (_isFunction2(tsupConfig)) {
|
|
477141
477148
|
const tsupOptions = await Promise.resolve(tsupConfig({}));
|
|
477142
|
-
await build(tsupOptions, config);
|
|
477149
|
+
await build(tsup, tsupOptions, config);
|
|
477143
477150
|
} else {
|
|
477144
|
-
await build(tsupConfig, config);
|
|
477151
|
+
await build(tsup, tsupConfig, config);
|
|
477145
477152
|
}
|
|
477146
|
-
} else
|
|
477153
|
+
} else {
|
|
477147
477154
|
writeWarning(
|
|
477148
477155
|
config,
|
|
477149
477156
|
"The Build process did not run because no `getConfig` parameter was provided"
|
|
@@ -477178,10 +477185,10 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
|
|
|
477178
477185
|
}
|
|
477179
477186
|
return tsConfig;
|
|
477180
477187
|
}
|
|
477181
|
-
var build = async (options8, config) => {
|
|
477188
|
+
var build = async (tsup, options8, config) => {
|
|
477182
477189
|
const { writeDebug } = await import("@storm-software/config-tools");
|
|
477183
477190
|
if (Array.isArray(options8)) {
|
|
477184
|
-
await Promise.all(options8.map((buildOptions) => build(buildOptions, config)));
|
|
477191
|
+
await Promise.all(options8.map((buildOptions) => build(tsup, buildOptions, config)));
|
|
477185
477192
|
} else {
|
|
477186
477193
|
let tsupOptions = options8;
|
|
477187
477194
|
if (_isFunction2(tsupOptions)) {
|
|
@@ -477195,7 +477202,7 @@ ${!_isFunction2(tsupOptions) ? Object.keys(tsupOptions).map(
|
|
|
477195
477202
|
).join("\n") : "<function>"}
|
|
477196
477203
|
`
|
|
477197
477204
|
);
|
|
477198
|
-
await (
|
|
477205
|
+
await tsup(tsupOptions);
|
|
477199
477206
|
}
|
|
477200
477207
|
};
|
|
477201
477208
|
var _isPrimitive = (value) => {
|
|
@@ -489100,10 +489107,6 @@ async function presetGeneratorFn(tree, options8) {
|
|
|
489100
489107
|
"@storm-software/linting-tools": "latest",
|
|
489101
489108
|
"@storm-software/testing-tools": "latest",
|
|
489102
489109
|
"@storm-software/workspace-tools": "latest",
|
|
489103
|
-
"@swc-node/register": "^1.6.8",
|
|
489104
|
-
"@swc/cli": "^0.1.62",
|
|
489105
|
-
"@swc/core": "^1.3.96",
|
|
489106
|
-
"@swc/helpers": "^0.5.3",
|
|
489107
489110
|
"@types/jest": "^29.5.8",
|
|
489108
489111
|
"@types/node": "20.8.10",
|
|
489109
489112
|
"@types/react": "^18.2.37",
|