Merge pull request #32516 from backstage/freben/nodecolon
Add a rule for the use of `node:` prefix on native imports
This commit is contained in:
@@ -15,13 +15,13 @@ import { PermissionCriteria } from '@backstage/plugin-permission-common';
|
||||
import { Schema } from 'jsonschema';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { SpawnOptionsWithoutStdio } from 'child_process';
|
||||
import { SpawnOptionsWithoutStdio } from 'node:child_process';
|
||||
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateInfo } from '@backstage/plugin-scaffolder-common';
|
||||
import { UpdateTaskCheckpointOptions } from '@backstage/plugin-scaffolder-node/alpha';
|
||||
import { UrlReaderService } from '@backstage/backend-plugin-api';
|
||||
import { UserEntity } from '@backstage/catalog-model';
|
||||
import { Writable } from 'stream';
|
||||
import { Writable } from 'node:stream';
|
||||
import { z } from 'zod';
|
||||
|
||||
// @public
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { LoggerService } from '@backstage/backend-plugin-api';
|
||||
import { spawn } from 'child_process';
|
||||
import { PassThrough, Writable } from 'stream';
|
||||
import { spawn } from 'node:child_process';
|
||||
import { PassThrough, Writable } from 'node:stream';
|
||||
import { executeShellCommand } from './executeShellCommand';
|
||||
|
||||
jest.mock('child_process', () => ({
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
*/
|
||||
|
||||
import { LoggerService } from '@backstage/backend-plugin-api';
|
||||
import { spawn, SpawnOptionsWithoutStdio } from 'child_process';
|
||||
import { PassThrough, Writable } from 'stream';
|
||||
import { spawn, SpawnOptionsWithoutStdio } from 'node:child_process';
|
||||
import { PassThrough, Writable } from 'node:stream';
|
||||
|
||||
/**
|
||||
* Options for {@link executeShellCommand}.
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
jest.mock('fs-extra');
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import { resolve as resolvePath } from 'node:path';
|
||||
import { UrlReaderService } from '@backstage/backend-plugin-api';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { fetchContents, fetchFile } from './fetch';
|
||||
import os from 'os';
|
||||
import os from 'node:os';
|
||||
|
||||
describe('fetchContents helper', () => {
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
import { InputError } from '@backstage/errors';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import path from 'node:path';
|
||||
|
||||
/**
|
||||
* A helper function that reads the contents of a directory from the given URL.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { InputError } from '@backstage/errors';
|
||||
import { isChildPath } from '@backstage/backend-plugin-api';
|
||||
import { join as joinPath, normalize as normalizePath } from 'path';
|
||||
import { join as joinPath, normalize as normalizePath } from 'node:path';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
import { TemplateActionOptions } from './createTemplateAction';
|
||||
import zodToJsonSchema from 'zod-to-json-schema';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import { dirname } from 'path';
|
||||
import { dirname } from 'node:path';
|
||||
import { resolveSafeChildPath } from '@backstage/backend-plugin-api';
|
||||
import { SerializedFile } from './types';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { promises as fs } from 'fs';
|
||||
import { promises as fs } from 'node:fs';
|
||||
import globby from 'globby';
|
||||
import limiterFactory from 'p-limit';
|
||||
import { resolveSafeChildPath } from '@backstage/backend-plugin-api';
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
import * as tar from 'tar';
|
||||
import concatStream from 'concat-stream';
|
||||
import { promisify } from 'util';
|
||||
import { pipeline as pipelineCb, Readable } from 'stream';
|
||||
import { promisify } from 'node:util';
|
||||
import { pipeline as pipelineCb, Readable } from 'node:stream';
|
||||
|
||||
const pipeline = promisify(pipelineCb);
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user