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 { Readable } from 'stream';
import { Readable } from 'node:stream';
import type { Quad } from '@rdfjs/types';
import arrayifyStream from 'arrayify-stream';
import type { Response } from 'cross-fetch';

View File

@@ -1,4 +1,4 @@
import { Readable } from 'stream';
import { Readable } from 'node:stream';
import type { Logger } from '../../../src/logging/Logger';
import { getLoggerFor } from '../../../src/logging/LogUtil';
import { guardStream, isGuarded } from '../../../src/util/GuardedStream';

View File

@@ -1,4 +1,4 @@
import { promises as fsPromises } from 'fs';
import { promises as fsPromises } from 'node:fs';
import type { TargetExtractor } from '../../../src/http/input/identifier/TargetExtractor';
import type { ResourceIdentifier } from '../../../src/http/representation/ResourceIdentifier';
import type { HttpRequest } from '../../../src/server/HttpRequest';

View File

@@ -1,5 +1,5 @@
import 'jest-rdf';
import type { Readable } from 'stream';
import type { Readable } from 'node:stream';
import type { Literal, NamedNode } from 'n3';
import { BasicRepresentation } from '../../../src/http/representation/BasicRepresentation';
import type { Representation } from '../../../src/http/representation/Representation';

View File

@@ -1,4 +1,4 @@
import { Readable } from 'stream';
import { Readable } from 'node:stream';
import { RangeNotSatisfiedHttpError } from '../../../src/util/errors/RangeNotSatisfiedHttpError';
import { SliceStream } from '../../../src/util/SliceStream';
import { readableToString } from '../../../src/util/StreamUtil';

View File

@@ -1,4 +1,4 @@
import { PassThrough, Readable } from 'stream';
import { PassThrough, Readable } from 'node:stream';
import arrayifyStream from 'arrayify-stream';
import { BlankNode, Literal, NamedNode, Quad, Store } from 'n3';
import type { Logger } from '../../../src/logging/Logger';

View File

@@ -1,4 +1,4 @@
import { EventEmitter } from 'events';
import { EventEmitter } from 'node:events';
import type { ResourceIdentifier } from '../../../../src/http/representation/ResourceIdentifier';
import { BaseReadWriteLocker } from '../../../../src/util/locking/BaseReadWriteLocker';
import type { ResourceLocker } from '../../../../src/util/locking/ResourceLocker';

View File

@@ -1,4 +1,4 @@
import EventEmitter from 'events';
import EventEmitter from 'node:events';
import type { Redis } from 'ioredis';
import type { ReadWriteLocker, ResourceLocker } from '../../../../src';
import { InternalServerError } from '../../../../src';

View File

@@ -2,7 +2,7 @@ import { resolveAssetPath } from '../../../../src/util/PathUtil';
import { getTemplateFilePath, readTemplate } from '../../../../src/util/templates/TemplateUtil';
import { mockFileSystem } from '../../../util/Util';
jest.mock('fs');
jest.mock('node:fs');
describe('TemplateUtil', (): void => {
describe('#getTemplateFilePath', (): void => {