Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to node16 module resolution #2550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Upgrade to node16 module resolution #2550

wants to merge 1 commit into from

Conversation

grant0417
Copy link
Member

No description provided.

@grant0417 grant0417 requested a review from mschrage as a code owner January 14, 2025 22:37
@withfig-bot
Copy link
Collaborator

withfig-bot commented Jan 14, 2025

Overview

src/br.ts:

Info:

src/@magnolia/cli.ts:

Info:

src/bunx.ts:

Info:

Single Functions:

postProcess:

 function (out) {
        const cli = [...npxSuggestions].reduce(
          (acc, { name }) => [...acc, name],
          []
        );
        return out
          .split("\n")
          .filter((name) => !cli.includes(name))
          .map((name) => ({
            name,
            icon: "fig://icon?type=command",
            loadSpec: name,
          }));
      }

src/build-storybook.ts:

Info:

src/code-insiders.ts:

Info:

src/cl.ts:

Info:

src/blitz.ts:

Info:

URLs:

  • https://raw.githubusercontent.com/blitz-js/art/master/square-logo-600.png

src/deno/generators.ts:

Info:

URLs:

  • https://cdn.deno.land/deno/meta/versions.json

src/argo.ts:

Info:

src/aws/secretsmanager.ts:

Info:

Single Functions:

postProcess:

 function (out) {
      try {
        const list = JSON.parse(out)["SecretList"];
        return list.map((item) => ({
          name: item["Name"],
        }));
      } catch (error) {
        console.error(error);
      }
      return [];
    }

postProcess:

 function (out) {
      try {
        const list = JSON.parse(out)["Keys"];
        return list.map((item) => ({
          name: item["KeyId"],
        }));
      } catch (error) {
        console.error(error);
      }
      return [];
    }

postProcess:

 function (out, tokens) {
      try {
        const list = JSON.parse(out)["Keys"];
        return list.flatMap((secret) => {
          return awsRegions.flatMap((region) => {
            return {
              name: `Region=${region},KmsKeyId=${secret.KeyId}`,
            };
          });
        });
      } catch (e) {
        console.log(e);
      }
      return [];
    }

postProcess:

 function (out, tokens) {
      try {
        const list = JSON.parse(out)["Functions"];
        return list.map((item) => ({
          name: item["FunctionArn"],
        }));
      } catch (e) {
        console.log(e);
      }
      return [];
    }

custom:

 async function (tokens, executeShellCommand) {
      try {
        // secret-id value
        const idx = tokens.indexOf("--secret-id");
        if (idx < 0) {
          return [];
        }
        const secretId = tokens[idx + 1];
        const { stdout } = await executeShellCommand({
          command: "aws",
          args: ["secretsmanager", "describe-secret", "--secret-id", secretId],
        });
        const versions = JSON.parse(stdout)["VersionIdsToStages"];
        return Object.keys(versions).map((elm) => ({ name: elm }));
      } catch (e) {
        console.log(e);
      }
      return [];
    }

custom:

 async function (tokens, executeShellCommand) {
      try {
        // secret-id value
        const idx = tokens.indexOf("--secret-id");
        if (idx < 0) {
          return [];
        }
        const secretId = tokens[idx + 1];
        const { stdout } = await executeShellCommand({
          command: "aws",
          args: ["secretsmanager", "describe-secret", "--secret-id", secretId],
        });
        const versions = JSON.parse(stdout)["VersionIdsToStages"];
        return Object.keys(versions).map((elm) => ({ name: versions[elm][0] }));
      } catch (e) {
        console.log(e);
      }
      return [];
    }

custom:

 async function (tokens, executeShellCommand) {
      try {
        // secret-id value
        const idx = tokens.indexOf("--secret-id");
        if (idx < 0) {
          return [];
        }
        const secretId = tokens[idx + 1];
        const { stdout } = await executeShellCommand({
          command: "aws",
          args: ["secretsmanager", "describe-secret", "--secret-id", secretId],
        });
        const versions = JSON.parse(stdout)["Tags"];
        return versions.map((elm) => ({ name: elm["Key"] }));
      } catch (e) {
        console.log(e);
      }
      return [];
    }

src/bun.ts:

Info:

src/g++.ts:

Info:

src/clang++.ts:

Info:

src/c++.ts:

Info:

src/aws/cloudformation.ts:

Info:

Single Functions:

postProcess:

 function (out) {
      try {
        const accountId = JSON.parse(out)["Account"];
        return [{ name: accountId }];
      } catch (error) {
        console.error(error);
      }
      return [];
    }

