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

IMPORTANT: npm package not up to date #323

Open
LBF38 opened this issue Sep 20, 2023 · 6 comments
Open

IMPORTANT: npm package not up to date #323

LBF38 opened this issue Sep 20, 2023 · 6 comments
Labels

Comments

@LBF38
Copy link

LBF38 commented Sep 20, 2023

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)

  • OS: Desktop
  • Platform: NodeJS, Desktop

Part of

@LBF38 LBF38 added the 🐛 bug label Sep 20, 2023
@lionelhorn
Copy link

Current version in code is 2.0.0

"version": "2.0.0",

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?
#274

@teolemon
Copy link
Member

@VaiTon should we consider releasing ?

@VaiTon
Copy link
Member

VaiTon commented Oct 27, 2023

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
Copy link
Member

VaiTon commented Oct 27, 2023

@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
Copy link
Author

LBF38 commented Oct 27, 2023

@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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

5 participants