Skip to content

Commit

Permalink
Enforce workspace:^ to specify @babel/ dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 24, 2021
1 parent e45d86c commit 50f99f5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions constraints.pro
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
% Enforces that all workspaces depend on other workspaces using `workspace:*` in devDependencies
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:*', 'devDependencies') :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, 'devDependencies'),
% Enforces that all workspaces depend on other workspaces using `workspace:^`
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:^', DependencyType) :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType),
% Only consider dependency ranges that start with 'workspace:'
atom_concat('workspace:', _, DependencyRange).
atom_concat('workspace:', _, DependencyRange),
% Only consider 'dependencies' and 'devDependencies'
(DependencyType = 'dependencies'; DependencyType = 'devDependencies').

% Enforces the license in all public workspaces while removing it from private workspaces
gen_enforced_field(WorkspaceCwd, 'license', 'MIT') :-
Expand Down

0 comments on commit 50f99f5

Please sign in to comment.