postProcess:

 function (out) {
      return postPrecessGenerator(out, "TypeSummaries", "TypeArn");
    }

postProcess:

 function (out) {
      return postPrecessGenerator(out, "Exports", "Name");
    }

postProcess:

 function (out, tokens) {
      try {
        return out.split("\n").map((line) => {
          const parts = line.split(/\s+/);
          // sub prefix
          if (!parts.length) {
            return [];
          }
          return {
            name: _prefixS3 + parts[parts.length - 1],
          };
        }) as Fig.Suggestion[];
      } catch (error) {
        console.error(error);
      }
      return [];
    }

postProcess:

 function (out) {
      return postPrecessGenerator(out, "Keys", "KeyId");
    }

src/cal.ts:

Info:

src/aws/s3.ts:

Info:

Single Functions:

postProcess:

 function (out, context) {
      try {
        return out.split("\n").map((line) => {
          const parts = line.split(/\s+/);
          // sub prefix
          if (!parts.length) {
            return [];
          }
          return {
            name: _prefixS3 + parts[parts.length - 1],
          };
        }) as Fig.Suggestion[];
      } catch (error) {
        console.error(error);
      }
      return [];
    }

postProcess:

 function (out) {
      try {
        const list = JSON.parse(out)["Keys"];
        return list.map((item) => ({
          name: item["KeyId"],
        }));
      } catch (error) {
        console.error(error);
      }
      return [];
    }

URLs:

  • http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  • http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  • http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  • http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  • http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html

src/fig/1.0.0.ts:

Info:

src/goland.ts:

Info:

src/fly.ts:

Info:

src/https.ts:

Info:

src/fig/2.0.0.ts:

Info:

src/clion.ts:

Info:

src/n.ts:

Info:

Single Functions:

postProcess:

 function (out) {
      const set = new Set<string>();
      const versions = out.split("\n").slice(1);
      for (const version of versions) {
        set.add(version); // 16.1.2
        const split = version.split(".");
        set.add(split[0] + "." + split[1]); // 16.1
        set.add(split[0]); // 16
      }
      return Array.from(set).map((version) => {
        return {
          name: [version, `v${version}`],
          description: `Node.js ${version}`,
        };
      });
    }

src/iex.ts:

Info:

src/aws/lambda.ts:

Info:

Single Functions:

custom:

 async function (tokens, executeShellCommand) {
      return listCustomGenerator(
        tokens,
        executeShellCommand,
        "list-layer-versions",
        ["--layer-name"],
        "LayerVersions",
        "Version"
      );
    }

postProcess:

 function (out, tokens) {
      try {
        const accountId = JSON.parse(out)["Account"];
        return [{ name: accountId }, { name: "*" }];
      } catch (error) {
        console.error(error);
      }
      return [];
    }

custom:

 async function (tokens, executeShellCommand) {
      return listCustomGenerator(
        tokens,
        executeShellCommand,
        "get-layer-version-policy",
        ["--layer-name", "--version-number"],
        "RevisionId"
      );
    }

custom:

 async function (tokens, executeShellCommand) {
      return listCustomGenerator(
        tokens,
        executeShellCommand,
        "get-policy",
        ["--function-name"],
        "RevisionId"
      );
    }

custom:

 async function (tokens, executeShellCommand) {
      return listCustomGenerator(
        tokens,
        executeShellCommand,
        "get-function",
        ["--function-name"],
        "Configuration",
        "RevisionId"
      );
    }

custom:

 async function (tokens, executeShellCommand) {
      return listCustomGenerator(
        tokens,
        executeShellCommand,
        "list-aliases",
        ["--function-name"],
        "Aliases",
        "Name"
      );
    }

custom:

 async function (tokens, executeShellCommand) {
      try {
        const idx = tokens.indexOf("--function-name");
        const args = [
          "lambda",
          "list-versions-by-function",
          "--function-name",
          tokens[idx + 1],
        ];
        const { stdout } = await executeShellCommand({
          command: "aws",
          args,
        });
        const list = JSON.parse(stdout)["Versions"];
        return list
          .filter((elm) => elm.Version !== "$LATEST")
          .map((elm) => {
            const version = elm["Version"];
            return {
              insertValue: version,
              name: version,
              displayName: `version: ${version}`,
              icon: "fig://icon?type=aws",
            };
          });
      } catch (e) {
        console.log(e);
      }
      return [];
    }

