@nx/rollup 20.3.2 → 20.4.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": "20. 
     | 
| 
      
 3 
     | 
    
         
            +
              "version": "20.4.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": {
         
     | 
| 
         @@ -29,8 +29,8 @@ 
     | 
|
| 
       29 
29 
     | 
    
         
             
                "migrations": "./migrations.json"
         
     | 
| 
       30 
30 
     | 
    
         
             
              },
         
     | 
| 
       31 
31 
     | 
    
         
             
              "dependencies": {
         
     | 
| 
       32 
     | 
    
         
            -
                "@nx/devkit": "20. 
     | 
| 
       33 
     | 
    
         
            -
                "@nx/js": "20. 
     | 
| 
      
 32 
     | 
    
         
            +
                "@nx/devkit": "20.4.0-beta.1",
         
     | 
| 
      
 33 
     | 
    
         
            +
                "@nx/js": "20.4.0-beta.1",
         
     | 
| 
       34 
34 
     | 
    
         
             
                "@rollup/plugin-babel": "^6.0.4",
         
     | 
| 
       35 
35 
     | 
    
         
             
                "@rollup/plugin-commonjs": "^25.0.7",
         
     | 
| 
       36 
36 
     | 
    
         
             
                "@rollup/plugin-image": "^3.0.3",
         
     | 
| 
         @@ -22,6 +22,16 @@ async function rollupInitGenerator(tree, schema) { 
     | 
|
| 
       22 
22 
     | 
    
         
             
                if (schema.addPlugin) {
         
     | 
| 
       23 
23 
     | 
    
         
             
                    await (0, add_plugin_1.addPluginV1)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/rollup/plugin', plugin_1.createNodes, {
         
     | 
| 
       24 
24 
     | 
    
         
             
                        buildTargetName: ['build', 'rollup:build', 'rollup-build'],
         
     | 
| 
      
 25 
     | 
    
         
            +
                        buildDepsTargetName: [
         
     | 
| 
      
 26 
     | 
    
         
            +
                            'build-deps',
         
     | 
| 
      
 27 
     | 
    
         
            +
                            'rollup:build-deps',
         
     | 
| 
      
 28 
     | 
    
         
            +
                            'rollup-build-deps',
         
     | 
| 
      
 29 
     | 
    
         
            +
                        ],
         
     | 
| 
      
 30 
     | 
    
         
            +
                        watchDepsTargetName: [
         
     | 
| 
      
 31 
     | 
    
         
            +
                            'watch-deps',
         
     | 
| 
      
 32 
     | 
    
         
            +
                            'rollup:watch-deps',
         
     | 
| 
      
 33 
     | 
    
         
            +
                            'rollup-watch-deps',
         
     | 
| 
      
 34 
     | 
    
         
            +
                        ],
         
     | 
| 
       25 
35 
     | 
    
         
             
                    }, schema.updatePackageScripts);
         
     | 
| 
       26 
36 
     | 
    
         
             
                }
         
     | 
| 
       27 
37 
     | 
    
         
             
                if (!schema.skipFormat) {
         
     | 
    
        package/src/plugins/plugin.d.ts
    CHANGED
    
    | 
         @@ -5,6 +5,8 @@ import { type CreateDependencies, type CreateNodes, CreateNodesV2 } from '@nx/de 
     | 
|
| 
       5 
5 
     | 
    
         
             
            export declare const createDependencies: CreateDependencies;
         
     | 
| 
       6 
6 
     | 
    
         
             
            export interface RollupPluginOptions {
         
     | 
| 
       7 
7 
     | 
    
         
             
                buildTargetName?: string;
         
     | 
| 
      
 8 
     | 
    
         
            +
                buildDepsTargetName?: string;
         
     | 
| 
      
 9 
     | 
    
         
            +
                watchDepsTargetName?: string;
         
     | 
| 
       8 
10 
     | 
    
         
             
            }
         
     | 
| 
       9 
11 
     | 
    
         
             
            export declare const createNodes: CreateNodes<RollupPluginOptions>;
         
     | 
| 
       10 
12 
     | 
    
         
             
            export declare const createNodesV2: CreateNodesV2<RollupPluginOptions>;
         
     | 
    
        package/src/plugins/plugin.js
    CHANGED
    
    | 
         @@ -10,6 +10,7 @@ const js_1 = require("@nx/js"); 
     | 
|
| 
       10 
10 
     | 
    
         
             
            const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
         
     | 
| 
       11 
11 
     | 
    
         
             
            const file_hasher_1 = require("nx/src/hasher/file-hasher");
         
     | 
| 
       12 
12 
     | 
    
         
             
            const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
         
     | 
| 
      
 13 
     | 
    
         
            +
            const util_1 = require("@nx/js/src/plugins/typescript/util");
         
     | 
| 
       13 
14 
     | 
    
         
             
            const pmc = (0, devkit_1.getPackageManagerCommand)();
         
     | 
| 
       14 
15 
     | 
    
         
             
            function readTargetsCache(cachePath) {
         
     | 
| 
       15 
16 
     | 
    
         
             
                return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
         
     | 
| 
         @@ -123,6 +124,7 @@ async function buildRollupTarget(configFilePath, projectRoot, options, context, 
     | 
|
| 
       123 
124 
     | 
    
         
             
                        '@nx/js:typescript-sync',
         
     | 
| 
       124 
125 
     | 
    
         
             
                    ];
         
     | 
| 
       125 
126 
     | 
    
         
             
                }
         
     | 
| 
      
 127 
     | 
    
         
            +
                (0, util_1.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
         
     | 
| 
       126 
128 
     | 
    
         
             
                return targets;
         
     | 
| 
       127 
129 
     | 
    
         
             
            }
         
     | 
| 
       128 
130 
     | 
    
         
             
            function getOutputs(rollupConfigs, projectRoot) {
         
     | 
| 
         @@ -154,5 +156,7 @@ function getOutputs(rollupConfigs, projectRoot) { 
     | 
|
| 
       154 
156 
     | 
    
         
             
            function normalizeOptions(options) {
         
     | 
| 
       155 
157 
     | 
    
         
             
                return {
         
     | 
| 
       156 
158 
     | 
    
         
             
                    buildTargetName: options.buildTargetName ?? 'build',
         
     | 
| 
      
 159 
     | 
    
         
            +
                    buildDepsTargetName: options.buildDepsTargetName ?? 'build-deps',
         
     | 
| 
      
 160 
     | 
    
         
            +
                    watchDepsTargetName: options.watchDepsTargetName ?? 'watch-deps',
         
     | 
| 
       157 
161 
     | 
    
         
             
                };
         
     | 
| 
       158 
162 
     | 
    
         
             
            }
         
     |