@storm-software/workspace-tools 1.22.2 → 1.23.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 +54 -46
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +53 -45
- package/src/executors/tsup/get-config.js +27 -30
- package/src/executors/tsup/schema.d.ts +2 -0
- package/src/executors/tsup/schema.json +11 -1
- package/src/executors/tsup-neutral/executor.js +54 -46
- package/src/executors/tsup-node/executor.js +54 -46
- package/src/utils/index.js +1 -1
package/package.json
CHANGED
|
@@ -115357,6 +115357,8 @@ function modernConfig({
|
|
|
115357
115357
|
projectRoot,
|
|
115358
115358
|
workspaceRoot,
|
|
115359
115359
|
tsconfig = "tsconfig.json",
|
|
115360
|
+
splitting,
|
|
115361
|
+
treeshake,
|
|
115360
115362
|
debug = false,
|
|
115361
115363
|
external,
|
|
115362
115364
|
banner = {},
|
|
@@ -115385,6 +115387,10 @@ function modernConfig({
|
|
|
115385
115387
|
"esnext"
|
|
115386
115388
|
] : ["esnext", "node18"],
|
|
115387
115389
|
tsconfig,
|
|
115390
|
+
splitting,
|
|
115391
|
+
treeshake: treeshake ? {
|
|
115392
|
+
preset: "recommended"
|
|
115393
|
+
} : false,
|
|
115388
115394
|
projectRoot,
|
|
115389
115395
|
workspaceRoot,
|
|
115390
115396
|
outDir: outputPath,
|
|
@@ -115430,6 +115436,8 @@ function legacyConfig({
|
|
|
115430
115436
|
projectRoot,
|
|
115431
115437
|
workspaceRoot,
|
|
115432
115438
|
tsconfig = "tsconfig.json",
|
|
115439
|
+
splitting,
|
|
115440
|
+
treeshake,
|
|
115433
115441
|
debug = false,
|
|
115434
115442
|
external,
|
|
115435
115443
|
banner = {},
|
|
@@ -115447,6 +115455,10 @@ function legacyConfig({
|
|
|
115447
115455
|
format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
|
|
115448
115456
|
target: ["es2022", "node18"],
|
|
115449
115457
|
tsconfig,
|
|
115458
|
+
splitting,
|
|
115459
|
+
treeshake: treeshake ? {
|
|
115460
|
+
preset: "recommended"
|
|
115461
|
+
} : false,
|
|
115450
115462
|
projectRoot,
|
|
115451
115463
|
workspaceRoot,
|
|
115452
115464
|
outDir: outputPath,
|
|
@@ -115492,6 +115504,8 @@ function workerConfig({
|
|
|
115492
115504
|
projectRoot,
|
|
115493
115505
|
workspaceRoot,
|
|
115494
115506
|
tsconfig = "tsconfig.json",
|
|
115507
|
+
splitting,
|
|
115508
|
+
treeshake,
|
|
115495
115509
|
debug = false,
|
|
115496
115510
|
external,
|
|
115497
115511
|
banner = {},
|
|
@@ -115504,6 +115518,7 @@ function workerConfig({
|
|
|
115504
115518
|
plugins,
|
|
115505
115519
|
dtsTsConfig
|
|
115506
115520
|
}) {
|
|
115521
|
+
let outputPath = (0, import_path3.join)(outDir, "dist");
|
|
115507
115522
|
return {
|
|
115508
115523
|
name: "worker",
|
|
115509
115524
|
entry,
|
|
@@ -115511,9 +115526,13 @@ function workerConfig({
|
|
|
115511
115526
|
target: ["chrome95"],
|
|
115512
115527
|
bundle: true,
|
|
115513
115528
|
tsconfig,
|
|
115529
|
+
splitting,
|
|
115530
|
+
treeshake: treeshake ? {
|
|
115531
|
+
preset: "recommended"
|
|
115532
|
+
} : false,
|
|
115514
115533
|
projectRoot,
|
|
115515
115534
|
workspaceRoot,
|
|
115516
|
-
outDir:
|
|
115535
|
+
outDir: outputPath,
|
|
115517
115536
|
silent: !verbose,
|
|
115518
115537
|
metafile: true,
|
|
115519
115538
|
shims: false,
|
|
@@ -115529,7 +115548,7 @@ function workerConfig({
|
|
|
115529
115548
|
...dtsTsConfig,
|
|
115530
115549
|
options: {
|
|
115531
115550
|
...dtsTsConfig.options,
|
|
115532
|
-
outDir:
|
|
115551
|
+
outDir: outputPath
|
|
115533
115552
|
}
|
|
115534
115553
|
}
|
|
115535
115554
|
},
|
|
@@ -115553,20 +115572,8 @@ function workerConfig({
|
|
|
115553
115572
|
function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
115554
115573
|
outputPath,
|
|
115555
115574
|
tsConfig,
|
|
115556
|
-
debug,
|
|
115557
|
-
banner,
|
|
115558
|
-
platform,
|
|
115559
|
-
external,
|
|
115560
|
-
options,
|
|
115561
115575
|
additionalEntryPoints,
|
|
115562
|
-
|
|
115563
|
-
docModel,
|
|
115564
|
-
tsdocMetadata,
|
|
115565
|
-
define: define2,
|
|
115566
|
-
env,
|
|
115567
|
-
verbose,
|
|
115568
|
-
dtsTsConfig,
|
|
115569
|
-
plugins,
|
|
115576
|
+
platform,
|
|
115570
115577
|
...rest
|
|
115571
115578
|
}) {
|
|
115572
115579
|
const entry = globSync(
|
|
@@ -115590,24 +115597,14 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
115590
115597
|
return ret;
|
|
115591
115598
|
}, {});
|
|
115592
115599
|
const params = {
|
|
115600
|
+
...rest,
|
|
115593
115601
|
entry,
|
|
115594
115602
|
outDir: outputPath,
|
|
115595
|
-
projectRoot,
|
|
115596
|
-
workspaceRoot,
|
|
115597
115603
|
tsconfig: tsConfig,
|
|
115598
|
-
|
|
115599
|
-
|
|
115600
|
-
|
|
115601
|
-
|
|
115602
|
-
verbose,
|
|
115603
|
-
apiReport,
|
|
115604
|
-
docModel,
|
|
115605
|
-
tsdocMetadata,
|
|
115606
|
-
define: define2,
|
|
115607
|
-
env,
|
|
115608
|
-
options,
|
|
115609
|
-
plugins,
|
|
115610
|
-
dtsTsConfig
|
|
115604
|
+
workspaceRoot,
|
|
115605
|
+
projectRoot,
|
|
115606
|
+
sourceRoot,
|
|
115607
|
+
platform
|
|
115611
115608
|
};
|
|
115612
115609
|
if (platform === "worker") {
|
|
115613
115610
|
return (0, import_tsup.defineConfig)(workerConfig(params));
|
|
@@ -115811,22 +115808,25 @@ ${externalDependencies.map((dep) => {
|
|
|
115811
115808
|
"package.json"
|
|
115812
115809
|
);
|
|
115813
115810
|
console.log(`\u26A1 Writing package.json file to: ${packageJsonPath}`);
|
|
115811
|
+
const prettierOptions = {
|
|
115812
|
+
plugins: ["prettier-plugin-packagejson"],
|
|
115813
|
+
trailingComma: "none",
|
|
115814
|
+
tabWidth: 2,
|
|
115815
|
+
semi: true,
|
|
115816
|
+
singleQuote: false,
|
|
115817
|
+
quoteProps: "preserve",
|
|
115818
|
+
insertPragma: false,
|
|
115819
|
+
bracketSameLine: true,
|
|
115820
|
+
printWidth: 80,
|
|
115821
|
+
bracketSpacing: true,
|
|
115822
|
+
arrowParens: "avoid",
|
|
115823
|
+
endOfLine: "lf"
|
|
115824
|
+
};
|
|
115814
115825
|
(0, import_fs3.writeFileSync)(
|
|
115815
115826
|
packageJsonPath,
|
|
115816
115827
|
await (0, import_prettier.format)(JSON.stringify(packageJson), {
|
|
115817
|
-
|
|
115818
|
-
parser: "json"
|
|
115819
|
-
trailingComma: "none",
|
|
115820
|
-
tabWidth: 2,
|
|
115821
|
-
semi: true,
|
|
115822
|
-
singleQuote: false,
|
|
115823
|
-
quoteProps: "preserve",
|
|
115824
|
-
insertPragma: false,
|
|
115825
|
-
bracketSameLine: true,
|
|
115826
|
-
printWidth: 80,
|
|
115827
|
-
bracketSpacing: true,
|
|
115828
|
-
arrowParens: "avoid",
|
|
115829
|
-
endOfLine: "lf"
|
|
115828
|
+
...prettierOptions,
|
|
115829
|
+
parser: "json"
|
|
115830
115830
|
})
|
|
115831
115831
|
);
|
|
115832
115832
|
if (options.includeSrc !== false) {
|
|
@@ -115838,11 +115838,17 @@ ${externalDependencies.map((dep) => {
|
|
|
115838
115838
|
]);
|
|
115839
115839
|
await Promise.allSettled(
|
|
115840
115840
|
files.map(
|
|
115841
|
-
(file) => (0, import_promises2.writeFile)(
|
|
115841
|
+
async (file) => (0, import_promises2.writeFile)(
|
|
115842
115842
|
file,
|
|
115843
|
-
|
|
115843
|
+
await (0, import_prettier.format)(
|
|
115844
|
+
`${options.banner ? options.banner.startsWith("//") ? options.banner : `// ${options.banner}` : ""}
|
|
115844
115845
|
|
|
115845
115846
|
${(0, import_fs3.readFileSync)(file, "utf-8")}`,
|
|
115847
|
+
{
|
|
115848
|
+
...prettierOptions,
|
|
115849
|
+
parser: "typescript"
|
|
115850
|
+
}
|
|
115851
|
+
),
|
|
115846
115852
|
"utf-8"
|
|
115847
115853
|
)
|
|
115848
115854
|
)
|
|
@@ -115964,6 +115970,8 @@ var applyDefaultOptions = (options) => {
|
|
|
115964
115970
|
options.entry ??= "{sourceRoot}/index.ts";
|
|
115965
115971
|
options.outputPath ??= "dist/{projectRoot}";
|
|
115966
115972
|
options.tsConfig ??= "tsconfig.json";
|
|
115973
|
+
options.splitting ??= true;
|
|
115974
|
+
options.treeshake ??= true;
|
|
115967
115975
|
options.platform ??= "neutral";
|
|
115968
115976
|
options.verbose ??= false;
|
|
115969
115977
|
options.external ??= [];
|
|
@@ -70615,6 +70615,8 @@ function modernConfig({
|
|
|
70615
70615
|
projectRoot,
|
|
70616
70616
|
workspaceRoot,
|
|
70617
70617
|
tsconfig = "tsconfig.json",
|
|
70618
|
+
splitting,
|
|
70619
|
+
treeshake,
|
|
70618
70620
|
debug = false,
|
|
70619
70621
|
external,
|
|
70620
70622
|
banner = {},
|
|
@@ -70643,6 +70645,10 @@ function modernConfig({
|
|
|
70643
70645
|
"esnext"
|
|
70644
70646
|
] : ["esnext", "node18"],
|
|
70645
70647
|
tsconfig,
|
|
70648
|
+
splitting,
|
|
70649
|
+
treeshake: treeshake ? {
|
|
70650
|
+
preset: "recommended"
|
|
70651
|
+
} : false,
|
|
70646
70652
|
projectRoot,
|
|
70647
70653
|
workspaceRoot,
|
|
70648
70654
|
outDir: outputPath,
|
|
@@ -70688,6 +70694,8 @@ function legacyConfig({
|
|
|
70688
70694
|
projectRoot,
|
|
70689
70695
|
workspaceRoot,
|
|
70690
70696
|
tsconfig = "tsconfig.json",
|
|
70697
|
+
splitting,
|
|
70698
|
+
treeshake,
|
|
70691
70699
|
debug = false,
|
|
70692
70700
|
external,
|
|
70693
70701
|
banner = {},
|
|
@@ -70705,6 +70713,10 @@ function legacyConfig({
|
|
|
70705
70713
|
format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
|
|
70706
70714
|
target: ["es2022", "node18"],
|
|
70707
70715
|
tsconfig,
|
|
70716
|
+
splitting,
|
|
70717
|
+
treeshake: treeshake ? {
|
|
70718
|
+
preset: "recommended"
|
|
70719
|
+
} : false,
|
|
70708
70720
|
projectRoot,
|
|
70709
70721
|
workspaceRoot,
|
|
70710
70722
|
outDir: outputPath,
|
|
@@ -70750,6 +70762,8 @@ function workerConfig({
|
|
|
70750
70762
|
projectRoot,
|
|
70751
70763
|
workspaceRoot,
|
|
70752
70764
|
tsconfig = "tsconfig.json",
|
|
70765
|
+
splitting,
|
|
70766
|
+
treeshake,
|
|
70753
70767
|
debug = false,
|
|
70754
70768
|
external,
|
|
70755
70769
|
banner = {},
|
|
@@ -70762,6 +70776,7 @@ function workerConfig({
|
|
|
70762
70776
|
plugins,
|
|
70763
70777
|
dtsTsConfig
|
|
70764
70778
|
}) {
|
|
70779
|
+
let outputPath = (0, import_path2.join)(outDir, "dist");
|
|
70765
70780
|
return {
|
|
70766
70781
|
name: "worker",
|
|
70767
70782
|
entry,
|
|
@@ -70769,9 +70784,13 @@ function workerConfig({
|
|
|
70769
70784
|
target: ["chrome95"],
|
|
70770
70785
|
bundle: true,
|
|
70771
70786
|
tsconfig,
|
|
70787
|
+
splitting,
|
|
70788
|
+
treeshake: treeshake ? {
|
|
70789
|
+
preset: "recommended"
|
|
70790
|
+
} : false,
|
|
70772
70791
|
projectRoot,
|
|
70773
70792
|
workspaceRoot,
|
|
70774
|
-
outDir:
|
|
70793
|
+
outDir: outputPath,
|
|
70775
70794
|
silent: !verbose,
|
|
70776
70795
|
metafile: true,
|
|
70777
70796
|
shims: false,
|
|
@@ -70787,7 +70806,7 @@ function workerConfig({
|
|
|
70787
70806
|
...dtsTsConfig,
|
|
70788
70807
|
options: {
|
|
70789
70808
|
...dtsTsConfig.options,
|
|
70790
|
-
outDir:
|
|
70809
|
+
outDir: outputPath
|
|
70791
70810
|
}
|
|
70792
70811
|
}
|
|
70793
70812
|
},
|
|
@@ -70811,20 +70830,8 @@ function workerConfig({
|
|
|
70811
70830
|
function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
70812
70831
|
outputPath,
|
|
70813
70832
|
tsConfig,
|
|
70814
|
-
debug,
|
|
70815
|
-
banner,
|
|
70816
|
-
platform,
|
|
70817
|
-
external,
|
|
70818
|
-
options,
|
|
70819
70833
|
additionalEntryPoints,
|
|
70820
|
-
|
|
70821
|
-
docModel,
|
|
70822
|
-
tsdocMetadata,
|
|
70823
|
-
define: define2,
|
|
70824
|
-
env,
|
|
70825
|
-
verbose,
|
|
70826
|
-
dtsTsConfig,
|
|
70827
|
-
plugins,
|
|
70834
|
+
platform,
|
|
70828
70835
|
...rest
|
|
70829
70836
|
}) {
|
|
70830
70837
|
const entry = globSync(
|
|
@@ -70848,24 +70855,14 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
70848
70855
|
return ret;
|
|
70849
70856
|
}, {});
|
|
70850
70857
|
const params = {
|
|
70858
|
+
...rest,
|
|
70851
70859
|
entry,
|
|
70852
70860
|
outDir: outputPath,
|
|
70853
|
-
projectRoot,
|
|
70854
|
-
workspaceRoot,
|
|
70855
70861
|
tsconfig: tsConfig,
|
|
70856
|
-
|
|
70857
|
-
|
|
70858
|
-
|
|
70859
|
-
|
|
70860
|
-
verbose,
|
|
70861
|
-
apiReport,
|
|
70862
|
-
docModel,
|
|
70863
|
-
tsdocMetadata,
|
|
70864
|
-
define: define2,
|
|
70865
|
-
env,
|
|
70866
|
-
options,
|
|
70867
|
-
plugins,
|
|
70868
|
-
dtsTsConfig
|
|
70862
|
+
workspaceRoot,
|
|
70863
|
+
projectRoot,
|
|
70864
|
+
sourceRoot,
|
|
70865
|
+
platform
|
|
70869
70866
|
};
|
|
70870
70867
|
if (platform === "worker") {
|
|
70871
70868
|
return (0, import_tsup.defineConfig)(workerConfig(params));
|
|
@@ -69,7 +69,17 @@
|
|
|
69
69
|
"includeSrc": {
|
|
70
70
|
"type": "boolean",
|
|
71
71
|
"description": "Should the source files be added to the distribution folder in an `src` directory.",
|
|
72
|
-
"default":
|
|
72
|
+
"default": true
|
|
73
|
+
},
|
|
74
|
+
"splitting": {
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"description": "Should the build process preform *code-splitting*?",
|
|
77
|
+
"default": true
|
|
78
|
+
},
|
|
79
|
+
"treeshake": {
|
|
80
|
+
"type": "boolean",
|
|
81
|
+
"description": "Should the build process *tree-shake* to remove unused code?",
|
|
82
|
+
"default": true
|
|
73
83
|
},
|
|
74
84
|
"debug": {
|
|
75
85
|
"type": "boolean",
|
|
@@ -109110,7 +109110,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
|
|
|
109110
109110
|
// packages/workspace-tools/src/utils/get-file-banner.ts
|
|
109111
109111
|
var getFileBanner = (name, commentStart = "//") => {
|
|
109112
109112
|
let padding = "";
|
|
109113
|
-
while (name.length + padding.length <
|
|
109113
|
+
while (name.length + padding.length < 12) {
|
|
109114
109114
|
padding += " ";
|
|
109115
109115
|
}
|
|
109116
109116
|
return `
|
|
@@ -115388,6 +115388,8 @@ function modernConfig({
|
|
|
115388
115388
|
projectRoot,
|
|
115389
115389
|
workspaceRoot,
|
|
115390
115390
|
tsconfig = "tsconfig.json",
|
|
115391
|
+
splitting,
|
|
115392
|
+
treeshake,
|
|
115391
115393
|
debug = false,
|
|
115392
115394
|
external,
|
|
115393
115395
|
banner = {},
|
|
@@ -115416,6 +115418,10 @@ function modernConfig({
|
|
|
115416
115418
|
"esnext"
|
|
115417
115419
|
] : ["esnext", "node18"],
|
|
115418
115420
|
tsconfig,
|
|
115421
|
+
splitting,
|
|
115422
|
+
treeshake: treeshake ? {
|
|
115423
|
+
preset: "recommended"
|
|
115424
|
+
} : false,
|
|
115419
115425
|
projectRoot,
|
|
115420
115426
|
workspaceRoot,
|
|
115421
115427
|
outDir: outputPath,
|
|
@@ -115461,6 +115467,8 @@ function legacyConfig({
|
|
|
115461
115467
|
projectRoot,
|
|
115462
115468
|
workspaceRoot,
|
|
115463
115469
|
tsconfig = "tsconfig.json",
|
|
115470
|
+
splitting,
|
|
115471
|
+
treeshake,
|
|
115464
115472
|
debug = false,
|
|
115465
115473
|
external,
|
|
115466
115474
|
banner = {},
|
|
@@ -115478,6 +115486,10 @@ function legacyConfig({
|
|
|
115478
115486
|
format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
|
|
115479
115487
|
target: ["es2022", "node18"],
|
|
115480
115488
|
tsconfig,
|
|
115489
|
+
splitting,
|
|
115490
|
+
treeshake: treeshake ? {
|
|
115491
|
+
preset: "recommended"
|
|
115492
|
+
} : false,
|
|
115481
115493
|
projectRoot,
|
|
115482
115494
|
workspaceRoot,
|
|
115483
115495
|
outDir: outputPath,
|
|
@@ -115523,6 +115535,8 @@ function workerConfig({
|
|
|
115523
115535
|
projectRoot,
|
|
115524
115536
|
workspaceRoot,
|
|
115525
115537
|
tsconfig = "tsconfig.json",
|
|
115538
|
+
splitting,
|
|
115539
|
+
treeshake,
|
|
115526
115540
|
debug = false,
|
|
115527
115541
|
external,
|
|
115528
115542
|
banner = {},
|
|
@@ -115535,6 +115549,7 @@ function workerConfig({
|
|
|
115535
115549
|
plugins,
|
|
115536
115550
|
dtsTsConfig
|
|
115537
115551
|
}) {
|
|
115552
|
+
let outputPath = (0, import_path3.join)(outDir, "dist");
|
|
115538
115553
|
return {
|
|
115539
115554
|
name: "worker",
|
|
115540
115555
|
entry,
|
|
@@ -115542,9 +115557,13 @@ function workerConfig({
|
|
|
115542
115557
|
target: ["chrome95"],
|
|
115543
115558
|
bundle: true,
|
|
115544
115559
|
tsconfig,
|
|
115560
|
+
splitting,
|
|
115561
|
+
treeshake: treeshake ? {
|
|
115562
|
+
preset: "recommended"
|
|
115563
|
+
} : false,
|
|
115545
115564
|
projectRoot,
|
|
115546
115565
|
workspaceRoot,
|
|
115547
|
-
outDir:
|
|
115566
|
+
outDir: outputPath,
|
|
115548
115567
|
silent: !verbose,
|
|
115549
115568
|
metafile: true,
|
|
115550
115569
|
shims: false,
|
|
@@ -115560,7 +115579,7 @@ function workerConfig({
|
|
|
115560
115579
|
...dtsTsConfig,
|
|
115561
115580
|
options: {
|
|
115562
115581
|
...dtsTsConfig.options,
|
|
115563
|
-
outDir:
|
|
115582
|
+
outDir: outputPath
|
|
115564
115583
|
}
|
|
115565
115584
|
}
|
|
115566
115585
|
},
|
|
@@ -115584,20 +115603,8 @@ function workerConfig({
|
|
|
115584
115603
|
function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
115585
115604
|
outputPath,
|
|
115586
115605
|
tsConfig,
|
|
115587
|
-
debug,
|
|
115588
|
-
banner,
|
|
115589
|
-
platform,
|
|
115590
|
-
external,
|
|
115591
|
-
options,
|
|
115592
115606
|
additionalEntryPoints,
|
|
115593
|
-
|
|
115594
|
-
docModel,
|
|
115595
|
-
tsdocMetadata,
|
|
115596
|
-
define: define2,
|
|
115597
|
-
env,
|
|
115598
|
-
verbose,
|
|
115599
|
-
dtsTsConfig,
|
|
115600
|
-
plugins,
|
|
115607
|
+
platform,
|
|
115601
115608
|
...rest
|
|
115602
115609
|
}) {
|
|
115603
115610
|
const entry = globSync(
|
|
@@ -115621,24 +115628,14 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
115621
115628
|
return ret;
|
|
115622
115629
|
}, {});
|
|
115623
115630
|
const params = {
|
|
115631
|
+
...rest,
|
|
115624
115632
|
entry,
|
|
115625
115633
|
outDir: outputPath,
|
|
115626
|
-
projectRoot,
|
|
115627
|
-
workspaceRoot,
|
|
115628
115634
|
tsconfig: tsConfig,
|
|
115629
|
-
|
|
115630
|
-
|
|
115631
|
-
|
|
115632
|
-
|
|
115633
|
-
verbose,
|
|
115634
|
-
apiReport,
|
|
115635
|
-
docModel,
|
|
115636
|
-
tsdocMetadata,
|
|
115637
|
-
define: define2,
|
|
115638
|
-
env,
|
|
115639
|
-
options,
|
|
115640
|
-
plugins,
|
|
115641
|
-
dtsTsConfig
|
|
115635
|
+
workspaceRoot,
|
|
115636
|
+
projectRoot,
|
|
115637
|
+
sourceRoot,
|
|
115638
|
+
platform
|
|
115642
115639
|
};
|
|
115643
115640
|
if (platform === "worker") {
|
|
115644
115641
|
return (0, import_tsup.defineConfig)(workerConfig(params));
|
|
@@ -115842,22 +115839,25 @@ ${externalDependencies.map((dep) => {
|
|
|
115842
115839
|
"package.json"
|
|
115843
115840
|
);
|
|
115844
115841
|
console.log(`\u26A1 Writing package.json file to: ${packageJsonPath}`);
|
|
115842
|
+
const prettierOptions = {
|
|
115843
|
+
plugins: ["prettier-plugin-packagejson"],
|
|
115844
|
+
trailingComma: "none",
|
|
115845
|
+
tabWidth: 2,
|
|
115846
|
+
semi: true,
|
|
115847
|
+
singleQuote: false,
|
|
115848
|
+
quoteProps: "preserve",
|
|
115849
|
+
insertPragma: false,
|
|
115850
|
+
bracketSameLine: true,
|
|
115851
|
+
printWidth: 80,
|
|
115852
|
+
bracketSpacing: true,
|
|
115853
|
+
arrowParens: "avoid",
|
|
115854
|
+
endOfLine: "lf"
|
|
115855
|
+
};
|
|
115845
115856
|
(0, import_fs3.writeFileSync)(
|
|
115846
115857
|
packageJsonPath,
|
|
115847
115858
|
await (0, import_prettier.format)(JSON.stringify(packageJson), {
|
|
115848
|
-
|
|
115849
|
-
parser: "json"
|
|
115850
|
-
trailingComma: "none",
|
|
115851
|
-
tabWidth: 2,
|
|
115852
|
-
semi: true,
|
|
115853
|
-
singleQuote: false,
|
|
115854
|
-
quoteProps: "preserve",
|
|
115855
|
-
insertPragma: false,
|
|
115856
|
-
bracketSameLine: true,
|
|
115857
|
-
printWidth: 80,
|
|
115858
|
-
bracketSpacing: true,
|
|
115859
|
-
arrowParens: "avoid",
|
|
115860
|
-
endOfLine: "lf"
|
|
115859
|
+
...prettierOptions,
|
|
115860
|
+
parser: "json"
|
|
115861
115861
|
})
|
|
115862
115862
|
);
|
|
115863
115863
|
if (options.includeSrc !== false) {
|
|
@@ -115869,11 +115869,17 @@ ${externalDependencies.map((dep) => {
|
|
|
115869
115869
|
]);
|
|
115870
115870
|
await Promise.allSettled(
|
|
115871
115871
|
files.map(
|
|
115872
|
-
(file) => (0, import_promises2.writeFile)(
|
|
115872
|
+
async (file) => (0, import_promises2.writeFile)(
|
|
115873
115873
|
file,
|
|
115874
|
-
|
|
115874
|
+
await (0, import_prettier.format)(
|
|
115875
|
+
`${options.banner ? options.banner.startsWith("//") ? options.banner : `// ${options.banner}` : ""}
|
|
115875
115876
|
|
|
115876
115877
|
${(0, import_fs3.readFileSync)(file, "utf-8")}`,
|
|
115878
|
+
{
|
|
115879
|
+
...prettierOptions,
|
|
115880
|
+
parser: "typescript"
|
|
115881
|
+
}
|
|
115882
|
+
),
|
|
115877
115883
|
"utf-8"
|
|
115878
115884
|
)
|
|
115879
115885
|
)
|
|
@@ -115995,6 +116001,8 @@ var applyDefaultOptions = (options) => {
|
|
|
115995
116001
|
options.entry ??= "{sourceRoot}/index.ts";
|
|
115996
116002
|
options.outputPath ??= "dist/{projectRoot}";
|
|
115997
116003
|
options.tsConfig ??= "tsconfig.json";
|
|
116004
|
+
options.splitting ??= true;
|
|
116005
|
+
options.treeshake ??= true;
|
|
115998
116006
|
options.platform ??= "neutral";
|
|
115999
116007
|
options.verbose ??= false;
|
|
116000
116008
|
options.external ??= [];
|