Fix inserted-count log, clear npm audit findings, add integration source tag#31
Merged
Conversation
npm audit fix --force's only proposed fix was downgrading @huggingface/transformers 4.2.0 -> 3.8.1 (a SemVer major regression), and it still left the adm-zip advisory open. Same root cause as semantic-search-example: onnxruntime-node's install script pins adm-zip ^0.5.16 even in its latest release. Override adm-zip to ^0.6.0 instead, which clears all findings without touching the transformers version the app actually depends on.
Attributes usage from this sample app per https://docs.pinecone.io/integrations/build-integration/attribute-usage-to-your-integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm run index's finalInserted N documents into index ...log readprogressBar.getTotal(), butcli-progress'sSingleBar.start()silently no-ops whenever stdout isn't a TTY (any piped/redirected/CI run), sototalnever gets set and the message falls back to the library's constructor default of 100 regardless of how many documents were actually indexed. Reproduced: reported "Inserted 100 documents" for a 10-row dataset. Fixed by reportingclean.lengthdirectly instead of relying on the progress bar's internal state.npm audit fix --force's only proposed fix was downgrading@huggingface/transformers4.2.0 → 3.8.1 (a SemVer major regression), and it still left theadm-zipadvisory open (same root cause assemantic-search-example:onnxruntime-node's install script pinsadm-zip@^0.5.16even in its latest release). Overrideadm-zipto^0.6.0instead, which clears all findings without touching thetransformersversion the app actually depends on. 3 findings → 0.sourceTagto thenew Pinecone(...)calls insrc/index.tsandsrc/recommend.tsso usage from this sample app is attributed per Pinecone's integration docs.Test plan
npm run typechecknpm test, 23 tests) passesnpm run index+npm run recommendend-to-end against a scratch index, confirming both the fixed count and correct recommendationsNote
Low Risk
Sample-app dependency and client configuration only; no auth logic or production data-path changes beyond using the existing env API key explicitly.
Overview
Adds an
adm-zipnpm override (^0.6.0) so transitive installs (e.g. fromonnxruntime-node) pick up the patched version without downgrading@huggingface/transformers;package-lock.jsonupdates accordingly.Pinecone client setup in
src/index.tsandsrc/recommend.tsnow passesapiKeyfromPINECONE_API_KEYand asourceTag(pinecone:recommender_example_typescript) onnew Pinecone(...)for integration attribution.Reviewed by Cursor Bugbot for commit ff55f50. Bugbot is set up for automated code reviews on this repo. Configure here.