-
Notifications
You must be signed in to change notification settings - Fork 11.9k
feat(@angular-devkit/architect): require build schemas from modules #29083
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
8126024
to
2d46bd1
Compare
@alan-agius4 I fixed the linting issue, please run the workflow again |
@realtimetodie It looks like the lint action now fails because of the commit message. Can you try amending the first commit with the lint fixes (e.g. using |
b0f932b
to
b881dd3
Compare
@jkrems done, sorry for the inconvenience |
packages/angular_devkit/architect/node/node-modules-architect-host.ts
Outdated
Show resolved
Hide resolved
packages/angular_devkit/architect/node/node-modules-architect-host.ts
Outdated
Show resolved
Hide resolved
packages/angular_devkit/architect/node/node-modules-architect-host.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you squash the commits? Otherwise this looks good.
Thank you for the contribution.
751ace6
to
5e1fe36
Compare
I squashed the commits. Thank your for taking the time to review my contribution. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently, when you create a custom builder for Angular CLI, the builder
schema
can only be a reference to a local file in the manifest directory. This is cumbersome, for example when you want to reference an external schema from a module instead.This is now working:
This is not working:
What is the new behavior?
It is now possible to require a builder schema from a module.
This is now working:
and this too:
Internal mechanics:
The
localRequire.resolve
function will look up the location of a module, but rather than loading the module, just return the resolved filename:If the module can not be found, a MODULE_NOT_FOUND error is thrown by Node.js and the filepath will be composed using the local manifest directory alternatively.
Error message:
In any case, the schema will be read using
readFileSync
and the error message will always be the same:Does this PR introduce a breaking change?
Other information