@storm-software/workspace-tools 1.10.20 → 1.11.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 +7 -0
- package/index.js +23 -23
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +96 -58
- package/src/executors/tsup/get-config.js +100 -60
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.10.20](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.10.19...workspace-tools-v1.10.20) (2023-11-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **workspace-tools:** Update the outDir value of parsed tsconfig options in tsup patch ([65c2aca](https://github.com/storm-software/storm-ops/commit/65c2aca19ba41a7de44d2f4b2121f7e2abfd3893))
|
|
7
|
+
|
|
1
8
|
## [1.10.19](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.10.18...workspace-tools-v1.10.19) (2023-11-25)
|
|
2
9
|
|
|
3
10
|
|
package/index.js
CHANGED
|
@@ -408390,9 +408390,9 @@ var require_brace_expansion2 = __commonJS({
|
|
|
408390
408390
|
}
|
|
408391
408391
|
});
|
|
408392
408392
|
|
|
408393
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
408393
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=5tqqjclwmacdlcpsbwlaqptbpe_@microsoft+api-extractor@7.38.3_@swc+core@1._uwnm353vjxd2qwlawie2fmt4ku/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
408394
408394
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
408395
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
408395
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=5tqqjclwmacdlcpsbwlaqptbpe_@microsoft+api-extractor@7.38.3_@swc+core@1._uwnm353vjxd2qwlawie2fmt4ku/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
408396
408396
|
"use strict";
|
|
408397
408397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
408398
408398
|
var version = "8.0.0";
|
|
@@ -410039,9 +410039,9 @@ var require_resolve_from = __commonJS({
|
|
|
410039
410039
|
}
|
|
410040
410040
|
});
|
|
410041
410041
|
|
|
410042
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410042
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=5tqqjclwmacdlcpsbwlaqptbpe_@microsoft+api-extractor@7.38.3_@swc+core@1._uwnm353vjxd2qwlawie2fmt4ku/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
410043
410043
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
410044
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410044
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=5tqqjclwmacdlcpsbwlaqptbpe_@microsoft+api-extractor@7.38.3_@swc+core@1._uwnm353vjxd2qwlawie2fmt4ku/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
410045
410045
|
"use strict";
|
|
410046
410046
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
410047
410047
|
function _interopRequireDefault(obj) {
|
|
@@ -410239,13 +410239,12 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
410239
410239
|
};
|
|
410240
410240
|
}
|
|
410241
410241
|
function ensureTempDeclarationDir(options) {
|
|
410242
|
-
const
|
|
410243
|
-
const dirPath = _path2.default.join(cwd, "tmp", ".tsup", "declaration");
|
|
410242
|
+
const dirPath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", "declaration");
|
|
410244
410243
|
if (_fs2.default.existsSync(dirPath)) {
|
|
410245
410244
|
return dirPath;
|
|
410246
410245
|
}
|
|
410247
410246
|
_fs2.default.mkdirSync(dirPath, { recursive: true });
|
|
410248
|
-
const gitIgnorePath = _path2.default.join(
|
|
410247
|
+
const gitIgnorePath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", ".gitignore");
|
|
410249
410248
|
writeFileSync(gitIgnorePath, "**/*\n");
|
|
410250
410249
|
return dirPath;
|
|
410251
410250
|
}
|
|
@@ -410320,9 +410319,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
410320
410319
|
}
|
|
410321
410320
|
});
|
|
410322
410321
|
|
|
410323
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410322
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=5tqqjclwmacdlcpsbwlaqptbpe_@microsoft+api-extractor@7.38.3_@swc+core@1._uwnm353vjxd2qwlawie2fmt4ku/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
410324
410323
|
var require_chunk_UIX4URMV = __commonJS({
|
|
410325
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410324
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=5tqqjclwmacdlcpsbwlaqptbpe_@microsoft+api-extractor@7.38.3_@swc+core@1._uwnm353vjxd2qwlawie2fmt4ku/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
410326
410325
|
"use strict";
|
|
410327
410326
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
410328
410327
|
function _interopRequireWildcard(obj) {
|
|
@@ -411256,9 +411255,9 @@ var require_dist2 = __commonJS({
|
|
|
411256
411255
|
}
|
|
411257
411256
|
});
|
|
411258
411257
|
|
|
411259
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
411258
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=5tqqjclwmacdlcpsbwlaqptbpe_@microsoft+api-extractor@7.38.3_@swc+core@1._uwnm353vjxd2qwlawie2fmt4ku/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
411260
411259
|
var require_chunk_7G76EW2R = __commonJS({
|
|
411261
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
411260
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=5tqqjclwmacdlcpsbwlaqptbpe_@microsoft+api-extractor@7.38.3_@swc+core@1._uwnm353vjxd2qwlawie2fmt4ku/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
411262
411261
|
"use strict";
|
|
411263
411262
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
411264
411263
|
function _interopRequireDefault(obj) {
|
|
@@ -465064,9 +465063,9 @@ var require_chokidar = __commonJS({
|
|
|
465064
465063
|
}
|
|
465065
465064
|
});
|
|
465066
465065
|
|
|
465067
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
465066
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=5tqqjclwmacdlcpsbwlaqptbpe_@microsoft+api-extractor@7.38.3_@swc+core@1._uwnm353vjxd2qwlawie2fmt4ku/node_modules/tsup/dist/index.js
|
|
465068
465067
|
var require_dist5 = __commonJS({
|
|
465069
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
465068
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=5tqqjclwmacdlcpsbwlaqptbpe_@microsoft+api-extractor@7.38.3_@swc+core@1._uwnm353vjxd2qwlawie2fmt4ku/node_modules/tsup/dist/index.js"(exports) {
|
|
465070
465069
|
"use strict";
|
|
465071
465070
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
465072
465071
|
function _interopRequireDefault(obj) {
|
|
@@ -466633,14 +466632,15 @@ var require_dist5 = __commonJS({
|
|
|
466633
466632
|
".js": extension.js || defaultExtension.js
|
|
466634
466633
|
};
|
|
466635
466634
|
};
|
|
466636
|
-
var generateExternal = async (external) => {
|
|
466635
|
+
var generateExternal = async (external, options, logger3) => {
|
|
466637
466636
|
const result = [];
|
|
466637
|
+
const pkgJsonPath = packageJsonSearch(options.outDir, options.silent, "CLI", logger3);
|
|
466638
466638
|
for (const item of external) {
|
|
466639
466639
|
if (typeof item !== "string" || !item.endsWith("package.json")) {
|
|
466640
466640
|
result.push(item);
|
|
466641
466641
|
continue;
|
|
466642
466642
|
}
|
|
466643
|
-
let pkgPath = _path2.default.isAbsolute(item) ? _path2.default.dirname(item) : _path2.default.dirname(_path2.default.resolve(process.cwd(), item));
|
|
466643
|
+
let pkgPath = _path2.default.isAbsolute(item) ? _path2.default.dirname(item) : _path2.default.dirname(_path2.default.resolve(pkgJsonPath ?? process.cwd(), item));
|
|
466644
466644
|
const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
|
|
466645
466645
|
result.push(...deps);
|
|
466646
466646
|
}
|
|
@@ -466648,7 +466648,7 @@ var require_dist5 = __commonJS({
|
|
|
466648
466648
|
};
|
|
466649
466649
|
var packageJsonSearch = (outDir, silent, format2, logger3) => {
|
|
466650
466650
|
let pkgPath = outDir ? outDir : process.cwd();
|
|
466651
|
-
!silent && logger3.info(format2, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
|
|
466651
|
+
!silent && logger3 && logger3.info(format2, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
|
|
466652
466652
|
if (pkgPath) {
|
|
466653
466653
|
const splits = pkgPath.split("/");
|
|
466654
466654
|
if (splits.length > 0) {
|
|
@@ -466660,12 +466660,12 @@ var require_dist5 = __commonJS({
|
|
|
466660
466660
|
).join("/"),
|
|
466661
466661
|
"package.json"
|
|
466662
466662
|
);
|
|
466663
|
-
!silent && logger3.info(
|
|
466663
|
+
!silent && logger3 && logger3.info(
|
|
466664
466664
|
format2,
|
|
466665
466665
|
`\u26A1 Searching for package.json file in ${packageJsonPath} (index: ${i})`
|
|
466666
466666
|
);
|
|
466667
466667
|
if (_fs2.default.existsSync(packageJsonPath)) {
|
|
466668
|
-
!silent && logger3.info(
|
|
466668
|
+
!silent && logger3 && logger3.info(
|
|
466669
466669
|
format2,
|
|
466670
466670
|
`\u26A1 Found the package.json file in ${packageJsonPath} (index: ${i})`
|
|
466671
466671
|
);
|
|
@@ -466691,7 +466691,7 @@ var require_dist5 = __commonJS({
|
|
|
466691
466691
|
const external = [
|
|
466692
466692
|
// Exclude dependencies, e.g. `lodash`, `lodash/get`
|
|
466693
466693
|
...deps.map((dep) => new RegExp(`^${dep}($|\\/|\\\\)`)),
|
|
466694
|
-
...await generateExternal(options.external || [])
|
|
466694
|
+
...await generateExternal(options.external || [], options, logger3)
|
|
466695
466695
|
];
|
|
466696
466696
|
const outDir = options.outDir;
|
|
466697
466697
|
const outExtension = getOutputExtensionMap(options, format2, pkg.type);
|
|
@@ -467366,7 +467366,7 @@ var require_dist5 = __commonJS({
|
|
|
467366
467366
|
rawTsconfig.data.compilerOptions = {};
|
|
467367
467367
|
}
|
|
467368
467368
|
logger.info("tsc", "Getting temporary declaration directory");
|
|
467369
|
-
let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0);
|
|
467369
|
+
let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
|
|
467370
467370
|
logger.info("tsc", declarationDir);
|
|
467371
467371
|
logger.info("tsc", "Parsing tsconfig.json");
|
|
467372
467372
|
let parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(
|
|
@@ -467780,7 +467780,7 @@ var require_dist5 = __commonJS({
|
|
|
467780
467780
|
async function build(_options) {
|
|
467781
467781
|
const config = _options.config === false ? {} : await _chunk7G76EW2Rjs.loadTsupConfig.call(
|
|
467782
467782
|
void 0,
|
|
467783
|
-
process.cwd(),
|
|
467783
|
+
_options.workspaceRoot ?? process.cwd(),
|
|
467784
467784
|
_options.config === true ? void 0 : _options.config
|
|
467785
467785
|
);
|
|
467786
467786
|
const configData = typeof config.data === "function" ? await config.data(_options) : config.data;
|
|
@@ -467846,7 +467846,7 @@ var require_dist5 = __commonJS({
|
|
|
467846
467846
|
let onSuccessProcess;
|
|
467847
467847
|
let onSuccessCleanup;
|
|
467848
467848
|
const buildDependencies = /* @__PURE__ */ new Set();
|
|
467849
|
-
let depsHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, process.cwd());
|
|
467849
|
+
let depsHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, options.workspaceRoot ?? process.cwd());
|
|
467850
467850
|
const doOnSuccessCleanup = async () => {
|
|
467851
467851
|
if (onSuccessProcess) {
|
|
467852
467852
|
await killProcess({
|
|
@@ -467968,7 +467968,7 @@ var require_dist5 = __commonJS({
|
|
|
467968
467968
|
let shouldSkipChange = false;
|
|
467969
467969
|
if (options.watch === true) {
|
|
467970
467970
|
if (file === "package.json" && !buildDependencies.has(file)) {
|
|
467971
|
-
const currentHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, process.cwd());
|
|
467971
|
+
const currentHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, options.workspaceRoot ?? process.cwd());
|
|
467972
467972
|
shouldSkipChange = currentHash === depsHash;
|
|
467973
467973
|
depsHash = currentHash;
|
|
467974
467974
|
} else if (!buildDependencies.has(file)) {
|