create-venture 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/index.mjs +2 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -119,7 +119,8 @@ if (answers.dump) {
119
119
 
120
120
  // The venture's package.json: the framework as a dev dependency and the four scripts (I-17).
121
121
  const fromClone = existsSync(join(framework, "test.mjs")) && !framework.split("/").includes("node_modules");
122
- const spec = opt("framework") ?? (fromClone ? `file:${framework}` : `${fw.name}@^${fw.version}`);
122
+ // A dependency value is a range or a location, never name@range: --framework naive-framework@^0.2 keeps ^0.2.
123
+ const spec = opt("framework")?.replace(new RegExp(`^${fw.name}@`), "") ?? (fromClone ? `file:${framework}` : `^${fw.version}`);
123
124
  writeFileSync(join(dir, "package.json"), JSON.stringify({
124
125
  name: id, private: true, type: "module",
125
126
  scripts: { dev: "naive dev", build: "naive build", start: "naive start", check: "naive check" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-venture",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Create a new Naive venture: npx create-venture my-venture",
5
5
  "type": "module",
6
6
  "license": "MIT",