function getPackages(typeFilter) {
  return globSync(`packages/${global.packageOrStar}/package.json`, {
    absolute: true,
  }).filter((pathToPackageJson) => {
    const pkgInfo = require(pathToPackageJson);
    const packageType = pkgInfo.workbox.packageType;
    if (!packageType) {
      throw Error(oneLine`Unable to determine package type. Please add
      workbox.packageType metadata to ${pathToPackageJson}`);
    }

    return typeFilter === 'all' || typeFilter === packageType;
  });
}
@param {string} typeFilter The type of packages to return: 'node', 'sw',
or 'all'.
@return Array<string> Paths to package.json files for the matching packages.