@sewing-kit/core
Advanced tools
Comparing version 0.4.0-alpha.1 to 0.4.0
@@ -57,2 +57,3 @@ 'use strict'; | ||
return { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
version: require(`${name}/package.json`).version | ||
@@ -59,0 +60,0 @@ }; |
interface PackageJsonInternal { | ||
name?: string; | ||
dependencies?: Record<string, string>; | ||
devDependencies?: Record<string, string>; | ||
dependencies?: { | ||
[key: string]: string; | ||
}; | ||
devDependencies?: { | ||
[key: string]: string; | ||
}; | ||
} | ||
@@ -10,4 +14,8 @@ export declare class PackageJson { | ||
get name(): string | undefined; | ||
get dependencies(): Record<string, string>; | ||
get devDependencies(): Record<string, string>; | ||
get dependencies(): { | ||
[key: string]: string; | ||
}; | ||
get devDependencies(): { | ||
[key: string]: string; | ||
}; | ||
constructor(internal: PackageJsonInternal); | ||
@@ -14,0 +22,0 @@ dependency(dependency: string): string | undefined; |
@@ -31,2 +31,3 @@ "use strict"; | ||
return { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
version: require(`${name}/package.json`).version, | ||
@@ -33,0 +34,0 @@ }; |
@@ -18,3 +18,3 @@ import { Runtime, ProjectKind } from './types'; | ||
readonly root: string; | ||
readonly aliases?: readonly string[]; | ||
readonly aliases?: ReadonlyArray<string>; | ||
} | ||
@@ -24,3 +24,3 @@ export declare class PackageBinary { | ||
readonly root: string; | ||
readonly aliases: readonly string[]; | ||
readonly aliases: ReadonlyArray<string>; | ||
constructor({ name, root, aliases }: PackageBinaryOptions); | ||
@@ -30,4 +30,4 @@ } | ||
runtimes?: Runtime[]; | ||
readonly entries?: readonly PackageEntryOptions[]; | ||
readonly binaries?: readonly PackageBinaryOptions[]; | ||
readonly entries?: ReadonlyArray<PackageEntryOptions>; | ||
readonly binaries?: ReadonlyArray<PackageBinaryOptions>; | ||
} | ||
@@ -37,4 +37,4 @@ export declare class Package extends Base { | ||
readonly runtimes: Runtime[] | undefined; | ||
readonly entries: readonly PackageEntry[]; | ||
readonly binaries: readonly PackageBinary[]; | ||
readonly entries: ReadonlyArray<PackageEntry>; | ||
readonly binaries: ReadonlyArray<PackageBinary>; | ||
get id(): string; | ||
@@ -41,0 +41,0 @@ get runtimeName(): string; |
@@ -12,24 +12,24 @@ import { Runtime } from './types'; | ||
} | ||
export interface Target<Kind extends Project, Options> { | ||
readonly options: Options; | ||
readonly project: Kind; | ||
export interface Target<TKind extends Project, TOptions> { | ||
readonly options: TOptions; | ||
readonly project: TKind; | ||
readonly runtime: TargetRuntime; | ||
} | ||
interface BuilderOptions<Kind extends Project, Options> { | ||
project: Kind; | ||
options?: Options[]; | ||
interface BuilderOptions<TKind extends Project, TOptions> { | ||
project: TKind; | ||
options?: TOptions[]; | ||
runtime?: TargetRuntime; | ||
needs?: Iterable<TargetBuilder<Kind, Options>>; | ||
needs?: Iterable<TargetBuilder<TKind, TOptions>>; | ||
default?: boolean; | ||
} | ||
export declare class TargetBuilder<Kind extends Project, Options> { | ||
export declare class TargetBuilder<TKind extends Project, TOptions> { | ||
readonly default: boolean; | ||
readonly needs: Set<TargetBuilder<Kind, Options>>; | ||
readonly project: Kind; | ||
readonly needs: Set<TargetBuilder<TKind, TOptions>>; | ||
readonly project: TKind; | ||
readonly runtime: TargetRuntime; | ||
private readonly options; | ||
constructor({ project, options, needs, runtime, default: isDefault, }: BuilderOptions<Kind, Options>); | ||
add(...options: Options[]): TargetBuilder<Kind, Options>; | ||
multiply(multiplier: (options: Options) => Options[]): TargetBuilder<Kind, Options>; | ||
toTargets(): Target<Kind, Options>[]; | ||
constructor({ project, options, needs, runtime, default: isDefault, }: BuilderOptions<TKind, TOptions>); | ||
add(...options: TOptions[]): TargetBuilder<TKind, TOptions>; | ||
multiply(multiplier: (options: TOptions) => TOptions[]): TargetBuilder<TKind, TOptions>; | ||
toTargets(): Target<TKind, TOptions>[]; | ||
} | ||
@@ -64,4 +64,4 @@ export declare type LogFormatter = (strings: TemplateStringsArray, ...interpolated: Loggable[]) => string; | ||
status(status: Loggable): void; | ||
exec(file: string, args?: readonly string[] | import('execa').Options, options?: import('execa').Options): import('execa').ExecaChildProcess; | ||
runNested(steps: readonly Step[]): Promise<void>; | ||
exec(file: string, args?: ReadonlyArray<string> | import('execa').Options, options?: import('execa').Options): import('execa').ExecaChildProcess; | ||
runNested(steps: ReadonlyArray<Step>): Promise<void>; | ||
} | ||
@@ -68,0 +68,0 @@ export interface Step { |
@@ -42,4 +42,4 @@ import { CopyOptions } from 'fs-extra'; | ||
status(status: Loggable): void; | ||
exec(file: string, args?: readonly string[] | import('execa').Options, options?: import('execa').Options): import('execa').ExecaChildProcess; | ||
runNested(steps: readonly Step[]): Promise<void>; | ||
exec(file: string, args?: ReadonlyArray<string> | import('execa').Options, options?: import('execa').Options): import('execa').ExecaChildProcess; | ||
runNested(steps: ReadonlyArray<Step>): Promise<void>; | ||
} | ||
@@ -46,0 +46,0 @@ export interface Step { |
@@ -6,10 +6,10 @@ import { Base, Options as BaseOptions } from './base'; | ||
export interface WorkspaceOptions extends BaseOptions { | ||
readonly webApps: readonly WebApp[]; | ||
readonly packages: readonly Package[]; | ||
readonly services: readonly Service[]; | ||
readonly webApps: ReadonlyArray<WebApp>; | ||
readonly packages: ReadonlyArray<Package>; | ||
readonly services: ReadonlyArray<Service>; | ||
} | ||
export declare class Workspace extends Base { | ||
readonly webApps: readonly WebApp[]; | ||
readonly packages: readonly Package[]; | ||
readonly services: readonly Service[]; | ||
readonly webApps: ReadonlyArray<WebApp>; | ||
readonly packages: ReadonlyArray<Package>; | ||
readonly services: ReadonlyArray<Service>; | ||
get projects(): (import("./package").Package | import("./web-app").WebApp | import("./service").Service)[]; | ||
@@ -16,0 +16,0 @@ constructor({ webApps, packages, services, ...rest }: WorkspaceOptions); |
@@ -10,2 +10,8 @@ # Changelog | ||
## [0.4.0] - 2021-05-20 | ||
### Breaking Changes | ||
- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. [[#170](https://github.com/Shopify/sewing-kit-next/pull/170)] | ||
### Added | ||
@@ -23,4 +29,4 @@ | ||
- Add `append` to `FileSystem` class ([#129](https://github.com/Shopify/sewing-kit-next/pull/129)) | ||
- Expose `FileSystem` type ([#128](https://github.com/Shopify/sewing-kit-next/pull/128)) | ||
- Add `append` to `FileSystem` class [[#129](https://github.com/Shopify/sewing-kit-next/pull/129)] | ||
- Expose `FileSystem` type [[#128](https://github.com/Shopify/sewing-kit-next/pull/128)] | ||
@@ -31,3 +37,3 @@ ## [0.2.0] - 2021-03-30 | ||
- Add `remove` to `fs` api ([#124](https://github.com/Shopify/sewing-kit-next/pull/124)) | ||
- Add `remove` to `fs` api [[#124](https://github.com/Shopify/sewing-kit-next/pull/124)] | ||
@@ -34,0 +40,0 @@ ## [0.1.5] |
{ | ||
"name": "@sewing-kit/core", | ||
"license": "MIT", | ||
"version": "0.4.0-alpha.1", | ||
"version": "0.4.0", | ||
"sideEffects": false, | ||
@@ -11,3 +11,3 @@ "publishConfig": { | ||
"engines": { | ||
"node": "^12.22.0 || >=14.17.0" | ||
"node": ">=12.14.0" | ||
}, | ||
@@ -23,3 +23,3 @@ "scripts": { | ||
}, | ||
"gitHead": "aabbbc30e295acfdb823e2e37c4b862e5c44b68e" | ||
"gitHead": "c96a65cc1a6304570802d1fe737924c00a896cc3" | ||
} |
import {createPackage, Runtime} from '@sewing-kit/config'; | ||
import {createSewingKitPackagePlugin} from '../../config/sewing-kit'; | ||
@@ -3,0 +4,0 @@ |
@@ -5,4 +5,4 @@ import {join} from 'path'; | ||
name?: string; | ||
dependencies?: Record<string, string>; | ||
devDependencies?: Record<string, string>; | ||
dependencies?: {[key: string]: string}; | ||
devDependencies?: {[key: string]: string}; | ||
} | ||
@@ -9,0 +9,0 @@ |
@@ -51,2 +51,3 @@ import {FileSystem} from './fs'; | ||
return { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
version: require(`${name}/package.json`).version, | ||
@@ -53,0 +54,0 @@ }; |
import {join} from 'path'; | ||
import {FileSystem} from '../fs'; | ||
@@ -3,0 +4,0 @@ |
@@ -26,3 +26,3 @@ import {Runtime, ProjectKind} from './types'; | ||
readonly root: string; | ||
readonly aliases?: readonly string[]; | ||
readonly aliases?: ReadonlyArray<string>; | ||
} | ||
@@ -33,3 +33,3 @@ | ||
readonly root: string; | ||
readonly aliases: readonly string[]; | ||
readonly aliases: ReadonlyArray<string>; | ||
@@ -45,4 +45,4 @@ constructor({name, root, aliases = []}: PackageBinaryOptions) { | ||
runtimes?: Runtime[]; | ||
readonly entries?: readonly PackageEntryOptions[]; | ||
readonly binaries?: readonly PackageBinaryOptions[]; | ||
readonly entries?: ReadonlyArray<PackageEntryOptions>; | ||
readonly binaries?: ReadonlyArray<PackageBinaryOptions>; | ||
} | ||
@@ -53,4 +53,4 @@ | ||
readonly runtimes: Runtime[] | undefined; | ||
readonly entries: readonly PackageEntry[]; | ||
readonly binaries: readonly PackageBinary[]; | ||
readonly entries: ReadonlyArray<PackageEntry>; | ||
readonly binaries: ReadonlyArray<PackageBinary>; | ||
@@ -57,0 +57,0 @@ get id() { |
@@ -5,2 +5,3 @@ import {Runtime} from './types'; | ||
import {Service} from './service'; | ||
import type {Project} from '.'; | ||
@@ -42,22 +43,22 @@ | ||
export interface Target<Kind extends Project, Options> { | ||
readonly options: Options; | ||
readonly project: Kind; | ||
export interface Target<TKind extends Project, TOptions> { | ||
readonly options: TOptions; | ||
readonly project: TKind; | ||
readonly runtime: TargetRuntime; | ||
} | ||
interface BuilderOptions<Kind extends Project, Options> { | ||
project: Kind; | ||
options?: Options[]; | ||
interface BuilderOptions<TKind extends Project, TOptions> { | ||
project: TKind; | ||
options?: TOptions[]; | ||
runtime?: TargetRuntime; | ||
needs?: Iterable<TargetBuilder<Kind, Options>>; | ||
needs?: Iterable<TargetBuilder<TKind, TOptions>>; | ||
default?: boolean; | ||
} | ||
export class TargetBuilder<Kind extends Project, Options> { | ||
export class TargetBuilder<TKind extends Project, TOptions> { | ||
readonly default: boolean; | ||
readonly needs: Set<TargetBuilder<Kind, Options>>; | ||
readonly project: Kind; | ||
readonly needs: Set<TargetBuilder<TKind, TOptions>>; | ||
readonly project: TKind; | ||
readonly runtime: TargetRuntime; | ||
private readonly options: Options[]; | ||
private readonly options: TOptions[]; | ||
@@ -70,3 +71,3 @@ constructor({ | ||
default: isDefault = options == null, | ||
}: BuilderOptions<Kind, Options>) { | ||
}: BuilderOptions<TKind, TOptions>) { | ||
this.project = project; | ||
@@ -79,3 +80,3 @@ this.runtime = runtime; | ||
add(...options: Options[]) { | ||
add(...options: TOptions[]) { | ||
return new TargetBuilder({ | ||
@@ -89,3 +90,3 @@ project: this.project, | ||
multiply(multiplier: (options: Options) => Options[]) { | ||
multiply(multiplier: (options: TOptions) => TOptions[]) { | ||
return new TargetBuilder({ | ||
@@ -99,3 +100,3 @@ project: this.project, | ||
toTargets(): Target<Kind, Options>[] { | ||
toTargets(): Target<TKind, TOptions>[] { | ||
const {project, runtime, options} = this; | ||
@@ -155,6 +156,6 @@ | ||
file: string, | ||
args?: readonly string[] | import('execa').Options, | ||
args?: ReadonlyArray<string> | import('execa').Options, | ||
options?: import('execa').Options, | ||
): import('execa').ExecaChildProcess; | ||
runNested(steps: readonly Step[]): Promise<void>; | ||
runNested(steps: ReadonlyArray<Step>): Promise<void>; | ||
} | ||
@@ -161,0 +162,0 @@ |
import {TargetRuntime} from '..'; | ||
import {Runtime} from '../types'; | ||
import { | ||
@@ -4,0 +5,0 @@ createTestWebAppWorkspace, |
import {ProjectKind} from '..'; | ||
import { | ||
@@ -3,0 +4,0 @@ createTestWebAppWorkspace, |
@@ -61,6 +61,6 @@ import {CopyOptions} from 'fs-extra'; | ||
file: string, | ||
args?: readonly string[] | import('execa').Options, | ||
args?: ReadonlyArray<string> | import('execa').Options, | ||
options?: import('execa').Options, | ||
): import('execa').ExecaChildProcess; | ||
runNested(steps: readonly Step[]): Promise<void>; | ||
runNested(steps: ReadonlyArray<Step>): Promise<void>; | ||
} | ||
@@ -67,0 +67,0 @@ |
@@ -8,11 +8,11 @@ import {Base, Options as BaseOptions} from './base'; | ||
export interface WorkspaceOptions extends BaseOptions { | ||
readonly webApps: readonly WebApp[]; | ||
readonly packages: readonly Package[]; | ||
readonly services: readonly Service[]; | ||
readonly webApps: ReadonlyArray<WebApp>; | ||
readonly packages: ReadonlyArray<Package>; | ||
readonly services: ReadonlyArray<Service>; | ||
} | ||
export class Workspace extends Base { | ||
readonly webApps: readonly WebApp[]; | ||
readonly packages: readonly Package[]; | ||
readonly services: readonly Service[]; | ||
readonly webApps: ReadonlyArray<WebApp>; | ||
readonly packages: ReadonlyArray<Package>; | ||
readonly services: ReadonlyArray<Service>; | ||
@@ -19,0 +19,0 @@ get projects() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
443818
2399
1