@nx/rollup 23.0.0-beta.7 → 23.0.0-beta.9

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/migrations.json CHANGED
@@ -1,4 +1,11 @@
1
1
  {
2
- "generators": {},
2
+ "generators": {
3
+ "update-23-0-0-remove-use-legacy-typescript-plugin": {
4
+ "cli": "nx",
5
+ "version": "23.0.0-beta.4",
6
+ "description": "Remove deprecated useLegacyTypescriptPlugin option from @nx/rollup:rollup",
7
+ "implementation": "./src/migrations/update-23-0-0/remove-use-legacy-typescript-plugin"
8
+ }
9
+ },
3
10
  "packageJsonUpdates": {}
4
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/rollup",
3
- "version": "23.0.0-beta.7",
3
+ "version": "23.0.0-beta.9",
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": {
@@ -30,8 +30,9 @@
30
30
  "migrations": "./migrations.json"
31
31
  },
32
32
  "dependencies": {
33
- "@nx/devkit": "23.0.0-beta.7",
34
- "@nx/js": "23.0.0-beta.7",
33
+ "@nx/devkit": "23.0.0-beta.9",
34
+ "@nx/js": "23.0.0-beta.9",
35
+ "@phenomnomnominal/tsquery": "~6.2.0",
35
36
  "@rollup/plugin-babel": "^6.0.4",
36
37
  "@rollup/plugin-commonjs": "^25.0.7",
37
38
  "@rollup/plugin-image": "^3.0.3",
@@ -45,11 +46,10 @@
45
46
  "postcss": "^8.4.38",
46
47
  "postcss-modules": "^6.0.1",
47
48
  "rollup": "^4.14.0",
48
- "rollup-plugin-typescript2": "^0.36.0",
49
49
  "tslib": "^2.3.0"
50
50
  },
51
51
  "devDependencies": {
52
- "nx": "23.0.0-beta.7",
52
+ "nx": "23.0.0-beta.9",
53
53
  "source-map-js": "^1.2.0"
54
54
  },
55
55
  "publishConfig": {
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/executors/rollup/rollup.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,KAAK,eAAe,EAAU,MAAM,YAAY,CAAC;AAG1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EACL,+BAA+B,EAEhC,MAAM,iBAAiB,CAAC;AAKzB,wBAAuB,cAAc,CACnC,UAAU,EAAE,qBAAqB,EACjC,OAAO,EAAE,eAAe,qCAkEzB;AAID,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,+BAA+B,EACxC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC,CAuDxD;AAWD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"rollup.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/executors/rollup/rollup.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,KAAK,eAAe,EAAU,MAAM,YAAY,CAAC;AAG1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EACL,+BAA+B,EAEhC,MAAM,iBAAiB,CAAC;AAMzB,wBAAuB,cAAc,CACnC,UAAU,EAAE,qBAAqB,EACjC,OAAO,EAAE,eAAe,qCAoEzB;AAID,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,+BAA+B,EACxC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC,CAuDxD;AAWD,eAAe,cAAc,CAAC"}
@@ -11,7 +11,9 @@ const normalize_1 = require("./lib/normalize");
11
11
  const with_nx_1 = require("../../plugins/with-nx/with-nx");
12
12
  const generate_package_json_1 = require("../../plugins/package-json/generate-package-json");
13
13
  const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
