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

Feat: Mono-repo setup added for i18nify and i18nify plugins #53

Merged
merged 34 commits into from
Jan 22, 2024

Conversation

tarun-khanna
Copy link
Contributor

@tarun-khanna tarun-khanna commented Jan 13, 2024

Description

Moved the architecture of the repo to be a mono-repo.
This mono-repo will now include the core js package ( i18nify-js ) and associated framework wrappers as packages (i18nify-react)

How to setup and build i18nify-js and plugins ?

  1. delete all existing node_modules ( rm -rf node_modules)
  2. take latest pull of branch.
  3. run yarn install at the root. This will install node_modules for all packages.
  4. run yarn build-js to build i18nify-js package.
  5. run yarn build-react to build i18nify-react package.

How to run unit tests for i18nify-js ?

  1. navigate to i18nify-js directory.
  2. run yarn test

How to run playwright tests for i18nify-js ?

  1. navigate to i18nify-js directory.
  2. run yarn test:browser

Few noteworthy pointers,

  1. To create a new wrapper for another framework or library, create a new package in this mono-repo.
  2. Currently unit test coverage is being measured only for i18nify-js package, so codeCov will scan only i18nify-js files and will report coverage accordingly (~92% at this point). We will be adding more tests for plugins in future.
  3. Bundle size report just takes i18nify-js output size in consideration, it doesn't measure the size cost of plugin bundles (i18nify-react).

Changes Made

List the main changes made in this pull request.

Title ---
JIRA link https://razorpay.atlassian.net/browse/ATLAS-96
Slack thread (if any) NA
Product spec NA
Tech spec/One-pager NA
Bundle Size Difference NA
Fixes Issue NA

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This change is a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Is your change backward compatible ?
  • Tested on major browsers (Chrome, Firefox, Safari, IE) ?
  • Tested in a consumer application(s) ?

Additional Notes

Any additional information that would be helpful for the reviewer.

Checklist:

  • Add Jira ID(s) in PR title and in the description?
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My code is written in TypeScript and follows the coding standards of the project.
  • I have added relevant documentation and updated the README if necessary.
  • My commit messages are clear and follow the project's commit message conventions.
  • Is any external library added?
  • My changes do not introduce any new runtime errors or warnings.
  • All relevant unit tests have been added/updated in my PR for the change.
  • Any Screenshots (mobile & desktop) required for PR? If yes, have you added the respective screenshots ?
  • Any manual dev testing done by you on beta/func environment?
  • Reviewer added (SLA 2 days)

Reviewer Checklist

  • Sufficient QA/Dev-Testing is done with proof (test cases list)
  • Ensure that the change in bundle size falls within the acceptable range.

PR Title Format

Format: <type>: <subject>

Types can be as follows:

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

Copy link

changeset-bot bot commented Jan 13, 2024

🦋 Changeset detected

Latest commit: 0f722b2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@razorpay/i18nify-js Minor
@razorpay/i18nify-react Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ae69a17) 91.02% compared to head (0f722b2) 91.02%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #53   +/-   ##
=======================================
  Coverage   91.02%   91.02%           
=======================================
  Files          26       26           
  Lines         245      245           
  Branches       60       60           
=======================================
  Hits          223      223           
  Misses         22       22           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This comment has been minimized.

This comment has been minimized.

@rzpcibot
Copy link
Contributor

rzpcibot commented Jan 15, 2024

Warnings
⚠️ Your PR has over 600 lines of code additions 😱 . Try to breakup into separate PRs 👍
⚠️

package.json: package.json is modified, do get this reviewed by gatekeepers ! 😇

⚠️ this yarn.lock has over 600 lines of code additions 😱 . Try to breakup into separate functions/components 👍

Bundle Size Report

Files

click to expand/collapse
🟢 No Change 🗑 File Deleted 🆕 New File 📈 Size Increased 👍 Size Reduced
Parsed (kb)
🚦 File Name Base PR Diff %
🟢 cjs/index.js 33.53 33.53 $\textcolor{green}{0}$ 0
🟢 esm/index.js 33.49 33.49 $\textcolor{green}{0}$ 0
🟢 umd/index.js 37.83 37.83 $\textcolor{green}{0}$ 0

Generated by 🚫 dangerJS against 0f722b2

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link

@avinashdvv avinashdvv left a comment

Choose a reason for hiding this comment

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

.DS_Store remove this binary files

.changeset/README.md Show resolved Hide resolved
.changeset/flat-sheep-own.md Show resolved Hide resolved
packages/.DS_Store Outdated Show resolved Hide resolved
.github/workflows/i18nify-react-validate.yml Outdated Show resolved Hide resolved
.changeset/flat-sheep-own.md Show resolved Hide resolved
.DS_Store Outdated Show resolved Hide resolved
.github/workflows/i18nify-js-validate.yml Outdated Show resolved Hide resolved

This comment has been minimized.

This comment has been minimized.

Copy link

@avinashdvv avinashdvv left a comment

Choose a reason for hiding this comment

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

LGTM

@tarun-khanna tarun-khanna merged commit 8154f6c into master Jan 22, 2024
11 checks passed
@tarun-khanna tarun-khanna deleted the feat/mono-repo branch January 22, 2024 16:32
Copy link
Contributor

Unit Test Results

0 files  0 suites   0s ⏱️
0 tests 0 ✔️ 0 💤 0 ❌

Results for commit 8154f6c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants