Commit Graph

7 Commits

Author SHA1 Message Date
Sean Massa
2c950d47ae ensure cleanup after the gatsby plugin runs (#9975)
There is an issue where you can interrupt a gatsby project build and the temporary files are not cleaned up. If you try to build again, it will get stuck in an infinite loop.

This PR adds an exit hook to make sure the cleanup happens.
2023-05-18 19:42:08 +00:00
Chris Barber
732ac2072c [tests] Update Typescript, Jest, and ts-jest (#9782)
Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Swarnava Sengupta <swarnavasengupta@gmail.com>
2023-04-12 08:38:03 -05:00
Nathan Rajlich
294935a9c5 [static-build] Remove Gatsby env var check (#9766)
This feature flag has been fully rolled out for a while now. Removing it makes the plugin work with `vc build` when running locally.
2023-04-07 02:10:51 +00:00
Nathan Rajlich
c6717a1492 [static-build] Add Gatsby GENERATED_FILE_COMMENT for non-existing config file cases (#9354)
Follow-up to #9312 which missed these two cases.
2023-01-31 18:57:06 -08:00
Ethan Arrowood
eed6a377f1 [static-build] Cleanup gatsby file changes after static-build completes (#9312)
Adds a new function that restores the user's `gatsby-config.(j|t|mj)s` and `gatsby-node.(j|t|mj)s` files
2023-01-27 16:23:02 +00:00
Nathan Rajlich
c16d9e6784 [static-build] Include Gatsby plugins as regular dependencies (#9313)
Right now, static-build will add the necessary Gatsby plugins to the project's `package.json` at build-time, which has been bothersome for package managers when using a frozen lockfile.

Another issue with it is that we install `latest` version of the plugin, so the version used becomes disjointed from the CLI version itself, which leads to unpredictability when trying to debug issues or help users roll back to a previous behavior if something breaks.

So instead of patching `package.json` directly, include the plugins as deps of static-build itself, and create symlinks to those paths into the project's `node_modules` directory.
2023-01-26 20:15:58 +00:00
Ethan Arrowood
52ca35252a [tests] add gatsby related unit tests to static-build (#9318)
Adds some unit tests for the gatsby injection logic. 

These are net new since we've heavily changed the injection logic. The tests and fixtures in `build-fixtures` and `builds.test.js` are seemingly not executed. We may delete those here too.
2023-01-26 03:33:18 +00:00