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

[development] Update webpack rewrite logic to facilitate pre-auth in local development #7598

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JayaShakthi97
Copy link
Contributor

Purpose

$subject

Related Issues

  • N/A

Related PRs

  • N/A

Checklist

  • e2e cypress tests locally verified. (for internal contributers)
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Relevant backend changes deployed and verified
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

@wso2-jenkins-bot
Copy link
Contributor

⚠️ No Changeset found

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go.

If these changes should result in a version bump, you need to add a changeset.

Refer Release Documentation to learn how to add a changeset.

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.85%. Comparing base (c1c517a) to head (e03726a).
Report is 251 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7598   +/-   ##
=======================================
  Coverage   41.85%   41.85%           
=======================================
  Files          42       42           
  Lines         939      939           
  Branches      230      238    +8     
=======================================
  Hits          393      393           
- Misses        502      546   +44     
+ Partials       44        0   -44     
Flag Coverage Δ
@wso2is/core 41.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 12 files with indirect coverage changes

const DEBUG_ENABLED: boolean = false;
const DEBUG_LOG_KEY: string = "webpack-dev-server";
// eslint-disable-next-line @typescript-eslint/typedef, no-console
const log = console.log;
Copy link
Contributor

Choose a reason for hiding this comment

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

If we directly assign console, we won't need a eslint disable comment here 😉

Suggested change
const log = console.log;
const logger = console;

Comment on lines +723 to +731
let matchFound: boolean = false;

for (const pattern of patterns) {
if (pattern.test(pathWithoutQuery) && query.code) {
matchFound = true;

break;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use .some instead.

const matchFound = patterns.some(pattern => pattern.test(pathWithoutQuery) && query.code);

@pavinduLakshan pavinduLakshan changed the title [development] Update webpack rewrite logic to facilitate pre-auth [development] Update webpack rewrite logic to facilitate pre-auth in local development Feb 11, 2025
@pavinduLakshan
Copy link
Contributor

Much needed improvement btw 👏

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.

3 participants