@nx/devkit
Advanced tools
Comparing version 0.0.0-pr-27085-57245c5 to 0.0.0-pr-27504-68aa5d2
{ | ||
"name": "@nx/devkit", | ||
"version": "0.0.0-pr-27085-57245c5", | ||
"version": "0.0.0-pr-27504-68aa5d2", | ||
"private": false, | ||
@@ -39,3 +39,3 @@ "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.", | ||
"minimatch": "9.0.3", | ||
"@nrwl/devkit": "0.0.0-pr-27085-57245c5" | ||
"@nrwl/devkit": "0.0.0-pr-27504-68aa5d2" | ||
}, | ||
@@ -51,3 +51,4 @@ "peerDependencies": { | ||
}, | ||
"type": "commonjs" | ||
"type": "commonjs", | ||
"types": "./index.d.ts" | ||
} |
import type { Tree } from 'nx/src/devkit-exports'; | ||
import type { ScriptTarget, ModuleKind } from 'typescript'; | ||
import type { ModuleKind, ScriptTarget } from 'typescript'; | ||
export type ToJSOptions = { | ||
extension?: '.js' | '.mjs' | '.cjs'; | ||
module?: ModuleKind; | ||
target?: ScriptTarget; | ||
module?: ModuleKind; | ||
extension: '.js' | '.mjs' | '.cjs'; | ||
useJsx?: boolean; | ||
}; | ||
@@ -8,0 +9,0 @@ /** |
@@ -20,5 +20,11 @@ "use strict"; | ||
})); | ||
tree.rename(c.path, c.path.replace(/\.tsx?$/, options?.extension ?? '.js')); | ||
tree.rename(c.path, c.path.replace(/\.ts$/, options?.extension ?? '.js')); | ||
if (options?.useJsx) { | ||
tree.rename(c.path, c.path.replace(/\.tsx$/, '.jsx')); | ||
} | ||
else { | ||
tree.rename(c.path, c.path.replace(/\.tsx$/, options?.extension ?? '.js')); | ||
} | ||
} | ||
} | ||
} |
@@ -14,3 +14,3 @@ "use strict"; | ||
*/ | ||
function installPackagesTask(tree, alwaysRun = false, cwd = '', packageManager = (0, devkit_exports_1.detectPackageManager)(cwd)) { | ||
function installPackagesTask(tree, alwaysRun = false, cwd = '', packageManager = (0, devkit_exports_1.detectPackageManager)((0, path_1.join)(tree.root, cwd))) { | ||
if (!tree | ||
@@ -17,0 +17,0 @@ .listChanges() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
224159
104
5489
32
+ Added@nrwl/devkit@0.0.0-pr-27504-68aa5d2(transitive)
+ Added@nrwl/tao@19.7.3(transitive)
+ Added@nx/nx-darwin-arm64@19.7.3(transitive)
+ Added@nx/nx-darwin-x64@19.7.3(transitive)
+ Added@nx/nx-freebsd-x64@19.7.3(transitive)
+ Added@nx/nx-linux-arm-gnueabihf@19.7.3(transitive)
+ Added@nx/nx-linux-arm64-gnu@19.7.3(transitive)
+ Added@nx/nx-linux-arm64-musl@19.7.3(transitive)
+ Added@nx/nx-linux-x64-gnu@19.7.3(transitive)
+ Added@nx/nx-linux-x64-musl@19.7.3(transitive)
+ Added@nx/nx-win32-arm64-msvc@19.7.3(transitive)
+ Added@nx/nx-win32-x64-msvc@19.7.3(transitive)
+ Addednx@19.7.3(transitive)
- Removed@nrwl/devkit@0.0.0-pr-27085-57245c5(transitive)
- Removed@nrwl/tao@19.7.2(transitive)
- Removed@nx/nx-darwin-arm64@19.7.2(transitive)
- Removed@nx/nx-darwin-x64@19.7.2(transitive)
- Removed@nx/nx-freebsd-x64@19.7.2(transitive)
- Removed@nx/nx-linux-arm-gnueabihf@19.7.2(transitive)
- Removed@nx/nx-linux-arm64-gnu@19.7.2(transitive)
- Removed@nx/nx-linux-arm64-musl@19.7.2(transitive)
- Removed@nx/nx-linux-x64-gnu@19.7.2(transitive)
- Removed@nx/nx-linux-x64-musl@19.7.2(transitive)
- Removed@nx/nx-win32-arm64-msvc@19.7.2(transitive)
- Removed@nx/nx-win32-x64-msvc@19.7.2(transitive)
- Removednx@19.7.2(transitive)