Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
2da5d36
feat: update to pnpm
tewarig Jul 20, 2025
8103d1b
chore: update github action
tewarig Jul 20, 2025
a1f144c
chore: change yarn to use pnpm
tewarig Jul 20, 2025
de6da72
chore: change yarn to pnpm
tewarig Jul 20, 2025
a68dd0c
chore: more package.json changes
tewarig Jul 20, 2025
ceab8e1
chore: empty commit
tewarig Aug 30, 2025
f98fe85
chore: update package.json
tewarig Aug 30, 2025
fb522fd
chore: replace run-p with --parallel
tewarig Aug 30, 2025
3a14f8b
chore: remove run-p from pnpm
tewarig Aug 31, 2025
86b0cd4
chore: replace run-p with runall
tewarig Aug 31, 2025
7620425
chore: update package.json
tewarig Aug 31, 2025
caf9635
chore: install deps first
tewarig Aug 31, 2025
f53e9b1
chore: change npm run-s to npm-run-all
tewarig Aug 31, 2025
c18f5d2
chore: add exec
tewarig Aug 31, 2025
8eb8484
chore: remove run from pacakge.json
tewarig Aug 31, 2025
728082a
chore: update github actions
tewarig Aug 31, 2025
8095579
chore: update razorpay blade
tewarig Aug 31, 2025
1769bdf
chore: update npm run all
tewarig Aug 31, 2025
7a838b4
chore: update pnpm workspace
tewarig Aug 31, 2025
3728dce
fix: spell check
tewarig Aug 31, 2025
164c463
chore: fozen lockfile
tewarig Aug 31, 2025
999dc7d
chore: update lock file
tewarig Aug 31, 2025
e70e63b
chore: update ts types
tewarig Sep 7, 2025
de0f6cc
more fixes
tewarig Sep 7, 2025
5105c36
fix: update types
tewarig Sep 7, 2025
17b5c38
chore: sync with master
tewarig Sep 7, 2025
196d8b5
chore: more chages
tewarig Sep 7, 2025
189684d
fix: all ts errors
tewarig Sep 10, 2025
0be1c04
fix: update blade validate
tewarig Sep 21, 2025
f9e29cd
fix: update lock file
tewarig Sep 21, 2025
9a6167b
feat: sync with master
tewarig Sep 21, 2025
51d4a25
fix: add pnpm rebuild
tewarig Sep 21, 2025
d6decd2
fix: add shell bash command
tewarig Sep 21, 2025
67ba645
fix: update lerna.json
tewarig Sep 21, 2025
a82f79a
fix: add rebuild at last
tewarig Sep 21, 2025
0dd4529
chore: add node canvas
tewarig Sep 21, 2025
0d660d3
chore: update lock file
tewarig Sep 21, 2025
b70855e
chore: new config
tewarig Sep 21, 2025
d407b90
chore: update pnpm file
tewarig Sep 21, 2025
8befcb7
chore: update pnpm file
tewarig Sep 21, 2025
80e6e76
fix: add overwrite
tewarig Sep 21, 2025
81aed2a
chore: update log file
tewarig Sep 21, 2025
77a7d80
chore: update snap
tewarig Sep 21, 2025
add336f
chore: ignore rn paths
tewarig Sep 21, 2025
5a86bab
chore: another try
tewarig Sep 21, 2025
92774de
fix: lint
tewarig Sep 21, 2025
d40e464
fix: transform ignore pattern
tewarig Sep 21, 2025
74b1a55
fix: update snaps
tewarig Sep 21, 2025
e44ca25
fix: lint
tewarig Sep 21, 2025
cd67ab9
fix: jest types issues
tewarig Sep 21, 2025
c2c7e76
fix: update blade mcp
tewarig Sep 21, 2025
f17b5f9
fix: update types
tewarig Sep 21, 2025
89467e1
fix: update eval values
tewarig Sep 28, 2025
95ce7c7
chore: updat snap
tewarig Sep 28, 2025
e4e0d29
fix: update test
tewarig Sep 28, 2025
9362a88
fix: lint
tewarig Sep 28, 2025
6de4938
fix: update github actions
tewarig Sep 28, 2025
92e4621
fix: disable type assertion for now
tewarig Sep 28, 2025
400eb8f
chore: sync with master
tewarig Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,31 @@ description: Installs npm packages and manages it's cache
runs:
using: composite
steps:
- name: Install Yarn
run: npm install -g yarn
shell: bash
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Cache setup for node modules
uses: actions/cache@v3
id: cache
with:
path: |
~/.yarn
~/.pnpm-store
./node_modules
./packages/**/node_modules
key: ${{ runner.os }}-blade-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-blade-${{ hashFiles('**/pnpm-lock.yaml') }}

# cache miss - install packages with `yarn --frozen-lockfile`
# cache hit - download packages from the cache and explicitly run postinstall script
# cache miss - install packages with pnpm install --frozen-lockfile
# cache hit - download packages from the cache
- name: install packages if cache miss
run: yarn --frozen-lockfile
run: |
pnpm install --frozen-lockfile
shell: bash
if: steps.cache.outputs.cache-hit != 'true'

