Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: npmrc registry url #2112

Merged
merged 16 commits into from
Apr 5, 2024
8 changes: 0 additions & 8 deletions .github/workflows/blade-bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18.12.1
# https://stackoverflow.com/a/73824182
registry-url: "https://npm.pkg.github.com"
- name: Setup Cache & Install Dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/actions/install-dependencies
- name: Update Bundle Size Data
run: yarn generate-bundle-size-info
Expand All @@ -51,11 +47,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18.12.1
# https://stackoverflow.com/a/73824182
registry-url: "https://npm.pkg.github.com"
- name: Setup Cache & Install Dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/actions/install-dependencies
- name: Build Blade React Production
run: yarn run-s build:clean build:generate-types build:react-prod
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/blade-chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.12.1
# https://stackoverflow.com/a/73824182
registry-url: "https://npm.pkg.github.com"
- name: Setup Cache & Install Dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/actions/install-dependencies
- name: Publish to Chromatic
uses: chromaui/action@v1
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/blade-interaction-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.12.1
# https://stackoverflow.com/a/73824182
registry-url: "https://npm.pkg.github.com"
- name: Setup Cache & Install Dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/actions/install-dependencies
- name: Run Interaction Tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/blade-pr-title-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Blade PR Title Check

on:
pull_request_target:
types: [open, edited, synchronize]
types: [opened, edited, synchronize]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was incorrect all along? how was it working 😄 ?


