Skip to content

Commit

Permalink
Merge pull request #29 from whomwah/feat/fix-streams
Browse files Browse the repository at this point in the history
Feat/fix streams
  • Loading branch information
whomwah authored Oct 4, 2024
2 parents d1c0704 + e0d2d3b commit 68bf455
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 36 deletions.
2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@std/fs": "jsr:@std/fs",
"@std/semver": "jsr:@std/semver",
"@std/path": "jsr:@std/path",
"@std/streams": "jsr:@std/streams",
"@std/io/write-all": "jsr:@std/io/write-all",
"sqlite": "https://deno.land/x/sqlite@v3.5.0/mod.ts"
},
"tasks": {
Expand Down
33 changes: 6 additions & 27 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<key>runningsubtext</key>
<string>Octocat initialising...please wait whilst we prefetch data</string>
<key>script</key>
<string>$(which deno) run --allow-env --allow-write --allow-read --allow-net ${INIT_FILE} filter $argv[1]</string>
<string>PATH="${HOME}/.deno/bin:${PATH}";$(which deno) run --allow-env --allow-write --allow-read --allow-net ${INIT_FILE} filter $argv[1]</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
Expand Down Expand Up @@ -246,7 +246,7 @@ echo "You are running the latest version (${alfred_workflow_version})"</string>
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>$(which deno) run --allow-net --allow-run --allow-env --allow-write --allow-read ${INIT_FILE} action $argv[1]</string>
<string>PATH="${HOME}/.deno/bin:${PATH}";$(which deno) run --allow-net --allow-run --allow-env --allow-write --allow-read ${INIT_FILE} action $argv[1]</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/log.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { writeAllSync } from "@std/streams";
import { writeAllSync } from "@std/io/write-all";

export function log(message: string) {
const contentBytes = new TextEncoder().encode(message);
Expand Down
14 changes: 9 additions & 5 deletions src/helpers/updateAvailable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ export async function updateAvailableItem(

await _internals.cacheRelease(now, config);

const isValid = lessOrEqual(
parse(config.latestVersion),
parse(config.currentVersion),
);
if (isValid) return null;
try {
const isValid = lessOrEqual(
parse(config.latestVersion),
parse(config.currentVersion),
);
if (isValid) return null;
} catch (_) {
return null;
}

const item: BuildItem = {
title: `Update available (${config.latestVersion})`,
Expand Down

0 comments on commit 68bf455

Please sign in to comment.