custom:

 async function (tokens, executeShellCommand) {
      return listCustomSIDGenerator(tokens, executeShellCommand, "get-policy", [
        "--function-name",
      ]);
    }

custom:

 async function (tokens, executeShellCommand) {
      return listCustomSIDGenerator(
        tokens,
        executeShellCommand,
        "get-layer-version-policy",
        ["--layer-name", "--version-number"]
      );
    }

custom:

 async function (tokens, executeShellCommand) {
      // Getting sqs queues is implemented, although it has a huge performance toll.
      // It seems Fig rejects long-running promises after a time.
      // I am currently investigating if this is the case.
      // const result = await Promise.all([
      //   getResultList(tokens, executeShellCommand, "aws sqs list-queues", "QueueUrls"),
      //   getResultList(tokens, executeShellCommand, "aws kinesis list-streams", "StreamNames")
      // ]);
      // const objects = result.flat().map((elm) => {
      //   if (elm.includes("sqs")) {
      //     return ({
      //       command: `aws sqs get-queue-attributes --queue-url ${elm} --attribute-names QueueArn`,
      //       parentKey: "Attributes",
      //       childKey: "QueueArn",
      //     })
      //   }
      //   return ({
      //     command: `aws kinesis describe-stream --stream-name ${elm}`,
      //     parentKey: "StreamDescription",
      //     childKey: "StreamARN",
      //   })
      // });
      return MultiSuggestionsGenerator(tokens, executeShellCommand, [
        {
          command: ["dynamodbstreams", "list-streams"],
          parentKey: "Streams",
          childKey: "StreamArn",
        },
        {
          command: ["kafka", "list-clusters"],
          parentKey: "ClusterInfoList",
          childKey: "ClusterArn",
        },
        //...objects,
      ]);
    }

custom:

 async function (tokens, executeShellCommand) {
      // Getting sqs queues is implemented, although it has a huge performance toll.
      // It seems Fig rejects long-running promises after a time.
      // I am currently investigating if this is the case.
      // const out = await executeShellCommand("aws sqs list-queues");
      // const list = JSON.parse(out)["QueueUrls"];
      // const sqsObjects = list.map((url) => ({
      //   command: `aws sqs get-queue-attributes --queue-url ${url} --attribute-names QueueArn`,
      //   parentKey: "Attributes",
      //   childKey: "QueueArn",
      // }));
      return MultiSuggestionsGenerator(tokens, executeShellCommand, [
        {
          command: ["sns", "list-topics"],
          parentKey: "Topics",
          childKey: "TopicArn",
        },
        {
          command: ["events", "list-event-buses"],
          parentKey: "EventBuses",
          childKey: "Arn",
        },
        {
          command: ["lambda", "list-functions"],
          parentKey: "Functions",
          childKey: "FunctionArn",
        },
        // ...sqsObjects,
      ]);
    }

postProcess:

 function (out) {
      return postPrecessGenerator(out, "Roles", "RoleName");
    }

postProcess:

 function (out) {
      return postPrecessGenerator(out, "Keys", "KeyArn");
    }

postProcess:

 function (out) {
      return postPrecessGenerator(out, "Layers", "LayerArn");
    }

postProcess:

 function (out) {
      try {
        const list = JSON.parse(out)["Layers"];
        return list.map((elm) => {
          return {
            name: elm["LatestMatchingVersion"]["LayerVersionArn"],
            icon: "fig://icon?type=aws",
          };
        });
      } catch (e) {
        console.log(e);
      }
      return [];
    }

postProcess:

 function (out) {
      try {
        const list = JSON.parse(out)["FileSystems"];
        return list.map((elm) => {
          const name = ("FileSystemArn" ? elm["FileSystemArn"] : elm) as string;
          return {
            name: `Arn=${name},LocalMountPath=/mnt/`,
            icon: "fig://icon?type=aws",
          };
        });
      } catch (e) {
        console.log(e);
      }
      return [];
    }

postProcess:

 function (out) {
      return postPrecessGenerator(
        out,
        "CodeSigningConfigs",
        "CodeSigningConfigArn"
      );
    }

postProcess:

 function (out) {
      return postPrecessGenerator(out, "EventSourceMappings", "UUID");
    }

postProcess:

 function (out) {
      return postPrecessGenerator(out, "Functions", "CodeSha256");
    }

