Skip to content

Commit

Permalink
refactor: simpler way to get npm package version
Browse files Browse the repository at this point in the history
  • Loading branch information
qdequele committed Jul 22, 2023
1 parent 2b43b5b commit fc68bc0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/meilisearch_client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Config, MeiliSearch } from 'meilisearch'
import { PACKAGE_VERSION } from './package_version.js'

export function initMeilisearchClient({
host,
Expand All @@ -10,7 +9,7 @@ export function initMeilisearchClient({
host,
apiKey,
clientAgents: [
`Meilisearch Crawler (v${PACKAGE_VERSION})`,
`Meilisearch Crawler (v${process.env.npm_package_version})`,

Check failure on line 12 in src/meilisearch_client.ts

View workflow job for this annotation

GitHub Actions / lint tests

Invalid type "string | undefined" of template literal expression

Check failure on line 12 in src/meilisearch_client.ts

View workflow job for this annotation

GitHub Actions / lint tests

Invalid type "string | undefined" of template literal expression
...clientAgents,
],
})
Expand Down
1 change: 0 additions & 1 deletion src/package_version.ts

This file was deleted.

0 comments on commit fc68bc0

Please sign in to comment.