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(internet): improve ipv4 method #2992

Open
wants to merge 11 commits into
base: next
Choose a base branch
from
Open

feat(internet): improve ipv4 method #2992

wants to merge 11 commits into from

Conversation

ST-DDT
Copy link
Member

@ST-DDT ST-DDT commented Jul 5, 2024

Improves the ipv4 generation options by adding parameters to configure the ip range to generate.

  • cidrBlock: Declares the explicit cidr range for the ip to generate in e.g. 192.168.42.0/24. Defaults to 0.0.0.0/0.
  • network: Alias for well known cidr-blocks such as loopback. Defaults to any.

Preview: internet#ipv4

grafik

Supersedes #2460

@ST-DDT ST-DDT added c: feature Request for new feature p: 1-normal Nothing urgent m: internet Something is referring to the internet module labels Jul 5, 2024
@ST-DDT ST-DDT added this to the v9.x milestone Jul 5, 2024
@ST-DDT ST-DDT requested review from a team July 5, 2024 14:30
@ST-DDT ST-DDT self-assigned this Jul 5, 2024
Copy link

netlify bot commented Jul 5, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 1398720
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/66e8947c45298300082b3090
😎 Deploy Preview https://deploy-preview-2992.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (48f171e) to head (1398720).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2992      +/-   ##
==========================================
- Coverage   99.97%   99.96%   -0.01%     
==========================================
  Files        2776     2776              
  Lines      226338   226380      +42     
  Branches      944      944              
==========================================
+ Hits       226285   226307      +22     
- Misses         53       73      +20     
Files with missing lines Coverage Δ
src/index.ts 100.00% <ø> (ø)
src/modules/internet/index.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Copy link
Member

@xDivisionByZerox xDivisionByZerox left a comment

Choose a reason for hiding this comment

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

I honestly have a hard time understanding the implementation details, as I my only experience with bit manipulation is reading enum "flags" from an integer. I'm very happy for the test scenarios you provided.

src/modules/internet/index.ts Outdated Show resolved Hide resolved
test/modules/internet.spec.ts Show resolved Hide resolved
src/modules/internet/index.ts Outdated Show resolved Hide resolved
src/modules/internet/index.ts Outdated Show resolved Hide resolved
@ST-DDT ST-DDT added the s: needs decision Needs team/maintainer decision label Jul 15, 2024
@xDivisionByZerox xDivisionByZerox removed the s: needs decision Needs team/maintainer decision label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature m: internet Something is referring to the internet module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants