gqty-dev / gqty

The No-GraphQL Client for TypeScript
https://gqty.dev
MIT License
934 stars 26 forks source link

Version Packages #1999

Closed github-actions[bot] closed 3 months ago

github-actions[bot] commented 3 months ago

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@gqty/cli@4.1.2

Patch Changes

lubosmato commented 3 months ago

@vicary can we merge this or is there anything else that should be tested/checked?

vicary commented 3 months ago

@lubosmato If you think the current main works as intended, we are good to go.

lubosmato commented 3 months ago

I tested these cases.

Working correctly:

Throws an error:

Let me know if it is worth to focus on the Glob pattern with quotes or we can merge.

vicary commented 3 months ago

@lubosmato Thanks for the extensive testing.

To qualify as a patch upgrade, we should try to retain previous behaviours. Fortunately CLI already has fast-glob so we don't have to introduce another new dependency.

I made some changes to main, see if 6bbdce83 checks everything on your list?

lubosmato commented 3 months ago

@vicary Thank you for taking care of the glob pattern.

Tested again and found that glob pattern does not pick up some changes.

CWD: apps/web/

Pattern is "../api/**/*.graphql"

Folder structure:

.
└── apps/
    ├── api/
    │   ├── sub/
    │   │   └── schema.graphql
    │   └── schema.graphql
    └── web (cwd)

Only apps/api/schema.graphql changes are picked up.

Not sure why at the moment. Will check the issue later today.

vicary commented 3 months ago

@lubosmato Basically map( pipeAsync() ) with flat() cuts off the iterable at the first match, do you think it's possible to do it without iter-ops?

lubosmato commented 3 months ago

Yeah, working on it.

vicary commented 3 months ago

@lubosmato Looking at the diff reminds me of the fact that we were watching recursively.

Shallow watches on the immediate directories would ignore nested directories created after the watcher is started.

I can think of two options at the moment,

  1. Running the watcher at your project root as a workaround,
  2. Expose a new CLI option as a watch target with cwd as a default.

wdyt?

lubosmato commented 3 months ago

I tried again to combine those pesky AsyncIterators and realized that this is a bit rabbit hole 😅 . The simplest approach could be watching recursively the top-most directory based on input endpoints.

E.g. ../api/**/*.graphql ../api2/**/*.graphql ./local.graphql would do single recursive watch on $PWD/../.

lubosmato commented 3 months ago

@vicary Let's revert my changes so we don't block release process and I will prepare a new MR with single recursive watch if you aggree.

lubosmato commented 3 months ago

@vicary The simplest approach implemented here and without any additional dependencies: https://github.com/gqty-dev/gqty/pull/2000

Thank you for your time and help with this fix.