create-turbo 1.7.0-canary.7 → 1.7.0-canary.8

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -23,15 +23,16 @@ var import_fs_extra = __toESM(require("fs-extra"));
23
23
  var import_inquirer = __toESM(require("inquirer"));
24
24
  var import_ora = __toESM(require("ora"));
25
25
  var import_meow = __toESM(require("meow"));
26
- var import_semver = require("semver");
27
26
  var import_gradient_string = __toESM(require("gradient-string"));
28
27
  var import_update_check = __toESM(require("update-check"));
28
+ var import_satisfies = __toESM(require("semver/functions/satisfies"));
29
+ var import_prerelease = __toESM(require("semver/functions/prerelease"));
29
30
  var import_chalk = __toESM(require("chalk"));
30
31
 
31
32
  // package.json
32
33
  var package_default = {
33
34
  name: "create-turbo",
34
- version: "1.7.0-canary.7",
35
+ version: "1.7.0-canary.8",
35
36
  description: "Create a new Turborepo",
36
37
  homepage: "https://turbo.build/repo",
37
38
  license: "MPL-2.0",
@@ -61,7 +62,7 @@ var package_default = {
61
62
  meow: "^7.1.1",
62
63
  ora: "4.1.1",
63
64
  rimraf: "^3.0.2",
64
- semver: "^7.3.5",
65
+ semver: "^7.3.7",
65
66
  "update-check": "^1.5.4"
66
67
  },
67
68
  devDependencies: {
@@ -255,6 +256,7 @@ run().then(notifyUpdate).catch(async (reason) => {
255
256
  process.exit(1);
256
257
  });
257
258
  async function run() {
259
+ var _a;
258
260
  let { input, flags } = (0, import_meow.default)(help, {
259
261
  booleanDefault: void 0,
260
262
  flags: {
@@ -326,7 +328,7 @@ async function run() {
326
328
  import_fs_extra.default.copySync(sharedTemplate, projectDir, { recursive: true });
327
329
  let packageManagerVersion = getPackageManagerVersion(answers.packageManager);
328
330
  let packageManagerConfigs = PACKAGE_MANAGERS[answers.packageManager];
329
- let packageManager = packageManagerConfigs.find((packageManager2) => (0, import_semver.satisfies)(packageManagerVersion, packageManager2.semver));
331
+ let packageManager = packageManagerConfigs.find((packageManager2) => (0, import_satisfies.default)(packageManagerVersion, packageManager2.semver));
330
332
  if (!packageManager) {
331
333
  throw new Error("Unsupported package manager version.");
332
334
  }
@@ -348,6 +350,10 @@ async function run() {
348
350
  });
349
351
  sharedPkg.packageManager = `${packageManager.command}@${packageManagerVersion}`;
350
352
  sharedPkg.name = projectName;
353
+ const shouldUsePreRelease = (0, import_prerelease.default)(package_default.version) !== null;
354
+ if (shouldUsePreRelease && ((_a = sharedPkg == null ? void 0 : sharedPkg.devDependencies) == null ? void 0 : _a.turbo)) {
355
+ sharedPkg.devDependencies.turbo = "canary";
356
+ }
351
357
  import_fs_extra.default.writeFileSync(path2.join(projectDir, "package.json"), JSON.stringify(sharedPkg, null, 2));
352
358
  console.log();
353
359
  console.log(`>>> Created a new turborepo with the following:`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-turbo",
3
- "version": "1.7.0-canary.7",
3
+ "version": "1.7.0-canary.8",
4
4
  "description": "Create a new Turborepo",
5
5
  "homepage": "https://turbo.build/repo",
6
6
  "license": "MPL-2.0",
@@ -30,7 +30,7 @@
30
30
  "meow": "^7.1.1",
31
31
  "ora": "4.1.1",
32
32
  "rimraf": "^3.0.2",
33
- "semver": "^7.3.5",
33
+ "semver": "^7.3.7",
34
34
  "update-check": "^1.5.4"
35
35
  },
36
36
  "devDependencies": {
@@ -9,7 +9,7 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "13.0.0",
12
+ "next": "^13.1.1",
13
13
  "react": "^18.2.0",
14
14
  "react-dom": "^18.2.0",
15
15
  "ui": "*"
@@ -9,7 +9,7 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "13.0.0",
12
+ "next": "^13.1.1",
13
13
  "react": "^18.2.0",
14
14
  "react-dom": "^18.2.0",
15
15
  "ui": "*"
@@ -9,7 +9,7 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "13.0.0",
12
+ "next": "^13.1.1",
13
13
  "react": "18.2.0",
14
14
  "react-dom": "18.2.0",
15
15
  "ui": "workspace:*"
@@ -9,7 +9,7 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "13.0.0",
12
+ "next": "^13.1.1",
13
13
  "react": "18.2.0",
14
14
  "react-dom": "18.2.0",
15
15
  "ui": "workspace:*"