Skip to content

feat: support --deny-import flag #29702

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

Merged
merged 11 commits into from
Jun 28, 2025
Merged

Conversation

sgasho
Copy link
Contributor

@sgasho sgasho commented Jun 11, 2025

Closes: #29502

Preparing deny_import.js like below,

import "https://deno.land/std@0.201.0/log/mod.ts";
console.log("hello");

I verified that these changes were working properly by running the following command: ~/denoland/deno/target/debug/deno run --deny-import="example.com:443,deno.land:443" deny_import.js shows an import access error like the one below.

スクリーンショット 2025-06-12 0 01 29

I also verified that ~/denoland/deno/target/debug/deno run --deny-import="example.com:443" deny_import.js does not show any errors because example.com is not referenced in deny_import.js

スクリーンショット 2025-06-12 0 03 27

@bartlomieju bartlomieju added this to the 2.4.0 milestone Jun 16, 2025
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@bartlomieju bartlomieju enabled auto-merge (squash) June 27, 2025 13:23
@bartlomieju bartlomieju changed the title feat(cli/args): implement --deny-import flag feat: support --deny-import flag Jun 27, 2025
@bartlomieju bartlomieju merged commit b5e41f6 into denoland:main Jun 28, 2025
18 checks passed
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.

Missing flag --deny-import
3 participants