cleanup(core): move lock-file utils to root nx level (#13245)
This commit is contained in:
parent
b88dc35aa5
commit
b2b161cb8d
@ -1,5 +1,5 @@
|
|||||||
import { readFileSync, writeFileSync } from 'fs-extra';
|
import { readFileSync, writeFileSync } from 'fs-extra';
|
||||||
import { detectPackageManager, PackageManager } from '../package-manager';
|
import { detectPackageManager, PackageManager } from '../utils/package-manager';
|
||||||
import {
|
import {
|
||||||
parseYarnLockFile,
|
parseYarnLockFile,
|
||||||
pruneYarnLockFile,
|
pruneYarnLockFile,
|
||||||
@ -19,13 +19,13 @@ import {
|
|||||||
transitiveDependencyPnpmLookup,
|
transitiveDependencyPnpmLookup,
|
||||||
} from './pnpm';
|
} from './pnpm';
|
||||||
import { LockFileData } from './lock-file-type';
|
import { LockFileData } from './lock-file-type';
|
||||||
import { workspaceRoot } from '../workspace-root';
|
import { workspaceRoot } from '../utils/workspace-root';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { hashExternalNodes, hashString, mapExternalNodes } from './utils';
|
import { hashExternalNodes, hashString, mapExternalNodes } from './utils';
|
||||||
import {
|
import {
|
||||||
ProjectGraph,
|
ProjectGraph,
|
||||||
ProjectGraphExternalNode,
|
ProjectGraphExternalNode,
|
||||||
} from '../../config/project-graph';
|
} from '../config/project-graph';
|
||||||
import { existsSync } from 'fs';
|
import { existsSync } from 'fs';
|
||||||
|
|
||||||
const YARN_LOCK_PATH = join(workspaceRoot, 'yarn.lock');
|
const YARN_LOCK_PATH = join(workspaceRoot, 'yarn.lock');
|
||||||
@ -15,7 +15,6 @@ import {
|
|||||||
lockFileV2YargsAndDevkitOnly,
|
lockFileV2YargsAndDevkitOnly,
|
||||||
} from './__fixtures__/npm.lock';
|
} from './__fixtures__/npm.lock';
|
||||||
import { vol } from 'memfs';
|
import { vol } from 'memfs';
|
||||||
import { readJsonFile } from '../fileutils';
|
|
||||||
|
|
||||||
jest.mock('fs', () => require('memfs').fs);
|
jest.mock('fs', () => require('memfs').fs);
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
import { existsSync } from 'fs';
|
import { existsSync } from 'fs';
|
||||||
import { satisfies } from 'semver';
|
import { satisfies } from 'semver';
|
||||||
import { readJsonFile } from '../fileutils';
|
import { readJsonFile } from '../utils/fileutils';
|
||||||
import { output } from '../output';
|
import { output } from '../utils/output';
|
||||||
import { joinPathFragments } from '../path';
|
import { joinPathFragments } from '../utils/path';
|
||||||
import { workspaceRoot } from '../workspace-root';
|
import { workspaceRoot } from '../utils/workspace-root';
|
||||||
import { LockFileData, PackageDependency } from './lock-file-type';
|
import { LockFileData, PackageDependency } from './lock-file-type';
|
||||||
import {
|
import {
|
||||||
sortObject,
|
sortObject,
|
||||||
@ -1,15 +1,15 @@
|
|||||||
import { defaultHashing } from '../../hasher/hashing-impl';
|
import { defaultHashing } from '../hasher/hashing-impl';
|
||||||
import {
|
import {
|
||||||
LockFileData,
|
LockFileData,
|
||||||
PackageDependency,
|
PackageDependency,
|
||||||
PackageVersions,
|
PackageVersions,
|
||||||
} from './lock-file-type';
|
} from './lock-file-type';
|
||||||
import { workspaceRoot } from '../workspace-root';
|
import { workspaceRoot } from '../utils/workspace-root';
|
||||||
import { existsSync, readFileSync } from 'fs';
|
import { existsSync, readFileSync } from 'fs';
|
||||||
import {
|
import {
|
||||||
ProjectGraph,
|
ProjectGraph,
|
||||||
ProjectGraphExternalNode,
|
ProjectGraphExternalNode,
|
||||||
} from '../../config/project-graph';
|
} from '../config/project-graph';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple sort function to ensure keys are ordered alphabetically
|
* Simple sort function to ensure keys are ordered alphabetically
|
||||||
@ -25,7 +25,6 @@ import { getRootTsConfigPath } from '../utils/typescript';
|
|||||||
import {
|
import {
|
||||||
ProjectFileMap,
|
ProjectFileMap,
|
||||||
ProjectGraph,
|
ProjectGraph,
|
||||||
ProjectGraphExternalNode,
|
|
||||||
ProjectGraphProcessorContext,
|
ProjectGraphProcessorContext,
|
||||||
} from '../config/project-graph';
|
} from '../config/project-graph';
|
||||||
import { readJsonFile } from '../utils/fileutils';
|
import { readJsonFile } from '../utils/fileutils';
|
||||||
@ -45,7 +44,7 @@ import {
|
|||||||
lockFileHash,
|
lockFileHash,
|
||||||
mapLockFileDataToPartialGraph,
|
mapLockFileDataToPartialGraph,
|
||||||
parseLockFile,
|
parseLockFile,
|
||||||
} from '../utils/lock-file/lock-file';
|
} from '../lock-file/lock-file';
|
||||||
|
|
||||||
export async function buildProjectGraph() {
|
export async function buildProjectGraph() {
|
||||||
const projectConfigurations = readAllWorkspaceConfiguration();
|
const projectConfigurations = readAllWorkspaceConfiguration();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user