create-turbo 1.1.0-canary.2 → 1.1.2

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/dist/index.js CHANGED
@@ -21,7 +21,6 @@ var __toModule = (module2) => {
21
21
  // src/index.ts
22
22
  var path2 = __toModule(require("path"));
23
23
  var import_execa = __toModule(require("execa"));
24
- var import_fs = __toModule(require("fs"));
25
24
  var import_fs_extra = __toModule(require("fs-extra"));
26
25
  var import_inquirer = __toModule(require("inquirer"));
27
26
  var import_ora = __toModule(require("ora"));
@@ -32,7 +31,7 @@ var import_chalk = __toModule(require("chalk"));
32
31
 
33
32
  // package.json
34
33
  var name = "create-turbo";
35
- var version = "1.1.0-canary.2";
34
+ var version = "1.1.2";
36
35
  var description = "Create a new Turborepo";
37
36
  var homepage = "https://turborepo.org";
38
37
  var license = "MPL-2.0";
@@ -178,6 +177,21 @@ function tryGitInit(root) {
178
177
  }
179
178
  }
180
179
 
180
+ // src/getPackageManagerVersion.ts
181
+ var import_child_process4 = __toModule(require("child_process"));
182
+ var getPackageManagerVersion = (ws) => {
183
+ switch (ws) {
184
+ case "yarn":
185
+ return (0, import_child_process4.execSync)("yarn --version").toString().trim();
186
+ case "pnpm":
187
+ return (0, import_child_process4.execSync)("pnpm --version").toString().trim();
188
+ case "npm":
189
+ return (0, import_child_process4.execSync)("npm --version").toString().trim();
190
+ default:
191
+ throw new Error(`${ws} is not supported`);
192
+ }
193
+ };
194
+
181
195
  // src/index.ts
182
196
  var turboGradient = (0, import_gradient_string.default)("#0099F7", "#F11712");
