Skip to content

Commit

Permalink
sync branch after merge from upstream
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Scamporlino <[email protected]>
  • Loading branch information
vinzscam committed Feb 3, 2025
1 parent 1dd0db8 commit ae05688
Show file tree
Hide file tree
Showing 24 changed files with 911 additions and 1,574 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,6 @@
"pre-commit": "pretty-quick --staged --pattern \"src/**/*.*(js|jsx|ts|tsx)\"",
"pre-push": "yarn run lint"
}
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
4 changes: 2 additions & 2 deletions src/ReleaseProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useContext, useState } from 'react'
import { useFetchReleases } from './hooks/fetch-release-versions'
import { USE_YARN_PLUGIN } from './utils'
import { useSettings } from './SettingsProvider'
import { ReleaseT } from './releases/types'
import { useFetchReleaseVersions } from './hooks/fetch-release-versions'

export const ReleasesContext = React.createContext<{
isDone: boolean
Expand All @@ -29,7 +29,7 @@ export const ReleasesProvider = React.memo(function ({
settings: { [USE_YARN_PLUGIN]: useYarnPlugin },
} = useSettings()

const value = useFetchReleases({ packageName, useYarnPlugin })
const value = useFetchReleaseVersions({ packageName, useYarnPlugin })
const [selectedVersions, setSelectedVersions] = useState<{
from?: ReleaseT
to?: ReleaseT
Expand Down
2 changes: 1 addition & 1 deletion src/SettingsProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode, useCallback, useContext } from 'react'
import React, { ReactNode, useContext } from 'react'
import useLocalStorage from 'react-use/lib/useLocalStorage'
import useSearchParam from 'react-use/lib/useSearchParam'

Expand Down
44 changes: 0 additions & 44 deletions src/__tests__/utils.spec.js

This file was deleted.

8 changes: 5 additions & 3 deletions src/__tests__/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import { getVersionsContentInDiff, getChangelogURL } from '../utils'

const fixtureVersions = ['0.59', '0.58', '0.57', '0.56'].map((version) => ({
version,
createApp: '',
}))

describe('getVersionsContentInDiff', () => {
it('returns the versions in the provided range', () => {
const versions = getVersionsContentInDiff({
packageName: PACKAGE_NAMES.RN,
// packageName: PACKAGE_NAMES.RN,
fromVersion: '0.57.0',
toVersion: '0.59.0',
versions: fixtureVersions,
Expand All @@ -19,7 +21,7 @@ describe('getVersionsContentInDiff', () => {

it('returns the versions in the provided range with release candidates', () => {
const versions = getVersionsContentInDiff({
packageName: PACKAGE_NAMES.RN,
// packageName: PACKAGE_NAMES.RN,
fromVersion: '0.56.0',
toVersion: '0.59.0-rc.1',
versions: fixtureVersions,
Expand All @@ -34,7 +36,7 @@ describe('getVersionsContentInDiff', () => {

it('returns the versions in the provided range with patches specified', () => {
const versions = getVersionsContentInDiff({
packageName: PACKAGE_NAMES.RN,
// packageName: PACKAGE_NAMES.RN,
fromVersion: '0.57.2',
toVersion: '0.59.9',
versions: fixtureVersions,
Expand Down
260 changes: 0 additions & 260 deletions src/components/common/Diff/Diff.js

This file was deleted.

6 changes: 5 additions & 1 deletion src/components/common/Diff/Diff.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { replaceAppDetails } from '../../../utils'
import type { Theme } from '../../../theme'
import type { ChangeEventArgs } from 'react-diff-view'
import type { DefaultRenderToken } from 'react-diff-view/types/context'
import { Button, Card, Typography } from 'antd'
import { useReleases } from '../../../ReleaseProvider'

const copyPathPopoverContentOpts = {
default: 'Copy file path',
Expand Down Expand Up @@ -272,11 +274,13 @@ const Diff = ({
setIsDiffCollapsed(true)
}

const { releases } = useReleases()
const diffComments = getComments({
packageName,
// packageName,
newPath,
fromVersion,
toVersion,
versions: releases,
})

const updatedHunks: HunkData[] = React.useMemo(
Expand Down
Loading

0 comments on commit ae05688

Please sign in to comment.