concurrency: # cancel previously running workflows when a new workflow is re-run
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/blade-tokens-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.12.1
# https://stackoverflow.com/a/73824182
registry-url: "https://npm.pkg.github.com"
- name: Setup Cache & Install Dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/actions/install-dependencies
- name: Upload Tokens
working-directory: packages/blade
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/blade-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.12.1
# https://stackoverflow.com/a/73824182
registry-url: "https://npm.pkg.github.com"
- name: Setup Cache & Install Dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/actions/install-dependencies
- name: Build Blade
run: yarn build
Expand All @@ -45,11 +41,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.12.1
# https://stackoverflow.com/a/73824182
registry-url: "https://npm.pkg.github.com"
- name: Setup Cache & Install Dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/actions/install-dependencies
- name: Run Unit Tests
run: yarn test
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.12.1
# https://stackoverflow.com/a/73824182
registry-url: "https://npm.pkg.github.com"
- name: Setup Cache & Install Dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/actions/install-dependencies
- name: Create Release Pull Request & Publish packages
id: changesets
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@razorpay:registry=https://registry.npmjs.org/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the default npmjs registry?

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
"@babel/eslint-parser": "7.21.8",
"@changesets/cli": "2.24.1",
"@types/jest": "26.0.23",
"@types/react": "17.0.4",
"@types/react-native": "0.64.4",
"@types/styled-components": "5.1.25",
"@types/styled-components-react-native": "5.1.3",
"@typescript-eslint/eslint-plugin": "5.59.6",
Expand Down Expand Up @@ -63,6 +61,9 @@
"stylelint-processor-styled-components": "1.10.0",
"typescript": "4.8.2"
},
"resolutions": {
"@types/react": "18.2.74"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
Expand Down
5 changes: 3 additions & 2 deletions packages/blade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
"@types/jest-axe": "3.5.5",
"@types/jscodeshift": "0.11.6",
"@types/jsdom": "20.0.1",
"@types/react": "17.0.38",
"@types/react": "18.2.74",
"@types/react-native": "0.72.2",
"@types/react-test-renderer": "17.0.1",
"@types/styled-components": "5.1.25",
Expand Down Expand Up @@ -250,7 +250,7 @@
"react-native": "0.72.3",
"react-native-gesture-handler": "2.9.0",
"react-native-reanimated": "3.4.2",
"react-native-svg": "12.3.0",
"react-native-svg": "15.1.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member Author

@anuraghazra anuraghazra Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v12 types are not compatible with react18 types.

plus we and most of our consumers are using react-native >v70, thus according to this table we should be using v15 of rnsvg.

"react-scripts": "5.0.1",
"react-test-renderer": "18.2.0",
"rollup": "3.28.1",
Expand Down Expand Up @@ -306,6 +306,7 @@
"@storybook/**/react": "18.2.0",
"react-dom": "18.2.0",
"react": "18.2.0",
"@types/react": "18.2.74",
"styled-components": "^5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ const _ActionListBox = React.forwardRef<SectionList, ActionListBoxProps>(
({ sectionData, actionListItemWrapperRole, isMultiSelectable, isInBottomSheet }, ref) => {
const { footerHeight, setContentHeight } = useBottomSheetContext();

const renderActionListItem = React.useCallback(({ item }) => {
const renderActionListItem = React.useCallback(({ item }: any) => {
kamleshchandnani marked this conversation as resolved.
Show resolved Hide resolved
return <ActionListItem {...item} />;
}, []);

const renderActionListSectionHeader = React.useCallback(({ section: { title } }) => {
const renderActionListSectionHeader = React.useCallback(({ section: { title } }: any) => {
if (!title) return null;
return <ActionListSection title={title} _hideDivider={true} children={undefined} />;
}, []);

const renderActionListSectionDivider = React.useCallback(
({ section: { title, hideDivider } }) => {
({ section: { title, hideDivider } }: any) => {
if (!title) return null;
if (hideDivider) return null;
return <Divider />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const _BottomSheet = ({
}, [children]);

const renderFooter = React.useCallback(
(props): React.ReactElement => {
(props: any): React.ReactElement => {
return (
<GorhomBottomSheetFooter {...props}>
<View
Expand All @@ -171,7 +171,7 @@ const _BottomSheet = ({
);

const renderBackdrop = React.useCallback(
(props): React.ReactElement => {
(props: any): React.ReactElement => {
return <BottomSheetBackdrop {...props} zIndex={bottomSheetZIndex} />;
},
[bottomSheetZIndex],
Expand Down Expand Up @@ -285,6 +285,7 @@ const _BottomSheet = ({
containerStyle={{ zIndex: bottomSheetZIndex }}
animateOnMount={true}
handleComponent={renderHandle}
// @ts-expect-error - GorhomBottomSheet types are not updated
backgroundComponent={BottomSheetSurface}
footerComponent={renderFooter}
backdropComponent={renderBackdrop}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useTheme } from '~components/BladeProvider';

const AnimatedButtonContent: React.ForwardRefRenderFunction<
TextInput,
AnimatedButtonContentProps
AnimatedButtonContentProps & { children: React.ReactNode }
> = ({ motionDuration, motionEasing, children, isPressed }) => {
const { theme } = useTheme();
const duration = getIn(theme.motion, motionDuration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const _StyledBaseButton: React.ForwardRefRenderFunction<TextInput, StyledBaseBut
motionEasing={motionEasing}
testID={testID}
>
{/* @ts-expect-error */}
{({ pressed }): React.ReactNode => {
isPressed.value = pressed;
return children;
Expand Down
10 changes: 8 additions & 2 deletions packages/blade/src/components/Tabs/Tabs.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ const Tabs = ({
}, [selectedValue, setIndex]);

const renderTabLabel = React.useCallback(
({ route, focused }) => {
({
route,
focused,
}: {
route: { title: string; leading?: React.ComponentType<any>; trailing?: React.ReactNode };
focused: boolean;
}) => {
const { title, leading: Leading, trailing } = route;
const selectedState = focused ? 'selected' : 'unselected';
// eslint-disable-next-line react-hooks/rules-of-hooks
Expand Down Expand Up @@ -158,7 +164,7 @@ const Tabs = ({
);

const renderTabBar = React.useCallback(
(props) => (
(props: any) => (
<TabBar
{...props}
{...metaAttribute({ name: MetaConstants.TabList })}
Expand Down
Loading
Loading