postProcess:

 function (out, tokens) {
      try {
        return out.split("\n").map((line) => {
          const parts = line.split(/\s+/);
          // sub prefix
          if (!parts.length) {
            return [];
          }
          return {
            name: parts[parts.length - 1],
          };
        }) as Fig.Suggestion[];
      } catch (error) {
        console.error(error);
      }
      return [];
    }

custom:

 async function (tokens, executeShellCommand) {
      try {
        const idx = tokens.indexOf("--s3-bucket");
        const args = [
          "s3",
          "ls",
          `${_prefixS3}${tokens[idx + 1]}`,
          "--recursive",
          "--page-size",
          "1000",
        ];
        const { stdout } = await executeShellCommand({
          command: "aws",
          args,
        });
        if (stdout == "") {
          return [];
        }
        if (stdout.trim() === _prefixS3) {
          return [
            {
              name: _prefixS3,
              insertValue: _prefixS3,
            },
          ];
        }
        return stdout.split("\n").map((line) => {
          const parts = line.split(/\s+/);
          // sub prefix
          if (!parts.length) {
            return [];
          }
          return {
            name: parts[parts.length - 1],
          };
        }) as Fig.Suggestion[];
      } catch (error) {
        console.error(error);
      }
      return [];
    }

custom:

 async function (tokens, executeShellCommand) {
      try {
        const bucketIdx = tokens.indexOf("--s3-bucket");
        const objectIdx = tokens.indexOf("--s3-key");
        const args = [
          "s3api",
          "list-object-versions",
          "--bucket",
          tokens[bucketIdx + 1],
          "--prefix",
          tokens[objectIdx + 1],
        ];
        const { stdout } = await executeShellCommand({
          command: "aws",
          args,
        });
        if (stdout == "") {
          return [];
        }
        if (stdout.trim() === _prefixS3) {
          return [
            {
              name: _prefixS3,
              insertValue: _prefixS3,
            },
          ];
        }
        const list = JSON.parse(stdout)["Versions"];
        return list
          .filter((elm) => elm["VersionId"] !== "null")
          .map((elm) => {
            return {
              name: elm["VersionId"],
              icon: "fig://icon?type=aws",
            };
          });
      } catch (e) {
        console.log(e);
      }
      return [];
    }

URLs:

  • https://opensource.org/licenses/MIT.

src/kubecolor.ts:

Info:

src/hub.ts:

Info:

src/rustrover.ts:

Info:

src/pycharm.ts:

Info:

src/rubymine.ts:

Info:

src/j.ts:

Info:

src/pre-commit.ts:

Info:

src/redwood.ts:

Info:

URLs:

  • https://avatars.githubusercontent.com/u/45050444?s=200&v=4
  • https://raw.githubusercontent.com/prisma/docs/main/src/images/favicon-16x16.png

src/rsync.ts:

Info:

src/gcc.ts:

Info:

src/preset.ts:

Info:

src/scp.ts:

Info:

src/sam.ts:

Info:

src/pip3.ts:

Info:

src/deno.ts:

Info:

src/sta.ts:

Info:

src/sls.ts:

Info:

src/phpstorm.ts:

Info:

src/nrm.ts:

Info:

src/rush.ts:

Info:

Single Functions:

postProcess:

 function (out: string) {
    const suggestions = [];

    try {
      if (!out) {
        return suggestions;
      }

      const rushConfigurationJson: IRushConfigurationJson = JSON.parse(
        stripJsonComments(out.trim())
      );

      for (const project of rushConfigurationJson.projects) {
        suggestions.push({
          name: project.packageName,
          description: "Projects",
        });
      }
    } catch (e: unknown) {
      console.log("generate project suggestion fail: ", e);
    }
    return suggestions;
  }

src/npx.ts:

Info:

Single Functions:

postProcess:

 function (out) {
        const cli = [...npxSuggestions].reduce(
          (acc, { name }) => [...acc, name],
          []
        );
        return out
          .split("\n")
          .filter((name) => !cli.includes(name))
          .map((name) => ({
            name,
            icon: "fig://icon?type=command",
            loadSpec: name,
          }));
      }

