@storm-software/workspace-tools 1.178.0 → 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 +1 -1
- package/README.md +1 -1
- package/index.js +19 -15
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/rollup/executor.js +19 -15
- 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,10 +437645,10 @@ 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
437654
|
verbosity: 3,
|
|
@@ -437713,18 +437713,18 @@ function createInput(options) {
|
|
|
437713
437713
|
});
|
|
437714
437714
|
return input;
|
|
437715
437715
|
}
|
|
437716
|
-
function createTsCompilerOptions(
|
|
437716
|
+
function createTsCompilerOptions(parsedCommandLine, options, dependencies, config) {
|
|
437717
437717
|
const compilerOptionPaths = (0, import_buildable_libs_utils.computeCompilerOptionsPaths)(
|
|
437718
|
-
|
|
437718
|
+
parsedCommandLine,
|
|
437719
437719
|
dependencies ?? []
|
|
437720
437720
|
);
|
|
437721
437721
|
const compilerOptions = {
|
|
437722
|
-
rootDir:
|
|
437722
|
+
rootDir: config?.workspaceRoot,
|
|
437723
437723
|
allowJs: options.allowJs,
|
|
437724
437724
|
declaration: true,
|
|
437725
437725
|
paths: compilerOptionPaths
|
|
437726
437726
|
};
|
|
437727
|
-
if (
|
|
437727
|
+
if (parsedCommandLine.options.module === ts.ModuleKind.CommonJS) {
|
|
437728
437728
|
compilerOptions["module"] = "ESNext";
|
|
437729
437729
|
}
|
|
437730
437730
|
if (options.compiler === "swc") {
|
|
@@ -437835,7 +437835,11 @@ ${formatLogMessage2(options)}`, config);
|
|
|
437835
437835
|
perf: true,
|
|
437836
437836
|
treeshake: true
|
|
437837
437837
|
};
|
|
437838
|
-
const rollupOptions = await createRollupOptions(
|
|
437838
|
+
const rollupOptions = await createRollupOptions(
|
|
437839
|
+
normalizedOptions,
|
|
437840
|
+
context,
|
|
437841
|
+
config
|
|
437842
|
+
);
|
|
437839
437843
|
const outfile = resolveOutfile(context, normalizedOptions);
|
|
437840
437844
|
if (normalizedOptions.watch) {
|
|
437841
437845
|
return yield* (0, import_async_iterable.createAsyncIterable)(({ next: next2 }) => {
|
|
@@ -437888,7 +437892,7 @@ ${formatLogMessage2(options)}`, config);
|
|
|
437888
437892
|
}
|
|
437889
437893
|
}
|
|
437890
437894
|
}
|
|
437891
|
-
async function createRollupOptions(options, context) {
|
|
437895
|
+
async function createRollupOptions(options, context, config) {
|
|
437892
437896
|
const { dependencies } = (0, import_buildable_libs_utils2.calculateProjectBuildableDependencies)(
|
|
437893
437897
|
context.taskGraph,
|
|
437894
437898
|
context.projectGraph,
|
|
@@ -437898,7 +437902,7 @@ async function createRollupOptions(options, context) {
|
|
|
437898
437902
|
context.configurationName,
|
|
437899
437903
|
true
|
|
437900
437904
|
);
|
|
437901
|
-
const rollupConfig = withRollupConfig(options, {}, dependencies);
|
|
437905
|
+
const rollupConfig = withRollupConfig(options, {}, dependencies, config);
|
|
437902
437906
|
const generatePackageJsonPlugin = Array.isArray(rollupConfig.plugins) ? rollupConfig.plugins.find(
|
|
437903
437907
|
(p2) => p2?.["name"] === import_generate_package_json2.pluginName
|
|
437904
437908
|
) : null;
|
|
@@ -437907,16 +437911,16 @@ async function createRollupOptions(options, context) {
|
|
|
437907
437911
|
);
|
|
437908
437912
|
let finalConfig = rollupConfig;
|
|
437909
437913
|
for (const _config of userDefinedRollupConfigs) {
|
|
437910
|
-
const
|
|
437911
|
-
if (typeof
|
|
437912
|
-
finalConfig =
|
|
437914
|
+
const config2 = await _config;
|
|
437915
|
+
if (typeof config2 === "function") {
|
|
437916
|
+
finalConfig = config2(finalConfig, options);
|
|
437913
437917
|
} else {
|
|
437914
437918
|
finalConfig = {
|
|
437915
437919
|
...finalConfig,
|
|
437916
|
-
...
|
|
437920
|
+
...config2,
|
|
437917
437921
|
plugins: [
|
|
437918
437922
|
...Array.isArray(finalConfig.plugins) && finalConfig.plugins?.length > 0 ? finalConfig.plugins : [],
|
|
437919
|
-
...
|
|
437923
|
+
...config2.plugins?.length > 0 ? config2.plugins : []
|
|
437920
437924
|
]
|
|
437921
437925
|
};
|
|
437922
437926
|
}
|