create-turbo 1.4.3 → 1.4.4-canary.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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  To get started, open a new shell and run:
6
6
 
7
7
  ```sh
8
- $ npx create-turbo@latest
8
+ npx create-turbo@latest
9
9
  ```
10
10
 
11
11
  Then follow the prompts you see in your terminal.
package/dist/index.js CHANGED
@@ -19,11 +19,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
19
19
  // src/index.ts
20
20
  var path2 = __toESM(require("path"));
21
21
  var import_execa = __toESM(require("execa"));
22
- var import_fs_extra = __toESM(require("fs-extra"));
22
+ var import_fs = __toESM(require("fs"));
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_lt = __toESM(require("semver/functions/lt"));
26
+ var import_semver = require("semver");
27
27
  var import_gradient_string = __toESM(require("gradient-string"));
28
28
  var import_update_check = __toESM(require("update-check"));
29
29
  var import_chalk = __toESM(require("chalk"));
@@ -31,7 +31,7 @@ var import_chalk = __toESM(require("chalk"));
31
31
  // package.json
32
32
  var package_default = {
33
33
  name: "create-turbo",
34
- version: "1.4.3-canary.0",
34
+ version: "1.4.4-canary.2",
35
35
  description: "Create a new Turborepo",
36
36
  homepage: "https://turborepo.org",
37
37
  license: "MPL-2.0",
@@ -47,14 +47,14 @@ var package_default = {
47
47
  "create-turbo": "dist/index.js"
48
48
  },
49
49
  scripts: {
50
- build: "tsup src/index.ts --format cjs",
50
+ build: "tsup",
51
51
  test: "jest",
52
- lint: "eslint src/**/*.ts"
52
+ lint: "eslint src/**/*.ts",
53
+ "check-types": "tsc --noEmit"
53
54
  },
54
55
  dependencies: {
55
56
  chalk: "2.4.2",
56
57
  execa: "5.1.1",
57
- "fs-extra": "^10.0.0",
58
58
  "gradient-string": "^2.0.0",
59
59
  inquirer: "^8.0.0",
60
60
  meow: "^7.1.1",
@@ -65,17 +65,18 @@ var package_default = {
65
65
  },
66
66
  devDependencies: {
67
67
  "@types/chalk-animation": "^1.6.0",
68
- "@types/fs-extra": "^9.0.13",
69
68
  "@types/gradient-string": "^1.1.2",
70
69
  "@types/inquirer": "^7.3.1",
71
70
  "@types/jest": "^27.4.0",
72
71
  "@types/node": "^16.11.12",
72
+ "@types/rimraf": "^3.0.2",
73
73
  "@types/semver": "^7.3.9",
74
74
  eslint: "^7.23.0",
75
75
  jest: "^27.4.3",
76
76
  semver: "^7.3.5",
77
77
  "strip-ansi": "^6.0.1",
78
78
  "ts-jest": "^27.1.1",
79
+ tsconfig: "workspace:*",
79
80
  tsup: "^5.10.3",
80
81
  typescript: "^4.5.5"
81
82
  },
@@ -114,10 +115,6 @@ function shouldUsePnpm() {
114
115
  return false;
115
116
  }
116
117
  }
117
- function getNpxCommandOfPnpm() {
118
- const currentVersion = (0, import_child_process2.execSync)("pnpm --version").toString();
119
- return Number(currentVersion.split(".")[0]) >= 6 ? "pnpm dlx" : "pnpx";
120
- }
121
118
 
122
119
  // src/git.ts
123
120
  var import_child_process3 = require("child_process");
@@ -165,19 +162,56 @@ function tryGitInit(root) {
165
162
  }
166
163
  }
167
164
 
165
+ // src/constants.ts
166
+ var PACKAGE_MANAGERS = {
167
+ npm: [
168
+ {
169
+ name: "npm",
170
+ template: "npm",
171
+ command: "npm",
172
+ installArgs: ["install"],
173
+ version: "latest",
174
+ executable: "npx",
175
+ semver: "*"
176
+ }
177
+ ],
178
+ pnpm: [
179
+ {
180
+ name: "pnpm",
181
+ template: "pnpm",
182
+ command: "pnpm",
183
+ installArgs: ["install"],
184
+ version: "latest",
185
+ executable: "pnpm dlx",
186
+ semver: ">=7"
187
+ }
188
+ ],
189
+ yarn: [
190
+ {
191
+ name: "yarn",
192
+ template: "yarn",
193
+ command: "yarn",
194
+ installArgs: ["install"],
195
+ version: "1.x",
196
+ executable: "npx",
197
+ semver: "<2"
198
+ },
199
+ {
200
+ name: "berry",
201
+ template: "berry",
202
+ command: "yarn",
203
+ installArgs: ["install", "--no-immutable"],
204
+ version: "stable",
205
+ executable: "yarn dlx",
206
+ semver: ">=2"
207
+ }
208
+ ]
209
+ };
210
+
168
211
  // src/getPackageManagerVersion.ts
