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

Pre-approve esm.sh network calls for easy access to transpiled modules during local-run #57

Closed
wants to merge 1 commit into from

Conversation

filmaj
Copy link
Contributor

@filmaj filmaj commented Oct 26, 2023

Should help address issues like e.g. slack-samples/deno-triage-rotation#32

Closes #56

Try it out by adding the following to a sample app's slack.json:

"start" : "deno run -q --config=deno.jsonc --allow-read --allow-net --allow-run --allow-env /Users/fmaj/src/deno-slack-runtime/src/local-run.ts "

@filmaj filmaj requested a review from a team as a code owner October 26, 2023 18:23
@filmaj filmaj self-assigned this Oct 26, 2023
@filmaj filmaj added enhancement New feature or request semver:patch requires a patch version number bump labels Oct 26, 2023
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #57 (91dec45) into main (97cf8f5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #57   +/-   ##
=======================================
  Coverage   95.08%   95.09%           
=======================================
  Files          14       14           
  Lines         549      550    +1     
  Branches       82       82           
=======================================
+ Hits          522      523    +1     
  Misses         27       27           
Files Coverage Δ
src/local-run.ts 89.28% <100.00%> (+0.09%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

LGTM, one concern on this relates to where we draw the line on adding domains here?
Now that Deno supports imports from npm with the npm: specifier and we fallback to bundling with esbuild should we favor the npm specifier over other alternatives?

@filmaj
Copy link
Contributor Author

filmaj commented Oct 26, 2023

Really good point @WilliamBergamin! Maybe this isn't needed after all?

@filmaj
Copy link
Contributor Author

filmaj commented Oct 26, 2023

Testing out what you suggested, indeed, not needed! npm: specifiers work great on their own in local-run mode, and your latest change to the hooks repo lands support for npm: specifiers during bundling. Excellent!

Gonna close this down.

@filmaj filmaj closed this Oct 26, 2023
@filmaj filmaj deleted the preapprove-esm.sh branch October 26, 2023 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request semver:patch requires a patch version number bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Implicitly approve an ESM-transpiling CDN for local-run
2 participants