@nx/rollup 23.1.1 → 23.1.2

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.
@@ -6,7 +6,6 @@ const devkit_1 = require("@nx/devkit");
6
6
  const js_1 = require("@nx/js");
7
7
  const internal_2 = require("@nx/js/internal");
8
8
  const posix_1 = require("node:path/posix");
9
- const devkit_internals_1 = require("nx/src/devkit-internals");
10
9
  const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
11
10
  const has_plugin_1 = require("../../utils/has-plugin");
12
11
  const deprecation_1 = require("../../utils/deprecation");
@@ -119,7 +118,7 @@ function updatePackageJson(tree, options, outputConfig, isTsSolutionSetup) {
119
118
  // target must exist if we don't receive an outputConfig
120
119
  const projectTarget = project.targets[options.buildTarget];
121
120
  const nxJson = (0, devkit_1.readNxJson)(tree);
122
- const mergedTarget = (0, devkit_internals_1.mergeTargetConfigurations)(projectTarget, (0, internal_1.readTargetDefaultsForTarget)(options.buildTarget, nxJson.targetDefaults, projectTarget.executor));
121
+ const mergedTarget = (0, internal_1.mergeTargetConfigurations)(projectTarget, (0, internal_1.readTargetDefaultsForTarget)(options.buildTarget, nxJson.targetDefaults, projectTarget.executor));
123
122
  ({ main, outputPath } = mergedTarget.options);
124
123
  }
125
124
  packageJson = (0, js_1.getUpdatedPackageJsonContent)(packageJson, {
@@ -1,5 +1,5 @@
1
1
  import type { Plugin } from 'rollup';
2
- import type { PackageJson } from 'nx/src/utils/package-json';
2
+ import { type PackageJson } from '@nx/devkit/internal';
3
3
  export interface GeneratePackageJsonOptions {
4
4
  outputPath: string;
5
5
  main: string;
@@ -1,4 +1,4 @@
1
- import { PackageJson } from 'nx/src/utils/package-json';
1
+ import { PackageJson } from '@nx/devkit/internal';
2
2
  export declare function updatePackageJson(options: {
3
3
  outputPath: string;
4
4
  main: string;
@@ -2,9 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updatePackageJson = updatePackageJson;
4
4
  const path_1 = require("path");
5
- const fileutils_1 = require("nx/src/utils/fileutils");
6
- const fs_1 = require("fs");
7
5
  const devkit_1 = require("@nx/devkit");
6
+ const fs_1 = require("fs");
8
7
  function updatePackageJson(options, packageJson) {
9
8
  const jsFileRegex = /(\.cjs|\.mjs|\.esm\.js|\.cjs\.js|\.mjs\.js|\.js)$/;
10
9
  const hasEsmFormat = options.format.includes('esm');
@@ -83,7 +82,7 @@ function updatePackageJson(options, packageJson) {
83
82
  else {
84
83
  packageJson.types ??= packageJson.main.replace(jsFileRegex, '.d.ts');
85
84
  }
86
- (0, fileutils_1.writeJsonFile)((0, path_1.join)(devkit_1.workspaceRoot, options.outputPath, 'package.json'), packageJson);
85
+ (0, devkit_1.writeJsonFile)((0, path_1.join)(devkit_1.workspaceRoot, options.outputPath, 'package.json'), packageJson);
87
86
  }
88
87
  function getExports(options) {
89
88
  const exports = {};
@@ -2,12 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createNodesV2 = exports.createNodes = exports.createDependencies = void 0;
4
4
  const internal_1 = require("@nx/devkit/internal");
5
- const cache_directory_1 = require("nx/src/utils/cache-directory");
6
5
  const path_1 = require("path");
7
6
  const fs_1 = require("fs");
8
7
  const devkit_1 = require("@nx/devkit");
9
8
  const js_1 = require("@nx/js");
10
- const file_hasher_1 = require("nx/src/hasher/file-hasher");
11
9
  const internal_2 = require("@nx/js/internal");
12
10
  /**
13
11
  * @deprecated The 'createDependencies' function is now a no-op. This functionality is included in 'createNodesV2'.
@@ -21,8 +19,8 @@ exports.createNodes = [
21
19
  rollupConfigGlob,
22
20
  async (configFilePaths, options, context) => {
23
21
  const normalizedOptions = normalizeOptions(options);
24
- const optionsHash = (0, file_hasher_1.hashObject)(normalizedOptions);
25
- const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `rollup-${optionsHash}.hash`);
22
+ const optionsHash = (0, internal_1.hashObject)(normalizedOptions);
23
+ const cachePath = (0, path_1.join)(internal_1.workspaceDataDirectory, `rollup-${optionsHash}.hash`);
26
24
  const targetsCache = new internal_1.PluginCache(cachePath);
27
25
  const isTsSolutionSetup = (0, internal_2.isUsingTsSolutionSetup)();
28
26
  const packageManager = (0, devkit_1.detectPackageManager)(context.workspaceRoot);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/rollup",
3
- "version": "23.1.1",
3
+ "version": "23.1.2",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "files": [
@@ -91,8 +91,8 @@
91
91
  "postcss": "^8.4.38",
92
92
  "postcss-modules": "^6.0.1",
93
93
  "tslib": "^2.3.0",
94
- "@nx/devkit": "23.1.1",
95
- "@nx/js": "23.1.1"
94
+ "@nx/devkit": "23.1.2",
95
+ "@nx/js": "23.1.2"
96
96
  },
97
97
  "peerDependencies": {
98
98
  "rollup": "^3.0.0 || ^4.0.0"
@@ -104,7 +104,7 @@
104
104
  },
105
105
  "devDependencies": {
106
106
  "source-map-js": "^1.2.0",
107
- "nx": "23.1.1"
107
+ "nx": "23.1.2"
108
108
  },
109
109
  "publishConfig": {
110
110
  "access": "public"