Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

refactor(deps): remove ip for node native implementation #1302

Merged
merged 8 commits into from
Feb 29, 2024

Conversation

dogpatch626
Copy link
Member

Description

remove node package 'Ip' use node native implementation in order to provide the same functionality

Motivation and Context

How Has This Been Tested?

unit tests, built local docker image

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)
  • Dependency update
  • Security update

Checklist:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • These changes should be applied to a maintenance branch.
  • This change requires cross browser checks.
  • Performance tests should be ran against the server prior to merging.
  • This change impacts caching for client browsers.
  • This change impacts HTTP headers.
  • This change adds additional environment variable requirements for One App users.
  • I have added the Apache 2.0 license header to any new files created.

What is the Impact to Developers Using One App?

Copy link
Contributor

github-actions bot commented Feb 22, 2024

Size Change: 0 B

Total Size: 719 kB

ℹ️ View Unchanged
Filename Size
./build/app/app.js 171 kB
./build/app/app~vendors.js 410 kB
./build/app/runtime.js 7.07 kB
./build/app/service-worker-client.js 7.25 kB
./build/app/vendors.js 123 kB

compressed-size-action

src/server/utils/getIP.js Outdated Show resolved Hide resolved
@@ -252,5 +252,5 @@ const runTime = [
},
];
runTime.forEach(preprocessEnvVar);
export { ip };
Copy link
Member

Choose a reason for hiding this comment

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

ip is actually a string but we return a function, should we return the function call?


const ipAddresses = Object.keys(interfaces)
.map((name) => interfaces[name].find((iface) => iface.family === 'IPv4'
&& !iface.internal && iface.address !== '127.0.0.1'))
Copy link
Member

Choose a reason for hiding this comment

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

not a blocker but && iface.address !== '127.0.0.1' is no longer needed

@dogpatch626 dogpatch626 enabled auto-merge (squash) February 29, 2024 14:02
@dogpatch626 dogpatch626 merged commit f088aab into main Feb 29, 2024
9 checks passed
@dogpatch626 dogpatch626 deleted the chore/replace-ip branch February 29, 2024 14:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants