@nx/devkit 20.6.1 → 20.6.3

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": "20.6.1",
3
+ "version": "20.6.3",
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": {
@@ -18,6 +18,13 @@ async function formatFiles(tree, options = {
18
18
  let prettier;
19
19
  try {
20
20
  prettier = await Promise.resolve().then(() => require('prettier'));
21
+ /**
22
+ * Even after we discovered prettier in node_modules, we need to be sure that the user is intentionally using prettier
23
+ * before proceeding to format with it.
24
+ */
25
+ if (!(0, devkit_internals_1.isUsingPrettierInTree)(tree)) {
26
+ return;
27
+ }
21
28
  }
22
29
  catch { }
23
30
  if (options.sortRootTsconfigPaths) {