Skip to content

Commit

Permalink
Adds constraints.pro rule that removes prepack build scripts (#1907)
Browse files Browse the repository at this point in the history
## Explanation

The `prepack` build script from incoming migration packages interfere with the release CI and need to be replaced with the `prepack` script in the root `package.json`. 

This `constraints.pro` rule enforces that redundant `prepack` scripts in non-root packages are removed. 

## References

- See #1902
- See https://github.com/MetaMask/core/actions/runs/6629214754/job/18008299892?pr=1897
- Closes #1906

## Changelog

N/A
  • Loading branch information
MajorLift authored Oct 24, 2023
1 parent 9e00912 commit ed03f8e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ gen_enforced_field(WorkspaceCwd, 'scripts.build:docs', 'typedoc') :-
gen_enforced_field(WorkspaceCwd, 'scripts.publish:preview', 'yarn npm publish --tag preview') :-
\+ workspace_field(WorkspaceCwd, 'private', true).

% All published packages must not have a "prepack" script.
gen_enforced_field(WorkspaceCwd, 'scripts.prepack', null) :-
\+ workspace_field(WorkspaceCwd, 'private', true).

% The "changelog:validate" script for each published package must run a common
% script with the name of the package as an argument.
gen_enforced_field(WorkspaceCwd, 'scripts.changelog:validate', ProperChangelogValidationScript) :-
Expand Down

0 comments on commit ed03f8e

Please sign in to comment.