@nx/rollup 19.5.0-beta.0 → 19.5.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/rollup",
3
- "version": "19.5.0-beta.0",
3
+ "version": "19.5.0-beta.1",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Rollup contains executors and generators that support building applications using Rollup.",
6
6
  "repository": {
@@ -44,9 +44,9 @@
44
44
  "rollup-plugin-postcss": "^4.0.2",
45
45
  "rollup-plugin-typescript2": "^0.36.0",
46
46
  "tslib": "^2.3.0",
47
- "@nx/devkit": "19.5.0-beta.0",
48
- "@nx/js": "19.5.0-beta.0",
49
- "@nrwl/rollup": "19.5.0-beta.0"
47
+ "@nx/devkit": "19.5.0-beta.1",
48
+ "@nx/js": "19.5.0-beta.1",
49
+ "@nrwl/rollup": "19.5.0-beta.1"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizePluginPath = exports.normalizeRollupExecutorOptions = void 0;
3
+ exports.normalizeRollupExecutorOptions = normalizeRollupExecutorOptions;
4
+ exports.normalizePluginPath = normalizePluginPath;
4
5
  const path_1 = require("path");
5
6
  function normalizeRollupExecutorOptions(options, context) {
6
7
  const { root } = context;
@@ -14,7 +15,6 @@ function normalizeRollupExecutorOptions(options, context) {
14
15
  skipTypeCheck: options.skipTypeCheck || false,
15
16
  };
16
17
  }
17
- exports.normalizeRollupExecutorOptions = normalizeRollupExecutorOptions;
18
18
  function normalizePluginPath(pluginPath, root) {
19
19
  if (!pluginPath) {
20
20
  return '';
@@ -26,4 +26,3 @@ function normalizePluginPath(pluginPath, root) {
26
26
  return (0, path_1.resolve)(root, pluginPath);
27
27
  }
28
28
  }
29
- exports.normalizePluginPath = normalizePluginPath;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createRollupOptions = exports.rollupExecutor = void 0;
3
+ exports.rollupExecutor = rollupExecutor;
4
+ exports.createRollupOptions = createRollupOptions;
4
5
  const rollup = require("rollup");
5
6
  const path_1 = require("path");
6
7
  const devkit_1 = require("@nx/devkit");
@@ -74,7 +75,6 @@ async function* rollupExecutor(rawOptions, context) {
74
75
  // endregion
75
76
  }
76
77
  }
77
- exports.rollupExecutor = rollupExecutor;
78
78
  // -----------------------------------------------------------------------------
79
79
  async function createRollupOptions(options, context) {
80
80
  const { dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, context.targetName, context.configurationName, true);
@@ -102,7 +102,6 @@ async function createRollupOptions(options, context) {
102
102
  }
103
103
  return finalConfig;
104
104
  }
105
- exports.createRollupOptions = createRollupOptions;
106
105
  function resolveOutfile(context, options) {
107
106
  if (!options.format?.includes('cjs'))
108
107
  return undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configurationGenerator = void 0;
3
+ exports.configurationGenerator = configurationGenerator;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const get_import_path_1 = require("@nx/js/src/utils/get-import-path");
6
6
  const init_1 = require("../init/init");
@@ -31,7 +31,6 @@ async function configurationGenerator(tree, options) {
31
31
  }
32
32
  return (0, devkit_1.runTasksInSerial)(...tasks);
33
33
  }
34
- exports.configurationGenerator = configurationGenerator;
35
34
  function createRollupConfig(tree, options) {
36
35
  const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
37
36
  const buildOptions = {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertToInferred = void 0;
3
+ exports.convertToInferred = convertToInferred;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  const extract_rollup_config_from_executor_options_1 = require("./lib/extract-rollup-config-from-executor-options");
@@ -74,5 +74,4 @@ async function convertToInferred(tree, options) {
74
74
  await (0, devkit_1.formatFiles)(tree);
75
75
  }
76
76
  }
77
- exports.convertToInferred = convertToInferred;
78
77
  exports.default = convertToInferred;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addPluginRegistrations = void 0;
3
+ exports.addPluginRegistrations = addPluginRegistrations;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const minimatch_1 = require("minimatch");
6
6
  async function addPluginRegistrations(tree, projectTargets, projects, pluginPath) {
@@ -37,7 +37,6 @@ async function addPluginRegistrations(tree, projectTargets, projects, pluginPath
37
37
  }
38
38
  (0, devkit_1.updateNxJson)(tree, nxJson);
39
39
  }
40
- exports.addPluginRegistrations = addPluginRegistrations;
41
40
  function areProjectsUsingTheExecutorLeft(projects) {
42
41
  return Array.from(projects.values()).some((project) => Object.values(project.targets ?? {}).some((target) => target.executor === '@nx/rollup:rollup'));
43
42
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extractRollupConfigFromExecutorOptions = void 0;
3
+ exports.extractRollupConfigFromExecutorOptions = extractRollupConfigFromExecutorOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const normalize_path_options_1 = require("./normalize-path-options");
6
6
  const aliases = {
@@ -85,7 +85,6 @@ function extractRollupConfigFromExecutorOptions(tree, options, configurations, p
85
85
  tree.write((0, devkit_1.joinPathFragments)(projectRoot, `rollup.config.js`), createNewRollupConfig(oldRollupConfig, defaultOptions, configurationOptions));
86
86
  return defaultOptions;
87
87
  }
88
- exports.extractRollupConfigFromExecutorOptions = extractRollupConfigFromExecutorOptions;
89
88
  function createNewRollupConfig(oldRollupConfig, defaultOptions, configurationOptions, singleConfiguration = false) {
90
89
  if (configurationOptions) {
91
90
  return (0, devkit_1.stripIndents) `
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizePathOptions = void 0;
3
+ exports.normalizePathOptions = normalizePathOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const executorPathFieldsToMigrate = [
6
6
  'tsConfig',
@@ -22,7 +22,6 @@ function normalizePathOptions(projectRoot, options) {
22
22
  }
23
23
  }
24
24
  }
25
- exports.normalizePathOptions = normalizePathOptions;
26
25
  function normalizeValue(projectRoot, key, value) {
27
26
  // Logic matches `@nx/rollup:rollup` in `normalizePluginPath` function.
28
27
  if (!value)
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.rollupInitGenerator = void 0;
3
+ exports.rollupInitGenerator = rollupInitGenerator;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const versions_1 = require("../../utils/versions");
6
6
  const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
@@ -29,5 +29,4 @@ async function rollupInitGenerator(tree, schema) {
29
29
  }
30
30
  return task;
31
31
  }
32
- exports.rollupInitGenerator = rollupInitGenerator;
33
32
  exports.default = rollupInitGenerator;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = replacePackage;
3
4
  const devkit_1 = require("@nx/devkit");
4
5
  const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
5
6
  async function replacePackage(tree) {
6
7
  await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/rollup', '@nx/rollup');
7
8
  await (0, devkit_1.formatFiles)(tree);
8
9
  }
9
- exports.default = replacePackage;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const devkit_1 = require("@nx/devkit");
4
5
  const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
5
6
  async function default_1(tree) {
@@ -14,4 +15,3 @@ async function default_1(tree) {
14
15
  });
15
16
  await (0, devkit_1.formatFiles)(tree);
16
17
  }
17
- exports.default = default_1;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const devkit_1 = require("@nx/devkit");
4
5
  const executors = new Set(['@nx/rollup:rollup', '@nrwl/rollup:rollup']);
5
6
  async function default_1(tree) {
@@ -26,4 +27,3 @@ async function default_1(tree) {
26
27
  }
27
28
  await (0, devkit_1.formatFiles)(tree);
28
29
  }
29
- exports.default = default_1;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.analyze = void 0;
3
+ exports.analyze = analyze;
4
4
  const chalk = require("chalk");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const formatBytes = (bytes) => {
@@ -22,4 +22,3 @@ function analyze() {
22
22
  },
23
23
  };
24
24
  }
25
- exports.analyze = analyze;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteOutput = void 0;
3
+ exports.deleteOutput = deleteOutput;
4
4
  const fs_1 = require("../utils/fs");
5
5
  function deleteOutput(options) {
6
6
  return {
@@ -8,4 +8,3 @@ function deleteOutput(options) {
8
8
  buildStart: () => options.dirs.forEach((dir) => (0, fs_1.deleteOutputDir)(process.cwd(), dir)),
9
9
  };
10
10
  }
11
- exports.deleteOutput = deleteOutput;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generatePackageJson = void 0;
3
+ exports.generatePackageJson = generatePackageJson;
4
4
  const update_package_json_1 = require("./update-package-json");
5
5
  function generatePackageJson(options, packageJson) {
6
6
  return {
@@ -10,4 +10,3 @@ function generatePackageJson(options, packageJson) {
10
10
  },
11
11
  };
12
12
  }
13
- exports.generatePackageJson = generatePackageJson;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updatePackageJson = void 0;
3
+ exports.updatePackageJson = updatePackageJson;
4
4
  const path_1 = require("path");
5
5
  const fileutils_1 = require("nx/src/utils/fileutils");
6
6
  const fs_1 = require("fs");
@@ -74,7 +74,6 @@ function updatePackageJson(options, packageJson) {
74
74
  }
75
75
  (0, fileutils_1.writeJsonFile)((0, path_1.join)(devkit_1.workspaceRoot, options.outputPath, 'package.json'), packageJson);
76
76
  }
77
- exports.updatePackageJson = updatePackageJson;
78
77
  function getExports(options) {
79
78
  const exports = {};
80
79
  // Users may provide custom input option and skip the main field.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.swc = void 0;
3
+ exports.swc = swc;
4
4
  function swc() {
5
5
  const { transform } = require('@swc/core');
6
6
  return {
@@ -17,4 +17,3 @@ function swc() {
17
17
  },
18
18
  };
19
19
  }
20
- exports.swc = swc;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getProjectNode = void 0;
3
+ exports.getProjectNode = getProjectNode;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  function getProjectNode() {
6
6
  // During graph construction, project is not necessary. Return a stub.
@@ -19,4 +19,3 @@ function getProjectNode() {
19
19
  return projectGraph.nodes[projectName];
20
20
  }
21
21
  }
22
- exports.getProjectNode = getProjectNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizeOptions = void 0;
3
+ exports.normalizeOptions = normalizeOptions;
4
4
  const node_path_1 = require("node:path");
5
5
  const node_fs_1 = require("node:fs");
6
6
  const devkit_1 = require("@nx/devkit");
@@ -27,7 +27,6 @@ function normalizeOptions(projectRoot, sourceRoot, options) {
27
27
  skipTypeField: options.skipTypeField ?? false,
28
28
  };
29
29
  }
30
- exports.normalizeOptions = normalizeOptions;
31
30
  function normalizeAssets(assets, root, sourceRoot) {
32
31
  return assets.map((asset) => {
33
32
  if (typeof asset === 'string') {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withNx = void 0;
3
+ exports.withNx = withNx;
4
4
  const node_fs_1 = require("node:fs");
5
5
  const node_path_1 = require("node:path");
6
6
  const ts = require("typescript");
@@ -187,7 +187,6 @@ dependencies) {
187
187
  }
188
188
  return finalConfig;
189
189
  }
190
- exports.withNx = withNx;
191
190
  function createInput(options) {
192
191
  // During graph creation, these input entries don't affect target configuration, so we can skip them.
193
192
  // If convert-to-inferred generator is used, and project uses configurations, some options like main might be missing from default options.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ensureDependencies = void 0;
3
+ exports.ensureDependencies = ensureDependencies;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const versions_1 = require("@nx/js/src/utils/versions");
6
6
  const versions_2 = require("./versions");
@@ -21,4 +21,3 @@ function ensureDependencies(tree, options) {
21
21
  return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { tslib: versions_2.tsLibVersion });
22
22
  }
23
23
  }
24
- exports.ensureDependencies = ensureDependencies;
package/src/utils/fs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteOutputDir = void 0;
3
+ exports.deleteOutputDir = deleteOutputDir;
4
4
  const path = require("path");
5
5
  const fs_1 = require("fs");
6
6
  /**
@@ -13,4 +13,3 @@ function deleteOutputDir(root, outputPath) {
13
13
  }
14
14
  (0, fs_1.rmSync)(resolvedOutputPath, { recursive: true, force: true });
15
15
  }
16
- exports.deleteOutputDir = deleteOutputDir;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hasPlugin = void 0;
3
+ exports.hasPlugin = hasPlugin;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  function hasPlugin(tree) {
6
6
  const nxJson = (0, devkit_1.readNxJson)(tree);
@@ -8,4 +8,3 @@ function hasPlugin(tree) {
8
8
  ? p === '@nx/rollup/plugin'
9
9
  : p.plugin === '@nx/rollup/plugin');
10
10
  }
11
- exports.hasPlugin = hasPlugin;