Skip to content
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

Fix json import #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run Unit Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Lint
run: deno lint
4 changes: 2 additions & 2 deletions .github/workflows/npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
fetch-depth: 0

- name: Setup Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
Expand Down
1 change: 1 addition & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"lint": {
"rules": {
"include": ["no-import-assertions"],
"exclude": ["no-explicit-any"]
}
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/locales/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { request_json } from "../../src/mixins/_request.ts";
import { set_option } from "../../src/mod.ts";
import { setup } from "../../src/setup.ts";
import { DenoFileStore } from "../../src/store.ts";
import { j, jo, jom } from "../../src/util.ts";
import { jo, jom } from "../../src/util.ts";
import { cache_fetch } from "../../src/util/cache-fetch.ts";

setup({
Expand Down Expand Up @@ -210,7 +210,7 @@ export const fetch_map: FetchMapItem[] = [
},
];

let base_strings = new Map();
const base_strings = new Map();

async function get_language_map() {
const map = new Map<string, [uri: string, path: string]>();
Expand Down
2 changes: 1 addition & 1 deletion src/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CONSTANTS from "./constants-ng.json" assert { type: "json" };
import CONSTANTS from "./constants-ng.json" with { type: "json" };
import { RequestClient } from "./request.ts";
import { wait } from "./util.ts";
import { Store } from "./store.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/_request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CONSTANTS2 from "../constants-ng.json" assert { type: "json" };
import CONSTANTS2 from "../constants-ng.json" with { type: "json" };

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

Expand Down
2 changes: 1 addition & 1 deletion src/mixins/browsing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CONSTANTS2 from "../constants-ng.json" assert { type: "json" };
import CONSTANTS2 from "../constants-ng.json" with { type: "json" };

import { get_continuations, get_sort_continuations } from "../continuations.ts";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/parsers/browsing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import STRINGS from "../../locales/strings.json" assert { type: "json" };
import STRINGS from "../../locales/strings.json" with { type: "json" };
import { LikeStatus } from "../mod.ts";
import { TAB_CONTENT } from "../nav.ts";

Expand Down
2 changes: 1 addition & 1 deletion src/request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ERROR_CODE, MuseError } from "./errors.ts";
import LOCALES from "../locales/locales.json" assert { type: "json" };
import LOCALES from "../locales/locales.json" with { type: "json" };
import { get_option } from "./setup.ts";

import { debug } from "./util.ts";
Expand Down