Skip to content

Commit 6a6c01a

Browse files
authored
Merge pull request #22 from lambdalisue/use-jsr
Fix things for JSR
2 parents 6fb61f7 + 45e922e commit 6a6c01a

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

bin/browse.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env -S deno run --allow-run --allow-read --allow-env
2-
import { parse } from "jsr:@std/flags";
3-
import { join } from "jsr:@std/path";
4-
import { ensure, is } from "jsr:@core/unknownutil";
5-
import { systemopen } from "jsr:@lambdalisue/systemopen";
6-
import { dir } from "jsr:@cross/dir";
2+
import { parseArgs } from "jsr:@std/cli@^0.221.0";
3+
import { join } from "jsr:@std/path@^0.221.0";
4+
import { ensure, is } from "jsr:@core/unknownutil@^3.17.2";
5+
import { systemopen } from "jsr:@lambdalisue/systemopen@^1.0.0";
6+
import { dir } from "jsr:@cross/dir@^1.1.0";
77
import {
88
getCommitAbbrevRef,
99
getCommitSHA1,
@@ -70,7 +70,7 @@ export async function readAliasesFile(): Promise<Record<string, string>> {
7070
}
7171

7272
async function main(args: string[]): Promise<void> {
73-
const opts = parse(args, {
73+
const opts = parseArgs(args, {
7474
boolean: [
7575
"commit",
7676
"help",

deno.jsonc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"lock": false,
33
"name": "@lambdalisue/git-browse",
44
"version": "0.0.0",
5-
"exports": "./mod.ts",
5+
"exports": {
6+
".": "./mod.ts",
7+
"./cli": "./bin/browse.ts"
8+
},
69
"tasks": {
710
"test": "deno test -A --parallel --doc",
811
"check": "deno check **/*.ts",

hosting_service/mod_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { assertThrows } from "jsr:@std/assert";
2-
import { assertSnapshot } from "jsr:@std/testing/snapshot";
1+
import { assertThrows } from "jsr:@std/assert@^0.221.0";
2+
import { assertSnapshot } from "jsr:@std/testing@^0.221.0/snapshot";
33
import { getHostingService, UnsupportedHostingServiceError } from "./mod.ts";
44

55
Deno.test("getHostingService", async (t) => {

hosting_service/services/bitbucket_org.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { HostingService, Range } from "../mod.ts";
22
import type { ExecuteOptions } from "../../process.ts";
3-
import { extname } from "jsr:@std/path";
3+
import { extname } from "jsr:@std/path@^0.221.0";
44
import { getCommitSHA1 } from "../../util.ts";
55

66
export const service: HostingService = {

process_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assert, assertRejects } from "jsr:@std/assert";
1+
import { assert, assertRejects } from "jsr:@std/assert@^0.221.0";
22
import { execute, ExecuteError } from "./process.ts";
33

44
Deno.test("execute() runs 'git' and return a stdout on success", async () => {

util_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { stub } from "jsr:@std/testing/mock";
2-
import { assertEquals, unreachable } from "jsr:@std/assert";
1+
import { stub } from "jsr:@std/testing@^0.221.0/mock";
2+
import { assertEquals, unreachable } from "jsr:@std/assert@^0.221.0";
33
import { _internals, ExecuteError } from "./process.ts";
44
import {
55
getCommitAbbrevRef,

0 commit comments

Comments
 (0)