@nx/devkit
Advanced tools
Comparing version 20.4.0-canary.20250114-6181592 to 20.4.0-canary.20250115-0ae8665
{ | ||
"name": "@nx/devkit", | ||
"version": "20.4.0-canary.20250114-6181592", | ||
"version": "20.4.0-canary.20250115-0ae8665", | ||
"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.", |
@@ -141,2 +141,3 @@ "use strict"; | ||
let hasChanges = false; | ||
targetCommands.sort((a, b) => b.command.split(/\s/).length - a.command.split(/\s/).length); | ||
for (const targetCommand of targetCommands) { | ||
@@ -208,3 +209,4 @@ const { command, target, configuration } = targetCommand; | ||
// they are the same, replace with the command removing the args | ||
packageJson.scripts[scriptName] = packageJson.scripts[scriptName].replace(match, match.replace(commandRegex, configuration | ||
const script = packageJson.scripts[scriptName]; | ||
packageJson.scripts[scriptName] = script.replace(match, match.replace(commandRegex, configuration | ||
? `$1nx ${target} --configuration=${configuration}$4` | ||
@@ -211,0 +213,0 @@ : `$1nx ${target}$4`)); |
208569
5136