-
Notifications
You must be signed in to change notification settings - Fork 12k
refactor: Consolidate adding dependencies #11131
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
@@ -350,6 +345,6 @@ export default function (options: ApplicationOptions): Rule { | |||
move(sourceDir), | |||
]), MergeStrategy.Overwrite), | |||
schematic('e2e', e2eOptions), | |||
]); | |||
])(host, context); |
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.
Please undo.
@@ -257,6 +255,6 @@ export default function (options: LibraryOptions): Rule { | |||
context.addTask(new NodePackageInstallTask()); | |||
} | |||
}, | |||
]); | |||
])(host, context); |
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.
Please undo.
node: JsonAstObject, | ||
propertyName: string, | ||
value: JsonValue, | ||
indent = 4, |
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.
Default for most JSON is 2.
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.
Indent is defaulted to 4, because the typical use case is to add a value to an existing object (i.e. dependencies
, devDependencies
) It could be removed as a default to make it more explicit.
import { UnitTestTree } from '@angular-devkit/schematics/testing'; | ||
import { insertPropertyInAstObjectInOrder } from './json-utils'; | ||
|
||
type Pojo = { |
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.
Not Pojso? ;)
return JSON.parse(tree.readContent(filePath)); | ||
} | ||
|
||
it('should insert a first prop', () => { |
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.
You should have a test where you call insertProperty...
multiple times in a row.
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. |
No description provided.