Skip to content
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

fix(core): add missing migration to npm package #29705

Closed
wants to merge 1 commit into from

Conversation

filipesilva
Copy link
Contributor

@filipesilva filipesilva commented Apr 4, 2019

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

While running ng update @angular/core --next, the following error would be displayed:

Cannot find module '....\node_modules\@angular\core\schematics\migrations\template-var-assignment\index'

This happened because the Schematics migration was referenced, but not included.

What is the new behavior?

This commit fixes that bug by including the migration in the Bazel npm package dependencies.

Does this PR introduce a breaking change?

  • Yes
  • No

While running `ng update @angular/core --next`, the following error would be displayed:

```
Cannot find module '....\node_modules\@angular\core\schematics\migrations\template-var-assignment\index'
```

This happened because the Schematics migration was referenced, but not included.

This commit fixes that bug by including the migration in the Bazel npm package dependencies.
@mary-poppins
Copy link

You can preview 70d407f at https://pr29705-70d407f.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 3aa435d at https://pr29705-3aa435d.ngbuilds.io/.

@devversion
Copy link
Member

How does the schematic actually run right now? We were talking about enabling it for beta/rc, but I was under the impression that it doesn't run right now because the migration targets v8.0.0 and not any beta/rc?

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

Also LGTM for adding this to the ng_package anyway.

@filipesilva
Copy link
Contributor Author

@devversion I was updating angular/angular-cli#14079 to actually try to update to the next angular versions via ng update @angular/core --next and saw the failure.

It runs because it's listed in the core migrations:

"migration-v8-template-local-variables": {
"version": "8",
"description": "Warns developers if values are assigned to template variables",
"factory": "./migrations/template-var-assignment/index"
}

IIRC as long as this package is updated to and the version matches, the migrations will run. @clydin might know more about the specifics.

@devversion
Copy link
Member

devversion commented Apr 4, 2019

@filipesilva Yeah it's clear that these are part of the migrations.json. My understanding was just that they don't run until V8 stable since the Semver criteria here is not satisfied with the migrations targeting 8.0.0. Maybe the update --to option is somehow set by the CLI to 8.0.0 instead of the appropriate beta? e.g.

@alexeagle alexeagle added the target: major This PR is targeted for the next major release label Apr 4, 2019
@alexeagle
Copy link
Contributor

Even though we don't run the migration, we still require() it so that's why we need this fix

@alexeagle alexeagle added the action: merge The PR is ready for merge by the caretaker label Apr 4, 2019
Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM

@kara kara added the comp: ivy label Apr 4, 2019
@ngbot ngbot bot added this to the needsTriage milestone Apr 4, 2019
@jasonaden jasonaden closed this in 96b76dc Apr 4, 2019
@filipesilva filipesilva deleted the missing-migration branch April 8, 2019 10:40
DeveloperFromUkraine pushed a commit to DeveloperFromUkraine/angular that referenced this pull request Apr 11, 2019
While running `ng update @angular/core --next`, the following error would be displayed:

```
Cannot find module '....\node_modules\@angular\core\schematics\migrations\template-var-assignment\index'
```

This happened because the Schematics migration was referenced, but not included.

This commit fixes that bug by including the migration in the Bazel npm package dependencies.

PR Close angular#29705
wKoza pushed a commit to wKoza/angular that referenced this pull request Apr 17, 2019
While running `ng update @angular/core --next`, the following error would be displayed:

```
Cannot find module '....\node_modules\@angular\core\schematics\migrations\template-var-assignment\index'
```

This happened because the Schematics migration was referenced, but not included.

This commit fixes that bug by including the migration in the Bazel npm package dependencies.

PR Close angular#29705
@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 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants