message: refactor: make it easier to add an exception to same version rule
diff: @@ -21,23 +21,13 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, Depende
  % TODO: in the future we should make it consistent and remove this ignore
  DependencyRange \= 'workspace:*',
  DependencyRange2 \= 'workspace:*',
  - % Get the workspace name
  - workspace_ident(WorkspaceCwd, WorkspaceIdent),
  - workspace_ident(OtherWorkspaceCwd, OtherWorkspaceIdent),
  - % @types/node in the root need to stay on ~12.12.0
  - (
  - (WorkspaceIdent = '@jest/monorepo'; OtherWorkspaceIdent = '@jest/monorepo') ->
  - DependencyIdent \= '@types/node'
  - ;
  - true
  - ),
  + % A list of exception to same version rule
  + \+ member(DependencyIdent, [
  % Allow enzyme example workspace use a older version react and react-dom, because enzyme don't support react 17
  - (
  - (WorkspaceIdent = 'example-enzyme'; OtherWorkspaceIdent = 'example-enzyme') ->
  - \+ member(DependencyIdent, ['react', 'react-dom'])
  - ;
  - true
  - ).
  + 'react', 'react-dom',
  + % @types/node in the root need to stay on ~12.12.0
  + '@types/node'
  + ]).
  % Enforces that a dependency doesn't appear in both `dependencies` and `devDependencies`
  gen_enforced_dependency(WorkspaceCwd, DependencyIdent, null, 'devDependencies') :-
  