@nx/devkit
Advanced tools
Comparing version 0.0.0-pr-3-5e7ccde to 0.0.0-pr-3-81283b1
{ | ||
"name": "@nx/devkit", | ||
"version": "0.0.0-pr-3-5e7ccde", | ||
"version": "0.0.0-pr-3-81283b1", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "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.", |
@@ -29,5 +29,5 @@ "use strict"; | ||
(0, devkit_exports_1.updateJson)(tree, updateConfigPath, (json) => { | ||
json.include = uniq([...json.include, 'src/**/*.js']); | ||
json.include = uniq([...(json.include ?? []), 'src/**/*.js']); | ||
json.exclude = uniq([ | ||
...json.exclude, | ||
...(json.exclude ?? []), | ||
'src/**/*.spec.js', | ||
@@ -34,0 +34,0 @@ 'src/**/*.test.js', |
import { CreateNodesContext, CreateNodesContextV2 } from 'nx/src/devkit-exports'; | ||
export declare function calculateHashForCreateNodes(projectRoot: string, options: object, context: CreateNodesContext | CreateNodesContextV2, additionalGlobs?: string[]): Promise<string>; | ||
export declare function calculateHashesForCreateNodes(projectRoots: string[], options: object, context: CreateNodesContext | CreateNodesContextV2, additionalGlobs?: string[][]): Promise<string[]>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.calculateHashForCreateNodes = calculateHashForCreateNodes; | ||
exports.calculateHashesForCreateNodes = calculateHashesForCreateNodes; | ||
const path_1 = require("path"); | ||
@@ -16,1 +17,13 @@ const devkit_exports_1 = require("nx/src/devkit-exports"); | ||
} | ||
async function calculateHashesForCreateNodes(projectRoots, options, context, additionalGlobs = []) { | ||
if (additionalGlobs.length && | ||
additionalGlobs.length !== projectRoots.length) { | ||
throw new Error('If additionalGlobs is provided, it must be the same length as projectRoots'); | ||
} | ||
return (0, devkit_internals_1.hashMultiGlobWithWorkspaceContext)(context.workspaceRoot, projectRoots.map((projectRoot, idx) => [ | ||
(0, path_1.join)(projectRoot, '**/*'), | ||
...(additionalGlobs.length ? additionalGlobs[idx] : []), | ||
])).then((hashes) => { | ||
return hashes.map((hash) => (0, devkit_exports_1.hashArray)([hash, (0, devkit_internals_1.hashObject)(options)])); | ||
}); | ||
} |
@@ -105,2 +105,3 @@ "use strict"; | ||
'bun.lockb', | ||
'bun.lock', | ||
'CHANGELOG.md', | ||
@@ -107,0 +108,0 @@ ]; |
209804
5158