Skip to content

fix(core): consistently use ng:/// for sourcemap URLs - #29826

Closed
cexbrayat wants to merge 1 commit into
angular:masterfrom
cexbrayat:fix/ng-domain
Closed

cexbrayat wants to merge 1 commit into
angular:masterfrom
cexbrayat:fix/ng-domain

Conversation

@cexbrayat

Copy link
Copy Markdown
Member

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?

Currently, in jit mode, ngInjectableDef, ngDirectiveDef, ngPipeDef and ngModuleDef use ng://,
which display them in the top domain in Chrome Dev Tools, whereas ngComponentDef uses ng:/// which display components in a separate domain.

You can currently see:

AppModule
UserService
ng://
|_ AppComponent
   |_ template.html
|_ AppComponent.js
...

What is the new behavior?

This commits replaces all ng:// with ng:/// to display every Angular entity in the ng:// domain.

ng://
|_ AppModule
|_ UserService
|_ AppComponent
...

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Note that this was already the case in VE:

function jitSourceUrl(url: string) {
// Note: We need 3 "/" so that ng shows up as a separate domain
// in the chrome dev tools.
return url.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/, 'ng:///');
}

@cexbrayat
cexbrayat requested a review from a team April 11, 2019 09:18
@benlesh benlesh added the area: core Issues related to the framework runtime label Apr 17, 2019
@ngbot ngbot Bot added this to the needsTriage milestone Apr 17, 2019
Currently, in jit mode, `ngInjectableDef`, `ngDirectiveDef`, `ngPipeDef` and `ngModuleDef` use `ng://`,
which display them in the top domain in Chrome Dev Tools, whereas `ngComponentDef` uses `ng:///` which display components in a separate domain.

You can currently see:

```
AppModule
UserService
ng://
|_ AppComponent
   |_ template.html
|_ AppComponent.js
...
```

This commits replaces all `ng://` with `ng:///` to display every Angular entity in the `ng://` domain.

```
ng://
|_ AppModule
|_ UserService
|_ AppComponent
...
```
@petebacondarwin petebacondarwin added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels May 7, 2019

@kara kara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@kara kara added target: major This PR is targeted for the next major release comp: ivy target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release target: major This PR is targeted for the next major release labels May 7, 2019
@kara

kara commented May 7, 2019

Copy link
Copy Markdown
Contributor

presubmit

@kara kara removed the action: presubmit The PR is in need of a google3 presubmit label May 7, 2019
kara pushed a commit that referenced this pull request May 7, 2019
Currently, in jit mode, `ngInjectableDef`, `ngDirectiveDef`, `ngPipeDef` and `ngModuleDef` use `ng://`,
which display them in the top domain in Chrome Dev Tools, whereas `ngComponentDef` uses `ng:///` which display components in a separate domain.

You can currently see:

```
AppModule
UserService
ng://
|_ AppComponent
   |_ template.html
|_ AppComponent.js
...
```

This commits replaces all `ng://` with `ng:///` to display every Angular entity in the `ng://` domain.

```
ng://
|_ AppModule
|_ UserService
|_ AppComponent
...
```

PR Close #29826
@kara kara closed this in 392473e May 7, 2019
BioPhoton pushed a commit to BioPhoton/angular that referenced this pull request May 21, 2019
Currently, in jit mode, `ngInjectableDef`, `ngDirectiveDef`, `ngPipeDef` and `ngModuleDef` use `ng://`,
which display them in the top domain in Chrome Dev Tools, whereas `ngComponentDef` uses `ng:///` which display components in a separate domain.

You can currently see:

```
AppModule
UserService
ng://
|_ AppComponent
   |_ template.html
|_ AppComponent.js
...
```

This commits replaces all `ng://` with `ng:///` to display every Angular entity in the `ng://` domain.

```
ng://
|_ AppModule
|_ UserService
|_ AppComponent
...
```

PR Close angular#29826
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 15, 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 area: core Issues related to the framework runtime cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants