From 9d6ab69d376cf7dd62253307a33c179aff54fb4c Mon Sep 17 00:00:00 2001 From: lohit Date: Tue, 13 May 2025 19:21:30 +0530 Subject: [PATCH 1/4] eslint - node out of memeory issue --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8d7ee6287..abfe137c2 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "test:e2e": "playwright test", "test:prettier:web": "npm run test:prettier --workspace=packages/bruno-app", "prepare": "husky install", - "lint": "npx eslint ./" + "lint": "node --max_old_space_size=4096 $(npx which eslint)" }, "overrides": { "rollup": "3.29.5", From 361add3385472a575e6acd6f2619093d2706274c Mon Sep 17 00:00:00 2001 From: lohit Date: Tue, 13 May 2025 19:41:39 +0530 Subject: [PATCH 2/4] handle folder run action while a collection run is in progress (#4658) Co-authored-by: lohit --- .../CollectionItem/RunCollectionItem/index.js | 49 ++++++++++++++----- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.js index 8aaaa749c..f56d408b0 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.js @@ -13,6 +13,7 @@ const RunCollectionItem = ({ collectionUid, item, onClose }) => { const dispatch = useDispatch(); const collection = useSelector(state => state.collections.collections?.find(c => c.uid === collectionUid)); + const isCollectionRunInProgress = collection?.runnerResult?.info?.status && (collection?.runnerResult?.info?.status !== 'ended'); const onSubmit = (recursive) => { dispatch( @@ -22,10 +23,24 @@ const RunCollectionItem = ({ collectionUid, item, onClose }) => { type: 'collection-runner' }) ); - dispatch(runCollectionFolder(collection.uid, item ? item.uid : null, recursive)); + if (!isCollectionRunInProgress) { + dispatch(runCollectionFolder(collection.uid, item ? item.uid : null, recursive)); + } onClose(); }; + const handleViewRunner = (e) => { + e.preventDefault(); + dispatch( + addTab({ + uid: uuid(), + collectionUid: collection.uid, + type: 'collection-runner' + }) + ); + onClose(); + } + const getRequestsCount = (items) => { const requestTypes = ['http-request', 'graphql-request'] return items.filter(req => requestTypes.includes(req.type)).length; @@ -55,22 +70,34 @@ const RunCollectionItem = ({ collectionUid, item, onClose }) => {
This will run all the requests in this folder and all its subfolders.
{isFolderLoading ?
Requests in this folder are still loading.
: null} + {isCollectionRunInProgress ?
A Collection Run is already in progress.
: null}
- - - - - - + { + isCollectionRunInProgress ? + + + + : + <> + + + + + + + + }
)} From c407b73c223599e7a895e8e8449b3dac12483a69 Mon Sep 17 00:00:00 2001 From: sreelakshmi-bruno Date: Tue, 13 May 2025 19:42:00 +0530 Subject: [PATCH 3/4] Updating contributing.md --- contributing.md | 58 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/contributing.md b/contributing.md index 2e91f5220..f8e0909e2 100644 --- a/contributing.md +++ b/contributing.md @@ -15,15 +15,15 @@ | [正體中文](docs/contributing/contributing_zhtw.md) | [日本語](docs/contributing/contributing_ja.md) | [हिंदी](docs/contributing/contributing_hi.md) -| [Nederlands](docs/contributing/contributing_nl.md) +| [Dutch](docs/contributing/contributing_nl.md) ## Let's make Bruno better, together!! -We are happy that you are looking to improve Bruno. Below are the guidelines to get started bringing up Bruno on your computer. +We are happy that you are looking to improve Bruno. Below are the guidelines to run Bruno on your computer. ### Technology Stack -Bruno is built using Next.js and React. We also use electron to ship a desktop version (that supports local collections) +Bruno is built using React and Electron. Libraries we use @@ -42,8 +42,9 @@ Libraries we use ## Development -Bruno is being developed as a desktop app. You need to load the app by running the Next.js app in one terminal and then run the electron app in another terminal. +Bruno is a desktop app. Below are the instructions to run Bruno. +> Note: We use React for the frontend and rsbuild for build and dev server. ## Install Dependencies @@ -55,9 +56,13 @@ nvm use npm i --legacy-peer-deps ``` -### Local Development (Option 1) +### Local Development -```bash +#### Build packages + +##### Option 1 + +```bash # build packages npm run build:graphql-docs npm run build:bruno-query @@ -67,7 +72,19 @@ npm run build:bruno-requests # bundle js sandbox libraries npm run sandbox:bundle-libraries --workspace=packages/bruno-js +``` +##### Option 2 +```bash +# install dependencies and setup +npm run setup +``` + +#### Run the app + +##### Option 1 + +```bash # run react app (terminal 1) npm run dev:web @@ -75,12 +92,8 @@ npm run dev:web npm run dev:electron ``` -### Local Development (Option 2) - +##### Option 2 ```bash -# install dependencies and setup -npm run setup - # run electron and react app concurrently npm run dev ``` @@ -103,7 +116,28 @@ find . -type f -name "package-lock.json" -delete ```bash # run bruno-schema tests -npm test --workspace=packages/bruno-schema +npm run test --workspace=packages/bruno-schema + +# run bruno-query tests +npm run test --workspace=packages/bruno-query + +# run bruno-common tests +npm run test --workspace=packages/bruno-common + +# run bruno-converters tests +npm run test --workspace=packages/bruno-converters + +# run bruno-app tests +npm run test --workspace=packages/bruno-app + +# run bruno-electron tests +npm run test --workspace=packages/bruno-electron + +# run bruno-lang tests +npm run test --workspace=packages/bruno-lang + +# run bruno-toml tests +npm run test --workspace=packages/bruno-toml # run tests over all workspaces npm test --workspaces --if-present From 2f58379feb9af1355904bf9c992cd0c94c70a354 Mon Sep 17 00:00:00 2001 From: ramki-bruno Date: Wed, 14 May 2025 11:54:33 +0530 Subject: [PATCH 4/4] Customize Playwright reporter and retries for dev and CI env --- playwright.config.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index b0adb030f..684477e40 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,12 +1,19 @@ import { defineConfig, devices } from '@playwright/test'; +const reporter: string[][string] = [['list'], ['html']]; + +if (process.env.CI) { + reporter.push(["github"]); +} + + export default defineConfig({ testDir: './e2e-tests', fullyParallel: false, forbidOnly: !!process.env.CI, - retries: process.env.CI ? 2 : 0, + retries: process.env.CI ? 1 : 0, workers: process.env.CI ? undefined : 1, - reporter: 'html', + reporter, use: { trace: 'on-first-retry' },