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

Simplify the way to get npm package version #61

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qdequele
Copy link
Member

This simple contribution uses the environment variable to get the npm package version instead of updating manually the version on a file.

Not sure if it's working on Docker but it should as we are performing a npm run start and not a node index.js from a transpiled file.

@qdequele qdequele marked this pull request as draft July 23, 2023 10:21
@@ -10,7 +9,7 @@ export function initMeilisearchClient({
host,
apiKey,
clientAgents: [
`Meilisearch Crawler (v${PACKAGE_VERSION})`,
`Meilisearch Crawler (v${process.env.npm_package_version})`,
Copy link
Contributor

Choose a reason for hiding this comment

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

How is the version added in the env variable npm_package_version ?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's npm that is adding it by itself.

@bidoubiwa bidoubiwa closed this Jul 31, 2023
@bidoubiwa bidoubiwa reopened this Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants