From 09e56bd0d7fb565b776bef62cbaf57299e3f2055 Mon Sep 17 00:00:00 2001 From: Batuhan Wilhelm Date: Thu, 5 Dec 2024 12:57:38 +0300 Subject: [PATCH] feat: add patch for @changesets/git package --- patches/@changesets__git@3.0.0.patch | 13 +++--- pnpm-lock.yaml | 66 ++++++++++++++-------------- 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/patches/@changesets__git@3.0.0.patch b/patches/@changesets__git@3.0.0.patch index 0660344c11e9..0a585a6f9130 100644 --- a/patches/@changesets__git@3.0.0.patch +++ b/patches/@changesets__git@3.0.0.patch @@ -1,5 +1,5 @@ diff --git a/dist/changesets-git.cjs.js b/dist/changesets-git.cjs.js -index 415542c09ff1a3dbfc3eef7ff52f9d592a3be334..45d2e19a09a09b9a8f30dbe61c14f6f7e8ec4bb0 100644 +index 415542c09ff1a3dbfc3eef7ff52f9d592a3be334..34f646a2f052a200521aebddcb12105e66224480 100644 --- a/dist/changesets-git.cjs.js +++ b/dist/changesets-git.cjs.js @@ -87,7 +87,7 @@ async function getCommitsThatAddFiles(gitPaths, { @@ -7,12 +7,12 @@ index 415542c09ff1a3dbfc3eef7ff52f9d592a3be334..45d2e19a09a09b9a8f30dbe61c14f6f7 // Fetch commit information for all paths we don't have yet const commitInfos = await Promise.all(remaining.map(async gitPath => { - const [commitSha, parentSha] = (await spawn__default["default"]("git", ["log", "--diff-filter=A", "--max-count=1", short ? "--pretty=format:%h:%p" : "--pretty=format:%H:%p", gitPath], { -+ const [commitSha, parentSha] = (await spawn__default["default"]("git", ["log", "--follow", "--diff-filter=A", "--max-count=1", short ? "--pretty=format:%h:%p" : "--pretty=format:%H:%p", gitPath], { ++ const [commitSha, parentSha] = (await spawn__default["default"]("git", ["log", "--follow", `--after=${new Date(new Date().setMonth(new Date().getMonth() -2)).toISOString()}`, "--diff-filter=A", "--max-count=1", short ? "--pretty=format:%h:%p" : "--pretty=format:%H:%p", gitPath], { cwd })).stdout.toString().split(":"); return { diff --git a/dist/changesets-git.esm.js b/dist/changesets-git.esm.js -index 58f76fe0cb21c35fa600e83f20fbbd23ee7d0ba0..0d65008e8e3a3f99277949f13c0c96584c60401c 100644 +index 58f76fe0cb21c35fa600e83f20fbbd23ee7d0ba0..b82da6c93e8039e728af7be257d769b11e017d66 100644 --- a/dist/changesets-git.esm.js +++ b/dist/changesets-git.esm.js @@ -75,7 +75,7 @@ async function getCommitsThatAddFiles(gitPaths, { @@ -20,19 +20,20 @@ index 58f76fe0cb21c35fa600e83f20fbbd23ee7d0ba0..0d65008e8e3a3f99277949f13c0c9658 // Fetch commit information for all paths we don't have yet const commitInfos = await Promise.all(remaining.map(async gitPath => { - const [commitSha, parentSha] = (await spawn("git", ["log", "--diff-filter=A", "--max-count=1", short ? "--pretty=format:%h:%p" : "--pretty=format:%H:%p", gitPath], { -+ const [commitSha, parentSha] = (await spawn("git", ["log", "--follow", "--diff-filter=A", "--max-count=1", short ? "--pretty=format:%h:%p" : "--pretty=format:%H:%p", gitPath], { ++ const [commitSha, parentSha] = (await spawn("git", ["log", "--follow", `--after=${new Date(new Date().setMonth(new Date().getMonth() -2)).toISOString()}`, "--diff-filter=A", "--max-count=1", short ? "--pretty=format:%h:%p" : "--pretty=format:%H:%p", gitPath], { cwd })).stdout.toString().split(":"); return { diff --git a/src/index.ts b/src/index.ts -index 7e3aee53439f3724886eacc2bb9ea8b9abc6b6cf..306ade4b8a56a9c1f0af9f87a94ac65447271ed1 100644 +index 7e3aee53439f3724886eacc2bb9ea8b9abc6b6cf..d44d159b7e411f017baf38f10e440d01f2b8a6f5 100644 --- a/src/index.ts +++ b/src/index.ts -@@ -80,6 +80,7 @@ export async function getCommitsThatAddFiles( +@@ -80,6 +80,8 @@ export async function getCommitsThatAddFiles( "git", [ "log", + "--follow", ++ `--after=${new Date(new Date().setMonth(new Date().getMonth() -2)).toISOString()}`, "--diff-filter=A", "--max-count=1", short ? "--pretty=format:%h:%p" : "--pretty=format:%H:%p", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d98fdd179ce1..3890a26e2c8c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,7 +6,7 @@ settings: patchedDependencies: '@changesets/git@3.0.0': - hash: mtg7py6kzexwisjv25jg7kfovi + hash: nu3pnoo55obvdtzwuff3eqw2pe path: patches/@changesets__git@3.0.0.patch importers: @@ -38504,7 +38504,7 @@ snapshots: '@babel/runtime': 7.25.7 '@changesets/config': 3.0.0 '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.0(patch_hash=mtg7py6kzexwisjv25jg7kfovi) + '@changesets/git': 3.0.0(patch_hash=nu3pnoo55obvdtzwuff3eqw2pe) '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 detect-indent: 6.1.0 @@ -38546,7 +38546,7 @@ snapshots: '@changesets/errors': 0.2.0 '@changesets/get-dependents-graph': 2.0.0 '@changesets/get-release-plan': 4.0.0 - '@changesets/git': 3.0.0(patch_hash=mtg7py6kzexwisjv25jg7kfovi) + '@changesets/git': 3.0.0(patch_hash=nu3pnoo55obvdtzwuff3eqw2pe) '@changesets/logger': 0.1.0 '@changesets/pre': 2.0.0 '@changesets/read': 0.6.0 @@ -38612,7 +38612,7 @@ snapshots: '@changesets/get-version-range-type@0.4.0': {} - '@changesets/git@3.0.0(patch_hash=mtg7py6kzexwisjv25jg7kfovi)': + '@changesets/git@3.0.0(patch_hash=nu3pnoo55obvdtzwuff3eqw2pe)': dependencies: '@babel/runtime': 7.25.7 '@changesets/errors': 0.2.0 @@ -38642,7 +38642,7 @@ snapshots: '@changesets/read@0.6.0': dependencies: '@babel/runtime': 7.25.7 - '@changesets/git': 3.0.0(patch_hash=mtg7py6kzexwisjv25jg7kfovi) + '@changesets/git': 3.0.0(patch_hash=nu3pnoo55obvdtzwuff3eqw2pe) '@changesets/logger': 0.1.0 '@changesets/parse': 0.4.0 '@changesets/types': 6.0.0 @@ -40989,8 +40989,8 @@ snapshots: '@medusajs/modules-sdk': 1.12.10(@types/node@18.19.31) '@medusajs/types': 1.11.15 '@medusajs/utils': 1.11.8(@types/node@18.19.31)(pg@8.11.5) - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) - '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7)(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5)) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5)) awilix: 8.0.1 transitivePeerDependencies: - '@mikro-orm/better-sqlite' @@ -41239,9 +41239,9 @@ snapshots: '@medusajs/utils@1.11.8(@types/node@18.19.31)(pg@8.11.5)': dependencies: '@medusajs/types': 1.11.15 - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) - '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7)(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5)) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5)) awilix: 8.0.1 bignumber.js: 9.1.2 knex: 2.4.2(pg@8.11.5) @@ -41293,7 +41293,7 @@ snapshots: - supports-color - tedious - '@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7)': + '@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7)': dependencies: acorn-loose: 8.3.0 acorn-walk: 8.2.0 @@ -41303,17 +41303,17 @@ snapshots: mikro-orm: 5.9.7 reflect-metadata: 0.1.13 optionalDependencies: - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) - '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7)(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5)) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5)) - '@mikro-orm/knex@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.3)': + '@mikro-orm/knex@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.3)': dependencies: - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) fs-extra: 11.1.1 knex: 2.5.1(pg@8.11.3) sqlstring: 2.3.3 optionalDependencies: - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) pg: 8.11.3 transitivePeerDependencies: - pg-native @@ -41322,21 +41322,21 @@ snapshots: '@mikro-orm/knex@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.5)': dependencies: - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) fs-extra: 11.1.1 knex: 2.5.1(pg@8.11.5) sqlstring: 2.3.3 optionalDependencies: - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) pg: 8.11.5 transitivePeerDependencies: - pg-native - supports-color - tedious - '@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5)': + '@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5)': dependencies: - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) '@mikro-orm/knex': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.5) fs-extra: 11.1.1 knex: 2.5.1(pg@8.11.5) @@ -41354,13 +41354,13 @@ snapshots: - supports-color - tedious - '@mikro-orm/postgresql@5.9.7(@mikro-orm/core@5.9.7)(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))': + '@mikro-orm/postgresql@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5))': dependencies: - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) - '@mikro-orm/knex': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.3) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/knex': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.3) pg: 8.11.3 optionalDependencies: - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) transitivePeerDependencies: - better-sqlite3 - mssql @@ -47420,14 +47420,14 @@ snapshots: transitivePeerDependencies: - supports-color - babel-plugin-styled-components@2.1.4(@babel/core@7.24.4)(styled-components@5.3.11(@babel/core@7.24.4)(react-dom@18.3.0(react@18.3.0))(react-is@18.3.1)(react@18.3.0)): + babel-plugin-styled-components@2.1.4(@babel/core@7.24.4)(styled-components@5.3.11(@babel/core@7.24.4)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0)): dependencies: '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-module-imports': 7.24.3 '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.4) lodash: 4.17.21 picomatch: 2.3.1 - styled-components: 5.3.11(@babel/core@7.24.4)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0) + styled-components: 5.3.11(@babel/core@7.24.4)(react-dom@18.3.0(react@18.3.0))(react-is@18.3.1)(react@18.3.0) transitivePeerDependencies: - '@babel/core' @@ -54726,8 +54726,8 @@ snapshots: dependencies: '@medusajs/modules-sdk': 1.12.10(@types/node@18.19.31) '@medusajs/utils': 1.11.8(@types/node@18.19.31)(pg@8.11.5) - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) - '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7)(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5)) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5)) medusa-core-utils: 1.2.1 randomatic: 3.1.1 optionalDependencies: @@ -60348,18 +60348,18 @@ snapshots: dependencies: inline-style-parser: 0.1.1 - styled-components@5.3.11(@babel/core@7.24.4)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0): + styled-components@5.3.11(@babel/core@7.24.4)(react-dom@18.3.0(react@18.3.0))(react-is@18.3.1)(react@18.3.0): dependencies: '@babel/helper-module-imports': 7.24.3 '@babel/traverse': 7.24.1(supports-color@5.5.0) '@emotion/is-prop-valid': 1.2.2 '@emotion/stylis': 0.8.5 '@emotion/unitless': 0.7.5 - babel-plugin-styled-components: 2.1.4(@babel/core@7.24.4)(styled-components@5.3.11(@babel/core@7.24.4)(react-dom@18.3.0(react@18.3.0))(react-is@18.3.1)(react@18.3.0)) + babel-plugin-styled-components: 2.1.4(@babel/core@7.24.4)(styled-components@5.3.11(@babel/core@7.24.4)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0)) css-to-react-native: 3.2.0 hoist-non-react-statics: 3.3.2 - react: 16.14.0 - react-dom: 16.14.0(react@16.14.0) + react: 18.3.0 + react-dom: 18.3.0(react@18.3.0) react-is: 18.3.1 shallowequal: 1.1.0 supports-color: 5.5.0 @@ -62138,7 +62138,7 @@ snapshots: prop-types: 15.8.1 react: 16.14.0 react-dom: 16.14.0(react@16.14.0) - styled-components: 5.3.11(@babel/core@7.24.4)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0) + styled-components: 5.3.11(@babel/core@7.24.4)(react-dom@18.3.0(react@18.3.0))(react-is@18.3.1)(react@18.3.0) tslib: 1.14.1 transitivePeerDependencies: - '@babel/core'