diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..d5d401c5189 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,31 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs +jobs: + say-hello: + # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job + docker: + # Specify the version you desire here + # See: https://circleci.com/developer/images/image/cimg/base + - image: cimg/base:current + + # Add steps to the job + # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps + steps: + # Checkout the code as the first step. + - checkout + - run: + name: "Say hello" + command: "echo Hello, World!" + +# Orchestrate jobs using workflows +# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows +workflows: + say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow. + # Inside the workflow, you define the jobs you want to run. + jobs: + - say-hello diff --git a/apps/cli/src/lib/pr-body-cleaner.ts b/apps/cli/src/lib/pr-body-cleaner.ts index 5213447eeb4..d759f98ae0a 100644 --- a/apps/cli/src/lib/pr-body-cleaner.ts +++ b/apps/cli/src/lib/pr-body-cleaner.ts @@ -87,7 +87,11 @@ function removeHTMLCommentsExceptCursorSummary(text: string): string { }) // Remove all other HTML comments - textWithProtection = textWithProtection.replace(//g, '') + let previousTextWithProtection: string + do { + previousTextWithProtection = textWithProtection + textWithProtection = textWithProtection.replace(//g, '') + } while (textWithProtection !== previousTextWithProtection) // Restore CURSOR_SUMMARY content (without comment markers and footers) summaries.forEach((summary, index) => { diff --git a/apps/web/src/pages/Landing/Landing.e2e.test.ts b/apps/web/src/pages/Landing/Landing.e2e.test.ts index 0fdce8d788a..dd3d96bbe0e 100644 --- a/apps/web/src/pages/Landing/Landing.e2e.test.ts +++ b/apps/web/src/pages/Landing/Landing.e2e.test.ts @@ -62,7 +62,7 @@ test.describe( await page.unrouteAll({ behavior: 'ignoreErrors' }) }) test('renders UK compliance banner in UK', async ({ page }) => { - await page.route(/(?:interface|beta).gateway.uniswap.org\/v1\/amplitude-proxy/, async (route) => { + await page.route(/(?:interface|beta)\.gateway\.uniswap\.org\/v1\/amplitude-proxy/, async (route) => { const requestBody = JSON.stringify(await route.request().postDataJSON()) const originalResponse = await route.fetch() const byteSize = new Blob([requestBody]).size diff --git a/packages/sessions/src/challenge-solvers/turnstileSolver.integration.test.ts b/packages/sessions/src/challenge-solvers/turnstileSolver.integration.test.ts index 21e5144d8c2..7b53ae30e37 100644 --- a/packages/sessions/src/challenge-solvers/turnstileSolver.integration.test.ts +++ b/packages/sessions/src/challenge-solvers/turnstileSolver.integration.test.ts @@ -26,7 +26,16 @@ beforeAll(() => { }) vi.spyOn(document.head, 'appendChild').mockImplementation((node) => { - if (node instanceof HTMLScriptElement && node.src.includes('challenges.cloudflare.com')) { + let isTurnstileScript = false + if (node instanceof HTMLScriptElement && node.src) { + try { + const url = new URL(node.src, window.location.origin) + isTurnstileScript = url.hostname === 'challenges.cloudflare.com' + } catch { + isTurnstileScript = false + } + } + if (isTurnstileScript) { // Simulate script load immediately setTimeout(() => { // Set up the mock turnstile API @@ -244,12 +253,19 @@ describe('Turnstile Solver Integration Tests', () => { it('handles script loading failures', async () => { // Mock script loading failure vi.spyOn(document.head, 'appendChild').mockImplementationOnce((node) => { - if (node instanceof HTMLScriptElement && node.src.includes('challenges.cloudflare.com')) { - setTimeout(() => { - if (node.onerror) { - node.onerror({} as Event) + if (node instanceof HTMLScriptElement && node.src) { + try { + const url = new URL(node.src, window.location.origin) + if (url.hostname === 'challenges.cloudflare.com') { + setTimeout(() => { + if (node.onerror) { + node.onerror({} as Event) + } + }, 0) } - }, 0) + } catch { + // If the URL is invalid, do not treat it as the Turnstile script + } } return node })