INNER CODE UNIT · JavaScript

pnpmStoreVersions

tunnckoCore/opensource · @packages/all-module-paths/src/index.js:15

  const pnpmStoreVersions = ['3', '2', '1'].map((x) =>
    path.join('pnpm-global', String(x), 'node_modules'),
  );

  /**
   * GLOBAL
   */

  // Maximum up to the home directory
  const globalPaths = mod.globalPaths
    .filter((x) => x.startsWith(HOMEDIR))

    // ?? removing pnpm stuff from globalPaths, we later adding it again
    .filter((x) => {
      const condition = pnpmStoreVersions.find(
        (fp) => (x.includes(fp) && x.endsWith(fp)) || !x.includes(fp),
      );

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…