Open jimaek opened 10 years ago
What exactly do you mean by 'rename' please?
For the pixijs issue, that is a bug on their end, not ours, & they need to fix it.
The minified file is PROJECTNAME.js & the 'source' is PROJECTNAME.dev.js which is great; that how I personally prefer it. But the sourcemap will never be found when pixi.js
is used, since the client will look for pixi.js.map
the way my research points to. It is their Gruntfile.js that fails to name the sourcemap correctly.
I think we has similar conversations with other bugs, like security holes etc.
If you think we can fix it on our end, that's cool. Could even add extra code to figure out if there is a sourcemap to rename it, but what to do if there are multiple minfied files & sourcmaps? Might be better at most just to flag as an issue (bot?), & await human interaction, don't you think?
The problem that I was hoping to solve here was not the .map issue. basically pixi.js -> pixi.min.js.
This functionality could help us keep existing structure and auto-update projects at the same time. Every time we change something in the structure its a potential problem. So I want to avoid this as much as possible.
I thought we tried to cover this scenario with the per-version mainfile
or 'alt-mainfile` months ago?
Sure, but in my opinion it doesn't make sense to change file structure outside of major.minor versions. Allowing mapping would allow us to enforce that rule until the next minor/major version is released when we can update the file structure
@tomByrer Outside of mainfiles structure changes are still dangerous. For example for people using version aliasing. They would get upgraded to the new version automatically but if the file is no longer available they will get a 404
@megawac I agree
doesn't make sense to change file structure outside of major.minor versions
In an ideal world, everyone would SemVer the exact same way. Reality is people are going to do what they do, which may break stuff. Are we going to enforce proper SemVer on everyone in every PR? (Which is a solution, but will require visually checking every version-changes.)
Would file aliasing be a good idea when the file structure changes?
I'm starting to lean towards removing the mainfile
in the top-level info.ini
totally to force people to reconsider what their mainfile should be per release, & make them enter it in every version.ini
if there is more than one file.
mainfile
is not a problem for now. Our solution of mainfile per version works just fine.
Like I said what worries me is version aliasing and structure changes. This is why rename files by bot would help a lot
Is there any way to make the bot rename some files before pushing them? This way we can make sure that all projects will follow our structure.
Discussion https://github.com/jsdelivr/jsdelivr/pull/915