async function pathsArrayFromCs(targets, cwd = process.cwd()) {
  if (!targets) return undefined;

  const resultPaths = [];

  for (const t of targets.split(',')) {
    if (t.startsWith('/')) {
      resultPaths.push(t);
      continue; // eslint-disable-line no-continue
    }
    if (t.includes('*')) {
      const x = (await globby(t, { cwd, absolute: true, onlyFiles: false })).map(toPosixPath);
      resultPaths.push(...x);
      continue; // eslint-disable-line no-continue
    }
    resultPaths.push(toPosixPath(path.resolve(cwd, t.trim())));
  }
  return resultPaths;
}
@param {string} targets
@returns {Promise<string[]|undefined>}