Gracefully handle incomplete package.json files#239
Merged
Conversation
Previously, scip-typescript didn't emit the required `scip-typescript npm PACKAGE_NAME PACKAGE_VERSION` prefix for global symbols when a package.json file was missing either the `name` or `version` field. Now, scip-typescript guarantees that all global symbols have this prefix. When the `version` field is missing, we fallback to the version `"HEAD"`.
72393d2 to
d0b386b
Compare
valerybugakov
approved these changes
Mar 16, 2023
olafurpg
added a commit
to sourcegraph/sourcegraph-public-snapshot
that referenced
this pull request
Mar 16, 2023
To include the fix from sourcegraph/scip-typescript#239 in the 5.0 release.
olafurpg
added a commit
to sourcegraph/sourcegraph-public-snapshot
that referenced
this pull request
Mar 16, 2023
To include the fix from sourcegraph/scip-typescript#239 in the 5.0 release. ## Test plan Ran the following command ``` ❯ docker run sourcegraph/scip-typescript@sha256:1851ad42b3b47c8fb240c5060b5757cf51ebeece5e360013e41ab8a1dd05d52c scip-typescript --version WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.3.7 ``` <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles -->
github-actions Bot
pushed a commit
to sourcegraph/sourcegraph-public-snapshot
that referenced
this pull request
Mar 16, 2023
To include the fix from sourcegraph/scip-typescript#239 in the 5.0 release. ## Test plan Ran the following command ``` ❯ docker run sourcegraph/scip-typescript@sha256:1851ad42b3b47c8fb240c5060b5757cf51ebeece5e360013e41ab8a1dd05d52c scip-typescript --version WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.3.7 ``` <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> (cherry picked from commit d7070e3)
Strum355
pushed a commit
to sourcegraph/sourcegraph-public-snapshot
that referenced
this pull request
Mar 16, 2023
To include the fix from sourcegraph/scip-typescript#239 in the 5.0 release. ## Test plan Ran the following command ``` ❯ docker run sourcegraph/scip-typescript@sha256:1851ad42b3b47c8fb240c5060b5757cf51ebeece5e360013e41ab8a1dd05d52c scip-typescript --version WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.3.7 ``` <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> <br> Backport d7070e3 from #49499 Co-authored-by: Ólafur Páll Geirsson <olafurpg@gmail.com>
sqs
pushed a commit
to sourcegraph/sourcegraph-public-snapshot
that referenced
this pull request
Mar 18, 2023
To include the fix from sourcegraph/scip-typescript#239 in the 5.0 release. ## Test plan Ran the following command ``` ❯ docker run sourcegraph/scip-typescript@sha256:1851ad42b3b47c8fb240c5060b5757cf51ebeece5e360013e41ab8a1dd05d52c scip-typescript --version WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.3.7 ``` <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles -->
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.
Previously, scip-typescript didn't emit the required
scip-typescript npm PACKAGE_NAME PACKAGE_VERSIONprefix for global symbols when a package.json file was missing either thenameorversionfield. Now, scip-typescript guarantees that all global symbols have this prefix. When theversionfield is missing, we fallback to the version"HEAD".Test plan
Updated snapshot tests with e2e tests.