-
Notifications
You must be signed in to change notification settings - Fork 117
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
NPM updating to 1.10 which breaks sourcemap sources files at least with concat #270
Comments
I need more details with a solid example. Please code up a spec into integration.js in this repo. |
Same issue reporting in, downgrading to 1.9.3 fixed the issue. I'll see if I can help with a repro as time allows today :). |
At the very least, I have a full stack here: Error: "../../../../../wwwroot/DevTools/DevTools/dev-tools.ts" is not in the SourceMap. |
And the pertinent part of our gulpfile :) :
|
It looks like this is specific to ngAnnotate's usage of sourcemaps, so it's a little difficult for me to repro as a direct consumer of sourcemaps. Is there any additional tracing I should turn on? I was looking in the change history and the large refactoring that happened in 1.10 means I can't easily experiment line by line to see what is causing the problem. |
I am first looking into Lastly turn on some logging on gulp-sourcemaps. DEBUG=gulp-sourcemaps:* Then we can possibly see where it gets to in gulp-sourcemaps. Your stack is puzzling as I dont see gulp-sourcemaps in it at all. |
I don't suspect it's a related package version, from what I can tell NPM is only swapping out the source for gulp-sourcemaps. npm install gulp-sourcemaps@1.10.0 @ms/mseg-eae-pylon-gulp@0.0.0-alpha ---At this point it's broken--- npm install gulp-sourcemaps@1.9.3 ---At this point it's working--- |
Ran with the debug flags -- basically, the "not working" one looks like this:
At this point in the not working flow, I see the error stack I posted above. And the working one looks like this (and has more of the same, basically it looks like it's doing it's job).
|
Ok I think I know the issue. I changed the sources to be flattened within the sourceRoot which is one of the main reasons I bumped to 1.10 and 2.3 . See lines: https://github.com/floridoo/gulp-sourcemaps/blob/master/src/write/index.internals.js#L42-L46 The old functionality just passed
|
My guess was from this |
That change doesn't seem to have an effect. Pertinent code is now:
|
What happens if you remove some steps. First ngAnnotate, then concat? |
Anyway instead of going back and forth here if you make a reproducible example and PR it to integration.js on 1.X I can actually run it. I am not cutting and pasting code that might throw. |
Issue seems to be specific to ngAnnotate being in the pipe. I'll try to make time to do that today. For the time being we're targeting version 1.9.3. |
Here is a really simple tar ball that will recreate the issue. Just two test js, a simple concat pipeline. Look in the current bundle.js.map and it should see the obvious problem."sources":["/bundle.js","/bundle.js"] run "npm install" followed by "gulp test" to create bundle.js and bundle.js.map Rollback version package.json and rm -R node_modules to do a fresh install. vs 2.2.3 and 1.9.3 and below seem to work fine. Thanks! |
Thanks @twiggy |
@twiggy as for your issue, doing |
I see the bug working on it. |
I think this is resolved see 0afd11c#diff-08e28e98a118d512b13f4fc7423da77aR234 Pushed/Published 2.3.1, and 1.10.1 |
thanks @nmccready ! |
We had our package.json set to ^1.6.0 which then updated to 1.10
If say you have pipe.concat('bundle.js') the sourcemap file will have an array like [ 'bundle.js', 'bundle.js', ... ] for each file that should have been there.
Thanks for contributing to open source! We do appreciate it.
The text was updated successfully, but these errors were encountered: