Skip to content

Commit d489370

Browse files
authored
Merge pull request #18 from AxelEriksson0/axeleriksson/fix-json-import
2 parents 56248de + 7e722b1 commit d489370

9 files changed

Lines changed: 35 additions & 9 deletions

File tree

.github/workflows/main.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Run Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Deno
20+
uses: denoland/setup-deno@v2
21+
with:
22+
deno-version: v2.x
23+
24+
- name: Lint
25+
run: deno lint

.github/workflows/npm.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
fetch-depth: 0
1313

1414
- name: Setup Deno
15-
uses: denoland/setup-deno@v1
15+
uses: denoland/setup-deno@v2
1616
with:
17-
deno-version: v1.x
17+
deno-version: v2.x
1818

1919
- name: Get tag version
2020
if: startsWith(github.ref, 'refs/tags/')

deno.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
},
77
"lint": {
88
"rules": {
9+
"include": ["no-import-assertions"],
910
"exclude": ["no-explicit-any"]
1011
}
1112
}

scripts/locales/strings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { request_json } from "../../src/mixins/_request.ts";
55
import { set_option } from "../../src/mod.ts";
66
import { setup } from "../../src/setup.ts";
77
import { DenoFileStore } from "../../src/store.ts";
8-
import { j, jo, jom } from "../../src/util.ts";
8+
import { jo, jom } from "../../src/util.ts";
99
import { cache_fetch } from "../../src/util/cache-fetch.ts";
1010

1111
setup({
@@ -210,7 +210,7 @@ export const fetch_map: FetchMapItem[] = [
210210
},
211211
];
212212

213-
let base_strings = new Map();
213+
const base_strings = new Map();
214214

215215
async function get_language_map() {
216216
const map = new Map<string, [uri: string, path: string]>();

src/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import CONSTANTS from "./constants-ng.json" assert { type: "json" };
1+
import CONSTANTS from "./constants-ng.json" with { type: "json" };
22
import { RequestClient } from "./request.ts";
33
import { wait } from "./util.ts";
44
import { Store } from "./store.ts";

src/mixins/_request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import CONSTANTS2 from "../constants-ng.json" assert { type: "json" };
1+
import CONSTANTS2 from "../constants-ng.json" with { type: "json" };
22

33
import { get_option, set_option } from "../setup.ts";
44

src/mixins/browsing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import CONSTANTS2 from "../constants-ng.json" assert { type: "json" };
1+
import CONSTANTS2 from "../constants-ng.json" with { type: "json" };
22

33
import { get_continuations, get_sort_continuations } from "../continuations.ts";
44
import {

src/parsers/browsing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import STRINGS from "../../locales/strings.json" assert { type: "json" };
1+
import STRINGS from "../../locales/strings.json" with { type: "json" };
22
import { LikeStatus } from "../mod.ts";
33
import { TAB_CONTENT } from "../nav.ts";
44

src/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ERROR_CODE, MuseError } from "./errors.ts";
2-
import LOCALES from "../locales/locales.json" assert { type: "json" };
2+
import LOCALES from "../locales/locales.json" with { type: "json" };
33
import { get_option } from "./setup.ts";
44

55
import { debug } from "./util.ts";

0 commit comments

Comments
 (0)