You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
improvement(build-tools): support 1-deep transitive deps (#23863)
In policy checks transitive dependencies are not deeply considered. But
one level deep checks are now added to handle regular tasks that are
expanded to be complex (multiple tasks).
### Example
Splitting common `build:esnext` into two steps should not require
downstream consumers to change dependencies as dependency on
`build:esnext` still ensures that all of the build steps are run. The
policy checkers know that `build:esnext:main` and/or
`build:esnext:experimental` are required, but not that `build:esnext`
ensures they are run.
```diff
- "build:esnext": "tsc --project ./tsconfig.json",
+ "build:esnext": "npm run build:esnext:main && npm run build:esnext:experimental",
+ "build:esnext:experimental": "tsc --project ./tsconfig.json",
+ "build:esnext:main": "tsc --project ./tsconfig.main.json",
```
### Infrastructure changes in support:
- Add "children" to Task Definitions to understand what other tasks are
run when running a task. This enables policy checks to work with a
multi-step task as a dependency and not requiring explicit dependency on
one or each part.
"children" property of Task Definition is computed from script command
line explicitly and is not manually configurable. Scripts listed via
`npm run` (no other arguments) and `concurrently` are recognized.
- Refactors existing logic from taskFactory to support `concurrently`
parsing.
- Add broad `readonly` attribute to Task Definitions and Configs that
shouldn't be changed. Add cloning where mutation may occur. (Note that
TypeScript doesn't detect all cases where something readonly is assigned
to non-readonly context. See
microsoft/TypeScript#18770.) Where mutability
is needed in policy fix-up handler, cast away to writeable.
0 commit comments