From 02b1c7a286269739588b09578eb4017f889067b2 Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Mon, 11 Nov 2024 19:34:46 -0600 Subject: [PATCH 1/8] Refactor prettier formatting to run from root --- .prettierignore | 11 +- package-scripts.js | 13 -- package.json | 118 ++++++------------ packages/victory-area/package.json | 28 ----- packages/victory-axis/package.json | 28 ----- packages/victory-bar/package.json | 28 ----- packages/victory-box-plot/package.json | 28 ----- packages/victory-brush-container/package.json | 28 ----- packages/victory-brush-line/package.json | 28 ----- packages/victory-candlestick/package.json | 28 ----- packages/victory-canvas/package.json | 28 ----- packages/victory-chart/package.json | 28 ----- packages/victory-core/package.json | 28 ----- .../victory-create-container/package.json | 28 ----- .../victory-cursor-container/package.json | 28 ----- packages/victory-errorbar/package.json | 28 ----- packages/victory-group/package.json | 28 ----- packages/victory-histogram/package.json | 28 ----- packages/victory-legend/package.json | 28 ----- packages/victory-line/package.json | 28 ----- packages/victory-pie/package.json | 28 ----- packages/victory-polar-axis/package.json | 28 ----- packages/victory-scatter/package.json | 28 ----- .../victory-selection-container/package.json | 28 ----- packages/victory-shared-events/package.json | 28 ----- packages/victory-stack/package.json | 28 ----- packages/victory-tooltip/package.json | 28 ----- packages/victory-vendor/package.json | 28 ----- .../victory-voronoi-container/package.json | 28 ----- packages/victory-voronoi/package.json | 28 ----- packages/victory-zoom-container/package.json | 28 ----- packages/victory/package.json | 28 ----- scripts/sync-pkgs-wireit-helpers.js | 19 --- 33 files changed, 44 insertions(+), 929 deletions(-) diff --git a/.prettierignore b/.prettierignore index 85814a27d..6570797cc 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,8 @@ +.cache +.changeset +.expo +.storybook +.wireit .vscode coverage dist @@ -10,12 +15,12 @@ node_modules npm-debug.log* lerna-debug.log* yarn-error.log* -.cache lerna.json tsconfig.json tsconfig.*.json storybook-static public artifacts -.expo -.wireit +stories +demo +website diff --git a/package-scripts.js b/package-scripts.js index 36ea7d02f..fe1bd06a7 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -39,19 +39,6 @@ module.exports = { "build:dist:min": "webpack --bail --config ../../config/webpack/webpack.config.js", - // Quality. - // - Format - // TODO(2375): Can we cache / incremental? - // https://github.com/FormidableLabs/victory/issues/2375 - "format:pkg": - 'prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --list-different "./**/*.{js,jsx,json,ts,tsx}"', - "format:pkg:fix": - 'prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --write "./**/*.{js,jsx,json,ts,tsx}"', - "format:root": - 'prettier --list-different "./*.js*" "./{scripts,config,demo,docs,stories,test}/*.{js,jsx,json,ts,tsx}"', - "format:root:fix": - 'prettier --write "./*.js*" "./{scripts,config,demo,docs,stories,test}/*.{js,jsx,json,ts,tsx}"', - // - TypeScript // TODO(2375): Can we cache / incremental? // https://github.com/FormidableLabs/victory/issues/2375 diff --git a/package.json b/package.json index f7edd53d1..62cc8b981 100644 --- a/package.json +++ b/package.json @@ -143,10 +143,6 @@ "build:docs": "wireit", "format": "wireit", "format:fix": "wireit", - "format:root": "wireit", - "format:root:fix": "wireit", - "format:pkgs": "wireit", - "format:pkgs:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "lint:root": "wireit", @@ -266,86 +262,10 @@ ] }, "format": { - "dependencies": [ - "format:root", - "format:pkgs" - ] + "command": "prettier --config .prettierrc.json --ignore-path .prettierignore --check \"./**/*.{js,jsx,json,ts,tsx}\"" }, "format:fix": { - "dependencies": [ - "format:root:fix", - "format:pkgs:fix" - ] - }, - "format:root": { - "command": "nps format:root", - "files": [ - "*.js", - "*.json", - "scripts", - "config", - "demo", - "docs", - "stories", - "test", - "!**/node_modules/**" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:root:fix": { - "command": "pnpm run format:root || nps format:root:fix", - "files": [ - "*.js", - "*.json", - "scripts", - "config", - "demo", - "docs", - "stories", - "test", - "!**/node_modules/**" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:pkgs": { - "dependencies": [ - "./packages/victory-native:format", - "./packages/victory-vendor:format", - "./packages/victory:format", - "./packages/victory-area:format", - "./packages/victory-axis:format", - "./packages/victory-bar:format", - "./packages/victory-box-plot:format", - "./packages/victory-brush-container:format", - "./packages/victory-brush-line:format", - "./packages/victory-candlestick:format", - "./packages/victory-canvas:format", - "./packages/victory-chart:format", - "./packages/victory-core:format", - "./packages/victory-create-container:format", - "./packages/victory-cursor-container:format", - "./packages/victory-errorbar:format", - "./packages/victory-group:format", - "./packages/victory-histogram:format", - "./packages/victory-legend:format", - "./packages/victory-line:format", - "./packages/victory-pie:format", - "./packages/victory-polar-axis:format", - "./packages/victory-scatter:format", - "./packages/victory-selection-container:format", - "./packages/victory-shared-events:format", - "./packages/victory-stack:format", - "./packages/victory-tooltip:format", - "./packages/victory-voronoi:format", - "./packages/victory-voronoi-container:format", - "./packages/victory-zoom-container:format" - ] + "command": "prettier --config .prettierrc.json --ignore-path .prettierignore --write \"./**/*.{js,jsx,json,ts,tsx}\"" }, "lint": { "dependencies": [ @@ -579,6 +499,40 @@ "dependencies": [ "build:lib:esm" ] + }, + "format:pkgs": { + "dependencies": [ + "./packages/victory-native:format", + "./packages/victory-vendor:format", + "./packages/victory:format", + "./packages/victory-area:format", + "./packages/victory-axis:format", + "./packages/victory-bar:format", + "./packages/victory-box-plot:format", + "./packages/victory-brush-container:format", + "./packages/victory-brush-line:format", + "./packages/victory-candlestick:format", + "./packages/victory-canvas:format", + "./packages/victory-chart:format", + "./packages/victory-core:format", + "./packages/victory-create-container:format", + "./packages/victory-cursor-container:format", + "./packages/victory-errorbar:format", + "./packages/victory-group:format", + "./packages/victory-histogram:format", + "./packages/victory-legend:format", + "./packages/victory-line:format", + "./packages/victory-pie:format", + "./packages/victory-polar-axis:format", + "./packages/victory-scatter:format", + "./packages/victory-selection-container:format", + "./packages/victory-shared-events:format", + "./packages/victory-stack:format", + "./packages/victory-tooltip:format", + "./packages/victory-voronoi:format", + "./packages/victory-voronoi-container:format", + "./packages/victory-zoom-container:format" + ] } }, "dependencies": { diff --git a/packages/victory-area/package.json b/packages/victory-area/package.json index 881510ca1..b7ad141d4 100644 --- a/packages/victory-area/package.json +++ b/packages/victory-area/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -209,32 +207,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-axis/package.json b/packages/victory-axis/package.json index 1d9f5d058..746f1263f 100644 --- a/packages/victory-axis/package.json +++ b/packages/victory-axis/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-bar/package.json b/packages/victory-bar/package.json index ee910faf8..397276940 100644 --- a/packages/victory-bar/package.json +++ b/packages/victory-bar/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -209,32 +207,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-box-plot/package.json b/packages/victory-box-plot/package.json index f84355d53..b25f20f08 100644 --- a/packages/victory-box-plot/package.json +++ b/packages/victory-box-plot/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -209,32 +207,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-brush-container/package.json b/packages/victory-brush-container/package.json index 14364b099..ab15b367a 100644 --- a/packages/victory-brush-container/package.json +++ b/packages/victory-brush-container/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -200,32 +198,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-brush-line/package.json b/packages/victory-brush-line/package.json index 82df22565..3e754ed4e 100644 --- a/packages/victory-brush-line/package.json +++ b/packages/victory-brush-line/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -200,32 +198,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-candlestick/package.json b/packages/victory-candlestick/package.json index 455a30a96..3aba7b05e 100644 --- a/packages/victory-candlestick/package.json +++ b/packages/victory-candlestick/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -204,32 +202,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-canvas/package.json b/packages/victory-canvas/package.json index a5f290fc3..3538ce6f6 100644 --- a/packages/victory-canvas/package.json +++ b/packages/victory-canvas/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -206,32 +204,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-chart/package.json b/packages/victory-chart/package.json index 4d2bcdc16..5755cf1b5 100644 --- a/packages/victory-chart/package.json +++ b/packages/victory-chart/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -221,32 +219,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-core/package.json b/packages/victory-core/package.json index ea237c5fe..ac603118e 100644 --- a/packages/victory-core/package.json +++ b/packages/victory-core/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-create-container/package.json b/packages/victory-create-container/package.json index ee8bd5b98..04d4efb71 100644 --- a/packages/victory-create-container/package.json +++ b/packages/victory-create-container/package.json @@ -47,8 +47,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -234,32 +232,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-cursor-container/package.json b/packages/victory-cursor-container/package.json index b8d438dc3..f618e7826 100644 --- a/packages/victory-cursor-container/package.json +++ b/packages/victory-cursor-container/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-errorbar/package.json b/packages/victory-errorbar/package.json index 5fe5335b1..28b27b717 100644 --- a/packages/victory-errorbar/package.json +++ b/packages/victory-errorbar/package.json @@ -45,8 +45,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -202,32 +200,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-group/package.json b/packages/victory-group/package.json index 9e5a8b148..248c034e7 100644 --- a/packages/victory-group/package.json +++ b/packages/victory-group/package.json @@ -47,8 +47,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -211,32 +209,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-histogram/package.json b/packages/victory-histogram/package.json index 359f9d93f..d565dd380 100644 --- a/packages/victory-histogram/package.json +++ b/packages/victory-histogram/package.json @@ -45,8 +45,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -213,32 +211,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-legend/package.json b/packages/victory-legend/package.json index f107c6345..a8b7b42e0 100644 --- a/packages/victory-legend/package.json +++ b/packages/victory-legend/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-line/package.json b/packages/victory-line/package.json index 175595cb6..3c2a4a0ec 100644 --- a/packages/victory-line/package.json +++ b/packages/victory-line/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -209,32 +207,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-pie/package.json b/packages/victory-pie/package.json index 15822269c..227c5652e 100644 --- a/packages/victory-pie/package.json +++ b/packages/victory-pie/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -205,32 +203,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-polar-axis/package.json b/packages/victory-polar-axis/package.json index 824336992..fdce3674b 100644 --- a/packages/victory-polar-axis/package.json +++ b/packages/victory-polar-axis/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-scatter/package.json b/packages/victory-scatter/package.json index 52b92e7b2..ccf840b92 100644 --- a/packages/victory-scatter/package.json +++ b/packages/victory-scatter/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-selection-container/package.json b/packages/victory-selection-container/package.json index bbd008e35..ebb257b44 100644 --- a/packages/victory-selection-container/package.json +++ b/packages/victory-selection-container/package.json @@ -46,8 +46,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -204,32 +202,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-shared-events/package.json b/packages/victory-shared-events/package.json index 24213d6ef..bdb4da2b0 100644 --- a/packages/victory-shared-events/package.json +++ b/packages/victory-shared-events/package.json @@ -44,8 +44,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -201,32 +199,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-stack/package.json b/packages/victory-stack/package.json index 496244d9e..e899dd299 100644 --- a/packages/victory-stack/package.json +++ b/packages/victory-stack/package.json @@ -49,8 +49,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -215,32 +213,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-tooltip/package.json b/packages/victory-tooltip/package.json index 16e218950..64bf46a54 100644 --- a/packages/victory-tooltip/package.json +++ b/packages/victory-tooltip/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-vendor/package.json b/packages/victory-vendor/package.json index 508eb9ba9..6bbd88484 100644 --- a/packages/victory-vendor/package.json +++ b/packages/victory-vendor/package.json @@ -63,8 +63,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -130,32 +128,6 @@ "build" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "scripts/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "scripts/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint scripts", "files": [ diff --git a/packages/victory-voronoi-container/package.json b/packages/victory-voronoi-container/package.json index d7d973ae4..cf4f15b19 100644 --- a/packages/victory-voronoi-container/package.json +++ b/packages/victory-voronoi-container/package.json @@ -45,8 +45,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -208,32 +206,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-voronoi/package.json b/packages/victory-voronoi/package.json index 8dddd0b4b..3801abefe 100644 --- a/packages/victory-voronoi/package.json +++ b/packages/victory-voronoi/package.json @@ -43,8 +43,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory-zoom-container/package.json b/packages/victory-zoom-container/package.json index 64eee9a8a..bfbb33f7f 100644 --- a/packages/victory-zoom-container/package.json +++ b/packages/victory-zoom-container/package.json @@ -42,8 +42,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -199,32 +197,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/packages/victory/package.json b/packages/victory/package.json index 27a3d707c..86cb0c02d 100644 --- a/packages/victory/package.json +++ b/packages/victory/package.json @@ -68,8 +68,6 @@ "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit" @@ -380,32 +378,6 @@ "pnpm-lock.yaml" ] }, - "format": { - "command": "nps format:pkg", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, - "format:fix": { - "command": "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json" - ], - "output": [], - "packageLocks": [ - "pnpm-lock.yaml" - ] - }, "lint": { "command": "eslint src", "files": [ diff --git a/scripts/sync-pkgs-wireit-helpers.js b/scripts/sync-pkgs-wireit-helpers.js index 66dcd52a5..e49328b8f 100644 --- a/scripts/sync-pkgs-wireit-helpers.js +++ b/scripts/sync-pkgs-wireit-helpers.js @@ -38,8 +38,6 @@ function generateWireitConfig(pkg, rootPkg) { "check": "wireit", "types:check": "wireit", "types:create": "wireit", - "format": "wireit", - "format:fix": "wireit", "lint": "wireit", "lint:fix": "wireit", "jest": "wireit", @@ -186,23 +184,6 @@ function generateWireitConfig(pkg, rootPkg) { ], "packageLocks": ["pnpm-lock.yaml"] }, - - // For the "fix" task, we first run the normal check that may fail so that - // we get caching for packages without changed files: - ...["format", "format:fix"].reduce((wireit, key) => { - wireit[key] = { - "command": key === "format" ? "nps format:pkg" : "pnpm run format || nps format:pkg:fix", - "files": [ - "src/**", - "*.json", - "../../.prettierignore", - "../../.prettierrc.json", - ], - "output": [], - "packageLocks": ["pnpm-lock.yaml"] - }; - return wireit; - }, {}), // Same as above ...["lint", "lint:fix"].reduce((wireit, key) => { wireit[key] = { From a3025a4ff6afb832e3147a8d1e55a31e95b830c9 Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Mon, 11 Nov 2024 19:36:00 -0600 Subject: [PATCH 2/8] Fix unformatted files --- packages/victory-core/src/victory-util/events.ts | 9 +++------ packages/victory-pie/src/helper-methods.ts | 2 +- packages/victory-stack/src/helper-methods.tsx | 12 ++++++------ packages/victory-tooltip/src/flyout.tsx | 8 ++++---- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/packages/victory-core/src/victory-util/events.ts b/packages/victory-core/src/victory-util/events.ts index 4c0ab4717..0923547e6 100644 --- a/packages/victory-core/src/victory-util/events.ts +++ b/packages/victory-core/src/victory-util/events.ts @@ -73,12 +73,9 @@ export function getEvents( const selectedEvents = getSelectedEvents(); return ( Array.isArray(selectedEvents) && - selectedEvents.reduce( - (memo, event) => { - return event ? Object.assign(memo, event.eventHandlers) : memo; - }, - {} as ComponentEvent["eventHandlers"], - ) + selectedEvents.reduce((memo, event) => { + return event ? Object.assign(memo, event.eventHandlers) : memo; + }, {} as ComponentEvent["eventHandlers"]) ); }; diff --git a/packages/victory-pie/src/helper-methods.ts b/packages/victory-pie/src/helper-methods.ts index 4cc2beac6..09c12f49c 100644 --- a/packages/victory-pie/src/helper-methods.ts +++ b/packages/victory-pie/src/helper-methods.ts @@ -63,7 +63,7 @@ const getSlices = (props, data) => { const getCategoriesFromProps = (props: VictoryPieProps) => Array.isArray(props.categories) ? props.categories - : ((props?.categories as { x: string[] })?.x ?? []); + : (props?.categories as { x: string[] })?.x ?? []; /** * Sorts data by props.categories or props.categories.x. If all of the data keys aren't diff --git a/packages/victory-stack/src/helper-methods.tsx b/packages/victory-stack/src/helper-methods.tsx index 2e4f19c29..d72990a0e 100644 --- a/packages/victory-stack/src/helper-methods.tsx +++ b/packages/victory-stack/src/helper-methods.tsx @@ -88,20 +88,20 @@ function addLayoutData(props, datasets, index) { _y0: !(datum._y instanceof Date) ? yOffset : yOffset - ? new Date(yOffset) - : datum._y, + ? new Date(yOffset) + : datum._y, _y1: datum._y === null ? null : datum._y instanceof Date - ? new Date(Number(datum._y) + Number(yOffset)) - : datum._y + yOffset, + ? new Date(Number(datum._y) + Number(yOffset)) + : datum._y + yOffset, _x1: datum._x === null ? null : datum._x instanceof Date - ? new Date(Number(datum._x) + Number(xOffset)) - : datum._x + xOffset, + ? new Date(Number(datum._x) + Number(xOffset)) + : datum._x + xOffset, }); }); } diff --git a/packages/victory-tooltip/src/flyout.tsx b/packages/victory-tooltip/src/flyout.tsx index cd0c1f046..51daff5fb 100644 --- a/packages/victory-tooltip/src/flyout.tsx +++ b/packages/victory-tooltip/src/flyout.tsx @@ -73,8 +73,8 @@ const getVerticalPath = (props: FlyoutPathProps) => { const arc = `${cornerRadius} ${cornerRadius} ${direction}`; return `M ${centerX - pointerWidth / 2}, ${pointerEdge} L ${pointerLength ? x : centerX + pointerWidth / 2}, ${ - pointerLength ? y : pointerEdge - } + pointerLength ? y : pointerEdge + } L ${centerX + pointerWidth / 2}, ${pointerEdge} L ${rightEdge - cornerRadius}, ${pointerEdge} A ${arc} ${rightEdge}, ${pointerEdge - sign * cornerRadius} @@ -104,8 +104,8 @@ const getHorizontalPath = (props: FlyoutPathProps) => { const arc = `${cornerRadius} ${cornerRadius} ${direction}`; return `M ${pointerEdge}, ${centerY - pointerWidth / 2} L ${pointerLength ? x : pointerEdge}, ${ - pointerLength ? y : centerY + pointerWidth / 2 - } + pointerLength ? y : centerY + pointerWidth / 2 + } L ${pointerEdge}, ${centerY + pointerWidth / 2} L ${pointerEdge}, ${bottomEdge - cornerRadius} A ${arc} ${pointerEdge + sign * cornerRadius}, ${bottomEdge} From 6cfb7c15b6a1fccf4731a73c0ac05ee2736d2b4e Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Mon, 11 Nov 2024 19:43:58 -0600 Subject: [PATCH 3/8] Run format in parallel with build --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a160bc655..47d70e272 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,6 @@ jobs: header: "Bundle size report" # PR comment header format: - needs: [build] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 82cc6c38dffa6aeb9071e0a6adc1cbfebc53cfdb Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Mon, 11 Nov 2024 19:48:43 -0600 Subject: [PATCH 4/8] Remove format since lint already executes the same --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47d70e272..2f4ba0446 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,15 +36,6 @@ jobs: onlyDiff: "true" header: "Bundle size report" # PR comment header - format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup - - - name: Format - run: pnpm format - lint: needs: [build] runs-on: ubuntu-latest From 7421bde4d42779c95e30905d02ab480547caf134 Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Mon, 11 Nov 2024 19:48:54 -0600 Subject: [PATCH 5/8] Upgrade wireit cache to latest version --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 84d9820b1..a4185e3a3 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -20,7 +20,7 @@ runs: cache: 'pnpm' # Wireit cache - - uses: google/wireit@setup-github-actions-caching/v1 + - uses: google/wireit@setup-github-actions-caching/v2 - name: Install dependencies shell: bash From de4435af7f80784512741473b3c3582917096ba0 Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Mon, 11 Nov 2024 19:53:20 -0600 Subject: [PATCH 6/8] Remove test formatting code --- packages/victory-core/src/victory-util/events.ts | 9 ++++++--- packages/victory-pie/src/helper-methods.ts | 2 +- packages/victory-stack/src/helper-methods.tsx | 12 ++++++------ packages/victory-tooltip/src/flyout.tsx | 8 ++++---- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/victory-core/src/victory-util/events.ts b/packages/victory-core/src/victory-util/events.ts index 0923547e6..4c0ab4717 100644 --- a/packages/victory-core/src/victory-util/events.ts +++ b/packages/victory-core/src/victory-util/events.ts @@ -73,9 +73,12 @@ export function getEvents( const selectedEvents = getSelectedEvents(); return ( Array.isArray(selectedEvents) && - selectedEvents.reduce((memo, event) => { - return event ? Object.assign(memo, event.eventHandlers) : memo; - }, {} as ComponentEvent["eventHandlers"]) + selectedEvents.reduce( + (memo, event) => { + return event ? Object.assign(memo, event.eventHandlers) : memo; + }, + {} as ComponentEvent["eventHandlers"], + ) ); }; diff --git a/packages/victory-pie/src/helper-methods.ts b/packages/victory-pie/src/helper-methods.ts index 09c12f49c..4cc2beac6 100644 --- a/packages/victory-pie/src/helper-methods.ts +++ b/packages/victory-pie/src/helper-methods.ts @@ -63,7 +63,7 @@ const getSlices = (props, data) => { const getCategoriesFromProps = (props: VictoryPieProps) => Array.isArray(props.categories) ? props.categories - : (props?.categories as { x: string[] })?.x ?? []; + : ((props?.categories as { x: string[] })?.x ?? []); /** * Sorts data by props.categories or props.categories.x. If all of the data keys aren't diff --git a/packages/victory-stack/src/helper-methods.tsx b/packages/victory-stack/src/helper-methods.tsx index d72990a0e..2e4f19c29 100644 --- a/packages/victory-stack/src/helper-methods.tsx +++ b/packages/victory-stack/src/helper-methods.tsx @@ -88,20 +88,20 @@ function addLayoutData(props, datasets, index) { _y0: !(datum._y instanceof Date) ? yOffset : yOffset - ? new Date(yOffset) - : datum._y, + ? new Date(yOffset) + : datum._y, _y1: datum._y === null ? null : datum._y instanceof Date - ? new Date(Number(datum._y) + Number(yOffset)) - : datum._y + yOffset, + ? new Date(Number(datum._y) + Number(yOffset)) + : datum._y + yOffset, _x1: datum._x === null ? null : datum._x instanceof Date - ? new Date(Number(datum._x) + Number(xOffset)) - : datum._x + xOffset, + ? new Date(Number(datum._x) + Number(xOffset)) + : datum._x + xOffset, }); }); } diff --git a/packages/victory-tooltip/src/flyout.tsx b/packages/victory-tooltip/src/flyout.tsx index 51daff5fb..cd0c1f046 100644 --- a/packages/victory-tooltip/src/flyout.tsx +++ b/packages/victory-tooltip/src/flyout.tsx @@ -73,8 +73,8 @@ const getVerticalPath = (props: FlyoutPathProps) => { const arc = `${cornerRadius} ${cornerRadius} ${direction}`; return `M ${centerX - pointerWidth / 2}, ${pointerEdge} L ${pointerLength ? x : centerX + pointerWidth / 2}, ${ - pointerLength ? y : pointerEdge - } + pointerLength ? y : pointerEdge + } L ${centerX + pointerWidth / 2}, ${pointerEdge} L ${rightEdge - cornerRadius}, ${pointerEdge} A ${arc} ${rightEdge}, ${pointerEdge - sign * cornerRadius} @@ -104,8 +104,8 @@ const getHorizontalPath = (props: FlyoutPathProps) => { const arc = `${cornerRadius} ${cornerRadius} ${direction}`; return `M ${pointerEdge}, ${centerY - pointerWidth / 2} L ${pointerLength ? x : pointerEdge}, ${ - pointerLength ? y : centerY + pointerWidth / 2 - } + pointerLength ? y : centerY + pointerWidth / 2 + } L ${pointerEdge}, ${centerY + pointerWidth / 2} L ${pointerEdge}, ${bottomEdge - cornerRadius} A ${arc} ${pointerEdge + sign * cornerRadius}, ${bottomEdge} From f9d2b5cfee97784d8e95a5565cf37d0fff03910f Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Mon, 11 Nov 2024 19:55:43 -0600 Subject: [PATCH 7/8] Revert to v1 wireit caching --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index a4185e3a3..84d9820b1 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -20,7 +20,7 @@ runs: cache: 'pnpm' # Wireit cache - - uses: google/wireit@setup-github-actions-caching/v2 + - uses: google/wireit@setup-github-actions-caching/v1 - name: Install dependencies shell: bash From 0c5496e8594f787d0a60f28e85ab2a3c3317206a Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Tue, 12 Nov 2024 08:40:06 -0600 Subject: [PATCH 8/8] Cleanup main package.json --- package.json | 74 ++----------------------------------- scripts/sync-pkgs-wireit.js | 2 - 2 files changed, 3 insertions(+), 73 deletions(-) diff --git a/package.json b/package.json index 62cc8b981..428a47367 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,9 @@ }, "homepage": "https://commerce.nearform.com/open-source/victory", "packageManager": "pnpm@7.33.7", + "dependencies": { + "clsx": "^2.1.1" + }, "devDependencies": { "@babel/cli": "7.23.9", "@babel/core": "7.23.9", @@ -460,82 +463,11 @@ "./packages/victory-zoom-container:types:create" ] }, - "format:pkgs:fix": { - "dependencies": [ - "./packages/victory-native:format:fix", - "./packages/victory-vendor:format:fix", - "./packages/victory:format:fix", - "./packages/victory-area:format:fix", - "./packages/victory-axis:format:fix", - "./packages/victory-bar:format:fix", - "./packages/victory-box-plot:format:fix", - "./packages/victory-brush-container:format:fix", - "./packages/victory-brush-line:format:fix", - "./packages/victory-candlestick:format:fix", - "./packages/victory-canvas:format:fix", - "./packages/victory-chart:format:fix", - "./packages/victory-core:format:fix", - "./packages/victory-create-container:format:fix", - "./packages/victory-cursor-container:format:fix", - "./packages/victory-errorbar:format:fix", - "./packages/victory-group:format:fix", - "./packages/victory-histogram:format:fix", - "./packages/victory-legend:format:fix", - "./packages/victory-line:format:fix", - "./packages/victory-pie:format:fix", - "./packages/victory-polar-axis:format:fix", - "./packages/victory-scatter:format:fix", - "./packages/victory-selection-container:format:fix", - "./packages/victory-shared-events:format:fix", - "./packages/victory-stack:format:fix", - "./packages/victory-tooltip:format:fix", - "./packages/victory-voronoi:format:fix", - "./packages/victory-voronoi-container:format:fix", - "./packages/victory-zoom-container:format:fix" - ] - }, "start:docs": { "command": "pnpm run --filter victory-docs start", "dependencies": [ "build:lib:esm" ] - }, - "format:pkgs": { - "dependencies": [ - "./packages/victory-native:format", - "./packages/victory-vendor:format", - "./packages/victory:format", - "./packages/victory-area:format", - "./packages/victory-axis:format", - "./packages/victory-bar:format", - "./packages/victory-box-plot:format", - "./packages/victory-brush-container:format", - "./packages/victory-brush-line:format", - "./packages/victory-candlestick:format", - "./packages/victory-canvas:format", - "./packages/victory-chart:format", - "./packages/victory-core:format", - "./packages/victory-create-container:format", - "./packages/victory-cursor-container:format", - "./packages/victory-errorbar:format", - "./packages/victory-group:format", - "./packages/victory-histogram:format", - "./packages/victory-legend:format", - "./packages/victory-line:format", - "./packages/victory-pie:format", - "./packages/victory-polar-axis:format", - "./packages/victory-scatter:format", - "./packages/victory-selection-container:format", - "./packages/victory-shared-events:format", - "./packages/victory-stack:format", - "./packages/victory-tooltip:format", - "./packages/victory-voronoi:format", - "./packages/victory-voronoi-container:format", - "./packages/victory-zoom-container:format" - ] } - }, - "dependencies": { - "clsx": "^2.1.1" } } diff --git a/scripts/sync-pkgs-wireit.js b/scripts/sync-pkgs-wireit.js index d01658b4e..03dda3f0b 100644 --- a/scripts/sync-pkgs-wireit.js +++ b/scripts/sync-pkgs-wireit.js @@ -76,8 +76,6 @@ const updateRootPkg = async ({ allPkgs }) => { [ { rootTask: "build", pkgTask: "build" }, { rootTask: "build:lib:esm", pkgTask: "build:lib:esm" }, - { rootTask: "format:pkgs", pkgTask: "format" }, - { rootTask: "format:pkgs:fix", pkgTask: "format:fix" }, { rootTask: "jest:pkgs", pkgTask: "jest" }, { rootTask: "types:check", pkgTask: "types:check" }, { rootTask: "types:create", pkgTask: "types:create" },