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

feat: quiet option on deno info #122

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/deno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export interface InfoOptions {
importMap?: string;
lock?: string;
nodeModulesDir?: boolean;
quiet?: boolean;
}

let tmpDir: string | undefined;
Expand Down Expand Up @@ -134,6 +135,9 @@ async function info(
if (options.nodeModulesDir) {
opts.args.push("--node-modules-dir");
}
if (options.quiet) {
opts.args.push("--quiet");
}
if (options.cwd) {
opts.cwd = options.cwd;
} else {
Expand Down
7 changes: 7 additions & 0 deletions src/plugin_deno_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ export interface DenoLoaderPluginOptions {
* loader always uses a local `node_modules` directory.
*/
nodeModulesDir?: boolean;
/**
* Specify whether to pass the quiet option to deno info.
lucacasonato marked this conversation as resolved.
Show resolved Hide resolved
*
* This option is ignored when using the `portable` loader.
*/
quiet?: boolean;
}

const LOADERS = ["native", "portable"] as const;
Expand Down Expand Up @@ -209,6 +215,7 @@ export function denoLoaderPlugin(
importMap: options.importMapURL,
lock: options.lockPath,
nodeModulesDir: options.nodeModulesDir,
quiet: options.quiet,
},
});
break;
Expand Down