From 48d676270c6e3169e32fd87e5e8ffefe55f57968 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:55:55 -0500 Subject: [PATCH 1/4] release(turborepo): 2.3.0 (#9437) Co-authored-by: Turbobot --- packages/create-turbo/package.json | 2 +- packages/eslint-config-turbo/package.json | 2 +- packages/eslint-plugin-turbo/package.json | 2 +- packages/turbo-codemod/package.json | 2 +- packages/turbo-gen/package.json | 2 +- packages/turbo-ignore/package.json | 2 +- packages/turbo-types/package.json | 2 +- packages/turbo-workspaces/package.json | 2 +- packages/turbo/package.json | 14 +++++++------- version.txt | 4 ++-- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/create-turbo/package.json b/packages/create-turbo/package.json index 8b20bce20dd06..55eeea3f03846 100644 --- a/packages/create-turbo/package.json +++ b/packages/create-turbo/package.json @@ -1,6 +1,6 @@ { "name": "create-turbo", - "version": "2.2.4-canary.10", + "version": "2.3.0", "description": "Create a new Turborepo", "homepage": "https://turbo.build/repo", "license": "MIT", diff --git a/packages/eslint-config-turbo/package.json b/packages/eslint-config-turbo/package.json index 80c1094f813b2..a04f585664138 100644 --- a/packages/eslint-config-turbo/package.json +++ b/packages/eslint-config-turbo/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-turbo", - "version": "2.2.4-canary.10", + "version": "2.3.0", "description": "ESLint config for Turborepo", "repository": { "type": "git", diff --git a/packages/eslint-plugin-turbo/package.json b/packages/eslint-plugin-turbo/package.json index f37dc918dae59..5e725f61776c4 100644 --- a/packages/eslint-plugin-turbo/package.json +++ b/packages/eslint-plugin-turbo/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-turbo", - "version": "2.2.4-canary.10", + "version": "2.3.0", "description": "ESLint plugin for Turborepo", "keywords": [ "turbo", diff --git a/packages/turbo-codemod/package.json b/packages/turbo-codemod/package.json index b8424f724324c..b373a11b84d5a 100644 --- a/packages/turbo-codemod/package.json +++ b/packages/turbo-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@turbo/codemod", - "version": "2.2.4-canary.10", + "version": "2.3.0", "description": "Provides Codemod transformations to help upgrade your Turborepo codebase when a feature is deprecated.", "homepage": "https://turbo.build/repo", "license": "MIT", diff --git a/packages/turbo-gen/package.json b/packages/turbo-gen/package.json index 726b599b0e1e5..92f9d3480ca31 100644 --- a/packages/turbo-gen/package.json +++ b/packages/turbo-gen/package.json @@ -1,6 +1,6 @@ { "name": "@turbo/gen", - "version": "2.2.4-canary.10", + "version": "2.3.0", "description": "Extend a Turborepo", "homepage": "https://turbo.build/repo", "license": "MIT", diff --git a/packages/turbo-ignore/package.json b/packages/turbo-ignore/package.json index 567cdbd7d9b71..f5cad3904796e 100644 --- a/packages/turbo-ignore/package.json +++ b/packages/turbo-ignore/package.json @@ -1,6 +1,6 @@ { "name": "turbo-ignore", - "version": "2.2.4-canary.10", + "version": "2.3.0", "description": "", "homepage": "https://turbo.build/repo", "keywords": [], diff --git a/packages/turbo-types/package.json b/packages/turbo-types/package.json index 93e1a8e6ea57f..162bc7fdd2139 100644 --- a/packages/turbo-types/package.json +++ b/packages/turbo-types/package.json @@ -1,6 +1,6 @@ { "name": "@turbo/types", - "version": "2.2.4-canary.10", + "version": "2.3.0", "description": "Turborepo types", "homepage": "https://turbo.build/repo", "license": "MIT", diff --git a/packages/turbo-workspaces/package.json b/packages/turbo-workspaces/package.json index 898f6e445bda0..bb84016b934a8 100644 --- a/packages/turbo-workspaces/package.json +++ b/packages/turbo-workspaces/package.json @@ -1,6 +1,6 @@ { "name": "@turbo/workspaces", - "version": "2.2.4-canary.10", + "version": "2.3.0", "description": "Tools for working with package managers", "homepage": "https://turbo.build/repo", "license": "MIT", diff --git a/packages/turbo/package.json b/packages/turbo/package.json index 7e97b4b2d89e3..f8902ef579fbd 100644 --- a/packages/turbo/package.json +++ b/packages/turbo/package.json @@ -1,6 +1,6 @@ { "name": "turbo", - "version": "2.2.4-canary.10", + "version": "2.3.0", "description": "Turborepo is a high-performance build system for JavaScript and TypeScript codebases.", "repository": "https://github.com/vercel/turborepo", "bugs": "https://github.com/vercel/turborepo/issues", @@ -17,11 +17,11 @@ "bin" ], "optionalDependencies": { - "turbo-darwin-64": "2.2.4-canary.10", - "turbo-darwin-arm64": "2.2.4-canary.10", - "turbo-linux-64": "2.2.4-canary.10", - "turbo-linux-arm64": "2.2.4-canary.10", - "turbo-windows-64": "2.2.4-canary.10", - "turbo-windows-arm64": "2.2.4-canary.10" + "turbo-darwin-64": "2.3.0", + "turbo-darwin-arm64": "2.3.0", + "turbo-linux-64": "2.3.0", + "turbo-linux-arm64": "2.3.0", + "turbo-windows-64": "2.3.0", + "turbo-windows-arm64": "2.3.0" } } diff --git a/version.txt b/version.txt index aed551b65b9f2..89d1e6680d2a1 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ -2.2.4-canary.10 -canary +2.3.0 +latest From e680dabb774b3f3b8024683ebb565ed52c1edbb4 Mon Sep 17 00:00:00 2001 From: Chris Olszewski Date: Thu, 14 Nov 2024 13:59:41 -0500 Subject: [PATCH 2/4] fix(windows): fix env var glob casing (#9429) ### Description In https://github.com/vercel/turborepo/issues/9424 a user had `path` as their Windows env var instead of `Path` or `PATH`. On Windows environment variables are case insensitive e.g. `process.env.PATH` and `process.env.Path` would both return the same. While fetching them might be the same [`std::env::vars`](https://doc.rust-lang.org/std/env/fn.vars.html) returns the environment variable names cased as they were declared even though [`std::env::var`](https://doc.rust-lang.org/std/env/fn.var.html) is case insensitive on Windows. Take for example the following code: ``` for (key, value) in std::env::vars() { println!("{key}: {value}"); let lowercase = key.to_ascii_lowercase(); println!("{lowercase}: {:?}", std::env::var(&lowercase)); } ``` On Windows it outputs: ``` ... PUBLIC: C:\Users\Public public: Ok("C:\\Users\\Public") SESSIONNAME: Console sessionname: Ok("Console") SystemDrive: C: systemdrive: Ok("C:") SystemRoot: C:\WINDOWS systemroot: Ok("C:\\WINDOWS") TEMP: C:\Users\Chris\AppData\Local\Temp temp: Ok("C:\\Users\\Chris\\AppData\\Local\\Temp") TMP: C:\Users\Chris\AppData\Local\Temp tmp: Ok("C:\\Users\\Chris\\AppData\\Local\\Temp") ``` On macOs it outputs: ``` ... TMPDIR: /var/folders/3m/rxkycvgs5jgfvs0k9xcgp6km0000gn/T/ tmpdir: Err(NotPresent) TMUX: /private/tmp/tmux-501/default,3104,0 tmux: Err(NotPresent) TMUX_PANE: %4 tmux_pane: Err(NotPresent) USER: olszewski user: Err(NotPresent) USER_ZDOTDIR: /Users/olszewski user_zdotdir: Err(NotPresent) ``` Previously we had special casing for well known Windows env vars that were set differently between Command Prompt and Powershell, but would break if a user overwrote `Path` or `PATH` to `path`. This was brittle and a correct solution would require that we include all casing variations of all environment variables and users would also need to know how env vars were declared on their Windows system. This fix is to make our env var wildcard handling case in ### Testing Instructions Added unit test to make sure we --- crates/turborepo-env/src/lib.rs | 28 ++++++++++++++++++++++++--- crates/turborepo-lib/src/task_hash.rs | 6 ------ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/crates/turborepo-env/src/lib.rs b/crates/turborepo-env/src/lib.rs index 938aff039f252..177955a6fe809 100644 --- a/crates/turborepo-env/src/lib.rs +++ b/crates/turborepo-env/src/lib.rs @@ -6,7 +6,7 @@ use std::{ ops::{Deref, DerefMut}, }; -use regex::Regex; +use regex::RegexBuilder; use serde::Serialize; use sha2::{Digest, Sha256}; use thiserror::Error; @@ -180,8 +180,13 @@ impl EnvironmentVariableMap { let include_regex_string = format!("^({})$", include_patterns.join("|")); let exclude_regex_string = format!("^({})$", exclude_patterns.join("|")); - let include_regex = Regex::new(&include_regex_string)?; - let exclude_regex = Regex::new(&exclude_regex_string)?; + let case_insensitive = cfg!(windows); + let include_regex = RegexBuilder::new(&include_regex_string) + .case_insensitive(case_insensitive) + .build()?; + let exclude_regex = RegexBuilder::new(&exclude_regex_string) + .case_insensitive(case_insensitive) + .build()?; for (env_var, env_value) in &self.0 { if !include_patterns.is_empty() && include_regex.is_match(env_var) { output.inclusions.insert(env_var.clone(), env_value.clone()); @@ -304,6 +309,8 @@ pub fn get_global_hashable_env_vars( mod tests { use test_case::test_case; + use super::*; + #[test_case("LITERAL_\\*", "LITERAL_\\*" ; "literal star")] #[test_case("\\*LEADING", "\\*LEADING" ; "leading literal star")] #[test_case("\\!LEADING", "\\\\!LEADING" ; "leading literal bang")] @@ -313,4 +320,19 @@ mod tests { let actual = super::wildcard_to_regex_pattern(pattern); assert_eq!(actual, expected); } + + #[test] + fn test_case_sensitivity() { + let start = EnvironmentVariableMap( + vec![("Turbo".to_string(), "true".to_string())] + .into_iter() + .collect(), + ); + let actual = start.from_wildcards(&["TURBO"]).unwrap(); + if cfg!(windows) { + assert_eq!(actual.get("Turbo").map(|s| s.as_str()), Some("true")); + } else { + assert_eq!(actual.get("Turbo"), None); + } + } } diff --git a/crates/turborepo-lib/src/task_hash.rs b/crates/turborepo-lib/src/task_hash.rs index 9bedc108e5129..1e5b717b87e70 100644 --- a/crates/turborepo-lib/src/task_hash.rs +++ b/crates/turborepo-lib/src/task_hash.rs @@ -506,12 +506,6 @@ impl<'a> TaskHasher<'a> { "PROGRAMDATA", "SYSTEMROOT", "SYSTEMDRIVE", - // Powershell casing of env variables - "Path", - "ProgramData", - "SystemRoot", - "AppData", - "SystemDrive", ])?; let tracker_env = self .task_hash_tracker From f4be2daca5b588131fac30b7f5be4c0ad0f13756 Mon Sep 17 00:00:00 2001 From: Jeremy Nguyen Date: Thu, 14 Nov 2024 11:58:31 -0800 Subject: [PATCH 3/4] chore(linting): implement ESLint flat config compatibility for `eslint-plugin-turbo` (#9426) ### Description - Add "flat/recommended" config to `eslint-plugin-turbo` - Add `meta` property to plugin - Update README.md accordingly with information on using flat config - Add tests for flat config in `__tests__/cwdFlat.test.ts` ### Testing Instructions Run the following command: ```shell pnpm run test --filter=eslint-plugin-turbo ``` See vercel/turborepo#8606 Co-authored-by: Anthony Shew --- packages/eslint-plugin-turbo/README.md | 55 ++++- .../__fixtures__/workspace/eslint.config.js | 3 + .../eslint-plugin-turbo/__tests__/cwd.test.ts | 9 + .../__tests__/cwdFlat.test.ts | 188 ++++++++++++++++++ .../lib/configs/flat/recommended.ts | 19 ++ .../lib/configs/recommended.ts | 3 +- packages/eslint-plugin-turbo/lib/index.ts | 29 ++- packages/eslint-plugin-turbo/package.json | 2 +- pnpm-lock.yaml | 19 +- 9 files changed, 300 insertions(+), 27 deletions(-) create mode 100644 packages/eslint-plugin-turbo/__fixtures__/workspace/eslint.config.js create mode 100644 packages/eslint-plugin-turbo/__tests__/cwdFlat.test.ts create mode 100644 packages/eslint-plugin-turbo/lib/configs/flat/recommended.ts diff --git a/packages/eslint-plugin-turbo/README.md b/packages/eslint-plugin-turbo/README.md index 83627a1e77d57..21299b643f0f8 100644 --- a/packages/eslint-plugin-turbo/README.md +++ b/packages/eslint-plugin-turbo/README.md @@ -1,6 +1,6 @@ # `eslint-plugin-turbo` -Ease configuration for Turborepo +Easy ESLint configuration for Turborepo ## Installation @@ -16,7 +16,7 @@ npm install eslint --save-dev npm install eslint-plugin-turbo --save-dev ``` -## Usage +## Usage (Legacy `eslintrc*`) Add `turbo` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix: @@ -36,7 +36,7 @@ Then configure the rules you want to use under the rules section. } ``` -### Example +## Example (Legacy `eslintrc*`) ```json { @@ -51,3 +51,52 @@ Then configure the rules you want to use under the rules section. } } ``` + +## Usage (Flat Config `eslint.config.js`) + +In ESLint v8, both the legacy system and the new flat config system are supported. In ESLint v9, only the new system will be supported. See the [official ESLint docs](https://eslint.org/docs/latest/use/configure/configuration-files). + +```js +import turbo from "eslint-plugin-turbo"; + +export default [turbo.configs["flat/recommended"]]; +``` + +Otherwise, you may configure the rules you want to use under the rules section. + +```js +import turbo from "eslint-plugin-turbo"; + +export default [ + { + plugins: { + turbo, + }, + rules: { + "turbo/no-undeclared-env-vars": "error", + }, + }, +]; +``` + +## Example (Flat Config `eslint.config.js`) + +```js +import turbo from "eslint-plugin-turbo"; + +export default [ + { + plugins: { + turbo, + }, + rules: { + "turbo/no-undeclared-env-vars": [ + "error", + { + allowList: ["^ENV_[A-Z]+$"], + }, + ], + }, + }, +]; +``` diff --git a/packages/eslint-plugin-turbo/__fixtures__/workspace/eslint.config.js b/packages/eslint-plugin-turbo/__fixtures__/workspace/eslint.config.js new file mode 100644 index 0000000000000..c4460d5e152f6 --- /dev/null +++ b/packages/eslint-plugin-turbo/__fixtures__/workspace/eslint.config.js @@ -0,0 +1,3 @@ +const turbo = require("eslint-plugin-turbo"); + +module.exports = [turbo.configs["flat/recommended"]]; diff --git a/packages/eslint-plugin-turbo/__tests__/cwd.test.ts b/packages/eslint-plugin-turbo/__tests__/cwd.test.ts index e7f32a3a15873..f559711127149 100644 --- a/packages/eslint-plugin-turbo/__tests__/cwd.test.ts +++ b/packages/eslint-plugin-turbo/__tests__/cwd.test.ts @@ -5,6 +5,11 @@ import { parse, stringify } from "json5"; import { setupTestFixtures } from "@turbo/test-utils"; import { describe, it, expect } from "@jest/globals"; +const env: NodeJS.ProcessEnv = { + ...process.env, + ESLINT_USE_FLAT_CONFIG: "false", +}; + describe("eslint settings check", () => { const { useFixture } = setupTestFixtures({ directory: path.join(__dirname, "../"), @@ -17,6 +22,7 @@ describe("eslint settings check", () => { const configString = execSync(`npm exec eslint -- --print-config peer.js`, { cwd, encoding: "utf8", + env, }); const configJson: Record = parse(configString); @@ -76,6 +82,7 @@ describe("eslint settings check", () => { { cwd, encoding: "utf8", + env, } ); const configJson: Record = parse(configString); @@ -144,6 +151,7 @@ describe("eslint cache is busted", () => { execSync(`npm exec eslint -- --format=json child.js`, { cwd, encoding: "utf8", + env, }); } catch (error: unknown) { const outputJson: Record = parse( @@ -172,6 +180,7 @@ describe("eslint cache is busted", () => { const output = execSync(`npm exec eslint -- --format=json child.js`, { cwd, encoding: "utf8", + env, }); const outputJson: Record = parse(output); expect(outputJson).toMatchObject([{ errorCount: 0 }]); diff --git a/packages/eslint-plugin-turbo/__tests__/cwdFlat.test.ts b/packages/eslint-plugin-turbo/__tests__/cwdFlat.test.ts new file mode 100644 index 0000000000000..09e7fbe5f84cc --- /dev/null +++ b/packages/eslint-plugin-turbo/__tests__/cwdFlat.test.ts @@ -0,0 +1,188 @@ +import path from "node:path"; +import { execSync } from "node:child_process"; +import { type Schema } from "@turbo/types"; +import { parse, stringify } from "json5"; +import { setupTestFixtures } from "@turbo/test-utils"; +import { describe, it, expect } from "@jest/globals"; + +const env: NodeJS.ProcessEnv = { + ...process.env, + ESLINT_USE_FLAT_CONFIG: "true", +}; + +describe("flat eslint settings check", () => { + const { useFixture } = setupTestFixtures({ + directory: path.join(__dirname, "../"), + }); + + it("does the right thing for peers", () => { + const { root: cwd } = useFixture({ fixture: "workspace" }); + execSync(`npm install`, { cwd }); + + const configString = execSync(`npm exec eslint -- --print-config peer.js`, { + cwd, + encoding: "utf8", + env, + }); + const configJson: Record = parse(configString); + + expect(configJson.settings).toEqual({ + turbo: { + cacheKey: { + global: { + legacyConfig: [], + env: ["CI", "UNORDERED"], + passThroughEnv: null, + dotEnv: { + filePaths: [".env", "missing.env"], + hashes: { + ".env": "9ad6c5fd4d5bbe7c00e1f2b358ac7ef2aa3521d0", + }, + }, + }, + globalTasks: { + build: { + legacyConfig: [], + env: [], + passThroughEnv: null, + dotEnv: null, + }, + test: { + legacyConfig: [], + env: [], + passThroughEnv: null, + dotEnv: null, + }, + lint: { + legacyConfig: [], + env: [], + passThroughEnv: null, + dotEnv: null, + }, + deploy: { + legacyConfig: [], + env: [], + passThroughEnv: null, + dotEnv: null, + }, + }, + workspaceTasks: {}, + }, + }, + }); + }); + + it("does the right thing for child dirs", () => { + const { root } = useFixture({ fixture: "workspace" }); + execSync(`npm install`, { cwd: root }); + + const cwd = path.join(root, "child"); + const configString = execSync( + `npm exec eslint -- --print-config child.js`, + { + cwd, + encoding: "utf8", + env, + } + ); + const configJson: Record = parse(configString); + + expect(configJson.settings).toEqual({ + turbo: { + cacheKey: { + global: { + legacyConfig: [], + env: ["CI", "UNORDERED"], + passThroughEnv: null, + dotEnv: { + filePaths: [".env", "missing.env"], + hashes: { + ".env": "9ad6c5fd4d5bbe7c00e1f2b358ac7ef2aa3521d0", + }, + }, + }, + globalTasks: { + build: { + legacyConfig: [], + env: [], + passThroughEnv: null, + dotEnv: null, + }, + test: { + legacyConfig: [], + env: [], + passThroughEnv: null, + dotEnv: null, + }, + lint: { + legacyConfig: [], + env: [], + passThroughEnv: null, + dotEnv: null, + }, + deploy: { + legacyConfig: [], + env: [], + passThroughEnv: null, + dotEnv: null, + }, + }, + workspaceTasks: {}, + }, + }, + }); + }); +}); + +describe("flat eslint cache is busted", () => { + const { useFixture } = setupTestFixtures({ + directory: path.join(__dirname, "../"), + }); + + it("catches a lint error after changing config", () => { + expect.assertions(2); + + // ensure that we populate the cache with a failure. + const { root, readJson, write } = useFixture({ fixture: "workspace" }); + execSync(`npm install`, { cwd: root }); + + const cwd = path.join(root, "child"); + try { + execSync(`npm exec eslint -- --format=json child.js`, { + cwd, + encoding: "utf8", + env, + }); + } catch (error: unknown) { + const outputJson: Record = parse( + (error as { stdout: string }).stdout + ); + expect(outputJson).toMatchObject([ + { + messages: [ + { + message: + "NONEXISTENT is not listed as a dependency in turbo.json", + }, + ], + }, + ]); + } + + // change the configuration + const turboJson = readJson("turbo.json"); + if (turboJson && "globalEnv" in turboJson) { + turboJson.globalEnv = ["CI", "NONEXISTENT"]; + write("turbo.json", stringify(turboJson, null, 2)); + } + + // test that we invalidated the eslint cache + const output = execSync(`npm exec eslint -- --format=json child.js`, { + cwd, + encoding: "utf8", + env, + }); + const outputJson: Record = parse(output); + expect(outputJson).toMatchObject([{ errorCount: 0 }]); + }); +}); diff --git a/packages/eslint-plugin-turbo/lib/configs/flat/recommended.ts b/packages/eslint-plugin-turbo/lib/configs/flat/recommended.ts new file mode 100644 index 0000000000000..c93de95988016 --- /dev/null +++ b/packages/eslint-plugin-turbo/lib/configs/flat/recommended.ts @@ -0,0 +1,19 @@ +import type { Linter } from "eslint"; +import { RULES } from "../../constants"; +import { Project } from "../../utils/calculate-inputs"; + +const project = new Project(process.cwd()); +const cacheKey = project.valid() ? project.key() : Math.random(); + +const config = { + rules: { + [`turbo/${RULES.noUndeclaredEnvVars}`]: "error", + }, + settings: { + turbo: { + cacheKey, + }, + }, +} satisfies Linter.FlatConfig; + +export default config; diff --git a/packages/eslint-plugin-turbo/lib/configs/recommended.ts b/packages/eslint-plugin-turbo/lib/configs/recommended.ts index 9b34d367f286f..fe495e382b6e9 100644 --- a/packages/eslint-plugin-turbo/lib/configs/recommended.ts +++ b/packages/eslint-plugin-turbo/lib/configs/recommended.ts @@ -1,3 +1,4 @@ +import type { Linter } from "eslint"; import { RULES } from "../constants"; import { Project } from "../utils/calculate-inputs"; @@ -16,6 +17,6 @@ const config = { rules: { [`turbo/${RULES.noUndeclaredEnvVars}`]: "error", }, -}; +} satisfies Linter.Config; export default config; diff --git a/packages/eslint-plugin-turbo/lib/index.ts b/packages/eslint-plugin-turbo/lib/index.ts index 44bd9013f327b..2c9418f3405b5 100644 --- a/packages/eslint-plugin-turbo/lib/index.ts +++ b/packages/eslint-plugin-turbo/lib/index.ts @@ -1,13 +1,28 @@ +import type { ESLint } from "eslint"; +import { name, version } from "../package.json"; import { RULES } from "./constants"; import noUndeclaredEnvVars from "./rules/no-undeclared-env-vars"; import recommended from "./configs/recommended"; +import flatRecommended from "./configs/flat/recommended"; -const rules = { - [RULES.noUndeclaredEnvVars]: noUndeclaredEnvVars, -}; +const plugin = { + meta: { name, version }, + rules: { + [RULES.noUndeclaredEnvVars]: noUndeclaredEnvVars, + }, + configs: { + recommended, + "flat/recommended": { + ...flatRecommended, + plugins: { + get turbo(): ESLint.Plugin { + return plugin; + }, + }, + }, + }, +} satisfies ESLint.Plugin; -const configs = { - recommended, -}; +export const { rules, configs } = plugin; -export { rules, configs }; +export default plugin; diff --git a/packages/eslint-plugin-turbo/package.json b/packages/eslint-plugin-turbo/package.json index 5e725f61776c4..ee2cbba3b3906 100644 --- a/packages/eslint-plugin-turbo/package.json +++ b/packages/eslint-plugin-turbo/package.json @@ -41,7 +41,7 @@ "@turbo/tsconfig": "workspace:*", "@turbo/types": "workspace:*", "@turbo/utils": "workspace:*", - "@types/eslint": "^8.4.5", + "@types/eslint": "^8.44.2", "@types/estree": "^1.0.0", "@types/node": "^18.17.2", "jest": "^29.7.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c25a384b0061b..392d77737c3c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -211,8 +211,8 @@ importers: specifier: workspace:* version: link:../turbo-utils '@types/eslint': - specifier: ^8.4.5 - version: 8.4.6 + specifier: ^8.44.2 + version: 8.44.2 '@types/estree': specifier: ^1.0.0 version: 1.0.0 @@ -2903,13 +2903,6 @@ packages: resolution: {integrity: sha512-uw8eYMIReOwstQ0QKF0sICefSy8cNO/v7gOTiIy9SbwuHyEecJUm7qlgueOO5S1udZ5I/irVydHVwMchgzbKTg==} dev: true - /@types/eslint@8.4.6: - resolution: {integrity: sha512-/fqTbjxyFUaYNO7VcW5g+4npmqVACz1bB7RTHYuLj+PRjw9hrCwrUXVQFpChUS0JsyEFvMZ7U/PfmvWgxJhI9g==} - dependencies: - '@types/estree': 1.0.0 - '@types/json-schema': 7.0.11 - dev: true - /@types/eslint@8.44.2: resolution: {integrity: sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg==} dependencies: @@ -3011,10 +3004,6 @@ packages: resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} dev: true - /@types/json-schema@7.0.12: - resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} - dev: true - /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true @@ -3329,7 +3318,7 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0) - '@types/json-schema': 7.0.12 + '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 @@ -3349,7 +3338,7 @@ packages: eslint: ^7.0.0 || ^8.0.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0) - '@types/json-schema': 7.0.12 + '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.18.1 '@typescript-eslint/types': 6.18.1 From 5d1ecc371da9c6a72e75ff24436d600f1e83b523 Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Thu, 14 Nov 2024 14:14:53 -0700 Subject: [PATCH 4/4] chore: Update bug issue template. (#9438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Description Updating our bug issue template to include `turbo info`, among other assorted changes. ### Testing Instructions 👀 --- .../ISSUE_TEMPLATE/0-turborepo-bug-report.yml | 57 ++++++------------- 1 file changed, 18 insertions(+), 39 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/0-turborepo-bug-report.yml b/.github/ISSUE_TEMPLATE/0-turborepo-bug-report.yml index e1af654abf418..b4dbdc827ea13 100644 --- a/.github/ISSUE_TEMPLATE/0-turborepo-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/0-turborepo-bug-report.yml @@ -1,11 +1,12 @@ name: Turborepo Bug Report -description: Create a bug report for the Turborepo core team +description: Create a bug report labels: ["kind: bug", "needs: triage"] +title: "🐛 " body: - type: markdown attributes: value: | - This template is to report Turborepo bugs. Before opening a new issue, please do a [search](https://github.com/vercel/turborepo/issues) of existing issues and :+1: upvote the existing issue instead. This will result in a quicker resolution. + This template is to report bugs. Before opening a new issue, please do a [search](https://github.com/vercel/turborepo/issues) of existing issues and :+1: upvote the existing issue instead. This will result in a quicker resolution. If you need help with your own project, you can: - Start a discussion in the ["Help" section](https://github.com/vercel/turborepo/discussions/categories/help). @@ -23,34 +24,7 @@ body: attributes: label: Link to code that reproduces this issue description: | - A link to a **public** GitHub repository with a minimal reproduction. Ideally, minimal reproductions should be created using [`npx create-turbo@canary -e with-shell-commands`](https://github.com/vercel/turborepo/tree/main/examples/with-shell-commands) and should include only changes that contribute to the issue. You may also use [`npx create-turbo@canary -e <example-name>`](https://github.com/vercel/turborepo/tree/main/examples) to create a reproduction that includes frameworks if you believe your bug requires a framework to reproduce. - validations: - required: true - - - type: dropdown - id: packageManager - attributes: - multiple: true - label: What package manager are you using / does the bug impact? - description: | - You can quickly check different package managers in your reproduction using `npx turbo/workspaces convert`. - options: - - npm - - pnpm - - Yarn v1 - - Yarn v2/v3/v4 (node_modules linker only) - validations: - required: true - - - type: dropdown - id: os - attributes: - label: What operating system are you using? - options: - - Mac - - Windows - - Linux - - Other + A link to a **public** GitHub repository with a minimal reproduction. Ideally, minimal reproductions should be created using [`npx create-turbo@canary -e with-shell-commands`](https://github.com/vercel/turborepo/tree/main/examples/with-shell-commands) and should include only changes that contribute to the issue. You may also use [`npx create-turbo@canary -e <example-name>`](https://github.com/vercel/turborepo/tree/main/examples) to create a reproduction that includes frameworks if you believe your bug requires a specific framework to reproduce. validations: required: true @@ -64,17 +38,24 @@ body: - type: textarea attributes: - label: Describe the Bug + label: Enviroment information + render: block description: | - A clear and concise description of the bug. + Run the command `turbo info` and paste its output here. Please review it in case there is sensitive information you don't want to share. + + - type: textarea + attributes: + label: Expected behavior + description: | + A clear and concise description of what you expected to happen. validations: required: true - type: textarea attributes: - label: Expected Behavior + label: Actual behavior description: | - A clear and concise description of what you expected to happen. + A clear and concise description of the bug. validations: required: true @@ -82,22 +63,20 @@ body: attributes: label: To Reproduce description: | - Steps to reproduce the unexpected behavior. Please provide a clear code snippets that always reproduces the issue or a GitHub repository. Screenshots can be provided in the issue body below. + Steps to reproduce the unexpected behavior. Please provide clear code snippets that always reproduces the issue or a GitHub repository. Screenshots can be provided in "Additional context" below. validations: required: true - type: markdown attributes: value: | - Another way you can help the maintainers is to pinpoint the `canary` version of `turbo` that introduced the issue. Check out our [releases](https://github.com/vercel/turborepo/releases), and try to find the first `canary` release that introduced the issue. This will help us narrow down the scope of the issue, and possibly point to the PR/code change that introduced it. You can install a specific version of `turbo` by running `npm install turbo@<version>`. + Another way you can help the maintainers is to pinpoint the `canary` version of `turbo` that introduced the issue. Check out our [releases](https://github.com/vercel/turborepo/releases), and try to find the first `canary` release that introduced the issue. While not required, this will help us narrow down the scope of the issue, and possibly point to the PR/code change that introduced it. You can install a specific version of `turbo` by running `npm install turbo@<version>`. - type: textarea attributes: label: Additional context description: | Any extra information that might help us investigate. For example, where are you deploying your application (Vercel, Docker, other platform)? Is it only reproducible on that platform, or locally too? Is the issue only happening in a specific browser? etc. placeholder: | - I tested my reproduction against different canary releases, and the first one that introduced the bug was "1.10.4-canary.2", since reverting to "1.10.4-canary.1" works. - + I tested my reproduction against different canary releases, and the first one that introduced the bug was "2.2.4-canary.2", since reverting to "2.3.4-canary.1" works. or - I am using GitHub Actions but running my tasks locally does not have the same issue.