-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor: split out task running and config loading #677
Open
apaleslimghost
wants to merge
353
commits into
main
Choose a base branch
from
split-config-loading
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
and make schemas package exports more consistent
(and make the zod inference helper type generic)
…ema when initialising
Co-authored-by: Ivo Murrell <ivo.murrell@ft.com>
Co-authored-by: Ivo Murrell <ivo.murrell@ft.com>
…compatible Slightly more backwards compatible
…options split task/plugin options
…ions Backwards compatible .toolkitrc options field
…atible-well-sort-of Even more backwards compatible (well sort of)
fix: remove check for undefined commands
how did that get there
chore: remove duplicate runInit call in runTasks
Manually bump updated prerelease packages
Fix Task options not being unwrapped when returned from Zod
Manually bump updated prerelease packages
Custom plugins can be imported using a relative path. We had previously switched to resolve-pkg to be able to handle plugins without an entrypoint, however this package can't handle resolving relative paths. Additionally, resolve-from's functionality is now available in Node's require API so let's remove both packages (this will also make it easier to migrate to ESM in the future). Now we can roll our own resolution logic that takes what we were using from the resolve-pkg package (resolving a package.json instead of an entrypoint) and adds adds support for relative paths too.
This allows custom plugins (who won't have a schema associated with them) to still use task options.
Fix issues with custom plugins
Manually bump updated prerelease packages
This partially reverts d1374d1, which I think was a mistake as we already remove the EOL character normally added by winston, and we skip appending a newline character to messages if it has a `process` attribute. So it meant that the only newlines that would be preserved were ones that happened to not be at the end (or start) of a stream flush.
Because we were declaring a regex within a template literal we needed to escape the backslash in the `\s` whitespace meta group. I we don't, the backslash is parsed as an escape character for the template literal, not the regex, and is replaced with a literal `s` as `\s` is not a valid escape sequence. This means the regex would search for an `s` instead of whitespace. This doesn't affect the unescaped `\n` as the escaped `\n` and the literal `0x0A` ASCII character are (roughly) equivalent in a regex. Instead of fixing the incorrect `\s`, let's remove it entirely and not trim whitespace characters, just newlines, as I'm not sure we actually want to strip indentation from hooked console logging.
Fix lack of newlines in subprocess logging
Use correct name for jobs in a matrix
Manually bump updated prerelease packages
build: update and simplify create-plugin script
fix: allow multiple instances of task with different options
apaleslimghost
force-pushed
the
task-context
branch
from
July 29, 2024 11:23
4375316
to
789e594
Compare
apaleslimghost
force-pushed
the
split-config-loading
branch
from
July 29, 2024 11:25
a1b1e34
to
a9b88bd
Compare
ivomurrell
force-pushed
the
task-context
branch
from
September 5, 2024 16:03
789e594
to
aa27bc4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
split from #630. allows running tasks from a previously-loaded config.