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

chore: upgrade package-manager-detector to add Deno support #313

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

benmccann
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Nov 16, 2024

🦋 Changeset detected

Latest commit: 8183d57

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sv Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Nov 16, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/sveltejs/cli/sv@313
pnpm add https://pkg.pr.new/sveltejs/cli/svelte-migrate@313

commit: 8183d57

Copy link
Member

@AdrianGonz97 AdrianGonz97 left a comment

Choose a reason for hiding this comment

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

It looks like the execute-local command for Deno (which maps to deno run {0}) isn't a valid way to execute local binaries, so it breaks during formatting (and will also break for sv check as we also depend on it there)

@benmccann
Copy link
Member Author

benmccann commented Nov 18, 2024

I filed a feature request denoland/deno#26918 after discussing it in https://github.com/antfu-collective/package-manager-detector/pull/25/files#r1847062219

@benmccann
Copy link
Member Author

@AdrianGonz97 I've updated this with a new version that should hopefully work. Can you test again?

@AdrianGonz97
Copy link
Member

Thanks! The previous issue is now resolved, but now we have another one that could be worked around.

Running the storybook add-on is failing as it's attempting to execute it with:

deno run storybook@latest init --skip-install --no-dev

which isn't correct when trying to execute remote scripts.

It should instead have the npm: protocol preprended to the name of the package:

deno run npm:storybook@latest init --skip-install --no-dev

This could be fixed this on our end, but it doesn't seem to be the intended purpose of the execute command for package-manager-detector.

This also raises the question of how should we deal with deno's security features? Should we just add a -A flag to permit all features (granting read/write/env/run access)? Or should we just let deno's built-in prompts take the wheel and have the user deal with it? I'm thinking the latter should be better, but the former is a nicer experience.

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