@aws/create-nx-workspace 0.120.0 → 0.121.0
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/bin/index.cjs +3 -2
- package/package.json +1 -1
package/bin/index.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
let child_process = require("child_process");
|
|
3
|
+
let fs = require("fs");
|
|
3
4
|
let path = require("path");
|
|
4
5
|
//#endregion
|
|
5
6
|
//#region src/create-nx-workspace.ts
|
|
@@ -128,7 +129,7 @@ const NX_VERSION = {
|
|
|
128
129
|
zod: "4.4.3",
|
|
129
130
|
ws: "8.21.0"
|
|
130
131
|
}["create-nx-workspace"];
|
|
131
|
-
const PRESET =
|
|
132
|
+
const PRESET = `@aws/nx-plugin@${JSON.parse((0, fs.readFileSync)((0, path.resolve)(__dirname, "..", "package.json"), "utf-8")).version}`;
|
|
132
133
|
const DEFAULT_FLAGS = ["--ci=skip", "--analytics=false"];
|
|
133
134
|
/**
|
|
134
135
|
* Detect the package manager from the npm_config_user_agent environment variable.
|
|
@@ -190,7 +191,7 @@ const initGitRepo = (dir) => {
|
|
|
190
191
|
*/
|
|
191
192
|
const createNxWorkspace = (args) => {
|
|
192
193
|
if (args.some((a) => a.startsWith("--preset"))) {
|
|
193
|
-
console.error(
|
|
194
|
+
console.error("Error: --preset cannot be used with @aws/create-nx-workspace.\nThis package always creates a workspace with the @aws/nx-plugin preset.\nTo use a different preset, run create-nx-workspace directly:\n\n npx create-nx-workspace <name> --preset=<your-preset>\n");
|
|
194
195
|
return 1;
|
|
195
196
|
}
|
|
196
197
|
const skipGit = shouldSkipGit(args.filter((a) => a.startsWith("-")));
|