14
+ const deprecation_1 = require("../../utils/deprecation");
14
15
  async function* rollupExecutor(rawOptions, context) {
16
+ (0, deprecation_1.warnRollupExecutorDeprecation)();
15
17
  process.env.NODE_ENV ??= 'production';
16
18
  const options = (0, normalize_1.normalizeRollupExecutorOptions)(rawOptions, context);
17
19
  const rollupOptions = await createRollupOptions(options, context);
@@ -33,6 +33,5 @@ export interface RollupExecutorOptions {
33
33
  rollupConfig?: string | string[];
34
34
  skipTypeCheck?: boolean;
35
35
  skipTypeField?: boolean;
36
- useLegacyTypescriptPlugin?: boolean;
37
36
  watch?: boolean;
38
37
  }
@@ -5,6 +5,7 @@
5
5
  "description": "Packages a library for different web usages (ESM, CommonJS).",
6
6
  "cli": "nx",
7
7
  "type": "object",
8
+ "x-deprecated": "The `@nx/rollup:rollup` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rollup:convert-to-inferred` to migrate to the `@nx/rollup/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
8
9
  "properties": {
9
10
  "project": {
10
11
  "type": "string",
@@ -155,11 +156,6 @@
155
156
  "sourceMap": {
156
157
  "description": "Output sourcemaps.",
157
158
  "type": "boolean"
158
- },
159
- "useLegacyTypescriptPlugin": {
160
- "type": "boolean",
161
- "description": "Use rollup-plugin-typescript2 instead of @rollup/plugin-typescript.",
162
- "default": false
163
159
  }
164
160
  },
165
161
  "required": ["tsConfig", "main", "outputPath"],
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/generators/configuration/configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAOjB,IAAI,EAIL,MAAM,YAAY,CAAC;AAiBpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mBAAmB,8BAmC7B;AAsPD,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/generators/configuration/configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAOjB,IAAI,EAIL,MAAM,YAAY,CAAC;AAkBpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mBAAmB,8BAoC7B;AAsPD,eAAe,sBAAsB,CAAC"}
@@ -11,6 +11,7 @@ const posix_1 = require("node:path/posix");
11
11
  const devkit_internals_1 = require("nx/src/devkit-internals");
12
12
  const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
13
13
  const has_plugin_1 = require("../../utils/has-plugin");
14
+ const deprecation_1 = require("../../utils/deprecation");
14
15
  const init_1 = require("../init/init");
15
16
  let ts;
16
17
  async function configurationGenerator(tree, options) {
@@ -29,6 +30,7 @@ async function configurationGenerator(tree, options) {
29
30
  outputConfig = createRollupConfig(tree, options, isTsSolutionSetup);
30
31
  }
31
32
  else {
33
+ (0, deprecation_1.warnRollupExecutorGenerating)();
32
34
  options.buildTarget ??= 'build';
33
35
  checkForTargetConflicts(tree, options);
34
36
  addBuildTarget(tree, options, isTsSolutionSetup);
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function (tree: Tree): Promise<void>;
3
+ //# sourceMappingURL=remove-use-legacy-typescript-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-use-legacy-typescript-plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/migrations/update-23-0-0/remove-use-legacy-typescript-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EAIL,MAAM,YAAY,CAAC;AAgBpB,yBAA+B,IAAI,EAAE,IAAI,iBAyFxC"}
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const tsquery_1 = require("@phenomnomnominal/tsquery");
6
+ const ROLLUP_CONFIG_NAMES = [
7
+ 'rollup.config.cjs',
8
+ 'rollup.config.mjs',
9
+ 'rollup.config.js',
10
+ 'rollup.config.ts',
11
+ ];
12
+ const PROPERTY_NAME = 'useLegacyTypescriptPlugin';
13
+ async function default_1(tree) {
14
+ const projects = (0, devkit_1.getProjects)(tree);
15
+ for (const [projectName] of projects) {
16
+ const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
17
+ let projectJsonChanged = false;
18
+ if (projectConfig.targets) {
19
+ for (const [, targetConfig] of Object.entries(projectConfig.targets)) {
20
+ if (targetConfig.executor !== '@nx/rollup:rollup' &&
21
+ targetConfig.executor !== '@nrwl/rollup:rollup') {
22
+ continue;
23
+ }
24
+ if (targetConfig.options &&
25
+ 'useLegacyTypescriptPlugin' in targetConfig.options) {
26
+ delete targetConfig.options.useLegacyTypescriptPlugin;
27
+ projectJsonChanged = true;
28
+ }
29
+ if (targetConfig.configurations) {
30
+ for (const [, config] of Object.entries(targetConfig.configurations)) {
31
+ if ('useLegacyTypescriptPlugin' in config) {
32
+ delete config.useLegacyTypescriptPlugin;
33
+ projectJsonChanged = true;
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ if (projectJsonChanged) {
40
+ (0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
41
+ }
42
+ (0, devkit_1.visitNotIgnoredFiles)(tree, projectConfig.root, (filePath) => {
43
+ const basename = filePath.split('/').pop();
44
+ if (!ROLLUP_CONFIG_NAMES.includes(basename))
45
+ return;
46
+ stripFromRollupConfig(tree, filePath);
47
+ });
48
+ }
49
+ // Strip from nx.json targetDefaults (keyed by target name or executor name).
50
+ const nxJson = (0, devkit_1.readNxJson)(tree);
51
+ if (nxJson?.targetDefaults) {
52
+ const ROLLUP_EXECUTORS = ['@nx/rollup:rollup', '@nrwl/rollup:rollup'];
53
+ let nxJsonChanged = false;
54
+ for (const [targetOrExecutor, targetDefault] of Object.entries(nxJson.targetDefaults)) {
55
+ if (!ROLLUP_EXECUTORS.includes(targetOrExecutor) &&
56
+ !ROLLUP_EXECUTORS.includes(targetDefault.executor)) {
57
+ continue;
58
+ }
59
+ if (targetDefault.options &&
60
+ 'useLegacyTypescriptPlugin' in targetDefault.options) {
61
+ delete targetDefault.options.useLegacyTypescriptPlugin;
62
+ nxJsonChanged = true;
63
+ }
64
+ if (targetDefault.configurations) {
65
+ for (const [, config] of Object.entries(targetDefault.configurations)) {
66
+ if ('useLegacyTypescriptPlugin' in config) {
67
+ delete config.useLegacyTypescriptPlugin;
68
+ nxJsonChanged = true;
69
+ }
70
+ }
71
+ }
72
+ }
73
+ if (nxJsonChanged) {
74
+ (0, devkit_1.updateNxJson)(tree, nxJson);
75
+ }
76
+ }
77
+ await (0, devkit_1.formatFiles)(tree);
78
+ }
79
+ function stripFromRollupConfig(tree, filePath) {
80
+ const original = tree.read(filePath, 'utf-8');
81
+ if (!original?.includes(PROPERTY_NAME))
82
+ return;
83
+ // Filter by the property NAME (not any descendant Identifier) so we don't
84
+ // strip `{ alias: useLegacyTypescriptPlugin }` where the identifier appears as a value.
85
+ // Also handle shorthand `{ useLegacyTypescriptPlugin }` — strip the entry, leave
86
+ // the variable declaration behind (not our problem).
87
+ const matches = (0, tsquery_1.query)((0, tsquery_1.ast)(original), 'PropertyAssignment, ShorthandPropertyAssignment').filter((p) => p.name && p.name.text === PROPERTY_NAME);
88
+ if (matches.length === 0)
89
+ return;
90
+ // Walk in reverse so each splice doesn't shift the offsets of remaining matches
91
+ // (a file may legitimately contain multiple withNx({...}) calls, e.g. multi-format
92
+ // configs returning more than one rollup options object).
93
+ let updated = original;
94
+ for (const propNode of matches.slice().reverse()) {
95
+ let start = propNode.getStart();
96
+ let end = propNode.getEnd();
97
+ if (updated[end] === ',')
98
+ end += 1;
99
+ // If the property occupies its own line, drop the whole line including indentation.
100
+ const lineStart = updated.lastIndexOf('\n', start - 1) + 1;
101
+ const nextNewline = updated.indexOf('\n', end);
102
+ const lineEnd = nextNewline === -1 ? updated.length : nextNewline + 1;
103
+ if (/^\s*$/.test(updated.slice(lineStart, start)) &&
104
+ /^\s*$/.test(updated.slice(end, lineEnd))) {
105
+ start = lineStart;
106
+ end = lineEnd;
107
+ }
108
+ updated = updated.slice(0, start) + updated.slice(end);
109
+ }
110
+ tree.write(filePath, updated);
111
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/plugins/with-nx/normalize-options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,mCAAmC,EACnC,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAI3B,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,yBAAyB,GACjC,mCAAmC,CAoCrC"}
1
+ {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/plugins/with-nx/normalize-options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,mCAAmC,EACnC,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAI3B,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,yBAAyB,GACjC,mCAAmC,CA+BrC"}
@@ -30,12 +30,7 @@ function normalizeOptions(projectRoot, sourceRoot, options) {
30
30
  javascriptEnabled: options.javascriptEnabled ?? false,
31
31
  skipTypeCheck: options.skipTypeCheck ?? false,
32
32
  skipTypeField: options.skipTypeField ?? false,
33
- /**
34
- * TODO(v23): Update default to true
35
- * This defaults to false for pure plugin usage to match what is the current behaviour for users
36
- * However, this differs from the Rollup executor usage as it defaulted to `true` in the `schema.json`
37
- */
38
- buildLibsFromSource: options.buildLibsFromSource ?? false,
33
+ buildLibsFromSource: options.buildLibsFromSource ?? true,
39
34
  };
40
35
  }
41
36
  function normalizeAssets(assets, root, sourceRoot) {
@@ -80,10 +80,6 @@ export interface RollupWithNxPluginOptions {
80
80
  * The path to tsconfig file.
81
81
  */
82
82
  tsConfig: string;
83
- /**
84
- * Use rollup-plugin-typescript2 instead of @rollup/plugin-typescript.
85
- */
86
- useLegacyTypescriptPlugin?: boolean;
87
83
  /**
88
84
  * Whether to generate a package.json file in the output path. It's not supported when the workspace is
89
85
  * set up with TypeScript Project References along with the package managers' Workspaces feature. Otherwise,
@@ -1 +1 @@
1
- {"version":3,"file":"with-nx-options.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/plugins/with-nx/with-nx-options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC;;SAEK;IACL,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC;IACnC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,MAAM,CAAC;IACrC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC;IAC3B;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mCACf,SAAQ,yBAAyB;IACjC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,QAAQ,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC;IAClC,MAAM,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC;CAC3B"}
1
+ {"version":3,"file":"with-nx-options.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/plugins/with-nx/with-nx-options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC;;SAEK;IACL,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC;IACnC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,MAAM,CAAC;IACrC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC;IAC3B;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mCACf,SAAQ,yBAAyB;IACjC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,QAAQ,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC;IAClC,MAAM,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"with-nx.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/plugins/with-nx/with-nx.ts"],"names":[],"mappings":"AAUA,OAAO,EAIL,6BAA6B,EAC9B,MAAM,uCAAuC,CAAC;AAY/C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAQjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AA4B9D,wBAAgB,MAAM,CACpB,UAAU,EAAE,yBAAyB,EACrC,YAAY,GAAE,MAAM,CAAC,aAAkB,EAEvC,YAAY,CAAC,EAAE,6BAA6B,EAAE,GAC7C,MAAM,CAAC,aAAa,CA0RtB"}
1
+ {"version":3,"file":"with-nx.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/plugins/with-nx/with-nx.ts"],"names":[],"mappings":"AAUA,OAAO,EAIL,6BAA6B,EAC9B,MAAM,uCAAuC,CAAC;AAY/C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAQjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AA4B9D,wBAAgB,MAAM,CACpB,UAAU,EAAE,yBAAyB,EACrC,YAAY,GAAE,MAAM,CAAC,aAAkB,EAEvC,YAAY,CAAC,EAAE,6BAA6B,EAAE,GAC7C,MAAM,CAAC,aAAa,CAuQtB"}
@@ -166,39 +166,23 @@ dependencies) {
166
166
  }),
167
167
  image(),
168
168
  json(),
169
- // TypeScript compilation and declaration generation
170
- options.useLegacyTypescriptPlugin === true
171
- ? (() => {
172
- // TODO(v23): Remove in Nx 23
173
- // Show deprecation warning
174
- devkit_1.logger.warn(`rollup-plugin-typescript2 is deprecated and will be removed in Nx 23. ` +
175
- `You are explicitly using it with 'useLegacyTypescriptPlugin: true'. ` +
176
- `Consider removing this option to use the official @rollup/plugin-typescript.`);
177
- return require('rollup-plugin-typescript2')({
178
- check: !options.skipTypeCheck,
179
- tsconfig: tsConfigPath,
180
- tsconfigOverride: {
181
- compilerOptions,
182
- },
183
- });
184
- })()
185
- : (() => {
186
- // @rollup/plugin-typescript needs outDir and declarationDir to match Rollup's output directory
187
- const { outDir, declarationDir, ...tsCompilerOptions } = compilerOptions;
188
- const rollupOutputDir = Array.isArray(finalConfig.output)
189
- ? finalConfig.output[0].dir
190
- : finalConfig.output.dir;
191
- return require('@rollup/plugin-typescript')({
192
- tsconfig: tsConfigPath,
193
- compilerOptions: {
194
- ...tsCompilerOptions,
195
- composite: false,
196
- outDir: rollupOutputDir,
197
- declarationDir: rollupOutputDir,
198
- noEmitOnError: !options.skipTypeCheck,
199
- },
200
- });
201
- })(),
169
+ (() => {
170
+ // @rollup/plugin-typescript needs outDir and declarationDir to match Rollup's output directory
171
+ const { outDir, declarationDir, ...tsCompilerOptions } = compilerOptions;
172
+ const rollupOutputDir = Array.isArray(finalConfig.output)
173
+ ? finalConfig.output[0].dir
174
+ : finalConfig.output.dir;
175
+ return require('@rollup/plugin-typescript')({
176
+ tsconfig: tsConfigPath,
177
+ compilerOptions: {
178
+ ...tsCompilerOptions,
179
+ composite: false,
180
+ outDir: rollupOutputDir,
181
+ declarationDir: rollupOutputDir,
182
+ noEmitOnError: !options.skipTypeCheck,
183
+ },
184
+ });
185
+ })(),
202
186
  (0, type_definitions_1.typeDefinitions)({
203
187
  projectRoot,
204
188
  }),
@@ -0,0 +1,4 @@
1
+ export declare const ROLLUP_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/rollup:rollup` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rollup:convert-to-inferred` to migrate to the `@nx/rollup/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.";
2
+ export declare function warnRollupExecutorDeprecation(): void;
3
+ export declare function warnRollupExecutorGenerating(): void;
4
+ //# sourceMappingURL=deprecation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecation.d.ts","sourceRoot":"","sources":["../../../../../packages/rollup/src/utils/deprecation.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mCAAmC,mQACkN,CAAC;AAEnQ,wBAAgB,6BAA6B,IAAI,IAAI,CAEpD;AAMD,wBAAgB,4BAA4B,IAAI,IAAI,CAInD"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ROLLUP_EXECUTOR_DEPRECATION_MESSAGE = void 0;
4
+ exports.warnRollupExecutorDeprecation = warnRollupExecutorDeprecation;
5
+ exports.warnRollupExecutorGenerating = warnRollupExecutorGenerating;
6
+ const devkit_1 = require("@nx/devkit");
7
+ // TODO(v24): Remove the @nx/rollup:rollup executor. The inferred plugin
8
+ // (@nx/rollup/plugin) and the convert-to-inferred generator stay supported.
9
+ exports.ROLLUP_EXECUTOR_DEPRECATION_MESSAGE = 'The `@nx/rollup:rollup` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rollup:convert-to-inferred` to migrate to the `@nx/rollup/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.';
10
+ function warnRollupExecutorDeprecation() {
11
+ devkit_1.logger.warn(exports.ROLLUP_EXECUTOR_DEPRECATION_MESSAGE);
12
+ }
13
+ // Fired when the @nx/rollup:configuration generator is about to generate a
14
+ // target that uses the deprecated executor — i.e. when @nx/rollup/plugin
15
+ // isn't registered in nx.json. Surfaces the deprecation at generation time
16
+ // rather than only when the user later runs the generated target.
17
+ function warnRollupExecutorGenerating() {
18
+ devkit_1.logger.warn('Generating a target that uses the deprecated `@nx/rollup:rollup` executor. The executor will be removed in Nx v24. Run `nx g @nx/rollup:convert-to-inferred` next to migrate this target to the `@nx/rollup/plugin` inferred plugin and prevent future generators from emitting executor targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.');
19
+ }