Skip to content

fix(@schematics/angular): findModuleFromOptions not handling proper… #13720

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

Merged
merged 1 commit into from
Feb 21, 2019
Merged

fix(@schematics/angular): findModuleFromOptions not handling proper… #13720

merged 1 commit into from
Feb 21, 2019

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Feb 20, 2019

…ly different casing in name

At the moment users can have various casing and separators in paths, we should not always dasherize the name when resolving modules.

As for example when providing something like:

/module/SubModule/feature

It won't be able to resolve the modules properly as sub-module does't exist.

This PR also updates the test for underscore as previously it was not properly testing this usercase, since the formatter was used on name and not th path.

Fixes #13714

@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Feb 20, 2019
@@ -111,12 +111,20 @@ describe('find-module', () => {
expect(modPath).toEqual('/projects/my-proj/src/app.module.ts' as Path);
});

it('should find a module if nameFormatter is provided', () => {
Copy link
Collaborator Author

@alan-agius4 alan-agius4 Feb 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test was actually not testing the correct usecase, as nameFormatter was only used when name is provided

@alan-agius4 alan-agius4 requested a review from clydin February 20, 2019 10:33
…ly different casing in name

At the moment users can have various casing and seperatirs in paths, we should not always dasherize the name when resolving modules.

As for example when providing something like:

```
/module/SubModule/feature
```

It won't be able to resolve the modules properly as `sub-module` does't exist.

This PR also updates the test for underscore as previously it was not properly testing this usercase, since the formatter was used on name and not th path.

Fixes #13714
@kyliau kyliau merged commit 9bf8b3e into angular:master Feb 21, 2019
@alan-agius4 alan-agius4 deleted the find-module-casing branch February 21, 2019 05:19
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Newly created component not being added to submodule
5 participants