- name: Run postinstall script
run: yarn postinstall
- name: Run postinstall script and ensure dependencies
run: |
pnpm run postinstall
shell: bash
if: steps.cache.outputs.cache-hit == 'true'
8 changes: 4 additions & 4 deletions .github/workflows/blade-bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- name: Setup Cache & Install Dependencies
uses: ./.github/actions/install-dependencies
- name: Update Bundle Size Data
run: yarn generate-bundle-size-info
run: pnpm generate-bundle-size-info
working-directory: packages/blade
- name: Danger
run: yarn danger ci
run: pnpm danger ci
working-directory: packages/blade
env:
DANGER_GITHUB_API_TOKEN: ${{ env.GITHUB_ACCESS_TOKEN }}
Expand All @@ -51,10 +51,10 @@ jobs:
- name: Setup Cache & Install Dependencies
uses: ./.github/actions/install-dependencies
- name: Build Blade React Production
run: yarn run-s build:clean build:generate-types build:react-prod
run: pnpm run-s build:clean build:generate-types build:react-prod
working-directory: packages/blade
- name: Update Bundle Size Data
run: yarn generate-bundle-size-info
run: pnpm generate-bundle-size-info
working-directory: packages/blade
env:
BUNDLE_SIZE_STATS_FILENAME: 'baseBundleSizeStats.json'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/blade-chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
buildScriptName: react:storybook:build
exitOnceUploaded: true
onlyChanged: true
untraced: '**/package.json'
untraced: '**/package.json **/pnpm-lock.yaml'
traceChanged: 'expanded'
env:
GITHUB_SHA: ${{ github.sha }}
Expand Down
31 changes: 12 additions & 19 deletions .github/workflows/blade-icon-to-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,45 +20,39 @@ jobs:
with:
fetch-depth: 0

# 2. decide what text well put in the file
# 2. decide what text we'll put in the file
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install Yarn
run: npm install --global yarn
- name: Setup Cache & Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Install dependencies
run: |
cd packages/blade
yarn install --frozen-lockfile

- name: Update icons.json
env:
FIGMA_API_TOKEN: ${{ secrets.FIGMA_API_TOKEN }}
run: |
cd packages/blade
yarn run fetch-icons
pnpm run fetch-icons


- name : Update icons Script
- name: Update icons Script
run: |
cd packages/blade
yarn run generate-icons
# 4. create the pull request
- name : Update React Tests
pnpm run generate-icons

- name: Update React Tests
run: |
cd packages/blade
yarn run test:react Icons --updateSnapshot
pnpm run test:react Icons --updateSnapshot

- name : Update React-Native Tests
- name: Update React-Native Tests
run: |
cd packages/blade
yarn run test:react-native Icons --updateSnapshot
pnpm run test:react-native Icons --updateSnapshot

- name: Lint Source Code
run: yarn lint:fix
run: pnpm lint:fix
continue-on-error: true

- name: Create Pull Request
Expand All @@ -74,4 +68,3 @@ jobs:
This PR was automatically generated by the **Create Random File PR** workflow.
It adds `${{ github.event.inputs.filename }}` containing random or provided text.
delete-branch: true
# cleans up after merge
2 changes: 1 addition & 1 deletion .github/workflows/blade-interaction-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ jobs:
- name: Run Interaction Tests
run: |
npx playwright install chromium firefox --with-deps
yarn test:react:interaction:ci
pnpm test:react:interaction:ci
working-directory: packages/blade
20 changes: 11 additions & 9 deletions .github/workflows/blade-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,19 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.12.1
- name: Pre-Generate Documentation Lock File
run: yarn generate-docs-lockfile
- name: Setup Cache & Install Dependencies
uses: ./.github/actions/install-dependencies
- name: Pre-Generate Documentation Lock File
run: pnpm generate-docs-lockfile
# check version of npm run all which is installed
- name: Check version of npm-run-all using pnpm
run: pnpm list npm-run-all
- name: Build Blade
run: yarn build
working-directory: packages/blade
run: pnpm --filter @razorpay/blade build
- name: Lint Source Code
run: yarn lint
run: pnpm lint
- name: Run TypeScript Checks
run: yarn typecheck
run: pnpm typecheck
working-directory: packages/blade

test:
Expand All @@ -53,7 +55,7 @@ jobs:
- name: Setup Cache & Install Dependencies
uses: ./.github/actions/install-dependencies
- name: Run Unit Tests
run: yarn test
run: pnpm test
working-directory: packages/blade
env:
SHARD: ${{ matrix.shard }}/${{ matrix.totalShards }}
Expand Down Expand Up @@ -110,10 +112,10 @@ jobs:
ls -la .nyc_output/