183
197
  var help = `
@@ -289,6 +303,7 @@ async function run() {
289
303
  }
290
304
  }
291
305
  });
306
+ appPkg.packageManager = `${answers.packageManager}@${getPackageManagerVersion(answers.packageManager)}`;
292
307
  await import_fs_extra.default.writeFile(path2.join(projectDir, "package.json"), JSON.stringify(appPkg, null, 2));
293
308
  if (flags.install) {
294
309
  console.log();
@@ -306,20 +321,6 @@ async function run() {
306
321
  frames: [" ", "> ", ">> ", ">>>"]
307
322
  }
308
323
  }).start();
309
- const data = import_fs.default.readFileSync(`${projectDir}/package.json`, "utf8");
310
- const pkg = JSON.parse(data.toString());
311
- switch (answers.packageManager) {
312
- case "yarn":
313
- pkg.packageManager = "yarn@1.22.17";
314
- break;
315
- case "pnpm":
316
- pkg.packageManager = "pnpm@6.26.1";
317
- break;
318
- case "npm":
319
- pkg.packageManager = "npm@8.3.0";
320
- break;
321
- }
322
- import_fs.default.writeFileSync(`${projectDir}/package.json`, JSON.stringify(pkg, null, 2));
323
324
  await (0, import_execa.default)(`${answers.packageManager}`, [`install`], {
324
325
  stdio: "ignore",
325
326
  cwd: projectDir
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-turbo",
3
- "version": "1.1.0-canary.2",
3
+ "version": "1.1.2",
4
4
  "description": "Create a new Turborepo",
5
5
  "homepage": "https://turborepo.org",
6
6
  "license": "MPL-2.0",
@@ -22,5 +22,4 @@ This turborepo has some additional tools already setup for you:
22
22
 
23
23
  - [TypeScript](https://www.typescriptlang.org/) for static type checking
24
24
  - [ESLint](https://eslint.org/) for code linting
25
- - [Jest](https://jestjs.io) test runner for all things JavaScript
26
25
  - [Prettier](https://prettier.io) for code formatting
@@ -9,7 +9,7 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "12.0.7",
12
+ "next": "12.0.8",
13
13
  "react": "17.0.2",
14
14
  "react-dom": "17.0.2",
15
15
  "ui": "*"
@@ -19,6 +19,7 @@
19
19
  "eslint": "7.32.0",
20
20
  "next-transpile-modules": "9.0.0",
21
21
  "tsconfig": "*",
22
+ "@types/node": "^17.0.12",
22
23
  "@types/react": "17.0.37",
23
24
  "typescript": "^4.5.3"
24
25
  }
@@ -9,7 +9,7 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "12.0.7",
12
+ "next": "12.0.8",
13
13
  "react": "17.0.2",
14
14
  "react-dom": "17.0.2",
15
15
  "ui": "*"
@@ -19,6 +19,7 @@
19
19
  "eslint": "7.32.0",
20
20
  "next-transpile-modules": "9.0.0",
21
21
  "tsconfig": "*",
22
+ "@types/node": "^17.0.12",
22
23
  "@types/react": "17.0.37",
23
24
  "typescript": "^4.5.3"
24
25
  }
@@ -16,25 +16,6 @@
16
16
  "prettier": "^2.5.1",
17
17
  "turbo": "*"
18
18
  },
19
- "turbo": {
20
- "pipeline": {
21
- "build": {
22
- "dependsOn": [
23
- "^build"
24
- ],
25
- "outputs": [
26
- "dist/**",
27
- ".next/**"
28
- ]
29
- },
30
- "lint": {
31
- "outputs": []
32
- },
33
- "dev": {
34
- "cache": false
35
- }
36
- }
37
- },
38
19
  "engines": {
39
20
  "npm": ">=7.0.0",
40
21
  "node": ">=14.0.0"
@@ -7,7 +7,7 @@
7
7
  "eslint-preset.js"
8
8
  ],
9
9
  "dependencies": {
10
- "eslint-config-next": "^12.0.7",
10
+ "eslint-config-next": "^12.0.8",
11
11
  "eslint-config-prettier": "^8.3.0"
12
12
  }
13
13
  }
@@ -0,0 +1,14 @@
1
+ {
2
+ "pipeline": {
3
+ "build": {
4
+ "dependsOn": ["^build"],
5
+ "outputs": ["dist/**", ".next/**"]
6
+ },
7
+ "lint": {
8
+ "outputs": []
9
+ },
10
+ "dev": {
11
+ "cache": false
12
+ }
13
+ }
14
+ }
@@ -22,7 +22,6 @@ This turborepo has some additional tools already setup for you:
22
22
 
23
23
  - [TypeScript](https://www.typescriptlang.org/) for static type checking
24
24
  - [ESLint](https://eslint.org/) for code linting
25
- - [Jest](https://jestjs.io) test runner for all things JavaScript
26
25
  - [Prettier](https://prettier.io) for code formatting
27
26
 
28
27
  ## Setup
@@ -15,24 +15,5 @@
15
15
  "devDependencies": {
16
16
  "prettier": "^2.5.1",
17
17
  "turbo": "*"
18
- },
19
- "turbo": {
20
- "pipeline": {
21
- "build": {
22
- "dependsOn": [
23
- "^build"
24
- ],
25
- "outputs": [
26
- "dist/**",
27
- ".next/**"
28
- ]
29
- },
30
- "lint": {
31
- "outputs": []
32
- },
33
- "dev": {
34
- "cache": false
35
- }
36
- }
37
18
  }
38
19
  }
@@ -0,0 +1,14 @@
1
+ {
2
+ "pipeline": {
3
+ "build": {
4
+ "dependsOn": ["^build"],
5
+ "outputs": ["dist/**", ".next/**"]
6
+ },
7
+ "lint": {
8
+ "outputs": []
9
+ },
10
+ "dev": {
11
+ "cache": false
12
+ }
13
+ }
14
+ }
@@ -22,7 +22,6 @@ This turborepo has some additional tools already setup for you:
22
22
 
23
23
  - [TypeScript](https://www.typescriptlang.org/) for static type checking
24
24
  - [ESLint](https://eslint.org/) for code linting
25
- - [Jest](https://jestjs.io) test runner for all things JavaScript
26
25
  - [Prettier](https://prettier.io) for code formatting
27
26
 
28
27
  ## Setup
@@ -9,7 +9,7 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "12.0.7",
12
+ "next": "12.0.8",
13
13
  "react": "17.0.2",
14
14
  "react-dom": "17.0.2",
15
15
  "ui": "workspace:*"
@@ -19,6 +19,7 @@
19
19
  "eslint": "7.32.0",
20
20
  "next-transpile-modules": "9.0.0",
21
21
  "tsconfig": "workspace:*",
22
+ "@types/node": "^17.0.12",
22
23
  "@types/react": "17.0.37",
23
24
  "typescript": "^4.5.3"
24
25
  }
@@ -9,7 +9,7 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "12.0.7",
12
+ "next": "12.0.8",
13
13
  "react": "17.0.2",
14
14
  "react-dom": "17.0.2",
15
15
  "ui": "workspace:*"
@@ -19,6 +19,7 @@
19
19
  "eslint": "7.32.0",
20
20
  "next-transpile-modules": "9.0.0",
21
21
  "tsconfig": "workspace:*",
22
+ "@types/node": "^17.0.12",
22
23
  "@types/react": "17.0.37",
23
24
  "typescript": "^4.5.3"
24
25
  }
@@ -11,24 +11,5 @@
11
11
  "devDependencies": {
12
12
  "prettier": "^2.5.1",
13
13
  "turbo": "latest"
14
- },
15
- "turbo": {
16
- "pipeline": {
17
- "build": {
18
- "dependsOn": [
19
- "^build"
20
- ],
21
- "outputs": [
22
- "dist/**",
23
- ".next/**"
24
- ]
25
- },
26
- "lint": {
27
- "outputs": []
28
- },
29
- "dev": {
30
- "cache": false
31
- }
32
- }
33
14
  }
34
15
  }
@@ -0,0 +1,14 @@
1
+ {
2
+ "pipeline": {
3
+ "build": {
4
+ "dependsOn": ["^build"],
5
+ "outputs": ["dist/**", ".next/**"]
6
+ },
7
+ "lint": {
8
+ "outputs": []
9
+ },
10
+ "dev": {
11
+ "cache": false
12
+ }
13
+ }
14
+ }
@@ -22,7 +22,6 @@ This turborepo has some additional tools already setup for you:
22
22
 
23
23
  - [TypeScript](https://www.typescriptlang.org/) for static type checking
24
24
  - [ESLint](https://eslint.org/) for code linting
25
- - [Jest](https://jestjs.io) test runner for all things JavaScript
26
25
  - [Prettier](https://prettier.io) for code formatting
27
26
 
28
27
  ## Setup
@@ -15,24 +15,5 @@
15
15
  "devDependencies": {
16
16
  "prettier": "^2.5.1",
17
17
  "turbo": "*"
18
- },
19
- "turbo": {
20
- "pipeline": {
21
- "build": {
22
- "dependsOn": [
23
- "^build"
24
- ],
25
- "outputs": [
26
- "dist/**",
27
- ".next/**"
28
- ]
29
- },
30
- "lint": {
31
- "outputs": []
32
- },
33
- "dev": {
34
- "cache": false
35
- }
36
- }
37
18
  }
38
19
  }
@@ -0,0 +1,14 @@
1
+ {
2
+ "pipeline": {
3
+ "build": {
4
+ "dependsOn": ["^build"],
5
+ "outputs": ["dist/**", ".next/**"]
6
+ },
7
+ "lint": {
8
+ "outputs": []
9
+ },
10
+ "dev": {
11
+ "cache": false
12
+ }
13
+ }
14
+ }