core(gather): new computed artifact, js-bundles#10078
Conversation
| `); | ||
| }); | ||
|
|
||
| it('handles faulty maps', async () => { |
There was a problem hiding this comment.
It's tricky to create "meaningful" bad source maps, so I just mutate a bunch of things.
| "browserify": "^16.2.3", | ||
| "bundlesize": "^0.17.2", | ||
| "chalk": "^2.4.1", | ||
| "chrome-devtools-frontend": "^1.0.708769", |
There was a problem hiding this comment.
fyi this hasn't been published in a month
There was a problem hiding this comment.
thanks for the heads up. fixed.
1.0.723630 is today's ToT
There was a problem hiding this comment.
diff between the two: https://diff.googleplex.com/#key=qMBBFZxro5yG
(nothing we care about)
There was a problem hiding this comment.
fyi i am on 1.0.723630 rn just didnt' update the package.json semever
dismissing stale review. review plz
| // Complicated expressions are hard detect with the TS lib, so instead work with the raw code. | ||
| const rawCodeToReplace = { | ||
| // Similar to the reason for removing `url += Common.UIString('? [sm]')`. | ||
| // The entries in `.mappings` should not have their url property modified. |
There was a problem hiding this comment.
I think it'll be a little weird to have devtools' POV slightly different here, but looking at the spec and a few examples... I don't see a great reason why the sources' URLs should be relative to the sourcemap file's URL.
so maybe we end up also removing this in devtools.
| map?: undefined; | ||
| } | ||
|
|
||
| export interface Bundle { |
There was a problem hiding this comment.
i was going to say we don't want the same data (ScriptElement) reported in two separate artifacts... but then realized Bundle is a computed artifact.
at some point we should separate the types of our computed artifacts from our gathered artifacts. tbh kinda weird that they are all in the same spot.
For usage examples, see #10064
I minimized the global scope pollution, but there remains aActually seems like ParsedURL is not important, so I removed it.String.prototype.asParsedURLMaybe just name it
Bundles?