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

local PR: run actions #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

milesrichardson
Copy link

No description provided.

Prior to dotansimha#9009, which moved from Chokidar to `@parcel/watcher`, the behavior
was to watch for all relevant files. However, since switching to
`@parcel/watcher`, the new behavior has been to watch all files below
`process.cwd()`, and then filter the change events for only the relevant files.
This approach works fine, except that it's possible for a valid config to
reference paths outside of the current working directory (e.g. `documents:
"../some-other/*.graphql`), and these paths are included in build mode, but
were not being included in watch mode because they're outside of
`process.cwd()`.

This commit adds logic, after parsing all relevant file paths, to find the
"longest common directory prefix" of all those file paths, i.e. the "highest"
(closest to `/`) directory that contains all the relevant file paths. Then,
when subscribing to the Parcel watcher, this directory is used instead of
`process.cwd()`. For example, the longest common directory of the paths
`/foo/bar/*.graphql` and `/foo/fizz/*.graphql` would be `/foo`.

Note that the filtering behavior is left unchanged, and this only affects the
root path given to the Parcel watcher. When an event is received, the filtering
can still filter out irrelevant paths, including those filtered by
`config.watchPattern` if it's defined.
…ode testing

This adds a directory "outside" of `dev-test`, and also adds a new script
command `yarn watch:examples` which is the "watch mode" equivalent of
`yarn generate:examples`. It adds a dependency on a `githunt` document in
`dev-test-outer-dir`, and if all is working as expected, you should be able to
edit this file while in watch mode to trigger a rebuild, and it should also be
included in build mode. That is, if you run `yarn generate:examples`, or
`yarn watch:examples`, there should be no changes to the Git repo.
@github-actions
Copy link

github-actions bot commented Apr 3, 2023

diff --git a/website/algolia-lockfile.json b/website/algolia-lockfile.json
index e59ce860e..18f5fa3b5 100644
--- a/website/algolia-lockfile.json
+++ b/website/algolia-lockfile.json
@@ -1434,7 +1434,7 @@
         "anchor": "10-feature-your-plugin-on-the-plugins-hub"
       }
     ],
-    "content": "8956b59de79a3a6d7f87fce7ccc4b194",
+    "content": "9f56712abf7cf75627f776620c5f491c",
     "url": "https://www.the-guild.dev/graphql/codegen/docs/custom-codegen/contributing",
     "domain": "https://www.the-guild.dev/graphql/codegen",
     "hierarchy": [

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant