message: scripts/verify-local-dependencies: update to require workspace ranges for local deps
diff: */
  const fs = require('fs-extra');
  -const semver = require('semver');
  const { getPackages } = require('@manypkg/get-packages');
  -const {
  - resolve: resolvePath,
  - relative: relativePath,
  - join: joinPath,
  -} = require('path');
  +const { resolve: resolvePath, join: joinPath } = require('path');
  /**
  * This script checks that all local package dependencies within the repo
  @@ -58,21 +53,14 @@ async function main(args) {
  continue;
  }
  const localPackage = pkgMap.get(dep);
  - if (localPackage) {
  - const localVersion = localPackage.packageJson.version;
  - if (!semver.satisfies(localVersion, range)) {
  - const path = joinPath(
  - relativePath(rootPath, pkg.dir),
  - 'package.json',
  - );
  + if (localPackage && range !== 'workspace:^') {
  + hadErrors = true;
  console.log(
  - `${path} depends on the wrong version of ${dep}: ${range} does not satisfy ${localVersion}`,
  + `Local dependency from ${pkg.packageJson.name} to ${dep} should have a workspace range`,
  );
  - hadErrors = true;
  fixed = true;
  - pkg.packageJson[depType][dep] = `^${localVersion}`;
  - }
  + pkg.packageJson[depType][dep] = 'workspace:^';
  }
  }
  }
  