v0.4.0
Minor Changes
-
770beb1: We made some improvements to our debug logs!
Previously, we were using the
debugpackage to log messages. This was good at first, but now that we're adding more features toggtwe need more control over our logs. We want to be able to output structured logs, control the verbosity, and output them as JSON so that we can pipe them to another tool or parse them in a script.To accomplish this, we've added 2 new flags:
-
-v, --verboseto output structured logsThis replaces the
--debugflag, which was a boolean flag that would print out all logs. This new flag is a counter, so you can use it multiple times to increase the verbosity of the logs. Currently, there are 3 levels of verbosity:-v= INFO-vv= DEBUG-vvv= TRACE
-
--jsonto print out logs in JSON formatThis is useful if you want to pipe the logs to another tool, or if you want to parse the logs in a script.
-
-
346dfa6: Improvements to
ggt sync!Improved de-sync detection and conflict resolution:
ggt synccan now detect all discrepancies between your local filesystem and your Gadget environment's filesystem. Previously, if a file was deleted locally whileggt syncwas not running,ggt synccould not detect that the file was deleted and would not delete the file in your Gadget environment.Now,
ggt synccan detect the following discrepancies:- Files that exist locally but not in your Gadget environment
- Files that exist in your Gadget environment but not locally
- Files that exist locally and in your Gadget environment but have different contents
- Files that exist locally and in your Gadget environment but have different permissions
- Only supported when the local filesystem is macOS or Linux
When
ggt syncstarts, it will compare your local filesystem to your Gadget environment's filesystem and calculate the changes that have occurred since the last timeggt syncwas run.You will be prompted to resolve conflicts if:
- Both filesystems updated the same file with different contents
- One filesystem updated a file and the other deleted it
Otherwise,
ggt syncwill automatically merge the changes from both filesystems and begin watching for changes.With the new de-sync detection in place, we now have the technology to solve the dreaded "Files version mismatch" error that causes
ggt syncto crash so often. Be on the lookout for a fix to this error in the near future! 👀New
--preferflag:ggt synchas a new--preferflag that will resolve conflicts in favor of the specified filesystem. This is useful if you always want to resolve conflicts in favor of your local filesystem or your Gadget environment's filesystem.# keep your local filesystem's conflicting changes $ ggt sync --prefer=local # keep your Gadget environment's conflicting changes $ ggt sync --prefer=gadget
New
--onceflag:ggt synchas a new--onceflag that will only sync local filesystem once and then exit. This flag in combination with--preferis useful if you want to runggt syncin a script or CI/CD pipeline and ensure that the sync will not hang waiting for user input.$ ggt sync --once --prefer=local
-
7dd74be: We got the
ggtnpm package name! 🎉Gadget now owns the
ggtpackage on NPM! This means you can turn this:$ npx @gadgetinc/ggt@latest sync ~/gadget/example --app=exampleInto this:
$ npx ggt@latest sync ~/gadget/example --app=exampleIf you've already installed
@gadgetinc/ggtglobally, you'll need to uninstall it first:$ npm uninstall -g @gadgetinc/ggt # or $ yarn global remove @gadgetinc/ggtThen you can install the
ggtpackage:$ npm install -g ggt@latest # or $ yarn global add ggt@latestIt's a small change, but it's less typing and easier to remember. We hope you enjoy it!
We're going to keep the
@gadgetinc/ggtpackage up-to-date with theggtpackage, so you can continue to use@gadgetinc/ggtif you prefer. We'll let you know if we ever decide to deprecate@gadgetinc/ggt.
Patch Changes
- 87e630b: Bump @sentry/node from 7.86.0 to 7.87.0
- 628c24f: Bump @sentry/node from 7.80.1 to 7.81.0
- 9871c6e: Bump @sentry/node from 7.84.0 to 7.85.0
- 82536a8: Bump @sentry/node from 7.79.0 to 7.80.0
- 9982d1d: Bump ws from 8.15.0 to 8.15.1
- ae25c76: Bump @sentry/node from 7.75.1 to 7.76.0
- dbbbc96: Bump @sentry/node from 7.81.1 to 7.82.0
- f9385ea: Bump ignore from 5.2.4 to 5.3.0
- 041cfe4: Bump fs-extra from 11.1.1 to 11.2.0
- 197bec8: Bump serialize-error from 11.0.2 to 11.0.3
- 0a555c0: Bump @sentry/node from 7.82.0 to 7.84.0
- 29c6ed0: Bump @sentry/node from 7.80.0 to 7.80.1
- bdc646d: Bump @sentry/node from 7.76.0 to 7.77.0
- 8075a9b: Bump @sentry/node from 7.85.0 to 7.86.0
- 4b67530: Bump @inquirer/select from 1.3.0 to 1.3.1
- 188e22f: Bump @sentry/node from 7.77.0 to 7.79.0
- e638ad0: Bump @sentry/node from 7.87.0 to 7.88.0
- bfb6152: Bump ws from 8.14.2 to 8.15.0
- d69f01f: Bump @sentry/node from 7.81.0 to 7.81.1