# Generate merged report and capture text-summary
yarn --silent nyc report --reporter=json --reporter=text-summary > coverage-summary.txt
pnpm --silent nyc report --reporter=json --reporter=text-summary > coverage-summary.txt

# Generate full coverage report
yarn --silent nyc report --reporter=json --reporter=text > coverage-full.txt
pnpm --silent nyc report --reporter=json --reporter=text > coverage-full.txt

# Ensure output directory exists
mkdir -p packages/blade/coverage
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
BLADE_MCP_SENTRY_DSN: ${{ secrets.BLADE_MCP_SENTRY_DSN }}
BLADE_SEGMENT_KEY: ${{ secrets.BLADE_SEGMENT_KEY }}
with:
publish: yarn release
publish: pnpm release
commit: 'build: update version'
title: 'build: update version'
- name: Publish to public npm registry
Expand All @@ -42,11 +42,11 @@ jobs:
BLADE_MCP_SENTRY_DSN: ${{ secrets.BLADE_MCP_SENTRY_DSN }}
BLADE_SEGMENT_KEY: ${{ secrets.BLADE_SEGMENT_KEY }}
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }}
run: yarn publish-npm
run: pnpm publish-npm
- name: Build Blade if not built by changeset
if: steps.changesets.outputs.published == 'false'
working-directory: packages/blade
run: yarn build
run: pnpm build
- name: Publish to Chromatic
uses: chromaui/action@v1
if: steps.changesets.outputs.published == 'true' || github.event_name == 'workflow_dispatch' # run when the package is published via changeset or if a release is triggered manually.
Expand All @@ -58,7 +58,7 @@ jobs:
buildScriptName: react:storybook:build
exitOnceUploaded: true
onlyChanged: true
untraced: '**/package.json'
untraced: '**/package.json **/pnpm-lock.yaml'
traceChanged: 'expanded'
env:
GITHUB_SHA: ${{ github.sha }}
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@razorpay:registry=https://registry.npmjs.org/
shared-workspace-lockfile=true
3 changes: 1 addition & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClient": "pnpm",
"command": {
"bootstrap": {
"ignoreScripts": true
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"engines": {
"node": ">=18.12.1"
},
"pnpm": {
"overrides": {
"canvas": "npm:@napi-rs/[email protected]"
}
},
"workspaces": {
"packages": [
"packages/blade",
Expand All @@ -23,8 +28,8 @@
"lint:fix": "eslint --ext js,jsx,ts,tsx packages --fix && stylelint '**/*.{js,jsx,ts,tsx}' --fix",
"publish-npm": "node ./scripts/publishToNpm.js",
"release": "node ./scripts/generateGitHubRegistryNpmrc.js && changeset publish",
"postinstall": "yarn build:eslint-plugin-blade",
"build": "npm-run-all --parallel build:*",
"postinstall": "pnpm run build:eslint-plugin-blade",
"build": "npm-run-all build:*",
"build:blade": "lerna run --scope @razorpay/blade build",
"build:blade-mcp": "lerna run --scope @razorpay/blade-mcp build",
"build:eslint-plugin-blade": "lerna run --scope eslint-plugin-blade build",
Expand Down
2 changes: 1 addition & 1 deletion packages/blade-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"base-blade-template"
],
"scripts": {
"prepare": "yarn build",
"prepare": "pnpm build",
"build": "cross-env NODE_ENV=production sh -c \"tsc && chmod +x dist/server.js && node src/replaceEnv.js\"",
"dev": "tsx src/server.ts",
"inspect": "npx -y @modelcontextprotocol/inspector node dist/server.js",
Expand Down
4 changes: 4 additions & 0 deletions packages/blade/.storybook/react/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ const config: StorybookConfig = {
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
// You can change the configuration based on that.
// 'PRODUCTION' is used when building the static version of storybook.

// Add the devtool configuration here
config.devtool = 'eval';

config.resolve.extensions = [
'.web.tsx',
'.web.ts',
Expand Down
2 changes: 1 addition & 1 deletion packages/blade/jest.native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
},
testEnvironment: 'node', // Ref: https://github.com/callstack/react-native-testing-library/issues/896#issuecomment-1190249878
transformIgnorePatterns: [
'node_modules/(?!(react-native.*|@react-native.*|@?react-navigation.*|@?react-navigation-stack)/)',
'node_modules/.pnpm/(?!(react-native.*|@react-native.*|@?react-navigation.*|@?react-navigation-stack)/)',
],
setupFilesAfterEnv: [
'@testing-library/jest-native/extend-expect',
Expand Down
2 changes: 1 addition & 1 deletion packages/blade/jest.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const baseConfig = {
transform: {
'\\.(js|ts|tsx)?$': './jest-preprocess.js',
},
transformIgnorePatterns: ['/node_modules/(?!(@table-library)/)'],
transformIgnorePatterns: ['/node_modules/(?!(.pnpm/)?@table-library.*)'],
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect', './jest-setup.web.js'],
moduleNameMapper: {
Expand Down
Loading
Loading