Skip to content

Commit 2c0d87e

Browse files
committed
chore: remove affected runs in CI
1 parent feb4e4c commit 2c0d87e

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
with:
3333
main-branch-name: 'master'
3434

35-
- name: Run build on affected projects
36-
run: npx nx affected --target=build --parallel=3
35+
- name: Run build on projects
36+
run: npx nx run-many --target=build --parallel=3
3737
continue-on-error: false
3838

39-
- name: Run lint on affected projects
40-
run: npx nx affected --target=lint --parallel=3
39+
- name: Run lint on projects
40+
run: npx nx run-many --target=lint --parallel=3
4141
continue-on-error: false
4242

4343
# - name: Run typecheck on affected projects
@@ -47,6 +47,6 @@ jobs:
4747
- name: Clear Jest cache
4848
run: npx jest --clearCache
4949

50-
- name: Run tests on affected projects
51-
run: npx nx affected --target=test --parallel=3 --coverage
50+
- name: Run tests projects
51+
run: npx nx run-many --target=test --parallel=3 --coverage
5252
continue-on-error: false

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939
with:
4040
main-branch-name: 'master'
4141

42-
- name: Build affected packages
43-
run: npx nx affected --target=build --parallel=3
42+
- name: Build packages
43+
run: npx nx run-many --target=build --parallel=3
4444

4545
- name: 🚀 Run Nx Release
4646
run: |

packages/common/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"command": "npm run build",
2222
"cwd": "packages/common"
2323
},
24+
"dependsOn": ["@data-driven-forms/react-form-renderer:build"],
2425
"cache": true
2526
},
2627
"build:cjs": {

packages/common/src/wizard/reducer.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ type WizardAction =
7272
type: 'jumpToStep';
7373
payload: {
7474
index: number;
75-
valid: boolean;
75+
valid?: boolean;
7676
fields: WizardField[];
77-
crossroads: string[];
77+
crossroads?: string[];
7878
formOptions: FormOptions;
7979
};
8080
};
@@ -186,11 +186,7 @@ const jumpToStep = (
186186

187187
const currentStep = findCurrentStep(newState.prevSteps[index], fields);
188188

189-
if (!currentStep) {
190-
return state;
191-
}
192-
193-
const currentStepHasStepMapper = DYNAMIC_WIZARD_TYPES.includes(typeof currentStep.nextStep);
189+
const currentStepHasStepMapper = DYNAMIC_WIZARD_TYPES.includes(typeof currentStep?.nextStep);
194190

195191
const hardcodedCrossroads = crossroads;
196192
const dynamicStepShouldDisableNav = newState.isDynamic && currentStepHasStepMapper;
@@ -211,7 +207,7 @@ const jumpToStep = (
211207
prevSteps: newState.prevSteps.slice(0, index),
212208
maxStepIndex: index,
213209
};
214-
} else if (currentStep.disableForwardJumping) {
210+
} else if (currentStep?.disableForwardJumping) {
215211
updatedState = {
216212
...updatedState,
217213
prevSteps: newState.prevSteps.slice(0, index),

packages/common/src/wizard/wizard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const WizardComponent: React.FC<WizardProps> = ({
8888
};
8989

9090
const jumpToStep = (index: number, valid?: boolean) =>
91-
dispatch({ type: 'jumpToStep', payload: { index, valid: valid ?? true, fields, crossroads: crossroads ?? [], formOptions } });
91+
dispatch({ type: 'jumpToStep', payload: { index, valid, fields, crossroads, formOptions } });
9292

9393
const handlePrev = () => jumpToStep(state.activeStepIndex - 1);
9494

0 commit comments

Comments
 (0)