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

fix: use correct version IPFS version number #3534

Closed
wants to merge 1 commit into from
Closed

Conversation

vmx
Copy link
Member

@vmx vmx commented Feb 5, 2021

The version number that ipfs.version() outputs should be the one
of the release.

Prior to this change it was the version of the ipfs-core package.

This change is powered by the hackweek :)

The version number that `ipfs.version()` outputs should be the one
of the release.

Prior to this change it was the version of the `ipfs-core` package.
@vmx vmx requested a review from achingbrain February 5, 2021 15:03
@@ -1,6 +1,6 @@
'use strict'

const pkg = require('../../package.json')
const pkg = require('../../../ipfs/package.json')
Copy link
Member

Choose a reason for hiding this comment

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

This will fail at runtime as it traverses outside of the module folder. E.g. if you only have ipfs-core installed (e.g. your app is running an in-process IPFS node and you don't need a CLI/HTTP API server/daemon, etc).

Copy link
Member

Choose a reason for hiding this comment

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

A better solution may be to have the build write a version file out at build time with the version number, git hash, etc, then we can try to load it here. It would also mean that the whole package.json doesn't get included in the browser bundle which would be a nice side benefit.

@lidel
Copy link
Member

lidel commented Apr 12, 2021

Seems this needs more robust solution, let's continue in #3622

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants