Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
fix(generate): member-ordering linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rudxde committed Apr 14, 2022
1 parent c6edc2e commit 62e260c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
16 changes: 8 additions & 8 deletions packages/generate/src/package.ts
Expand Up @@ -24,6 +24,14 @@ export class Package {
private args: IGenerateArgs,
) { }

get relativePath(): string {
return normalizePath(relative(this.lernaPackage.rootPath, this.lernaPackage.location));
}

get dockerWorkingDir(): string {
return this.args.dockerfileWorkingDir + this.relativePath;
}

async findDockerfile(): Promise<string | undefined> {
if (!this.lernaPackage) {
throw new Error(`The lerna package is missing for the dependency ${this.name}`);
Expand Down Expand Up @@ -54,14 +62,6 @@ export class Package {
return this.dockerFile!;
}

get relativePath(): string {
return normalizePath(relative(this.lernaPackage.rootPath, this.lernaPackage.location));
}

get dockerWorkingDir(): string {
return this.args.dockerfileWorkingDir + this.relativePath;
}

getPackageStageNamePrefix(): string {
return this.name.replace(/@/gm, '').replace(/\//gm, '_');
}
Expand Down
4 changes: 2 additions & 2 deletions packages/generate/typings/lerna-command/index.d.ts
Expand Up @@ -9,10 +9,10 @@ declare module '@lerna/command' {
execOpts: import('@lerna/child-process').ExecOpts;
packageGraph: import('@lerna/package-graph').PackageGraph;
constructor(_argv: any);
then(onResolved: any, onRejected: any): any;
catch(onRejected: any): any;
get requiresGit(): boolean;
get otherCommandConfigs(): any[];
then(onResolved: any, onRejected: any): any;
catch(onRejected: any): any;
configureEnvironment(): void;
configureOptions(): void;
configureProperties(): void;
Expand Down
22 changes: 12 additions & 10 deletions packages/generate/typings/lerna-package/index.d.ts
Expand Up @@ -52,14 +52,7 @@ declare module '@lerna/package' {
*/
constructor(pkg: RawManifest, location: string, rootPath?: string);

/**
* Create a Package instance from parameters, possibly reusing existing instance.
* @param {string|Package|RawManifest} ref A path to a package.json file, Package instance, or JSON object
* @param {string} [dir] If `ref` is a JSON object, this is the location of the manifest
* @returns {Package}
*/
static lazy(ref: string | Package | RawManifest, dir?: string): Package;


get location(): string;
get private(): boolean;
get resolved(): any;
Expand All @@ -72,14 +65,23 @@ declare module '@lerna/package' {
get manifestLocation(): string;
get nodeModulesLocation(): string;
get __isLernaPackage(): boolean;
set version(arg: string);
get version(): string;
set contents(arg: any);
get contents(): any;
get dependencies(): Record<string, string>;
get devDependencies(): Record<string, string>;
get optionalDependencies(): Record<string, string>;
get peerDependencies(): Record<string, string>;
set version(arg: string);
set contents(arg: any);

/**
* Create a Package instance from parameters, possibly reusing existing instance.
* @param {string|Package|RawManifest} ref A path to a package.json file, Package instance, or JSON object
* @param {string} [dir] If `ref` is a JSON object, this is the location of the manifest
* @returns {Package}
*/
static lazy(ref: string | Package | RawManifest, dir?: string): Package;

/**
* Map-like retrieval of arbitrary values
* @template {keyof RawManifest} K
Expand Down

0 comments on commit 62e260c

Please sign in to comment.