@storm-software/workspace-tools 1.177.2 → 1.178.1
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/README.md +1 -1
- package/index.js +21 -16
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/rollup/executor.js +21 -16
- package/src/executors/rollup/utils/get-options.d.ts +2 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/index.js
CHANGED
|
@@ -437508,7 +437508,7 @@ function analyze() {
|
|
|
437508
437508
|
}
|
|
437509
437509
|
};
|
|
437510
437510
|
}
|
|
437511
|
-
function withRollupConfig(rawOptions, rollupConfig = {}, dependencies) {
|
|
437511
|
+
function withRollupConfig(rawOptions, rollupConfig = {}, dependencies, config) {
|
|
437512
437512
|
const finalConfig = { ...rollupConfig };
|
|
437513
437513
|
const projectNode = getProjectNode();
|
|
437514
437514
|
const projectRoot = (0, import_node_path14.join)(import_devkit7.workspaceRoot, projectNode.data.root);
|
|
@@ -437645,13 +437645,14 @@ function withRollupConfig(rawOptions, rollupConfig = {}, dependencies) {
|
|
|
437645
437645
|
tsconfig: options.tsConfig,
|
|
437646
437646
|
tsconfigOverride: {
|
|
437647
437647
|
compilerOptions: createTsCompilerOptions(
|
|
437648
|
-
projectRoot,
|
|
437649
437648
|
tsConfig,
|
|
437650
437649
|
options,
|
|
437651
|
-
dependencies
|
|
437650
|
+
dependencies,
|
|
437651
|
+
config
|
|
437652
437652
|
)
|
|
437653
437653
|
},
|
|
437654
|
-
verbosity: 3
|
|
437654
|
+
verbosity: 3,
|
|
437655
|
+
useTsconfigDeclarationDir: true
|
|
437655
437656
|
}),
|
|
437656
437657
|
(0, import_type_definitions.typeDefinitions)({
|
|
437657
437658
|
projectRoot
|
|
@@ -437712,18 +437713,18 @@ function createInput(options) {
|
|
|
437712
437713
|
});
|
|
437713
437714
|
return input;
|
|
437714
437715
|
}
|
|
437715
|
-
function createTsCompilerOptions(
|
|
437716
|
+
function createTsCompilerOptions(parsedCommandLine, options, dependencies, config) {
|
|
437716
437717
|
const compilerOptionPaths = (0, import_buildable_libs_utils.computeCompilerOptionsPaths)(
|
|
437717
|
-
|
|
437718
|
+
parsedCommandLine,
|
|
437718
437719
|
dependencies ?? []
|
|
437719
437720
|
);
|
|
437720
437721
|
const compilerOptions = {
|
|
437721
|
-
rootDir:
|
|
437722
|
+
rootDir: config?.workspaceRoot,
|
|
437722
437723
|
allowJs: options.allowJs,
|
|
437723
437724
|
declaration: true,
|
|
437724
437725
|
paths: compilerOptionPaths
|
|
437725
437726
|
};
|
|
437726
|
-
if (
|
|
437727
|
+
if (parsedCommandLine.options.module === ts.ModuleKind.CommonJS) {
|
|
437727
437728
|
compilerOptions["module"] = "ESNext";
|
|
437728
437729
|
}
|
|
437729
437730
|
if (options.compiler === "swc") {
|
|
@@ -437834,7 +437835,11 @@ ${formatLogMessage2(options)}`, config);
|
|
|
437834
437835
|
perf: true,
|
|
437835
437836
|
treeshake: true
|
|
437836
437837
|
};
|
|
437837
|
-
const rollupOptions = await createRollupOptions(
|
|
437838
|
+
const rollupOptions = await createRollupOptions(
|
|
437839
|
+
normalizedOptions,
|
|
437840
|
+
context,
|
|
437841
|
+
config
|
|
437842
|
+
);
|
|
437838
437843
|
const outfile = resolveOutfile(context, normalizedOptions);
|
|
437839
437844
|
if (normalizedOptions.watch) {
|
|
437840
437845
|
return yield* (0, import_async_iterable.createAsyncIterable)(({ next: next2 }) => {
|
|
@@ -437887,7 +437892,7 @@ ${formatLogMessage2(options)}`, config);
|
|
|
437887
437892
|
}
|
|
437888
437893
|
}
|
|
437889
437894
|
}
|
|
437890
|
-
async function createRollupOptions(options, context) {
|
|
437895
|
+
async function createRollupOptions(options, context, config) {
|
|
437891
437896
|
const { dependencies } = (0, import_buildable_libs_utils2.calculateProjectBuildableDependencies)(
|
|
437892
437897
|
context.taskGraph,
|
|
437893
437898
|
context.projectGraph,
|
|
@@ -437897,7 +437902,7 @@ async function createRollupOptions(options, context) {
|
|
|
437897
437902
|
context.configurationName,
|
|
437898
437903
|
true
|
|
437899
437904
|
);
|
|
437900
|
-
const rollupConfig = withRollupConfig(options, {}, dependencies);
|
|
437905
|
+
const rollupConfig = withRollupConfig(options, {}, dependencies, config);
|
|
437901
437906
|
const generatePackageJsonPlugin = Array.isArray(rollupConfig.plugins) ? rollupConfig.plugins.find(
|
|
437902
437907
|
(p2) => p2?.["name"] === import_generate_package_json2.pluginName
|
|
437903
437908
|
) : null;
|
|
@@ -437906,16 +437911,16 @@ async function createRollupOptions(options, context) {
|
|
|
437906
437911
|
);
|
|
437907
437912
|
let finalConfig = rollupConfig;
|
|
437908
437913
|
for (const _config of userDefinedRollupConfigs) {
|
|
437909
|
-
const
|
|
437910
|
-
if (typeof
|
|
437911
|
-
finalConfig =
|
|
437914
|
+
const config2 = await _config;
|
|
437915
|
+
if (typeof config2 === "function") {
|
|
437916
|
+
finalConfig = config2(finalConfig, options);
|
|
437912
437917
|
} else {
|
|
437913
437918
|
finalConfig = {
|
|
437914
437919
|
...finalConfig,
|
|
437915
|
-
...
|
|
437920
|
+
...config2,
|
|
437916
437921
|
plugins: [
|
|
437917
437922
|
...Array.isArray(finalConfig.plugins) && finalConfig.plugins?.length > 0 ? finalConfig.plugins : [],
|
|
437918
|
-
...
|
|
437923
|
+
...config2.plugins?.length > 0 ? config2.plugins : []
|
|
437919
437924
|
]
|
|
437920
437925
|
};
|
|
437921
437926
|
}
|