URLs:

  • https://vitejs.dev/logo.svg
  • https://raw.githubusercontent.com/babel/logo/master/babel.png
  • https://reactnative.dev/img/pwa/manifest-icon-512.png
  • https://reactnative.dev/img/pwa/manifest-icon-512.png
  • https://tailwindcss.com/favicons/favicon-32x32.png
  • https://nextjs.org/static/favicon/favicon-16x16.png
  • https://raw.githubusercontent.com/nuxt/framework/main/docs/public/icon.png
  • https://raw.githubusercontent.com/pmndrs/branding/master/logo.svg
  • https://raw.githubusercontent.com/prisma/docs/main/src/images/favicon-16x16.png
  • https://raw.githubusercontent.com/eslint/eslint.org/main/src/static/icon-512.png
  • https://prettier.io/icon.png
  • https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Typescript_logo_2020.svg/240px-Typescript_logo_2020.svg.png
  • https://avatars.githubusercontent.com/u/20165699?s=200&v=4
  • https://fig.io/icons/fig-light.png
  • https://fig.io/icons/fig-light.png
  • https://fig.io/icons/fig-light.png
  • https://fig.io/icons/fig-light.png
  • https://nextjs.org/static/favicon/favicon-16x16.png
  • https://create.t3.gg/favicon.svg
  • https://discordjs.dev/favicon-32x32.png
  • https://raw.githubusercontent.com/remotion-dev/remotion/main/packages/docs/static/img/logo-small.png
  • https://raw.githubusercontent.com/remotion-dev/remotion/main/packages/docs/static/img/logo-small.png
  • https://remix.run/favicon-light.1.png
  • https://remix.run/favicon-light.1.png
  • https://playwright.dev/img/playwright-logo.svg
  • https://raw.githubusercontent.com/preset/preset/main/.github/assets/logo.svg
  • https://raw.githubusercontent.com/mikro-orm/mikro-orm/master/docs/static/img/favicon.ico
  • https://capacitorjs.com/docs/img/meta/favicon.png
  • https://capacitorjs.com/docs/img/meta/favicon.png
  • https://avatars.githubusercontent.com/u/25686615?s=200&v=4
  • https://stenciljs.com/assets/icon/favicon.ico
  • https://static1.smartbear.co/swagger/media/assets/swagger_fav.png
  • https://static1.smartbear.co/swagger/media/assets/swagger_fav.png
  • https://s1.wp.com/i/webclip.png
  • https://astro.build/favicon.svg
  • https://raw.githubusercontent.com/aws-amplify/docs/refs/heads/main/public/favicon.ico

src/ts-node.ts:

Info:

Single Functions:

filterTemplateSuggestions:

 function (paths) {
            return paths
              .filter((file) => {
                return file.name.match(/.*\.json$/g) || file.name.endsWith("/");
              })
              .map((file) => {
                const isJsFile = file.name.match(/.*\.json?$/g);
                const isTsConfig = file.name.match(/tsconfig.json$/g);

                return {
                  ...file,
                  priority: isTsConfig ? 100 : isJsFile && 76,
                };
              });
          }

src/tsh.ts:

Info:

src/ubuntu-advantage.ts:

Info:

src/task.ts:

Info:

src/tccutil.ts:

Info:

src/cap.ts:

Info:

src/webstorm.ts:

Info:

src/nr.ts:

Info:

src/st2.ts:

Info:

src/turbo.ts:

Info:

URLs:

  • https://turborepo.org/schema.json

src/unix2dos.ts:

Info:

src/mgnl.ts:

Info:

URLs:

  • https://avatars.githubusercontent.com/u/25686615?s=200&v=4

src/ua.ts:

Info:

src/mosh.ts:

Info:

src/pipenv.ts:

Info:

src/vsce.ts:

Info:

src/tns.ts:

Info:

src/nativescript.ts:

Info:

src/ni.ts:

Info:

src/rushx.ts:

Info:

src/zig.ts:

Info:

src/yarn.ts:

Info:

Single Functions:

