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

Re-implement dev dependency automatic handling #1161

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

FredKSchott
Copy link
Owner

@FredKSchott FredKSchott commented Sep 30, 2020

autonewpackage

Changes

  • We have a JS API for esinstall now! This makes install re-running much easier, easy enough to auto-run on demand for you when a new dependency is scanned.
  • Refactors some lazy uses of process.exit() that should have been handle-able exceptions.

Testing

  • No tests for dev mode, but manually tested extensively.

PR Walkthrough

@FredKSchott FredKSchott requested a review from a team as a code owner September 30, 2020 04:58
@vercel
Copy link

vercel bot commented Sep 30, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/8gkuu8x9s
✅ Preview: https://snowpack-git-wip-auto-reinstall.pikapkg.vercel.app

@@ -21,8 +21,8 @@ exports[`snowpack install config-alias: import-map.json 1`] = `
`;

exports[`snowpack install config-alias: output 1`] = `
"[snowpack] ! installing dependencies…
Copy link
Collaborator

@drwpow drwpow Sep 30, 2020

Choose a reason for hiding this comment

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

RIP ellipsis 😢

(I don’t actually care; it’s just technically correct, but agree it looks bad in monospaced fonts)

} catch (err) {
logger.error(err.message);
logger.debug(err.stack);
process.exit(1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Much cleaner!

@@ -114,10 +114,9 @@ function resolveWebDependency(
exportMapEntry?.require ||
exportMapEntry;
if (typeof exportMapValue !== 'string') {
logger.error(
throw new Error(
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍🏻

@FredKSchott FredKSchott merged commit 7593243 into master Oct 1, 2020
@FredKSchott FredKSchott deleted the wip-auto-reinstall branch October 1, 2020 00:01
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.

None yet

2 participants