@nx/devkit 21.0.0-beta.7 → 21.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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/devkit",
|
3
|
-
"version": "21.0.0-beta.
|
3
|
+
"version": "21.0.0-beta.9",
|
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": {
|
@@ -17,7 +17,7 @@ function readTargetOptions({ project, target, configuration }, context) {
|
|
17
17
|
if (!targetConfiguration) {
|
18
18
|
throw new Error(`Unable to find target ${target} for project ${project}`);
|
19
19
|
}
|
20
|
-
const [nodeModule, executorName] = targetConfiguration.executor
|
20
|
+
const [nodeModule, executorName] = (0, devkit_internals_1.parseExecutor)(targetConfiguration.executor);
|
21
21
|
const { schema } = (0, devkit_internals_1.getExecutorInformation)(nodeModule, executorName, context.root, context.projectsConfigurations?.projects);
|
22
22
|
const defaultProject = (0, devkit_internals_1.calculateDefaultProjectName)(context.cwd, context.root, { version: 2, projects: context.projectsConfigurations.projects }, context.nxJsonConfiguration);
|
23
23
|
return (0, devkit_internals_1.combineOptionsForExecutor)({}, configuration ?? targetConfiguration.defaultConfiguration ?? '', targetConfiguration, schema, defaultProject, (0, path_1.relative)(context.root, context.cwd));
|
@@ -176,14 +176,18 @@ function removeDependenciesFromPackageJson(tree, dependencies, devDependencies,
|
|
176
176
|
const currentPackageJson = (0, devkit_exports_1.readJson)(tree, packageJsonPath);
|
177
177
|
if (requiresRemovingOfPackages(currentPackageJson, dependencies, devDependencies)) {
|
178
178
|
(0, devkit_exports_1.updateJson)(tree, packageJsonPath, (json) => {
|
179
|
-
|
180
|
-
|
179
|
+
if (json.dependencies) {
|
180
|
+
for (const dep of dependencies) {
|
181
|
+
delete json.dependencies[dep];
|
182
|
+
}
|
183
|
+
json.dependencies = sortObjectByKeys(json.dependencies);
|
181
184
|
}
|
182
|
-
|
183
|
-
|
185
|
+
if (json.devDependencies) {
|
186
|
+
for (const devDep of devDependencies) {
|
187
|
+
delete json.devDependencies[devDep];
|
188
|
+
}
|
189
|
+
json.devDependencies = sortObjectByKeys(json.devDependencies);
|
184
190
|
}
|
185
|
-
json.dependencies = sortObjectByKeys(json.dependencies);
|
186
|
-
json.devDependencies = sortObjectByKeys(json.devDependencies);
|
187
191
|
return json;
|
188
192
|
});
|
189
193
|
}
|