@jujulego/jill 2.4.0-alpha.2 → 2.4.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,12 +18,19 @@ That done it can offer you various utilities:
18
18
 
19
19
  It supports both `npm` and `yarn`.
20
20
 
21
+ ### Hook scripts
22
+ Jill will run hook script like npm do, for both npm and yarn. As npm, when you type `jill run test`, it will first run
23
+ `pretest` if it exists, then `test` and finally `posttest`.
24
+
25
+ This feature can be disabled using the `--no-hooks` option: `jill run --no-hooks test`.
26
+
21
27
  ### Experimental features
22
28
  - `jill group` same as `run` but allows to run multiple scripts in sequence or in parallel using the task syntax
23
29
 
24
30
  #### Task syntax _(only supported by `jill group` command yet)_
25
- Allows to instruct multiple tasks with the given orchestration. The orchetraction is given by the following operators:
31
+ Allows to instruct multiple tasks with the given orchestration. The orchestration is given by the following operators:
26
32
  - `->` in sequence
33
+ - `||` fallbacks
27
34
  - `//` in parallel
28
35
 
29
36
  ##### Examples:
@@ -32,6 +39,11 @@ Allows to instruct multiple tasks with the given orchestration. The orchetractio
32
39
  jill group 'taskA -> taskB -> taskC'
33
40
  ```
34
41
 
42
+ - This will run first **taskA**, if it fails it will run **taskB**, then **taskC** in order, until one succeed.
43
+ ```shell
44
+ jill group 'taskA || taskB || taskC'
45
+ ```
46
+
35
47
  - This will run scripts **taskA**, **taskB** and **taskC** in parallel.
36
48
  ```shell
37
49
  jill group 'taskA // taskB // taskC'
package/bin/jill.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ import '../dist/main.js';
@@ -7,6 +7,7 @@ export interface IEachCommandArgs {
7
7
  script: string;
8
8
  'build-script': string;
9
9
  'deps-mode': WorkspaceDepsMode;
10
+ 'allow-no-workspaces'?: boolean;
10
11
  private?: boolean;
11
12
  affected: string;
12
13
  'affected-rev-fallback': string;
@@ -1,21 +1,30 @@
1
+ import { Logger } from '@jujulego/logger';
1
2
  import { type ArgumentsCamelCase, type Argv } from 'yargs';
2
3
  import { InkCommand } from '@/src/modules/ink-command.tsx';
3
4
  import { type Project } from '@/src/project/project.ts';
4
5
  export type Attribute = 'name' | 'version' | 'root' | 'slug';
5
6
  export type Data = Partial<Record<Attribute, string>>;
6
- export interface IListCommandArgs {
7
+ export type Order = 'asc' | 'desc';
8
+ export interface ListCommandArgs {
7
9
  private?: boolean;
8
10
  'with-script'?: string[];
9
11
  affected: string;
10
12
  'affected-rev-fallback': string;
11
13
  'affected-rev-sort'?: string;
12
- attrs: Attribute[];
14
+ attrs?: Attribute[];
13
15
  headers?: boolean;
14
16
  long?: boolean;
15
17
  json?: boolean;
18
+ 'sort-by'?: Attribute[];
19
+ order: Order;
16
20
  }
17
- export declare class ListCommand extends InkCommand<IListCommandArgs> {
21
+ export declare class ListCommand extends InkCommand<ListCommandArgs> {
22
+ private readonly logger;
18
23
  readonly project: Project;
19
- builder(parser: Argv): Argv<IListCommandArgs>;
20
- render(args: ArgumentsCamelCase<IListCommandArgs>): AsyncGenerator<import("react/jsx-runtime").JSX.Element, void, unknown>;
24
+ constructor(logger: Logger);
25
+ builder(parser: Argv): Argv<ListCommandArgs>;
26
+ render(args: ArgumentsCamelCase<ListCommandArgs>): AsyncGenerator<import("react/jsx-runtime").JSX.Element, void, unknown>;
27
+ private _applyDefaults;
28
+ private _preparePipeline;
29
+ private _dataComparator;
21
30
  }
@@ -1,6 +1,7 @@
1
1
  import { type cosmiconfig } from 'cosmiconfig';
2
2
  export interface IConfig {
3
3
  jobs?: number;
4
+ hooks?: boolean;
4
5
  plugins?: string[];
5
6
  verbose?: 'info' | 'verbose' | 'debug';
6
7
  }