From cbcb402efd0842f3fff685c5fe8af32efd1d1903 Mon Sep 17 00:00:00 2001 From: Charles Kornoelje <33156025+charkour@users.noreply.github.com> Date: Sat, 11 Dec 2021 22:30:29 -0500 Subject: [PATCH 1/4] update docs about engine versions, create npmrc --- .gitignore | 1 + create-turbo/__tests__/cli.test.ts | 2 +- create-turbo/templates/_shared_ts/.npmrc | 1 + create-turbo/templates/_shared_ts/package.json | 4 ++++ docs/pages/docs/getting-started.mdx | 4 +++- 5 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 create-turbo/templates/_shared_ts/.npmrc diff --git a/.gitignore b/.gitignore index 6ec5036cca78b..577fb05780f12 100644 --- a/.gitignore +++ b/.gitignore @@ -49,5 +49,6 @@ store !http_cache/cache/cache.go *.log .npmrc +!create-turbo/templates/**/* todos.md examples/*/*.lock diff --git a/create-turbo/__tests__/cli.test.ts b/create-turbo/__tests__/cli.test.ts index d746e0ea58947..08d9bffe9d054 100644 --- a/create-turbo/__tests__/cli.test.ts +++ b/create-turbo/__tests__/cli.test.ts @@ -25,7 +25,7 @@ describe("create-turbo cli", () => { beforeAll(() => { jest.setTimeout(DEFAULT_JEST_TIMEOUT * 3); if (!fs.existsSync(createTurbo)) { - // TODO: Consider runnuing the build here instead of throwing + // TODO: Consider running the build here instead of throwing throw new Error( `Cannot run Turbrepo CLI tests without building create-turbo` ); diff --git a/create-turbo/templates/_shared_ts/.npmrc b/create-turbo/templates/_shared_ts/.npmrc new file mode 100644 index 0000000000000..4fd021952d5a1 --- /dev/null +++ b/create-turbo/templates/_shared_ts/.npmrc @@ -0,0 +1 @@ +engine-strict=true \ No newline at end of file diff --git a/create-turbo/templates/_shared_ts/package.json b/create-turbo/templates/_shared_ts/package.json index e5c73e27db8f1..56d9d06c09455 100644 --- a/create-turbo/templates/_shared_ts/package.json +++ b/create-turbo/templates/_shared_ts/package.json @@ -34,5 +34,9 @@ "cache": false } } + }, + "engines": { + "npm": ">=7.0.0", + "node": ">=14.0.0" } } diff --git a/docs/pages/docs/getting-started.mdx b/docs/pages/docs/getting-started.mdx index 21eae85ee54aa..5ec4793e3e46e 100644 --- a/docs/pages/docs/getting-started.mdx +++ b/docs/pages/docs/getting-started.mdx @@ -23,7 +23,7 @@ To see more examples and starters, have a look at the [example directory on GitH Turborepo was designed to be incrementally adopted. Adding it to an existing monorepo takes just a few minutes. -Turborepo works with [Yarn v1](https://classic.yarnpkg.com/lang/en/), [NPM](https://npmjs.com), and [PNPM](https://pnpm.io/) workspaces. The `turbo` CLI works on the following operating systems. +Turborepo works with [Yarn v1](https://classic.yarnpkg.com/lang/en/), [NPM](https://npmjs.com), and [PNPM](https://pnpm.io/) workspaces and [Node](https://nodejs.org/en/) v14 or higher. The `turbo` CLI works on the following operating systems. - macOS darwin 64-bit (Intel), Arm 64-bit (Apple Silicon) - Linux 32-bit, 64-bit, Arm, Arm 64-bit, mips64le, ppc64le @@ -46,6 +46,8 @@ yarn add turbo -W --dev npm install turbo -D ``` +The NPM version must be v7 or higher. + ### PNPM ```bash From 440e631abb91f000bffe7f21ed855564bcc6579c Mon Sep 17 00:00:00 2001 From: Charles Kornoelje <33156025+charkour@users.noreply.github.com> Date: Sun, 12 Dec 2021 19:57:16 -0500 Subject: [PATCH 2/4] revert docs --- docs/pages/docs/getting-started.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/pages/docs/getting-started.mdx b/docs/pages/docs/getting-started.mdx index a8d3e674bb2c6..b50329968a631 100644 --- a/docs/pages/docs/getting-started.mdx +++ b/docs/pages/docs/getting-started.mdx @@ -23,7 +23,7 @@ To see more examples and starters, have a look at the [examples directory on Git Turborepo was designed to be incrementally adopted. Adding it to an existing monorepo takes just a few minutes. -Turborepo works with [Yarn v1](https://classic.yarnpkg.com/lang/en/), [NPM](https://npmjs.com), and [PNPM](https://pnpm.io/) workspaces and [Node](https://nodejs.org/en/) v14 or higher. The `turbo` CLI works on the following operating systems. +Turborepo works with [Yarn v1](https://classic.yarnpkg.com/lang/en/), [NPM](https://npmjs.com), and [PNPM](https://pnpm.io/) workspaces. The `turbo` CLI works on the following operating systems. - macOS darwin 64-bit (Intel), Arm 64-bit (Apple Silicon) - Linux 32-bit, 64-bit, Arm, Arm 64-bit, mips64le, ppc64le @@ -46,8 +46,6 @@ yarn add turbo -W --dev npm install turbo -D ``` -The NPM version must be v7 or higher. - ### PNPM ```bash From 2b4c6f8f3e6bac3f410068f6455aa0024b72ddda Mon Sep 17 00:00:00 2001 From: Charles Kornoelje <33156025+charkour@users.noreply.github.com> Date: Sun, 12 Dec 2021 20:26:24 -0500 Subject: [PATCH 3/4] add pnpm engine version in create-turbo --- create-turbo/templates/_shared_ts/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/create-turbo/templates/_shared_ts/package.json b/create-turbo/templates/_shared_ts/package.json index 43e9817e82a9f..dcf468f4c193e 100644 --- a/create-turbo/templates/_shared_ts/package.json +++ b/create-turbo/templates/_shared_ts/package.json @@ -37,6 +37,7 @@ }, "engines": { "npm": ">=7.0.0", + "pnpm": ">=3.7.0", "node": ">=14.0.0" } } From 3c61ec74d2c50b8f5b6d46970e746584acf7b7ee Mon Sep 17 00:00:00 2001 From: Charles Kornoelje <33156025+charkour@users.noreply.github.com> Date: Sun, 12 Dec 2021 20:26:52 -0500 Subject: [PATCH 4/4] fix with-turbo example package.json --- examples/with-pnpm/package.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/with-pnpm/package.json b/examples/with-pnpm/package.json index 53652f7286d3a..fda247104b2d6 100644 --- a/examples/with-pnpm/package.json +++ b/examples/with-pnpm/package.json @@ -2,6 +2,11 @@ "name": "turborepo-with-pnpm", "version": "0.0.0", "private": true, + "scripts": { + "build": "turbo run build", + "dev": "turbo run dev --parallel", + "lint": "turbo run lint" + }, "devDependencies": { "turbo": "latest" }, @@ -18,6 +23,9 @@ }, "lint": { "outputs": [] + }, + "dev": { + "cache": false } } }