postProcess:

 function (out) {
    if (out.trim() == "") {
      return [];
    }

    try {
      const startIndex = out.indexOf("{");
      const endIndex = out.indexOf("}");
      let output = out.substring(startIndex, endIndex + 1);
      // TODO: fix hacky code
      // reason: JSON parse was not working without double quotes
      output = output
        .replace(/\'/gi, '"')
        .replace("lastUpdateCheck", '"lastUpdateCheck"')
        .replace("registry", '"lastUpdateCheck"');
      const configObject = JSON.parse(output);
      if (configObject) {
        return Object.keys(configObject).map((key) => ({ name: key }));
      }
    } catch (e) {}

    return [];
  }

postProcess:

 function (out, context = []) {
    if (out.trim() === "") {
      return [];
    }

    try {
      const packageContent = JSON.parse(out);
      const dependencies = packageContent["dependencies"] ?? {};
      const devDependencies = packageContent["devDependencies"];
      const optionalDependencies = packageContent["optionalDependencies"] ?? {};
      Object.assign(dependencies, devDependencies, optionalDependencies);

      return Object.keys(dependencies)
        .filter((pkgName) => {
          const isListed = context.some((current) => current === pkgName);
          return !isListed;
        })
        .map((pkgName) => ({
          name: pkgName,
          icon: "📦",
          description: dependencies[pkgName]
            ? "dependency"
            : optionalDependencies[pkgName]
              ? "optionalDependency"
              : "devDependency",
        }));
    } catch (e) {
      console.error(e);
      return [];
    }
  }

script:

 function (context) {
    if (context[context.length - 1] === "") return undefined;
    const searchTerm = "create-" + context[context.length - 1];
    return [
      "curl",
      "-s",
      "-H",
      "Accept: application/json",
      `https://api.npms.io/v2/search?q=${searchTerm}&size=20`,
    ];
  }

postProcess:

 function (out) {
    try {
      return JSON.parse(out).results.map(
        (item) =>
          ({
            name: item.package.name.substring(7),
            description: item.package.description,
          }) as Fig.Suggestion
      ) as Fig.Suggestion[];
    } catch (e) {
      return [];
    }
  }

postProcess:

 function (out: string) {
                    if (out.trim() == "") {
                      return [];
                    }
                    try {
                      const packageContent = JSON.parse(out);
                      const scripts = packageContent["scripts"];
                      if (scripts) {
                        return Object.keys(scripts).map((script) => ({
                          name: script,
                        }));
                      }
                    } catch (e) {}
                    return [];
                  }

URLs:

  • https://api.npms.io/v2/search?q=

src/pnpm.ts:

Info:

Single Functions:

postProcess:

 function (out) {
    const output = filterMessages(out);

    if (output.startsWith("fatal:")) {
      return [];
    }

    return output.split("\n").map((elm) => {
      let name = elm.trim();
      const parts = elm.match(/\S+/g);
      if (parts.length > 1) {
        if (parts[0] == "*") {
          // Current branch.
          return {
            name: elm.replace("*", "").trim(),
            description: "Current branch",
            icon: "⭐️",
          };
        } else if (parts[0] == "+") {
          // Branch checked out in another worktree.
          name = elm.replace("+", "").trim();
        }
      }

      return {
        name,
        description: "Branch",
        icon: "fig://icon?type=git",
      };
    });
  }

postProcess:

 function (out) {
    /**
     * out
     * @example
     * ```
     * Legend: production dependency, optional only, dev only
     *
     * /xxxx/xxxx/<package-name> (PRIVATE)
     *
     * dependencies:
     * lodash 4.17.21
     * foo link:packages/foo
     *
     * devDependencies:
     * typescript 4.7.4
     * ```
     */
    if (out.includes("ERR_PNPM")) {
      return [];
    }

    const output = out
      .split("\n")
      .slice(3)
      // remove empty lines, "*dependencies:" lines, local workspace packages (eg: "foo":"workspace:*")
      .filter(
        (item) =>
          !!item &&
          !item.toLowerCase().includes("dependencies") &&
          !item.includes("link:")
      )
      .map((item) => item.replace(/\s/, "@")); // typescript 4.7.4 -> [email protected]

    return output.map((pkg) => {
      return {
        name: pkg,
        icon: "fig://icon?type=package",
      };
    });
  }

src/sftp.ts:

Info:

src/heroku/8.6.0.ts:

Info:

URLs:

  • https://devcenter.heroku.com/articles/managing-add-ons
  • https://devcenter.heroku.com/articles/managing-add-ons
  • https://redis.io/commands/config-resetstat)
  • https://git.heroku.com/example.git

src/heroku/8.0.0.ts:

Info:

URLs:

  • https://redis.io/commands/config-resetstat)
  • https://devcenter.heroku.com/articles/managing-add-ons
  • https://devcenter.heroku.com/articles/managing-add-ons
  • https://redis.io/commands/config-resetstat)
  • https://git.heroku.com/example.git
  • https://git.heroku.com/example.git

@withfig-bot
Copy link
Collaborator

Hello @grant0417,
thank you very much for creating a Pull Request!
Here is a small checklist to get this PR merged as quickly as possible:

  • Do all subcommands / options which take arguments include the args property (args: {})?
  • Are all options modular? E.g. -a -u -x instead of -aux
  • Have all other checks passed?

Please add a 👍 as a reaction to this comment to show that you read this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants