Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 2750df0

Browse files
committed
server-esm: Change simple library import statements
1 parent 35d11cc commit 2750df0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+122
-122
lines changed

electron.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
import electron = require('electron');
3+
import electron from "electron";
44
import sqlInit from "./src/services/sql_init.js";
55
import appIconService from "./src/services/app_icon.js";
66
import windowService from "./src/services/window.js";

spec/etapi/import.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import etapi from "../support/etapi.js";
2-
import fs = require('fs');
3-
import path = require('path');
2+
import fs from "fs";
3+
import path from "path";
44

55
etapi.describeEtapi("import", () => {
66
// temporarily skip this test since test-export.zip is missing

spec/etapi/notes.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import crypto = require('crypto');
1+
import crypto from "crypto";
22
import etapi from "../support/etapi.js";
33

44
etapi.describeEtapi("notes", () => {

spec/search/becca_mocking.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import BNote from "../../src/becca/entities/bnote.js";
22
import BBranch from "../../src/becca/entities/bbranch.js";
33
import BAttribute from "../../src/becca/entities/battribute.js";
44
import becca from "../../src/becca/becca.js";
5-
import randtoken = require('rand-token');
5+
import randtoken from "rand-token";
66
import SearchResult from "../../src/services/search/search_result.js";
77
import { NoteType } from "../../src/becca/entities/rows";
88
randtoken.generator({ source: "crypto" });

spec/support/etapi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import child_process = require('child_process');
2-
import kill = require('tree-kill');
1+
import child_process from "child_process";
2+
import kill from "tree-kill";
33

44
let etapiAuthToken: string | undefined;
55

src/app.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import express = require('express');
2-
import path = require('path');
3-
import favicon = require('serve-favicon');
4-
import cookieParser = require('cookie-parser');
5-
import helmet = require('helmet');
6-
import compression = require('compression');
1+
import express from "express";
2+
import path from "path";
3+
import favicon from "serve-favicon";
4+
import cookieParser from "cookie-parser";
5+
import helmet from "helmet";
6+
import compression from "compression";
77
import sessionParser from "./routes/session_parser.js";
88
import utils from "./services/utils.js";
99

src/becca/entities/bnote.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import AbstractBeccaEntity from "./abstract_becca_entity.js";
99
import BRevision from "./brevision.js";
1010
import BAttachment from "./battachment.js";
1111
import TaskContext from "../../services/task_context.js";
12-
import dayjs = require('dayjs');
13-
import utc = require('dayjs/plugin/utc');
12+
import dayjs from "dayjs";
13+
import utc from "dayjs/plugin/utc";
1414
import eventService from "../../services/events.js";
1515
import { AttachmentRow, NoteRow, NoteType, RevisionRow } from './rows';
1616
import BBranch from "./bbranch.js";

src/etapi/spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Router } from "express";
22

3-
import fs = require('fs');
4-
import path = require('path');
3+
import fs from "fs";
4+
import path from "path";
55

66
const specPath = path.join(__dirname, 'etapi.openapi.yaml');
77
let spec: string | null = null;

src/routes/api/backend_log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
import fs = require('fs');
3+
import fs from "fs";
44
import dateUtils from "../../services/date_utils.js";
55
import dataDir from "../../services/data_dir.js";
66
const { LOG_DIR } = dataDir;

src/routes/api/clipper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import appInfo from "../../services/app_info.js";
1212
import ws from "../../services/ws.js";
1313
import log from "../../services/log.js";
1414
import utils from "../../services/utils.js";
15-
import path = require('path');
15+
import path from "path";
1616
import htmlSanitizer from "../../services/html_sanitizer.js";
1717
import attributeFormatter from "../../services/attribute_formatter.js";
18-
import jsdom = require('jsdom');
18+
import jsdom from "jsdom";
1919
import BNote from "../../becca/entities/bnote.js";
2020
import ValidationError from "../../errors/validation_error.js";
2121
const { JSDOM } = jsdom;

0 commit comments

Comments
 (0)