@storm-software/workspace-tools 1.10.19 → 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 +14 -0
- package/index.js +30 -31
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +110 -71
- package/src/executors/tsup/get-config.js +114 -73
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
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)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **workspace-tools:** Replace invalid charaters in property key ([923bdad](https://github.com/storm-software/storm-ops/commit/923bdada143fc1150113b9b1881fe915a33a9e87))
|
|
14
|
+
|
|
1
15
|
## [1.10.18](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.10.17...workspace-tools-v1.10.18) (2023-11-25)
|
|
2
16
|
|
|
3
17
|
|
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(
|
|
@@ -467376,19 +467376,16 @@ var require_dist5 = __commonJS({
|
|
|
467376
467376
|
...rawTsconfig.data.compilerOptions,
|
|
467377
467377
|
...compilerOptions,
|
|
467378
467378
|
// Enable declaration emit and disable javascript emit
|
|
467379
|
+
outDir: options.outDir,
|
|
467379
467380
|
noEmit: false,
|
|
467380
467381
|
declaration: true,
|
|
467381
467382
|
declarationMap: true,
|
|
467382
467383
|
declarationDir,
|
|
467383
467384
|
emitDeclarationOnly: true
|
|
467384
467385
|
},
|
|
467385
|
-
files: [
|
|
467386
|
-
...rawTsconfig.data.files ?? {},
|
|
467387
|
-
`${options.projectRoot}/**/*`
|
|
467388
|
-
],
|
|
467389
467386
|
include: [
|
|
467390
467387
|
...rawTsconfig.data.files ?? {},
|
|
467391
|
-
|
|
467388
|
+
_path.join(options.projectRoot, "**", "*")
|
|
467392
467389
|
]
|
|
467393
467390
|
},
|
|
467394
467391
|
_typescript2.default.sys,
|
|
@@ -467742,11 +467739,12 @@ var require_dist5 = __commonJS({
|
|
|
467742
467739
|
options.entry = entry;
|
|
467743
467740
|
logger3.info("CLI", `Building entry: ${JSON.stringify(entry)}`);
|
|
467744
467741
|
}
|
|
467745
|
-
|
|
467742
|
+
!options.silent && logger2.info("CLI", `\u26A1 Normalizing options: ${options.tsconfig}`);
|
|
467743
|
+
const tsconfig = _bundlerequire.loadTsConfig.call(void 0, options.workspaceRoot, options.tsconfig);
|
|
467746
467744
|
if (tsconfig) {
|
|
467747
467745
|
logger3.info(
|
|
467748
467746
|
"CLI",
|
|
467749
|
-
`Using tsconfig: ${_path2.default.relative(
|
|
467747
|
+
`Using tsconfig: ${_path2.default.relative(options.workspaceRoot, tsconfig.path)}`
|
|
467750
467748
|
);
|
|
467751
467749
|
options.tsconfig = tsconfig.path;
|
|
467752
467750
|
options.tsconfigResolvePaths = _optionalChain([tsconfig, "access", (_20) => _20.data, "optionalAccess", (_21) => _21.compilerOptions, "optionalAccess", (_22) => _22.paths]) || {};
|
|
@@ -467760,7 +467758,8 @@ var require_dist5 = __commonJS({
|
|
|
467760
467758
|
if (options.experimentalDts) {
|
|
467761
467759
|
options.experimentalDts.compilerOptions = {
|
|
467762
467760
|
...tsconfig.data.compilerOptions || {},
|
|
467763
|
-
...options.experimentalDts.compilerOptions || {}
|
|
467761
|
+
...options.experimentalDts.compilerOptions || {},
|
|
467762
|
+
outDir: options.outDir
|
|
467764
467763
|
};
|
|
467765
467764
|
options.experimentalDts.entry = _chunkGQ77QZBOjs.toObjectEntry.call(
|
|
467766
467765
|
void 0,
|
|
@@ -467781,7 +467780,7 @@ var require_dist5 = __commonJS({
|
|
|
467781
467780
|
async function build(_options) {
|
|
467782
467781
|
const config = _options.config === false ? {} : await _chunk7G76EW2Rjs.loadTsupConfig.call(
|
|
467783
467782
|
void 0,
|
|
467784
|
-
process.cwd(),
|
|
467783
|
+
_options.workspaceRoot ?? process.cwd(),
|
|
467785
467784
|
_options.config === true ? void 0 : _options.config
|
|
467786
467785
|
);
|
|
467787
467786
|
const configData = typeof config.data === "function" ? await config.data(_options) : config.data;
|
|
@@ -467847,7 +467846,7 @@ var require_dist5 = __commonJS({
|
|
|
467847
467846
|
let onSuccessProcess;
|
|
467848
467847
|
let onSuccessCleanup;
|
|
467849
467848
|
const buildDependencies = /* @__PURE__ */ new Set();
|
|
467850
|
-
let depsHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, process.cwd());
|
|
467849
|
+
let depsHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, options.workspaceRoot ?? process.cwd());
|
|
467851
467850
|
const doOnSuccessCleanup = async () => {
|
|
467852
467851
|
if (onSuccessProcess) {
|
|
467853
467852
|
await killProcess({
|
|
@@ -467969,7 +467968,7 @@ var require_dist5 = __commonJS({
|
|
|
467969
467968
|
let shouldSkipChange = false;
|
|
467970
467969
|
if (options.watch === true) {
|
|
467971
467970
|
if (file === "package.json" && !buildDependencies.has(file)) {
|
|
467972
|
-
const currentHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, process.cwd());
|
|
467971
|
+
const currentHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, options.workspaceRoot ?? process.cwd());
|
|
467973
467972
|
shouldSkipChange = currentHash === depsHash;
|
|
467974
467973
|
depsHash = currentHash;
|
|
467975
467974
|
} else if (!buildDependencies.has(file)) {
|