mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-22 15:02:11 +08:00
refactor(@angular/cli): convert ini
and @yarnpkg/lockfile
usage from require to import
The removal of require usage supports the eventual shift to an ESM output for the CLI package.
This commit is contained in:
parent
6f4bf38e9c
commit
266233c66e
10
packages/angular/cli/src/typings.d.ts
vendored
10
packages/angular/cli/src/typings.d.ts
vendored
@ -6,6 +6,16 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
declare module '@yarnpkg/lockfile' {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function parse(data: string): Record<string, any>;
|
||||
}
|
||||
|
||||
declare module 'ini' {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function parse(data: string): Record<string, any>;
|
||||
}
|
||||
|
||||
declare module 'npm-pick-manifest' {
|
||||
function pickManifest(
|
||||
metadata: import('../utilities/package-metadata').PackageMetadata,
|
||||
|
@ -7,13 +7,13 @@
|
||||
*/
|
||||
|
||||
import { logging } from '@angular-devkit/core';
|
||||
import * as lockfile from '@yarnpkg/lockfile';
|
||||
import { existsSync, readFileSync } from 'fs';
|
||||
import * as ini from 'ini';
|
||||
import { homedir } from 'os';
|
||||
import * as path from 'path';
|
||||
import { JsonSchemaForNpmPackageJsonFiles } from './package-json';
|
||||
|
||||
const lockfile = require('@yarnpkg/lockfile');
|
||||
const ini = require('ini');
|
||||
const pacote = require('pacote');
|
||||
|
||||
const npmPackageJsonCache = new Map<string, Promise<Partial<NpmRepositoryPackageJson>>>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user