-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix/2177/log missing local network ip #2732
Conversation
🦋 Changeset detectedLatest commit: 8f4df75 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
const { type = 'module', version, dependencies = {} } = await fs.readFile('./package.json').then((res) => JSON.parse(res.toString())); | ||
// expose PACKAGE_VERSION on process.env for CLI utils | ||
config.define = { 'process.env.PACKAGE_VERSION': JSON.stringify(version) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were already reading the local package.json
file anyway, so we can inject whatever metadata we need during build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great call!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Looks good to merge once CI is all passing.
* feat: show "localhost" for local network IPs * refactor: remove timestamps from addr logs * fix: hide timestamp on null types * feat: add emoji OS helper * feat: make logs 100% nicer * refactor: extract isLocalHost to util * feat: update preview logs to match * chore: add changeset * fix: pull pkg version from package.json * refactor: remove 👉 guys * fix: devStart return type * feat: inject process.env.PACKAGE_VERSION at build time * feat: update unit test for hostname checks Co-authored-by: Nate Moore <nate@skypack.dev>
* feat: show "localhost" for local network IPs * refactor: remove timestamps from addr logs * fix: hide timestamp on null types * feat: add emoji OS helper * feat: make logs 100% nicer * refactor: extract isLocalHost to util * feat: update preview logs to match * chore: add changeset * fix: pull pkg version from package.json * refactor: remove 👉 guys * fix: devStart return type * feat: inject process.env.PACKAGE_VERSION at build time * feat: update unit test for hostname checks Co-authored-by: Nate Moore <nate@skypack.dev>
Changes
devOptions.hostname
not displaying local network IP. #2177--hostname=127.0.0.1
,--hostname=0.0.0.0
, no hostname provided--hostname
IP for all other IPsTesting
Manually tested with different
--hostname
arguments.Docs
N/A