Skip to content

fix(cli): accept allow-import for deno add#35019

Merged
bartlomieju merged 1 commit into
mainfrom
orch/divybot-519
Jun 7, 2026
Merged

fix(cli): accept allow-import for deno add#35019
bartlomieju merged 1 commit into
mainfrom
orch/divybot-519

Conversation

@divybot

@divybot divybot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

deno add now accepts --allow-import/--deny-import and parses them into the normal import permission flags before dependency resolution runs. This lets scripts bypass remote import prompts caused by existing deno.json imports.

Added parser coverage and a spec that runs deno add --allow-import=localhost:4545 with an existing remote import alias.

Tests:

  • cargo test -p deno flags::tests::add_or_install_subcommand --lib --features rustls/ring
  • PATH="$PWD/target/debug:$PATH" ./x test-spec add/allow_import

Closes #29150
Closes denoland/divybot#519

@bartlomieju
bartlomieju merged commit 2fd8967 into main Jun 7, 2026
137 checks passed
@bartlomieju
bartlomieju deleted the orch/divybot-519 branch June 7, 2026 21:38
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.

deno add says use --allow-import, but doesn't actually accept that flag

2 participants