@factorialco/gat 3.0.0 → 3.0.1

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/dist/job.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export interface ConcurrencyGroup {
1
+ export type ConcurrencyGroup = {
2
2
  groupSuffix: string;
3
3
  cancelPrevious: boolean;
4
- }
4
+ };
5
5
  export interface Matrix {
6
6
  elements: Array<{
7
7
  id: string;
@@ -29,7 +29,7 @@ export interface JobOptions<Step, RunnerDefinition, Name> {
29
29
  dependsOn?: Array<Name>;
30
30
  services?: Record<string, Service>;
31
31
  env?: Record<string, string>;
32
- concurrency?: ConcurrencyGroup;
32
+ concurrency?: ConcurrencyGroup | null;
33
33
  matrix?: Matrix | string;
34
34
  steps: Step[];
35
35
  outputs?: Record<string, string>;
@@ -18,13 +18,13 @@ export declare class Workflow<JobStep extends Step = Step, Runner extends Runner
18
18
  jobs: Array<Job<JobStep, Runner, JobName>>;
19
19
  defaultOptions: DefaultOptions | null;
20
20
  env: EnvVar[];
21
- concurrencyGroup?: ConcurrencyGroup;
21
+ concurrencyGroup?: ConcurrencyGroup | null;
22
22
  constructor(name: string);
23
23
  on<T extends EventName>(name: T, options?: EventOptions<T>): this;
24
24
  addDefaults(options: DefaultOptions): this;
25
25
  addJob<T extends string>(name: StringWithNoSpaces<T>, options: JobOptions<JobStep, Runner, JobName>): Workflow<JobStep, Runner, JobName | T>;
26
26
  setEnv(name: string, value: string): this;
27
- setConcurrencyGroup(concurrencyGroup: ConcurrencyGroup): this;
27
+ setConcurrencyGroup(concurrencyGroup: ConcurrencyGroup | null): this;
28
28
  defaultRunner(): string;
29
29
  compile(filepath?: string): Promise<string | void>;
30
30
  }
@@ -243,4 +243,18 @@ exit 0`,
243
243
  });
244
244
  (0, vitest_1.expect)(await workflow.compile()).toMatchSnapshot();
245
245
  });
246
+ (0, vitest_1.it)("allows creating jobs with concurrency set to null", async () => {
247
+ const workflow = new workflow_1.Workflow("Without concurrency")
248
+ .on("push")
249
+ .addJob("job1", {
250
+ concurrency: null,
251
+ steps: [
252
+ {
253
+ name: "Do something",
254
+ run: "exit 0",
255
+ },
256
+ ],
257
+ });
258
+ (0, vitest_1.expect)(await workflow.compile()).toMatchSnapshot();
259
+ });
246
260
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/gat",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Write your GitHub Actions workflows using TypeScript",
5
5
  "bin": {
6
6
  "gat": "dist/cli.js"