refactor: Use node protocol when importing builtins

This commit is contained in:
Joachim Van Herwegen
2023-10-30 15:53:29 +01:00
parent def0b5c732
commit 990184dbb5
127 changed files with 170 additions and 172 deletions

View File

@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';
import fetch from 'cross-fetch';
import type { App } from '../../src/init/App';
import { getPort } from '../util/Util';

View File

@@ -1,4 +1,4 @@
import { mkdirSync } from 'fs';
import { mkdirSync } from 'node:fs';
import fetch from 'cross-fetch';
import type { App } from '../../src/init/App';
import { joinFilePath } from '../../src/util/PathUtil';

View File

@@ -1,4 +1,4 @@
import { promises as fsPromises } from 'fs';
import { promises as fsPromises } from 'node:fs';
import fetch from 'cross-fetch';
import type { App, ResourceStore } from '../../src/';
import { BasicRepresentation, isSystemError, joinFilePath, joinUrl } from '../../src/';

View File

@@ -1,4 +1,4 @@
import { createReadStream } from 'fs';
import { createReadStream } from 'node:fs';
import fetch from 'cross-fetch';
import type { Quad } from 'n3';
import { DataFactory, Parser, Store } from 'n3';

View File

@@ -1,4 +1,4 @@
import type { Server } from 'http';
import type { Server } from 'node:http';
import request from 'supertest';
import type { App } from '../../src/init/App';
import type { HttpServerFactory } from '../../src/server/HttpServerFactory';

View File

@@ -1,4 +1,4 @@
import type { Stats } from 'fs';
import type { Stats } from 'node:fs';
import fetch from 'cross-fetch';
import type { Response } from 'cross-fetch';
import { ensureDir, pathExists, stat } from 'fs-extra';

View File

@@ -1,4 +1,4 @@
import EventEmitter from 'events';
import EventEmitter from 'node:events';
import fetch from 'cross-fetch';
import Redis, { ReplyError } from 'ioredis';
import type { App } from '../../src';

View File

@@ -1,4 +1,4 @@
import { Readable } from 'stream';
import { Readable } from 'node:stream';
import arrayifyStream from 'arrayify-stream';
import { BasicETagHandler, SingleRootIdentifierStrategy } from '../../src';
import { BasicRequestParser } from '../../src/http/input/BasicRequestParser';

View File

@@ -1,4 +1,4 @@
import { promises as fs } from 'fs';
import { promises as fs } from 'node:fs';
import { joinFilePath } from '../../src/';
import type { App } from '../../src/';
import { putResource } from '../util/FetchUtil';

View File

@@ -1,5 +1,5 @@
import { createServer } from 'http';
import type { IncomingMessage, Server, ServerResponse } from 'http';
import { createServer } from 'node:http';
import type { IncomingMessage, Server, ServerResponse } from 'node:http';
import { fetch } from 'cross-fetch';
import { createRemoteJWKSet, jwtVerify } from 'jose';
import type { NamedNode } from 'n3';