require the use of node prefix on native imports

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2026-01-25 13:47:32 +01:00
parent 4ad63b8d9f
commit 7455dae884
444 changed files with 749 additions and 634 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ import { ScmIntegrationRegistry } from '@backstage/integration';
import { StorageOptions } from '@google-cloud/storage';
import { UrlReaderService } from '@backstage/backend-plugin-api';
import * as winston from 'winston';
import { Writable } from 'stream';
import { Writable } from 'node:stream';
// @public
export class DirectoryPreparer implements PreparerBase {
+3 -3
View File
@@ -17,9 +17,9 @@
import { Entity, getEntitySourceLocation } from '@backstage/catalog-model';
import { ConfigReader } from '@backstage/config';
import { ScmIntegrations } from '@backstage/integration';
import os from 'os';
import path from 'path';
import { Readable } from 'stream';
import os from 'node:os';
import path from 'node:path';
import { Readable } from 'node:stream';
import { TECHDOCS_ANNOTATION } from '@backstage/plugin-techdocs-common';
import {
getDocFilesFromRepository,
+1 -1
View File
@@ -27,7 +27,7 @@ import {
import { InputError } from '@backstage/errors';
import { ScmIntegrationRegistry } from '@backstage/integration';
import { TECHDOCS_ANNOTATION } from '@backstage/plugin-techdocs-common';
import path from 'path';
import path from 'node:path';
import { PreparerResponse, RemoteProtocol } from './stages/prepare/types';
/**
@@ -15,7 +15,7 @@
*/
import fs from 'fs-extra';
import Stream, { PassThrough } from 'stream';
import Stream, { PassThrough } from 'node:stream';
import { DockerContainerRunner, UserOptions } from './DockerContainerRunner';
import { createMockDirectory } from '@backstage/backend-test-utils';
@@ -17,11 +17,11 @@
import Docker from 'dockerode';
import fs from 'fs-extra';
import { ForwardedError } from '@backstage/errors';
import { PassThrough } from 'stream';
import { pipeline as pipelineStream } from 'stream';
import { promisify } from 'util';
import { PassThrough } from 'node:stream';
import { pipeline as pipelineStream } from 'node:stream';
import { promisify } from 'node:util';
import { TechDocsContainerRunner } from './types';
import { Writable } from 'stream';
import { Writable } from 'node:stream';
const pipeline = promisify(pipelineStream);
@@ -21,7 +21,7 @@ import {
mockServices,
} from '@backstage/backend-test-utils';
import fs from 'fs-extra';
import path, { resolve as resolvePath } from 'path';
import path, { resolve as resolvePath } from 'node:path';
import { ParsedLocationAnnotation } from '../../helpers';
import {
createOrUpdateMetadata,
@@ -18,12 +18,12 @@ import { isChildPath, LoggerService } from '@backstage/backend-plugin-api';
import { Entity } from '@backstage/catalog-model';
import { assertError, ForwardedError } from '@backstage/errors';
import { ScmIntegrationRegistry } from '@backstage/integration';
import { SpawnOptionsWithoutStdio, spawn } from 'child_process';
import { SpawnOptionsWithoutStdio, spawn } from 'node:child_process';
import fs from 'fs-extra';
import gitUrlParse from 'git-url-parse';
import yaml, { DEFAULT_SCHEMA, Type } from 'js-yaml';
import path, { resolve as resolvePath } from 'path';
import { PassThrough, Writable } from 'stream';
import path, { resolve as resolvePath } from 'node:path';
import { PassThrough, Writable } from 'node:stream';
import { ParsedLocationAnnotation } from '../../helpers';
import { DefaultMkdocsContent, SupportedGeneratorKey } from './types';
import { getFileTreeRecursively } from '../publish/helpers';
@@ -15,7 +15,7 @@
*/
import { Config } from '@backstage/config';
import path from 'path';
import path from 'node:path';
import {
ScmIntegrationRegistry,
ScmIntegrations,
@@ -15,7 +15,7 @@
*/
import { Entity } from '@backstage/catalog-model';
import { Writable } from 'stream';
import { Writable } from 'node:stream';
import { Logger } from 'winston';
import { ParsedLocationAnnotation } from '../../helpers';
import { LoggerService } from '@backstage/backend-plugin-api';
@@ -35,10 +35,10 @@ import {
import { mockClient, AwsClientStub } from 'aws-sdk-client-mock';
import express from 'express';
import request from 'supertest';
import path from 'path';
import path from 'node:path';
import fs from 'fs-extra';
import { AwsS3Publish } from './awsS3';
import { Readable } from 'stream';
import { Readable } from 'node:stream';
import {
createMockDirectory,
mockServices,
@@ -46,8 +46,8 @@ import express from 'express';
import fs from 'fs-extra';
import JSON5 from 'json5';
import createLimiter from 'p-limit';
import path from 'path';
import { Readable } from 'stream';
import path from 'node:path';
import { Readable } from 'node:stream';
import {
bulkStorageOperation,
getCloudPathForLocalPath,
@@ -18,7 +18,7 @@ import { Entity, DEFAULT_NAMESPACE } from '@backstage/catalog-model';
import { ConfigReader } from '@backstage/config';
import express from 'express';
import request from 'supertest';
import path from 'path';
import path from 'node:path';
import fs from 'fs-extra';
import { AzureBlobStoragePublish } from './azureBlobStorage';
import {
@@ -25,7 +25,7 @@ import { assertError, ForwardedError } from '@backstage/errors';
import express from 'express';
import JSON5 from 'json5';
import limiterFactory from 'p-limit';
import { default as path, default as platformPath } from 'path';
import { default as path, default as platformPath } from 'node:path';
import {
bulkStorageOperation,
getCloudPathForLocalPath,
@@ -18,9 +18,9 @@ import { Entity, DEFAULT_NAMESPACE } from '@backstage/catalog-model';
import { ConfigReader } from '@backstage/config';
import express from 'express';
import request from 'supertest';
import path from 'path';
import path from 'node:path';
import fs from 'fs-extra';
import { Readable } from 'stream';
import { Readable } from 'node:stream';
import { GoogleGCSPublish } from './googleStorage';
import {
createMockDirectory,
@@ -24,8 +24,8 @@ import {
} from '@google-cloud/storage';
import express from 'express';
import JSON5 from 'json5';
import path from 'path';
import { Readable } from 'stream';
import path from 'node:path';
import { Readable } from 'node:stream';
import {
getFileTreeRecursively,
getHeadersForFileExtension,
@@ -15,7 +15,7 @@
*/
import { Entity, DEFAULT_NAMESPACE } from '@backstage/catalog-model';
import mime from 'mime-types';
import path from 'path';
import path from 'node:path';
import createLimiter from 'p-limit';
import recursiveReadDir from 'recursive-readdir';
@@ -18,9 +18,9 @@ import { overridePackagePathResolution } from '@backstage/backend-plugin-api/tes
import { ConfigReader } from '@backstage/config';
import express from 'express';
import request from 'supertest';
import * as os from 'os';
import * as os from 'node:os';
import { LocalPublish } from './local';
import path from 'path';
import path from 'node:path';
import {
createMockDirectory,
mockServices,
@@ -28,9 +28,9 @@ import {
import { Config } from '@backstage/config';
import express from 'express';
import fs from 'fs-extra';
import os from 'os';
import os from 'node:os';
import createLimiter from 'p-limit';
import path from 'path';
import path from 'node:path';
import {
PublisherBase,
PublishRequest,
@@ -16,7 +16,7 @@
import { assertError } from '@backstage/errors';
import { File } from '@google-cloud/storage';
import { Writable } from 'stream';
import { Writable } from 'node:stream';
import { lowerCaseEntityTripletInStoragePath } from '../helpers';
import { LoggerService } from '@backstage/backend-plugin-api';
@@ -23,10 +23,10 @@ import { ConfigReader } from '@backstage/config';
import express from 'express';
import request from 'supertest';
import fs from 'fs-extra';
import path from 'path';
import path from 'node:path';
import { OpenStackSwiftPublish } from './openStackSwift';
import { PublisherBase, TechDocsMetadata } from './types';
import { Stream, Readable } from 'stream';
import { Stream, Readable } from 'node:stream';
import {
createMockDirectory,
mockServices,
@@ -19,10 +19,10 @@ import express from 'express';
import fs from 'fs-extra';
import JSON5 from 'json5';
import createLimiter from 'p-limit';
import path from 'path';
import path from 'node:path';
import { SwiftClient } from '@trendyol-js/openstack-swift-sdk';
import { NotFound } from '@trendyol-js/openstack-swift-sdk/lib/types';
import { Stream, Readable } from 'stream';
import { Stream, Readable } from 'node:stream';
import {
getFileTreeRecursively,