require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -15,11 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
const path = require('node:path');
|
||||
|
||||
// Figure out whether we're running inside the backstage repo or as an installed dependency
|
||||
/* eslint-disable-next-line no-restricted-syntax */
|
||||
const isLocal = require('fs').existsSync(path.resolve(__dirname, '../src'));
|
||||
const isLocal = require('node:fs').existsSync(
|
||||
path.resolve(__dirname, '../src'),
|
||||
);
|
||||
|
||||
if (!isLocal) {
|
||||
require('..');
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
const path = require('node:path');
|
||||
|
||||
module.exports = require('@backstage/cli/config/jest').then(baseConfig => ({
|
||||
...baseConfig,
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { execSync, spawn, SpawnOptionsWithoutStdio } from 'child_process';
|
||||
import path from 'path';
|
||||
import { execSync, spawn, SpawnOptionsWithoutStdio } from 'node:child_process';
|
||||
import path from 'node:path';
|
||||
|
||||
import findProcess from 'find-process';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { resolve } from 'path';
|
||||
import { resolve } from 'node:path';
|
||||
import { OptionValues } from 'commander';
|
||||
import fs from 'fs-extra';
|
||||
import {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { resolve } from 'path';
|
||||
import { resolve } from 'node:path';
|
||||
import { OptionValues } from 'commander';
|
||||
import { createLogger } from '../../lib/utility';
|
||||
import { HostDiscovery } from '@backstage/backend-defaults/discovery';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { OptionValues } from 'commander';
|
||||
import path from 'path';
|
||||
import path from 'node:path';
|
||||
import openBrowser from 'react-dev-utils/openBrowser';
|
||||
import { findPaths, RunOnOutput } from '@backstage/cli-common';
|
||||
import HTTPServer from '../../lib/httpServer';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import serveHandler from 'serve-handler';
|
||||
import http from 'http';
|
||||
import http from 'node:http';
|
||||
import httpProxy from 'http-proxy';
|
||||
import { createLogger } from './utility';
|
||||
import {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import http from 'http';
|
||||
import http from 'node:http';
|
||||
import {
|
||||
injectLivereloadParameters,
|
||||
proxyHtmlWithLivereloadInjection,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import http from 'http';
|
||||
import http from 'node:http';
|
||||
import httpProxy from 'http-proxy';
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
ParsedLocationAnnotation,
|
||||
} from '@backstage/plugin-techdocs-node';
|
||||
import * as winston from 'winston';
|
||||
import { Writable } from 'stream';
|
||||
import { stdout } from 'process';
|
||||
import { Writable } from 'node:stream';
|
||||
import { stdout } from 'node:process';
|
||||
|
||||
export const convertTechDocsRefToLocationAnnotation = (
|
||||
techdocsRef: string,
|
||||
|
||||
Reference in New Issue
Block a user