-
Notifications
You must be signed in to change notification settings - Fork 449
feat: begin integrating @netlify/dev#7950
Conversation
Sets the foundation for integrating @netlify/dev in the CLI. We start by disabling all features (except for db, which is enabled with an environment variable). Then we can gradually start enabling individual features and remove the corresponding code from the codebase.
As for the term "programmatic", I was looking for a way to distinguish the new @netlify/dev package (which offers a programmatic interface for the emulation of the Netlify platform) from the existing Netlify Dev command. Naming things is hard. Happy to go for another term if someone has a better idea.
package.json
Outdated
| "@netlify/db": "^0.1.0", | ||
| "@netlify/db-dev": "^0.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In tests, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh, test fixtures with a package.json don't get npm installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see what you mean. Moved to the fixture deps in bd20f1c.
| if (force === undefined) { | ||
| const existingValue = await store.get(key) | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a wrong type we should be fixing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linting started failing for this, randomly. I haven't yet had the time to understand why, since I haven't touched this part of the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into this as a follow-up.
|
|
||
| injectEnvVariables(env) | ||
|
|
||
| const programmaticNetlifyDev = await startProgrammaticNetlifyDev({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may know this already, but for completeness: this would need to also be hooked up in the dev:exec, serve, and functions:serve commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'll do that in a follow up. Having this on dev for now is fine.
* chore: add deps
* fix(deps): bump netlify packages to dedupe with @netlify/dev
* chore: update deps
* chore: fix lint issue
* chore: add debug logging
* chore: add comment
Co-authored-by: Philippe Serhal
* chore: cap site name length in tests
* chore: update snapshot
---------
Co-authored-by: Philippe Serhal