169
212
  var import_child_process4 = require("child_process");
170
- var getPackageManagerVersion = (ws) => {
171
- switch (ws) {
172
- case "yarn":
173
- return (0, import_child_process4.execSync)("yarn --version").toString().trim();
174
- case "pnpm":
175
- return (0, import_child_process4.execSync)("pnpm --version").toString().trim();
176
- case "npm":
177
- return (0, import_child_process4.execSync)("npm --version").toString().trim();
178
- default:
179
- throw new Error(`${ws} is not supported`);
180
- }
213
+ var getPackageManagerVersion = (command) => {
214
+ return (0, import_child_process4.execSync)(`${command} --version`).toString().trim();
181
215
  };
182
216
 
183
217
  // src/index.ts
@@ -274,20 +308,29 @@ async function run() {
274
308
  let relativeProjectDir = path2.relative(process.cwd(), projectDir);
275
309
  let projectDirIsCurrentDir = relativeProjectDir === "";
276
310
  if (!projectDirIsCurrentDir) {
277
- if (import_fs_extra.default.existsSync(projectDir)) {
311
+ if (import_fs.default.existsSync(projectDir) && import_fs.default.readdirSync(projectDir).length !== 0) {
278
312
  console.log(`\uFE0F\u{1F6A8} Oops, "${relativeProjectDir}" already exists. Please try again with a different directory.`);
279
313
  process.exit(1);
280
314
  } else {
281
- await import_fs_extra.default.mkdir(projectDir);
315
+ import_fs.default.mkdirSync(projectDir, { recursive: true });
282
316
  }
283
317
  }
284
318
  let sharedTemplate = path2.resolve(__dirname, "../templates", `_shared_ts`);
285
- await import_fs_extra.default.copy(sharedTemplate, projectDir);
286
- let serverTemplate = path2.resolve(__dirname, "../templates", answers.packageManager);
287
- if (import_fs_extra.default.existsSync(serverTemplate)) {
288
- await import_fs_extra.default.copy(serverTemplate, projectDir, { overwrite: true });
319
+ import_fs.default.cpSync(sharedTemplate, projectDir, { recursive: true });
320
+ let packageManagerVersion = getPackageManagerVersion(answers.packageManager);
321
+ let packageManagerConfigs = PACKAGE_MANAGERS[answers.packageManager];
322
+ let packageManager = packageManagerConfigs.find((packageManager2) => (0, import_semver.satisfies)(packageManagerVersion, packageManager2.semver));
323
+ if (!packageManager) {
324
+ throw new Error("Unsupported package manager version.");
325
+ }
326
+ let packageManagerTemplate = path2.resolve(__dirname, "../templates", packageManager.template);
327
+ if (import_fs.default.existsSync(packageManagerTemplate)) {
328
+ import_fs.default.cpSync(packageManagerTemplate, projectDir, {
329
+ recursive: true,
330
+ force: true
331
+ });
289
332
  }
290
- await import_fs_extra.default.move(path2.join(projectDir, "gitignore"), path2.join(projectDir, ".gitignore"));
333
+ import_fs.default.renameSync(path2.join(projectDir, "gitignore"), path2.join(projectDir, ".gitignore"));
291
334
  let sharedPkg = require(path2.join(sharedTemplate, "package.json"));
292
335
  let projectPkg = require(path2.join(projectDir, "package.json"));
293
336
  ["dependencies", "devDependencies"].forEach((pkgKey) => {
@@ -296,93 +339,61 @@ async function run() {
296
339
  ...projectPkg[pkgKey]
297
340
  };
298
341
  });
299
- sharedPkg.packageManager = `${answers.packageManager}@${getPackageManagerVersion(answers.packageManager)}`;
342
+ sharedPkg.packageManager = `${packageManager.command}@${packageManagerVersion}`;
300
343
  sharedPkg.name = projectName;
301
- await import_fs_extra.default.writeFile(path2.join(projectDir, "package.json"), JSON.stringify(sharedPkg, null, 2));
344
+ import_fs.default.writeFileSync(path2.join(projectDir, "package.json"), JSON.stringify(sharedPkg, null, 2));
345
+ console.log();
346
+ console.log(`>>> Created a new turborepo with the following:`);
347
+ console.log();
348
+ console.log(` - ${import_chalk.default.bold("apps/web")}: Next.js with TypeScript`);
349
+ console.log(` - ${import_chalk.default.bold("apps/docs")}: Next.js with TypeScript`);
350
+ console.log(` - ${import_chalk.default.bold("packages/ui")}: Shared React component library`);
351
+ console.log(` - ${import_chalk.default.bold("packages/eslint-config-custom")}: Shared configuration (ESLint)`);
352
+ console.log(` - ${import_chalk.default.bold("packages/tsconfig")}: Shared TypeScript \`tsconfig.json\``);
353
+ console.log();
302
354
  if (flags.install) {
303
- console.log();
304
- console.log(`>>> Creating a new turborepo with the following:`);
305
- console.log();
306
- console.log(` - ${import_chalk.default.bold("apps/web")}: Next.js with TypeScript`);
307
- console.log(` - ${import_chalk.default.bold("apps/docs")}: Next.js with TypeScript`);
308
- console.log(` - ${import_chalk.default.bold("packages/ui")}: Shared React component library`);
309
- console.log(` - ${import_chalk.default.bold("packages/eslint-config-custom")}: Shared configuration (ESLint)`);
310
- console.log(` - ${import_chalk.default.bold("packages/tsconfig")}: Shared TypeScript \`tsconfig.json\``);
311
- console.log();
312
355
  const spinner = (0, import_ora.default)({
313
356
  text: "Installing dependencies...",
314
357
  spinner: {
315
358
  frames: [" ", "> ", ">> ", ">>>"]
316
359
  }
317
360
  }).start();
318
- let supportsRegistryArg = false;
319
- try {
320
- supportsRegistryArg = (0, import_lt.default)(getPackageManagerVersion(answers.packageManager), "2.0.0");
321
- } catch (err) {
322
- }
323
- const installArgs = ["install"];
324
- if (supportsRegistryArg) {
325
- const npmRegistry = await getNpmRegistry(answers.packageManager);
326
- installArgs.push(`--registry=${npmRegistry}`);
327
- }
328
- await (0, import_execa.default)(`${answers.packageManager}`, installArgs, {
361
+ await (0, import_execa.default)(`${packageManager.command}`, packageManager.installArgs, {
329
362
  stdio: "ignore",
330
363
  cwd: projectDir
331
364
  });
332
365
  spinner.stop();
333
- } else {
334
- console.log();
335
- console.log(`>>> Bootstrapped a new turborepo with the following:`);
336
- console.log();
337
- console.log(` - ${import_chalk.default.bold("apps/web")}: Next.js with TypeScript`);
338
- console.log(` - ${import_chalk.default.bold("apps/docs")}: Next.js with TypeScript`);
339
- console.log(` - ${import_chalk.default.bold("packages/ui")}: Shared React component library`);
340
- console.log(` - ${import_chalk.default.bold("packages/config")}: Shared configuration (ESLint)`);
341
- console.log(` - ${import_chalk.default.bold("packages/tsconfig")}: Shared TypeScript \`tsconfig.json\``);
342
- console.log();
343
366
  }
344
367
  process.chdir(projectDir);
345
368
  tryGitInit(relativeProjectDir);
346
369
  if (projectDirIsCurrentDir) {
347
- console.log(`${import_chalk.default.bold(turboGradient(">>> Success!"))} Your new Turborepo is ready. `);
370
+ console.log(`${import_chalk.default.bold(turboGradient(">>> Success!"))} Your new Turborepo is ready.`);
348
371
  console.log("Inside this directory, you can run several commands:");
349
372
  } else {
350
- console.log(`${import_chalk.default.bold(turboGradient(">>> Success!"))} Created a new Turborepo at "${relativeProjectDir}". `);
373
+ console.log(`${import_chalk.default.bold(turboGradient(">>> Success!"))} Created a new Turborepo at "${relativeProjectDir}".`);
351
374
  console.log("Inside that directory, you can run several commands:");
352
375
  }
353
376
  console.log();
354
- console.log(import_chalk.default.cyan(` ${answers.packageManager} run build`));
377
+ console.log(import_chalk.default.cyan(` ${packageManager.command} run build`));
355
378
  console.log(` Build all apps and packages`);
356
379
  console.log();
357
- console.log(import_chalk.default.cyan(` ${answers.packageManager} run dev`));
380
+ console.log(import_chalk.default.cyan(` ${packageManager.command} run dev`));
358
381
  console.log(` Develop all apps and packages`);
359
382
  console.log();
360
383
  console.log(`Turborepo will cache locally by default. For an additional`);
361
384
  console.log(`speed boost, enable Remote Caching with Vercel by`);
362
385
  console.log(`entering the following command:`);
363
386
  console.log();
364
- console.log(import_chalk.default.cyan(` ${getNpxCommand(answers.packageManager)} turbo login`));
387
+ console.log(import_chalk.default.cyan(` ${packageManager.executable} turbo login`));
365
388
  console.log();
366
389
  console.log(`We suggest that you begin by typing:`);
367
390
  console.log();
368
391
  if (!projectDirIsCurrentDir) {
369
392
  console.log(` ${import_chalk.default.cyan("cd")} ${relativeProjectDir}`);
370
393
  }
371
- console.log(import_chalk.default.cyan(` ${getNpxCommand(answers.packageManager)} turbo login`));
394
+ console.log(import_chalk.default.cyan(` ${packageManager.executable} turbo login`));
372
395
  console.log();
373
396
  }
374
- async function getNpmRegistry(pkgManager) {
375
- try {
376
- const { stdout: registry } = await (0, import_execa.default)(pkgManager, [
377
- "config",
378
- "get",
379
- "registry"
380
- ]);
381
- return registry;
382
- } catch (error) {
383
- return "";
384
- }
385
- }
386
397
  var update = (0, import_update_check.default)(package_default).catch(() => null);
387
398
  async function notifyUpdate() {
388
399
  try {
@@ -398,12 +409,3 @@ async function notifyUpdate() {
398
409
  } catch {
399
410
  }
400
411
  }
401
- function getNpxCommand(pkgManager) {
402
- if (pkgManager === "yarn") {
403
- return "npx";
404
- } else if (pkgManager === "pnpm") {
405
- return getNpxCommandOfPnpm();
406
- } else {
407
- return "npx";
408
- }
409
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-turbo",
3
- "version": "1.4.3",
3
+ "version": "1.4.4-canary.2",
4
4
  "description": "Create a new Turborepo",
5
5
  "homepage": "https://turborepo.org",
6
6
  "license": "MPL-2.0",
@@ -16,14 +16,14 @@
16
16
  "create-turbo": "dist/index.js"
17
17
  },
18
18
  "scripts": {
19
- "build": "tsup src/index.ts --format cjs",
19
+ "build": "tsup",
20
20
  "test": "jest",
21
- "lint": "eslint src/**/*.ts"
21
+ "lint": "eslint src/**/*.ts",
22
+ "check-types": "tsc --noEmit"
22
23
  },
23
24
  "dependencies": {
24
25
  "chalk": "2.4.2",
25
26
  "execa": "5.1.1",
26
- "fs-extra": "^10.0.0",
27
27
  "gradient-string": "^2.0.0",
28
28
  "inquirer": "^8.0.0",
29
29
  "meow": "^7.1.1",
@@ -34,17 +34,18 @@
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/chalk-animation": "^1.6.0",
37
- "@types/fs-extra": "^9.0.13",
38
37
  "@types/gradient-string": "^1.1.2",
39
38
  "@types/inquirer": "^7.3.1",
40
39
  "@types/jest": "^27.4.0",
41
40
  "@types/node": "^16.11.12",
41
+ "@types/rimraf": "^3.0.2",
42
42
  "@types/semver": "^7.3.9",
43
43
  "eslint": "^7.23.0",
44
44
  "jest": "^27.4.3",
45
45
  "semver": "^7.3.5",
46
46
  "strip-ansi": "^6.0.1",
47
47
  "ts-jest": "^27.1.1",
48
+ "tsconfig": "workspace:*",
48
49
  "tsup": "^5.10.3",
49
50
  "typescript": "^4.5.5"
50
51
  },
@@ -9,9 +9,9 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "12.2.3",
13
- "react": "17.0.2",
14
- "react-dom": "17.0.2",
12
+ "next": "12.2.5",
13
+ "react": "18.2.0",
14
+ "react-dom": "18.2.0",
15
15
  "ui": "*"
16
16
  },
17
17
  "devDependencies": {
@@ -21,7 +21,7 @@
21
21
  "next-transpile-modules": "9.0.0",
22
22
  "tsconfig": "*",
23
23
  "@types/node": "^17.0.12",
24
- "@types/react": "17.0.48",
24
+ "@types/react": "18.0.17",
25
25
  "typescript": "^4.5.3"
26
26
  }
27
27
  }
@@ -9,9 +9,9 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "12.2.3",
13
- "react": "17.0.2",
14
- "react-dom": "17.0.2",
12
+ "next": "12.2.5",
13
+ "react": "18.2.0",
14
+ "react-dom": "18.2.0",
15
15
  "ui": "*"
16
16
  },
17
17
  "devDependencies": {
@@ -21,7 +21,7 @@
21
21
  "next-transpile-modules": "9.0.0",
22
22
  "tsconfig": "*",
23
23
  "@types/node": "^17.0.12",
24
- "@types/react": "17.0.48",
24
+ "@types/react": "18.0.17",
25
25
  "typescript": "^4.5.3"
26
26
  }
27
27
  }
@@ -18,7 +18,6 @@
18
18
  "turbo": "latest"
19
19
  },
20
20
  "engines": {
21
- "npm": ">=7.0.0",
22
21
  "node": ">=14.0.0"
23
22
  }
24
23
  }
