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(dev): enable the usage of the command property without port #3662

Merged
merged 3 commits into from
Nov 23, 2021

Conversation

lukasholzer
Copy link
Contributor

@lukasholzer lukasholzer commented Nov 19, 2021

πŸŽ‰ Thanks for submitting a pull request! πŸŽ‰

Summary

Fixes #3654


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code πŸ§‘β€πŸ’». This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire πŸ”₯ (e.g. incident related), you can skip this step.
  • Read the contribution guidelines πŸ“–. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) πŸ§ͺ
  • Update or add documentation (if features were changed or added) πŸ“
  • Make sure the status checks below are successful βœ…

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

@github-actions github-actions bot added the type: chore work needed to keep the product and development running smoothly label Nov 19, 2021
@github-actions
Copy link

github-actions bot commented Nov 19, 2021

πŸ“Š Benchmark results

Comparing with 51bde9a

Package size: 365 MB

⬇️ 0.00% decrease vs. 51bde9a

^  364 MB  364 MB  364 MB  364 MB  364 MB  364 MB  364 MB  364 MB  364 MB  365 MB  365 MB  365 MB  365 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

src/utils/types.d.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

This is looking good so far, and works for me locally with Remix. The behaviour is a significant change though, so you should ensure that you test various scenarios to avoid breaking existing sites.

@lukasholzer lukasholzer requested a review from ascorbic November 19, 2021 15:49
@lukasholzer lukasholzer marked this pull request as ready for review November 19, 2021 15:49
@lukasholzer lukasholzer force-pushed the feat/3654-enable-the-dev-command-without-targetPort branch from 7b9492d to a5d85ac Compare November 19, 2021 15:50
@lukasholzer lukasholzer changed the title chore(dev): enable the usage of the command property without port feat(dev): enable the usage of the command property without port Nov 19, 2021
@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Nov 19, 2021
@lukasholzer lukasholzer removed the type: chore work needed to keep the product and development running smoothly label Nov 19, 2021
@ascorbic
Copy link
Contributor

This will probably need a docs update, explaing that if targetPort is provided then it will wait for that port to open, and proxy to it, and if it's not provided then the static server will be used.

@lukasholzer
Copy link
Contributor Author

This will probably need a docs update, explaing that if targetPort is provided then it will wait for that port to open, and proxy to it, and if it's not provided then the static server will be used.

I think it should be updated here as well: https://docs.netlify.com/configure-builds/file-based-configuration/#netlify-dev

Hey as the docs in the repo are "autogenerated" <!-- AUTO-GENERATED-CONTENT:START (GENERATE_COMMANDS_DOCS) --> – can you point me in the direction on where to adapt it?

@ascorbic
Copy link
Contributor

What's needed to land this? It would be great to get this out, now that Remix has been released

@lukasholzer
Copy link
Contributor Author

lukasholzer commented Nov 23, 2021

@ascorbic I'm opening up a PR on the docs site as well to change it but IMHO we can release it first ;) From my point, it should be good to go but I'm the PR issuer so maybe @ehmicky can provide here more information.

The doc's site does not say that this is not working what we implemented so we only need to explain this use case a little bit more there:

https://docs.netlify.com/configure-builds/file-based-configuration/#netlify-dev

@ascorbic
Copy link
Contributor

Great! Could you complete the PR description now it's ready for review?

@lukasholzer lukasholzer added the automerge Add to Kodiak auto merge queue label Nov 23, 2021
@kodiakhq kodiakhq bot merged commit ba154f6 into main Nov 23, 2021
@kodiakhq kodiakhq bot deleted the feat/3654-enable-the-dev-command-without-targetPort branch November 23, 2021 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Add to Kodiak auto merge queue needs docs 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.

Support arbitrary dev commands alongside static server
3 participants