@nx/devkit 20.5.0-canary.20250214-ef08108 → 21.0.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/devkit",
|
3
|
-
"version": "
|
3
|
+
"version": "21.0.0-beta.1",
|
4
4
|
"private": false,
|
5
5
|
"description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more. Learn more about [extending Nx by leveraging the Nx Devkit](https://nx.dev/extending-nx/intro/getting-started) on our docs.",
|
6
6
|
"repository": {
|
@@ -1,3 +1,2 @@
|
|
1
1
|
import { CreateNodesContext, CreateNodesContextV2 } from 'nx/src/devkit-exports';
|
2
2
|
export declare function calculateHashForCreateNodes(projectRoot: string, options: object, context: CreateNodesContext | CreateNodesContextV2, additionalGlobs?: string[]): Promise<string>;
|
3
|
-
export declare function calculateHashesForCreateNodes(projectRoots: string[], options: object, context: CreateNodesContext | CreateNodesContextV2, additionalGlobs?: string[][]): Promise<string[]>;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.calculateHashForCreateNodes = calculateHashForCreateNodes;
|
4
|
-
exports.calculateHashesForCreateNodes = calculateHashesForCreateNodes;
|
5
4
|
const path_1 = require("path");
|
6
5
|
const devkit_exports_1 = require("nx/src/devkit-exports");
|
7
6
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
@@ -14,15 +13,3 @@ async function calculateHashForCreateNodes(projectRoot, options, context, additi
|
|
14
13
|
(0, devkit_internals_1.hashObject)(options),
|
15
14
|
]);
|
16
15
|
}
|
17
|
-
async function calculateHashesForCreateNodes(projectRoots, options, context, additionalGlobs = []) {
|
18
|
-
if (additionalGlobs.length &&
|
19
|
-
additionalGlobs.length !== projectRoots.length) {
|
20
|
-
throw new Error('If additionalGlobs is provided, it must be the same length as projectRoots');
|
21
|
-
}
|
22
|
-
return (0, devkit_internals_1.hashMultiGlobWithWorkspaceContext)(context.workspaceRoot, projectRoots.map((projectRoot, idx) => [
|
23
|
-
(0, path_1.join)(projectRoot, '**/*'),
|
24
|
-
...(additionalGlobs.length ? additionalGlobs[idx] : []),
|
25
|
-
])).then((hashes) => {
|
26
|
-
return hashes.map((hash) => (0, devkit_exports_1.hashArray)([hash, (0, devkit_internals_1.hashObject)(options)]));
|
27
|
-
});
|
28
|
-
}
|