-
Notifications
You must be signed in to change notification settings - Fork 110
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
feat(deno): Retrieve version from import.meta.url or git, when possible #1985
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1985 +/- ##
=======================================
Coverage 85.68% 85.68%
=======================================
Files 91 91
Lines 3792 3792
Branches 1220 1220
=======================================
Hits 3249 3249
Misses 457 457
Partials 86 86 ☔ View full report in Codecov by Sentry. |
This comment was marked as resolved.
This comment was marked as resolved.
98b660e
to
f6665a3
Compare
f6665a3
to
7b85ad9
Compare
I think this should be good to go. |
7b85ad9
to
961dc35
Compare
let version = getArchiveVersion() | ||
if (version) { return version } | ||
|
||
const url = new URL(Deno.mainModule) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched to Deno.mainModule
to display a module users would expect, if we can't find any version info. Not sure if tying it to Deno is wise. Could inspect the stack trace to find the main module.
bids-validator/src/setup/options.ts
Outdated
'--filenameMode', | ||
'Enable filename checks for newline separated filenames read from stdin', | ||
) | ||
async function getValidatorCommand() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return annotation caused headaches, so I dropped it, and typescript was happy enough.
5221c61
to
c5775f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made one change which preserves the export for validateCommand since this is used by OpenNeuro CLI.
c165b73
to
789ff09
Compare
Rebased to resolve tests (I hope). |
This way git can fail and we fall back to the URL, rather than have Deno crash.
6150a3f
to
748cf3c
Compare
Should emit the right version for released versions on deno.land. We can improve it for untagged versions in the future.