@storm-software/workspace-tools 1.30.2 → 1.30.4
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 +100 -86
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +51 -80
- package/src/executors/tsup/get-config.js +3 -2
- package/src/executors/tsup/schema.d.ts +1 -1
- package/src/executors/tsup/schema.json +2 -2
- package/src/executors/tsup-browser/executor.js +51 -80
- package/src/executors/tsup-neutral/executor.js +51 -80
- package/src/executors/tsup-node/executor.js +51 -80
- package/src/utils/index.js +63 -0
package/package.json
CHANGED
|
@@ -18464,46 +18464,6 @@ var require_devkit = __commonJS({
|
|
|
18464
18464
|
}
|
|
18465
18465
|
});
|
|
18466
18466
|
|
|
18467
|
-
// node_modules/.pnpm/@nx+esbuild@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_esbuild@0.19._qd2wqrdgtfa7fy24o2frhwj6em/node_modules/@nx/esbuild/src/executors/esbuild/lib/get-extra-dependencies.js
|
|
18468
|
-
var require_get_extra_dependencies = __commonJS({
|
|
18469
|
-
"node_modules/.pnpm/@nx+esbuild@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_esbuild@0.19._qd2wqrdgtfa7fy24o2frhwj6em/node_modules/@nx/esbuild/src/executors/esbuild/lib/get-extra-dependencies.js"(exports) {
|
|
18470
|
-
"use strict";
|
|
18471
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18472
|
-
exports.getExtraDependencies = void 0;
|
|
18473
|
-
function getExtraDependencies2(projectName, graph) {
|
|
18474
|
-
const deps = /* @__PURE__ */ new Map();
|
|
18475
|
-
recur(projectName);
|
|
18476
|
-
function recur(currProjectName) {
|
|
18477
|
-
const allDeps = graph.dependencies[currProjectName];
|
|
18478
|
-
const externalDeps = allDeps.reduce((acc, node) => {
|
|
18479
|
-
const found = graph.externalNodes[node.target];
|
|
18480
|
-
if (found)
|
|
18481
|
-
acc.push(found);
|
|
18482
|
-
return acc;
|
|
18483
|
-
}, []);
|
|
18484
|
-
const internalDeps = allDeps.reduce((acc, node) => {
|
|
18485
|
-
const found = graph.nodes[node.target];
|
|
18486
|
-
if (found)
|
|
18487
|
-
acc.push(found);
|
|
18488
|
-
return acc;
|
|
18489
|
-
}, []);
|
|
18490
|
-
for (const externalDep of externalDeps) {
|
|
18491
|
-
deps.set(externalDep.name, {
|
|
18492
|
-
name: externalDep.name,
|
|
18493
|
-
outputs: [],
|
|
18494
|
-
node: externalDep
|
|
18495
|
-
});
|
|
18496
|
-
}
|
|
18497
|
-
for (const internalDep of internalDeps) {
|
|
18498
|
-
recur(internalDep.name);
|
|
18499
|
-
}
|
|
18500
|
-
}
|
|
18501
|
-
return Array.from(deps.values());
|
|
18502
|
-
}
|
|
18503
|
-
exports.getExtraDependencies = getExtraDependencies2;
|
|
18504
|
-
}
|
|
18505
|
-
});
|
|
18506
|
-
|
|
18507
18467
|
// node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/package.json
|
|
18508
18468
|
var require_package2 = __commonJS({
|
|
18509
18469
|
"node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/package.json"(exports, module2) {
|
|
@@ -106595,7 +106555,6 @@ __export(executor_exports, {
|
|
|
106595
106555
|
module.exports = __toCommonJS(executor_exports);
|
|
106596
106556
|
var import_esbuild_decorators = __toESM(require_src());
|
|
106597
106557
|
var import_devkit2 = __toESM(require_devkit());
|
|
106598
|
-
var import_get_extra_dependencies = __toESM(require_get_extra_dependencies());
|
|
106599
106558
|
var import_js = __toESM(require_src2());
|
|
106600
106559
|
var import_normalize_options = __toESM(require_normalize_options());
|
|
106601
106560
|
var import_tsc = __toESM(require_tsc_impl());
|
|
@@ -116979,6 +116938,26 @@ var removeExtension = (filePath) => {
|
|
|
116979
116938
|
return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
116980
116939
|
};
|
|
116981
116940
|
|
|
116941
|
+
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
116942
|
+
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
116943
|
+
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(
|
|
116944
|
+
getWorkspaceRoot2()
|
|
116945
|
+
);
|
|
116946
|
+
var getProjectConfiguration = (projectName) => getProjectConfigurations()?.[projectName];
|
|
116947
|
+
|
|
116948
|
+
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
116949
|
+
function getExternalDependencies(projectName, graph) {
|
|
116950
|
+
const allDeps = graph.dependencies[projectName];
|
|
116951
|
+
return Array.from(
|
|
116952
|
+
allDeps.reduce((acc, node) => {
|
|
116953
|
+
const found = graph.externalNodes[node.target];
|
|
116954
|
+
if (found)
|
|
116955
|
+
acc.push(found);
|
|
116956
|
+
return acc;
|
|
116957
|
+
}, [])
|
|
116958
|
+
);
|
|
116959
|
+
}
|
|
116960
|
+
|
|
116982
116961
|
// packages/workspace-tools/src/executors/tsup/get-config.ts
|
|
116983
116962
|
var import_devkit = __toESM(require_devkit());
|
|
116984
116963
|
var import_tsup = __toESM(require_dist5());
|
|
@@ -117214,13 +117193,14 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
117214
117193
|
tsConfig,
|
|
117215
117194
|
additionalEntryPoints,
|
|
117216
117195
|
platform,
|
|
117196
|
+
emitOnAll = true,
|
|
117217
117197
|
...rest
|
|
117218
117198
|
}) {
|
|
117219
117199
|
const entryPoints = [];
|
|
117220
117200
|
if (rest.entry) {
|
|
117221
117201
|
entryPoints.push(rest.entry);
|
|
117222
117202
|
}
|
|
117223
|
-
if (
|
|
117203
|
+
if (emitOnAll !== false) {
|
|
117224
117204
|
entryPoints.push((0, import_devkit.joinPathFragments)(sourceRoot, "**/*.{ts,tsx}"));
|
|
117225
117205
|
}
|
|
117226
117206
|
if (additionalEntryPoints) {
|
|
@@ -117232,7 +117212,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
117232
117212
|
let propertyKey = (0, import_devkit.joinPathFragments)(
|
|
117233
117213
|
filePath.path,
|
|
117234
117214
|
removeExtension(filePath.name)
|
|
117235
|
-
).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(
|
|
117215
|
+
).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(2).replaceAll("\\", "/"), "").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
|
|
117236
117216
|
if (propertyKey) {
|
|
117237
117217
|
while (propertyKey.startsWith("/")) {
|
|
117238
117218
|
propertyKey = propertyKey.substring(1);
|
|
@@ -117354,28 +117334,6 @@ ${Object.keys(options).map(
|
|
|
117354
117334
|
options.external
|
|
117355
117335
|
);
|
|
117356
117336
|
}
|
|
117357
|
-
const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
|
|
117358
|
-
if (implicitDependencies && implicitDependencies.length > 0) {
|
|
117359
|
-
options.external = implicitDependencies.reduce(
|
|
117360
|
-
(ret, key) => {
|
|
117361
|
-
if (Object.keys(context.projectsConfigurations.projects[key]?.targets).length > 0) {
|
|
117362
|
-
const buildTargetName = Object.keys(
|
|
117363
|
-
context.projectsConfigurations.projects[key].targets
|
|
117364
|
-
).find((name) => name.toLowerCase() === "build");
|
|
117365
|
-
if (buildTargetName && context.projectsConfigurations.projects[key].targets[buildTargetName]?.options?.project) {
|
|
117366
|
-
const packageJson = (0, import_devkit2.readJsonFile)(
|
|
117367
|
-
context.projectsConfigurations.projects[key].targets[buildTargetName].options.project
|
|
117368
|
-
);
|
|
117369
|
-
if (packageJson?.name && !options.external.includes(packageJson.name)) {
|
|
117370
|
-
ret.push(packageJson.name);
|
|
117371
|
-
}
|
|
117372
|
-
}
|
|
117373
|
-
}
|
|
117374
|
-
return ret;
|
|
117375
|
-
},
|
|
117376
|
-
options.external
|
|
117377
|
-
);
|
|
117378
|
-
}
|
|
117379
117337
|
let externalDependencies = options.external.reduce((acc, name) => {
|
|
117380
117338
|
const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
|
|
117381
117339
|
if (externalNode) {
|
|
@@ -117387,19 +117345,28 @@ ${Object.keys(options).map(
|
|
|
117387
117345
|
}
|
|
117388
117346
|
return acc;
|
|
117389
117347
|
}, []);
|
|
117390
|
-
|
|
117391
|
-
|
|
117392
|
-
|
|
117393
|
-
|
|
117394
|
-
|
|
117395
|
-
|
|
117396
|
-
|
|
117397
|
-
|
|
117398
|
-
|
|
117399
|
-
|
|
117400
|
-
|
|
117348
|
+
const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
|
|
117349
|
+
const internalDependencies = [];
|
|
117350
|
+
if (implicitDependencies && implicitDependencies.length > 0) {
|
|
117351
|
+
options.external = implicitDependencies.reduce(
|
|
117352
|
+
(ret, key) => {
|
|
117353
|
+
const projectConfig = getProjectConfiguration(key);
|
|
117354
|
+
if (projectConfig.targets?.build) {
|
|
117355
|
+
const packageJson = (0, import_devkit2.readJsonFile)(
|
|
117356
|
+
projectConfig.targets?.build.options.project
|
|
117357
|
+
);
|
|
117358
|
+
if (packageJson?.name && !options.external.includes(packageJson.name)) {
|
|
117359
|
+
ret.push(packageJson.name);
|
|
117360
|
+
internalDependencies.push(packageJson.name);
|
|
117361
|
+
}
|
|
117362
|
+
}
|
|
117363
|
+
return ret;
|
|
117364
|
+
},
|
|
117365
|
+
options.external
|
|
117366
|
+
);
|
|
117367
|
+
}
|
|
117401
117368
|
if (options.bundle === false) {
|
|
117402
|
-
for (const thirdPartyDependency of (
|
|
117369
|
+
for (const thirdPartyDependency of getExternalDependencies(
|
|
117403
117370
|
context.projectName,
|
|
117404
117371
|
context.projectGraph
|
|
117405
117372
|
)) {
|
|
@@ -117411,7 +117378,7 @@ ${Object.keys(options).map(
|
|
|
117411
117378
|
}
|
|
117412
117379
|
}
|
|
117413
117380
|
console.log(`Building with the following dependencies marked as external:
|
|
117414
|
-
|
|
117381
|
+
${externalDependencies.map((dep) => {
|
|
117415
117382
|
return `name: ${dep.name}, node: ${dep.node}, outputs: ${dep.outputs}`;
|
|
117416
117383
|
}).join("\n")}`);
|
|
117417
117384
|
const prettierOptions = {
|
|
@@ -117435,7 +117402,7 @@ ${Object.keys(options).map(
|
|
|
117435
117402
|
delete packageJson.dependencies;
|
|
117436
117403
|
externalDependencies.forEach((entry) => {
|
|
117437
117404
|
const packageConfig = entry.node.data;
|
|
117438
|
-
if (packageConfig?.packageName &&
|
|
117405
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[entry.node.name]?.type === "npm")) {
|
|
117439
117406
|
const { packageName, version } = packageConfig;
|
|
117440
117407
|
if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
|
|
117441
117408
|
return;
|
|
@@ -117444,6 +117411,10 @@ ${Object.keys(options).map(
|
|
|
117444
117411
|
packageJson.dependencies[packageName] = !!projectGraph.nodes[entry.node.name] ? "latest" : version;
|
|
117445
117412
|
}
|
|
117446
117413
|
});
|
|
117414
|
+
internalDependencies.forEach((packageName) => {
|
|
117415
|
+
packageJson.dependencies ??= {};
|
|
117416
|
+
packageJson.dependencies[packageName] = "latest";
|
|
117417
|
+
});
|
|
117447
117418
|
packageJson.type = "module";
|
|
117448
117419
|
packageJson.exports ??= {
|
|
117449
117420
|
".": {
|
|
@@ -117695,7 +117666,7 @@ var applyDefaultOptions = (options) => {
|
|
|
117695
117666
|
options.apiReport ??= true;
|
|
117696
117667
|
options.docModel ??= true;
|
|
117697
117668
|
options.tsdocMetadata ??= true;
|
|
117698
|
-
options.
|
|
117669
|
+
options.emitOnAll ??= true;
|
|
117699
117670
|
options.define ??= {};
|
|
117700
117671
|
options.env ??= {};
|
|
117701
117672
|
options.verbose ??= !!process.env.CI;
|
|
@@ -88611,13 +88611,14 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
88611
88611
|
tsConfig,
|
|
88612
88612
|
additionalEntryPoints,
|
|
88613
88613
|
platform,
|
|
88614
|
+
emitOnAll = true,
|
|
88614
88615
|
...rest
|
|
88615
88616
|
}) {
|
|
88616
88617
|
const entryPoints = [];
|
|
88617
88618
|
if (rest.entry) {
|
|
88618
88619
|
entryPoints.push(rest.entry);
|
|
88619
88620
|
}
|
|
88620
|
-
if (
|
|
88621
|
+
if (emitOnAll !== false) {
|
|
88621
88622
|
entryPoints.push((0, import_devkit.joinPathFragments)(sourceRoot, "**/*.{ts,tsx}"));
|
|
88622
88623
|
}
|
|
88623
88624
|
if (additionalEntryPoints) {
|
|
@@ -88629,7 +88630,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
88629
88630
|
let propertyKey = (0, import_devkit.joinPathFragments)(
|
|
88630
88631
|
filePath.path,
|
|
88631
88632
|
removeExtension(filePath.name)
|
|
88632
|
-
).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(
|
|
88633
|
+
).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(2).replaceAll("\\", "/"), "").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
|
|
88633
88634
|
if (propertyKey) {
|
|
88634
88635
|
while (propertyKey.startsWith("/")) {
|
|
88635
88636
|
propertyKey = propertyKey.substring(1);
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"description": "Should the source files be added to the distribution folder in an `src` directory.",
|
|
72
72
|
"default": false
|
|
73
73
|
},
|
|
74
|
-
"
|
|
74
|
+
"emitOnAll": {
|
|
75
75
|
"type": "boolean",
|
|
76
|
-
"description": "Should
|
|
76
|
+
"description": "Should each file contained in the package be emitted individually.",
|
|
77
77
|
"default": true
|
|
78
78
|
},
|
|
79
79
|
"generatePackageJson": {
|
|
@@ -26484,46 +26484,6 @@ var require_devkit = __commonJS({
|
|
|
26484
26484
|
}
|
|
26485
26485
|
});
|
|
26486
26486
|
|
|
26487
|
-
// node_modules/.pnpm/@nx+esbuild@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_esbuild@0.19._qd2wqrdgtfa7fy24o2frhwj6em/node_modules/@nx/esbuild/src/executors/esbuild/lib/get-extra-dependencies.js
|
|
26488
|
-
var require_get_extra_dependencies = __commonJS({
|
|
26489
|
-
"node_modules/.pnpm/@nx+esbuild@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_esbuild@0.19._qd2wqrdgtfa7fy24o2frhwj6em/node_modules/@nx/esbuild/src/executors/esbuild/lib/get-extra-dependencies.js"(exports) {
|
|
26490
|
-
"use strict";
|
|
26491
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26492
|
-
exports.getExtraDependencies = void 0;
|
|
26493
|
-
function getExtraDependencies2(projectName, graph) {
|
|
26494
|
-
const deps = /* @__PURE__ */ new Map();
|
|
26495
|
-
recur(projectName);
|
|
26496
|
-
function recur(currProjectName) {
|
|
26497
|
-
const allDeps = graph.dependencies[currProjectName];
|
|
26498
|
-
const externalDeps = allDeps.reduce((acc, node) => {
|
|
26499
|
-
const found = graph.externalNodes[node.target];
|
|
26500
|
-
if (found)
|
|
26501
|
-
acc.push(found);
|
|
26502
|
-
return acc;
|
|
26503
|
-
}, []);
|
|
26504
|
-
const internalDeps = allDeps.reduce((acc, node) => {
|
|
26505
|
-
const found = graph.nodes[node.target];
|
|
26506
|
-
if (found)
|
|
26507
|
-
acc.push(found);
|
|
26508
|
-
return acc;
|
|
26509
|
-
}, []);
|
|
26510
|
-
for (const externalDep of externalDeps) {
|
|
26511
|
-
deps.set(externalDep.name, {
|
|
26512
|
-
name: externalDep.name,
|
|
26513
|
-
outputs: [],
|
|
26514
|
-
node: externalDep
|
|
26515
|
-
});
|
|
26516
|
-
}
|
|
26517
|
-
for (const internalDep of internalDeps) {
|
|
26518
|
-
recur(internalDep.name);
|
|
26519
|
-
}
|
|
26520
|
-
}
|
|
26521
|
-
return Array.from(deps.values());
|
|
26522
|
-
}
|
|
26523
|
-
exports.getExtraDependencies = getExtraDependencies2;
|
|
26524
|
-
}
|
|
26525
|
-
});
|
|
26526
|
-
|
|
26527
26487
|
// node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/package.json
|
|
26528
26488
|
var require_package2 = __commonJS({
|
|
26529
26489
|
"node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/package.json"(exports, module2) {
|
|
@@ -110772,7 +110732,6 @@ ${commentStart} ----------------------------------------------------------------
|
|
|
110772
110732
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
110773
110733
|
var import_esbuild_decorators = __toESM(require_src());
|
|
110774
110734
|
var import_devkit2 = __toESM(require_devkit());
|
|
110775
|
-
var import_get_extra_dependencies = __toESM(require_get_extra_dependencies());
|
|
110776
110735
|
var import_js = __toESM(require_src2());
|
|
110777
110736
|
var import_normalize_options = __toESM(require_normalize_options());
|
|
110778
110737
|
var import_tsc = __toESM(require_tsc_impl());
|
|
@@ -117010,6 +116969,26 @@ var removeExtension = (filePath) => {
|
|
|
117010
116969
|
return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
117011
116970
|
};
|
|
117012
116971
|
|
|
116972
|
+
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
116973
|
+
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
116974
|
+
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(
|
|
116975
|
+
getWorkspaceRoot2()
|
|
116976
|
+
);
|
|
116977
|
+
var getProjectConfiguration = (projectName) => getProjectConfigurations()?.[projectName];
|
|
116978
|
+
|
|
116979
|
+
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
116980
|
+
function getExternalDependencies(projectName, graph) {
|
|
116981
|
+
const allDeps = graph.dependencies[projectName];
|
|
116982
|
+
return Array.from(
|
|
116983
|
+
allDeps.reduce((acc, node) => {
|
|
116984
|
+
const found = graph.externalNodes[node.target];
|
|
116985
|
+
if (found)
|
|
116986
|
+
acc.push(found);
|
|
116987
|
+
return acc;
|
|
116988
|
+
}, [])
|
|
116989
|
+
);
|
|
116990
|
+
}
|
|
116991
|
+
|
|
117013
116992
|
// packages/workspace-tools/src/executors/tsup/get-config.ts
|
|
117014
116993
|
var import_devkit = __toESM(require_devkit());
|
|
117015
116994
|
var import_tsup = __toESM(require_dist6());
|
|
@@ -117245,13 +117224,14 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
117245
117224
|
tsConfig,
|
|
117246
117225
|
additionalEntryPoints,
|
|
117247
117226
|
platform,
|
|
117227
|
+
emitOnAll = true,
|
|
117248
117228
|
...rest
|
|
117249
117229
|
}) {
|
|
117250
117230
|
const entryPoints = [];
|
|
117251
117231
|
if (rest.entry) {
|
|
117252
117232
|
entryPoints.push(rest.entry);
|
|
117253
117233
|
}
|
|
117254
|
-
if (
|
|
117234
|
+
if (emitOnAll !== false) {
|
|
117255
117235
|
entryPoints.push((0, import_devkit.joinPathFragments)(sourceRoot, "**/*.{ts,tsx}"));
|
|
117256
117236
|
}
|
|
117257
117237
|
if (additionalEntryPoints) {
|
|
@@ -117263,7 +117243,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
117263
117243
|
let propertyKey = (0, import_devkit.joinPathFragments)(
|
|
117264
117244
|
filePath.path,
|
|
117265
117245
|
removeExtension(filePath.name)
|
|
117266
|
-
).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(
|
|
117246
|
+
).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(2).replaceAll("\\", "/"), "").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
|
|
117267
117247
|
if (propertyKey) {
|
|
117268
117248
|
while (propertyKey.startsWith("/")) {
|
|
117269
117249
|
propertyKey = propertyKey.substring(1);
|
|
@@ -117385,28 +117365,6 @@ ${Object.keys(options).map(
|
|
|
117385
117365
|
options.external
|
|
117386
117366
|
);
|
|
117387
117367
|
}
|
|
117388
|
-
const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
|
|
117389
|
-
if (implicitDependencies && implicitDependencies.length > 0) {
|
|
117390
|
-
options.external = implicitDependencies.reduce(
|
|
117391
|
-
(ret, key) => {
|
|
117392
|
-
if (Object.keys(context.projectsConfigurations.projects[key]?.targets).length > 0) {
|
|
117393
|
-
const buildTargetName = Object.keys(
|
|
117394
|
-
context.projectsConfigurations.projects[key].targets
|
|
117395
|
-
).find((name) => name.toLowerCase() === "build");
|
|
117396
|
-
if (buildTargetName && context.projectsConfigurations.projects[key].targets[buildTargetName]?.options?.project) {
|
|
117397
|
-
const packageJson = (0, import_devkit2.readJsonFile)(
|
|
117398
|
-
context.projectsConfigurations.projects[key].targets[buildTargetName].options.project
|
|
117399
|
-
);
|
|
117400
|
-
if (packageJson?.name && !options.external.includes(packageJson.name)) {
|
|
117401
|
-
ret.push(packageJson.name);
|
|
117402
|
-
}
|
|
117403
|
-
}
|
|
117404
|
-
}
|
|
117405
|
-
return ret;
|
|
117406
|
-
},
|
|
117407
|
-
options.external
|
|
117408
|
-
);
|
|
117409
|
-
}
|
|
117410
117368
|
let externalDependencies = options.external.reduce((acc, name) => {
|
|
117411
117369
|
const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
|
|
117412
117370
|
if (externalNode) {
|
|
@@ -117418,19 +117376,28 @@ ${Object.keys(options).map(
|
|
|
117418
117376
|
}
|
|
117419
117377
|
return acc;
|
|
117420
117378
|
}, []);
|
|
117421
|
-
|
|
117422
|
-
|
|
117423
|
-
|
|
117424
|
-
|
|
117425
|
-
|
|
117426
|
-
|
|
117427
|
-
|
|
117428
|
-
|
|
117429
|
-
|
|
117430
|
-
|
|
117431
|
-
|
|
117379
|
+
const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
|
|
117380
|
+
const internalDependencies = [];
|
|
117381
|
+
if (implicitDependencies && implicitDependencies.length > 0) {
|
|
117382
|
+
options.external = implicitDependencies.reduce(
|
|
117383
|
+
(ret, key) => {
|
|
117384
|
+
const projectConfig = getProjectConfiguration(key);
|
|
117385
|
+
if (projectConfig.targets?.build) {
|
|
117386
|
+
const packageJson = (0, import_devkit2.readJsonFile)(
|
|
117387
|
+
projectConfig.targets?.build.options.project
|
|
117388
|
+
);
|
|
117389
|
+
if (packageJson?.name && !options.external.includes(packageJson.name)) {
|
|
117390
|
+
ret.push(packageJson.name);
|
|
117391
|
+
internalDependencies.push(packageJson.name);
|
|
117392
|
+
}
|
|
117393
|
+
}
|
|
117394
|
+
return ret;
|
|
117395
|
+
},
|
|
117396
|
+
options.external
|
|
117397
|
+
);
|
|
117398
|
+
}
|
|
117432
117399
|
if (options.bundle === false) {
|
|
117433
|
-
for (const thirdPartyDependency of (
|
|
117400
|
+
for (const thirdPartyDependency of getExternalDependencies(
|
|
117434
117401
|
context.projectName,
|
|
117435
117402
|
context.projectGraph
|
|
117436
117403
|
)) {
|
|
@@ -117442,7 +117409,7 @@ ${Object.keys(options).map(
|
|
|
117442
117409
|
}
|
|
117443
117410
|
}
|
|
117444
117411
|
console.log(`Building with the following dependencies marked as external:
|
|
117445
|
-
|
|
117412
|
+
${externalDependencies.map((dep) => {
|
|
117446
117413
|
return `name: ${dep.name}, node: ${dep.node}, outputs: ${dep.outputs}`;
|
|
117447
117414
|
}).join("\n")}`);
|
|
117448
117415
|
const prettierOptions = {
|
|
@@ -117466,7 +117433,7 @@ ${Object.keys(options).map(
|
|
|
117466
117433
|
delete packageJson.dependencies;
|
|
117467
117434
|
externalDependencies.forEach((entry) => {
|
|
117468
117435
|
const packageConfig = entry.node.data;
|
|
117469
|
-
if (packageConfig?.packageName &&
|
|
117436
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[entry.node.name]?.type === "npm")) {
|
|
117470
117437
|
const { packageName, version } = packageConfig;
|
|
117471
117438
|
if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
|
|
117472
117439
|
return;
|
|
@@ -117475,6 +117442,10 @@ ${Object.keys(options).map(
|
|
|
117475
117442
|
packageJson.dependencies[packageName] = !!projectGraph.nodes[entry.node.name] ? "latest" : version;
|
|
117476
117443
|
}
|
|
117477
117444
|
});
|
|
117445
|
+
internalDependencies.forEach((packageName) => {
|
|
117446
|
+
packageJson.dependencies ??= {};
|
|
117447
|
+
packageJson.dependencies[packageName] = "latest";
|
|
117448
|
+
});
|
|
117478
117449
|
packageJson.type = "module";
|
|
117479
117450
|
packageJson.exports ??= {
|
|
117480
117451
|
".": {
|
|
@@ -117726,7 +117697,7 @@ var applyDefaultOptions = (options) => {
|
|
|
117726
117697
|
options.apiReport ??= true;
|
|
117727
117698
|
options.docModel ??= true;
|
|
117728
117699
|
options.tsdocMetadata ??= true;
|
|
117729
|
-
options.
|
|
117700
|
+
options.emitOnAll ??= true;
|
|
117730
117701
|
options.define ??= {};
|
|
117731
117702
|
options.env ??= {};
|
|
117732
117703
|
options.verbose ??= !!process.env.CI;
|