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

Source file location in jQuery CDN .map file is incorrect #3260

dmethvin opened this issue Aug 2, 2016 · 2 comments

Source file location in jQuery CDN .map file is incorrect #3260

dmethvin opened this issue Aug 2, 2016 · 2 comments


Copy link

@dmethvin dmethvin commented Aug 2, 2016

At some point in the recent past, Chrome added the ability to manually associate a map file with minified source. For people using the jQuery CDN, this would optimistically mean they could right click on the file in dev tools and for example associate with the jQuery 3.1.0 minified file. However, that map file refers back to plain old jquery.js as the original source, which is our frozen-in-time 1.11 version. It should refer to jquery-3.1.0.min.js.

The release process should ensure the file name matches the one on the CDN so that it could be manually associated for debugging.

Map files are so lame.

Copy link
Member Author

@dmethvin dmethvin commented Aug 5, 2016

Also to be clear, the current map file name is correct for the Google CDN since they deliver their copy with the name jquery.js. The jQuery and Microsoft CDNs include the version number in the file name, so they require a physically different map file with the version-specific file names.

@timmywil timmywil added the Build label Aug 5, 2016
@timmywil timmywil added this to the 3.1.1 milestone Aug 5, 2016
Copy link
Member Author

@dmethvin dmethvin commented Aug 17, 2016

Just showing my work here so I can come back to it when I get a chance.

jQuery 1.12.0 is where this regressed. It looks like the code to rename the references in the map file is [still there](

// Map files need to reference the new uncompressed name;
// assume that all files reside in the same directory.
// "file":"jquery.min.js","sources":["jquery.js"]
text = fs.readFileSync( builtFile, "utf8" )
.replace( /"file":"([^"]+)","sources":\["([^"]+)"\]/,
"\"file\":\"" + unpathedFile.replace( /\.min\.map/, ".min.js" ) +
"\",\"sources\":[\"" + unpathedFile.replace( /\.min\.map/, ".js" ) + "\"]" );
fs.writeFileSync( releaseFile, text );
but the names of the versioned files aren't correct in the jQuery CDN or the Microsoft CDN.

dmethvin added a commit to dmethvin/jquery that referenced this issue Sep 19, 2016
@dmethvin dmethvin closed this in 37f1da6 Sep 19, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.