openfoodfacts / openfoodfacts-nodejs

Official Node package for Open Food Facts
https://openfoodfacts.github.io/openfoodfacts-nodejs/
Apache License 2.0
139 stars 26 forks source link

IMPORTANT: npm package not up to date #323

Open LBF38 opened 12 months ago

LBF38 commented 12 months ago

What

The npm package corresponding to this repo is not up to date to the latest development. See here for more info.

Steps to reproduce the behavior:

  1. Run pnpm add openfoodfacts-nodejs in your terminal (or npm i ...
  2. Go to the node_modules folder
  3. Search for the openfoodfacts-nodejs package folder
  4. Open the README and see the version.
  5. The error can occur when consuming the package in TypeScript for example. => it works when using require but no IntelliSense.

Expected behavior

To have the latest code of this repo in the package.

Screenshots

image

Platform (Desktop, Mobile, Hunger Games)

Part of

lionelhorn commented 10 months ago

Current version in code is 2.0.0 https://github.com/openfoodfacts/openfoodfacts-nodejs/blob/c261d98d3feb6441cf7d9de63cb315306787d9d7/package.json#L3

And version on npm is 0.1.0 https://www.npmjs.com/package/openfoodfacts-nodejs?activeTab=versions

Is there a reason the dev branch state hasn't been released?

And the related PR not approved? https://github.com/openfoodfacts/openfoodfacts-nodejs/pull/274

teolemon commented 10 months ago

@VaiTon should we consider releasing ?

VaiTon commented 10 months ago

Is there a reason the dev branch state hasn't been released?

And the related PR not approved? #274

Because it isn't stable yet, and the main branch is still in develop. Any help is appreciated though!

VaiTon commented 10 months ago

@LBF38 in the meantime you can use the git dependency in the package.json

https://docs.npmjs.com/cli/v10/configuring-npm/package-json#git-urls-as-dependencies

LBF38 commented 10 months ago

@LBF38 in the meantime you can use the git dependency in the package.json

docs.npmjs.com/cli/v10/configuring-npm/package-json#git-urls-as-dependencies

That's true ! Completely forgot about that. Thanks for the reminder 🙏

alexfauquette commented 8 months ago

I tried with the following package.json import.

    "openfoodfacts-nodejs": "https://github.com/openfoodfacts/openfoodfacts-nodejs.git#develop",

About the argument

Because it isn't stable yet

It's possible to release a version "2.0.0-alpha.x" or "2.0.0-beta.x". npm will still consider the current version as the latest. To install the unstable package, you will have to use openfoodfacts-nodejs: 'next'

As an example, you can see the @mui/x-charts package version (we are transitioning between v6 to v7) https://www.npmjs.com/package/@mui/x-charts?activeTab=versions