@@ -7,7 +7,7 @@
7
7
  "eslint": "^7.23.0",
8
8
  "eslint-config-next": "^12.0.8",
9
9
  "eslint-config-prettier": "^8.3.0",
10
- "eslint-plugin-react": "7.28.0",
10
+ "eslint-plugin-react": "7.31.0",
11
11
  "eslint-config-turbo": "latest"
12
12
  },
13
13
  "devDependencies": {
@@ -2,7 +2,6 @@
2
2
  "name": "tsconfig",
3
3
  "version": "0.0.0",
4
4
  "private": true,
5
- "main": "index.js",
6
5
  "files": [
7
6
  "base.json",
8
7
  "nextjs.json",
@@ -12,7 +12,7 @@
12
12
  "@types/react-dom": "^17.0.11",
13
13
  "eslint": "^7.32.0",
14
14
  "eslint-config-custom": "*",
15
- "react": "^17.0.2",
15
+ "react": "^18.2.0",
16
16
  "tsconfig": "*",
17
17
  "typescript": "^4.5.2"
18
18
  }
@@ -0,0 +1 @@
1
+ nodeLinker: "node-modules"
@@ -0,0 +1,73 @@
1
+ # Turborepo starter
2
+
3
+ This is an official Yarn (Berry) starter turborepo.
4
+
5
+ ## What's inside?
6
+
7
+ This turborepo uses [Yarn](https://yarnpkg.com/) as a package manager. It includes the following packages/apps:
8
+
9
+ ### Apps and Packages
10
+
11
+ - `docs`: a [Next.js](https://nextjs.org) app
12
+ - `web`: another [Next.js](https://nextjs.org) app
13
+ - `ui`: a stub React component library shared by both `web` and `docs` applications
14
+ - `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
15
+ - `tsconfig`: `tsconfig.json`s used throughout the monorepo
16
+
17
+ Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
18
+
19
+ ### Utilities
20
+
21
+ This turborepo has some additional tools already setup for you:
22
+
23
+ - [TypeScript](https://www.typescriptlang.org/) for static type checking
24
+ - [ESLint](https://eslint.org/) for code linting
25
+ - [Prettier](https://prettier.io) for code formatting
26
+
27
+ ### Build
28
+
29
+ To build all apps and packages, run the following command:
30
+
31
+ ```
32
+ cd my-turborepo
33
+ yarn run build
34
+ ```
35
+
36
+ ### Develop
37
+
38
+ To develop all apps and packages, run the following command:
39
+
40
+ ```
41
+ cd my-turborepo
42
+ yarn run dev
43
+ ```
44
+
45
+ ### Remote Caching
46
+
47
+ Turborepo can use a technique known as [Remote Caching](https://turborepo.org/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
48
+
49
+ By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
50
+
51
+ ```
52
+ cd my-turborepo
53
+ yarn dlx turbo login
54
+ ```
55
+
56
+ This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
57
+
58
+ Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
59
+
60
+ ```
61
+ yarn dlx turbo link
62
+ ```
63
+
64
+ ## Useful Links
65
+
66
+ Learn more about the power of Turborepo:
67
+
68
+ - [Pipelines](https://turborepo.org/docs/core-concepts/pipelines)
69
+ - [Caching](https://turborepo.org/docs/core-concepts/caching)
70
+ - [Remote Caching](https://turborepo.org/docs/core-concepts/remote-caching)
71
+ - [Scoped Tasks](https://turborepo.org/docs/core-concepts/scopes)
72
+ - [Configuration Options](https://turborepo.org/docs/reference/configuration)
73
+ - [CLI Usage](https://turborepo.org/docs/reference/command-line-reference)
@@ -1,6 +1,6 @@
1
- # Turborepo starter with npm
1
+ # Turborepo starter
2
2
 
3
- This is an official starter turborepo.
3
+ This is an official npm starter turborepo.
4
4
 
5
5
  ## What's inside?
6
6
 
@@ -24,10 +24,6 @@ This turborepo has some additional tools already setup for you:
24
24
  - [ESLint](https://eslint.org/) for code linting
25
25
  - [Prettier](https://prettier.io) for code formatting
26
26
 
27
- ## Setup
28
-
29
- This repository is used in the `npx create-turbo@latest` command, and selected when choosing which package manager you wish to use with your monorepo (npm).
30
-
31
27
  ### Build
32
28
 
33
29
  To build all apps and packages, run the following command:
@@ -1,10 +1,10 @@
1
- # Turborepo starter with pnpm
1
+ # Turborepo starter
2
2
 
3
- This is an official starter turborepo.
3
+ This is an official pnpm starter turborepo.
4
4
 
5
5
  ## What's inside?
6
6
 
7
- This turborepo uses [pnpm](https://pnpm.io) as a packages manager. It includes the following packages/apps:
7
+ This turborepo uses [pnpm](https://pnpm.io) as a package manager. It includes the following packages/apps:
8
8
 
9
9
  ### Apps and Packages
10
10
 
@@ -24,10 +24,6 @@ This turborepo has some additional tools already setup for you:
24
24
  - [ESLint](https://eslint.org/) for code linting
25
25
  - [Prettier](https://prettier.io) for code formatting
26
26
 
27
- ## Setup
28
-
29
- This repository is used in the `npx create-turbo@latest` command, and selected when choosing which package manager you wish to use with your monorepo (pnpm).
30
-
31
27
  ### Build
32
28
 
33
29
  To build all apps and packages, run the following command:
@@ -54,7 +50,7 @@ By default, Turborepo will cache locally. To enable Remote Caching you will need
54
50
 
55
51
  ```
56
52
  cd my-turborepo
57
- pnpx turbo login
53
+ pnpm dlx turbo login
58
54
  ```
59
55
 
60
56
  This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
@@ -62,7 +58,7 @@ This will authenticate the Turborepo CLI with your [Vercel account](https://verc
62
58
  Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
63
59
 
64
60
  ```
65
- pnpx turbo link
61
+ pnpm dlx turbo link
66
62
  ```
67
63
 
68
64
  ## Useful Links
@@ -9,9 +9,9 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "12.2.3",
13
- "react": "17.0.2",
14
- "react-dom": "17.0.2",
12
+ "next": "12.2.5",
13
+ "react": "18.2.0",
14
+ "react-dom": "18.2.0",
15
15
  "ui": "workspace:*"
16
16
  },
17
17
  "devDependencies": {
@@ -21,7 +21,7 @@
21
21
  "next-transpile-modules": "9.0.0",
22
22
  "tsconfig": "workspace:*",
23
23
  "@types/node": "^17.0.12",
24
- "@types/react": "17.0.48",
24
+ "@types/react": "18.0.17",
25
25
  "typescript": "^4.5.3"
26
26
  }
27
27
  }
@@ -9,9 +9,9 @@
9
9
  "lint": "next lint"
10
10
  },
11
11
  "dependencies": {
12
- "next": "12.2.3",
13
- "react": "17.0.2",
14
- "react-dom": "17.0.2",
12
+ "next": "12.2.5",
13
+ "react": "18.2.0",
14
+ "react-dom": "18.2.0",
15
15
  "ui": "workspace:*"
16
16
  },
17
17
  "devDependencies": {
@@ -21,7 +21,7 @@
21
21
  "next-transpile-modules": "9.0.0",
22
22
  "tsconfig": "workspace:*",
23
23
  "@types/node": "^17.0.12",
24
- "@types/react": "17.0.48",
24
+ "@types/react": "18.0.17",
25
25
  "typescript": "^4.5.3"
26
26
  }
27
27
  }
@@ -12,5 +12,8 @@
12
12
  "eslint-config-custom": "workspace:*",
13
13
  "prettier": "latest",
14
14
  "turbo": "latest"
15
+ },
16
+ "engines": {
17
+ "node": ">=14.0.0"
15
18
  }
16
19
  }
@@ -8,11 +8,11 @@
8
8
  "lint": "eslint *.ts*"
9
9
  },
10
10
  "devDependencies": {
11
- "@types/react": "^17.0.37",
12
- "@types/react-dom": "^17.0.11",
11
+ "@types/react": "^18.0.17",
12
+ "@types/react-dom": "^18.0.6",
13
13
  "eslint": "^7.32.0",
14
14
  "eslint-config-custom": "workspace:*",
15
- "react": "^17.0.2",
15
+ "react": "^18.2.0",
16
16
  "tsconfig": "workspace:*",
17
17
  "typescript": "^4.5.2"
18
18
  }
@@ -4,7 +4,7 @@ This is an official Yarn v1 starter turborepo.
4
4
 
5
5
  ## What's inside?
6
6
 
7
- This turborepo uses [Yarn](https://classic.yarnpkg.com/lang/en/) as a package manager. It includes the following packages/apps:
7
+ This turborepo uses [Yarn](https://classic.yarnpkg.com/) as a package manager. It includes the following packages/apps:
8
8
 
9
9
  ### Apps and Packages
10
10
 
@@ -24,10 +24,6 @@ This turborepo has some additional tools already setup for you:
24
24
  - [ESLint](https://eslint.org/) for code linting
25
25
  - [Prettier](https://prettier.io) for code formatting
26
26
 
27
- ## Setup
28
-
29
- This repository is used in the `npx create-turbo` command, and selected when choosing which package manager you wish to use with your monorepo (Yarn).
30
-
31
27
  ### Build
32
28
 
33
29
  To build all apps and packages, run the following command:
@@ -1,19 +0,0 @@
1
- {
2
- "name": "turborepo-basic-npm",
3
- "version": "0.0.0",
4
- "private": true,
5
- "workspaces": [
6
- "apps/*",
7
- "packages/*"
8
- ],
9
- "scripts": {
10
- "build": "turbo run build",
11
- "dev": "turbo run dev --parallel",
12
- "lint": "turbo run lint",
13
- "format": "prettier --write \"**/*.{ts,tsx,md}\""
14
- },
15
- "devDependencies": {
16
- "prettier": "latest",
17
- "turbo": "latest"
18
- }
19
- }
@@ -1,15 +0,0 @@
1
- {
2
- "$schema": "https://turborepo.org/schema.json",
3
- "pipeline": {
4
- "build": {
5
- "dependsOn": ["^build"],
6
- "outputs": ["dist/**", ".next/**"]
7
- },
8
- "lint": {
9
- "outputs": []
10
- },
11
- "dev": {
12
- "cache": false
13
- }
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- {
2
- "$schema": "https://turborepo.org/schema.json",
3
- "pipeline": {
4
- "build": {
5
- "dependsOn": ["^build"],
6
- "outputs": ["dist/**", ".next/**"]
7
- },
8
- "lint": {
9
- "outputs": []
10
- },
11
- "dev": {
12
- "cache": false
13
- }
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- {
2
- "$schema": "https://turborepo.org/schema.json",
3
- "pipeline": {
4
- "build": {
5
- "dependsOn": ["^build"],
6
- "outputs": ["dist/**", ".next/**"]
7
- },
8
- "lint": {
9
- "outputs": []
10
- },
11
- "dev": {
12
- "cache": false
13
- }
14
- }
15
- }