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): consistently use ng:/// for sourcemap URLs #29826

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
5 participants
@cexbrayat
Copy link
Contributor

commented Apr 11, 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?

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 angular/fw-core as a code owner Apr 11, 2019

@googlebot googlebot added the cla: yes label Apr 11, 2019

@benlesh benlesh added the comp: core label Apr 17, 2019

@ngbot ngbot bot added this to the needsTriage milestone Apr 17, 2019

@cexbrayat cexbrayat force-pushed the cexbrayat:fix/ng-domain branch from 96b3b76 to 6716210 Apr 25, 2019

fix(core): consistently use ng:/// for sourcemap URLs
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
...
```
@kara

kara approved these changes May 7, 2019

Copy link
Contributor

left a comment

LGTM

@kara

This comment has been minimized.

Copy link
Contributor

commented May 7, 2019

kara added a commit that referenced this pull request May 7, 2019

fix(core): consistently use ng:/// for sourcemap URLs (#29826)
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 added a commit to BioPhoton/angular that referenced this pull request May 21, 2019

fix(core): consistently use ng:/// for sourcemap URLs (angular#29826)
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.