code: function filterRequirementsFile(source, target, options) {
    const noDeploy = new Set(options.noDeploy || []);
    const requirements = fse
      .readFileSync(source, { encoding: 'utf-8' })
      .replace(/\\\n/g, ' ')
      .split(/\r?\n/);
    var prepend = [];
    const filteredRequirements = requirements.filter(req => {
      req = req.trim();
      if (req.startsWith('#')) {
        // Skip comments
        return false;
      } else if (
        req.startsWith('--') ||
        req.startsWith('-f') ||
        req.startsWith('-i')
      ) {
        // If we have options (prefixed with --) keep them for later
        prepend.push(req);
        return false;
      } else if (req === '') {
        return false;
      }
      return !noDeploy.has(req.split(/[=<> \t]/)[0].trim());
    });
    filteredRequirements.sort(); // Sort remaining alphabetically
    // Then prepend any options from above in the same order
    for (let item of prepend.reverse()) {
      if (item && item.length > 0) {
        filteredRequirements.unshift(item);
      }
    }
    fse.writeFileSync(target, filteredRequirements.join('\n') + '\n');
  }
docs: create a filtered requirements.txt without anything from noDeploy
  then remove all comments and empty lines, and sort the list which
  assist with matching the static cache.  The sorting will skip any
  lines starting with -- as those are typically ordered at the
  start of a file ( eg: --index-url / --extra-index-url ) or any
  lines that start with -f or -i,  Please see:
  https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format
  @param {string} source requirements
  @param {string} target requirements where results are written
  @param {Object} options