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

Feat: use framework info #1704

Merged
merged 32 commits into from
Jul 13, 2021
Merged

Feat: use framework info #1704

merged 32 commits into from
Jul 13, 2021

Conversation

erezrokah
Copy link
Contributor

@erezrokah erezrokah commented Jan 7, 2021

Summary

Fixes #1495
Fixes #1252

Related to #843

Changes in behavior

Changes from #843

  • framework = "#custom".
    • Current behavior - an error is shown if command and targetPort are not configured.
    • New behavior - same as current.
  • framework is not #custom and user has specified command and targetPort.
    • Current behavior - an error is shown to set framework = "#custom".
    • New behavior - everything works as the CLI has all the information it needs to run. This allows running ntl dev --command "echo hello" --targetPort 8000 which was not supported before (adding --framework "#custom" didn't work as well).
  • dir flag is specified.
    • Current behavior - we don't run framework detection, use a static server and show an error if targetPort or command are specified.
    • New behavior - we don't run framework detection and use a static server.
      • If command is configured we print a warning and suggest to use targetPort for a custom setup.
      • If targetPort is configured we print a warning and suggest to use staticServerPort to configure the static server port.

Other changes

  • framework = "create-react-app" (or any other specific framework)

    • Current behavior - run the create-react-app detector, if it fails report an error, otherwise use it
    • New behavior - always use the specific framework settings
  • Added a new --framework flag. You can only configure framework using the dev block at the moment. That doesn't make sense since we already have command and targetPort flags. Done in feat(command-dev): add framework flag #2818

Test plan

Testing this manually at the moment.
Will think of a good way to test the integration without having a performance hit.

Tested only the happy path, so others are probably broken.

Replaced the unit tests with integration tests

Tests were added in #2821, I've updated them to reflect the new behavior

- A picture of a cute animal (not mandatory but encouraged)
image

@github-actions
Copy link

github-actions bot commented Apr 22, 2021

📊 Benchmark results

Comparing with 0b5c891

  • Package size: 389 MB (no change)

@erezrokah erezrokah force-pushed the feat/use_framework_info branch 2 times, most recently from ca1c791 to bfcb6cd Compare May 26, 2021 16:36
@erezrokah erezrokah force-pushed the feat/use_framework_info branch 2 times, most recently from 6d425d9 to 8efd263 Compare June 6, 2021 16:50
@erezrokah erezrokah force-pushed the feat/use_framework_info branch 2 times, most recently from cc98c28 to fe4f619 Compare June 15, 2021 14:09
@github-actions
Copy link

github-actions bot commented Jun 30, 2021

📊 Benchmark results

Comparing with 728826e

Package size: 330 MB

(no change)

^  330 MB  330 MB  330 MB  330 MB  330 MB  330 MB  330 MB  330 MB  330 MB  330 MB  330 MB  330 MB  330 MB 
│   ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-12    T-11    T-10    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use @netlify/framework-info in Netlify Dev "netlify dev" is running incorrect command for parcel
2 participants