chore: Sort all imports and activate eslint import rule by jdeniau · Pull Request #2119 · immutable-js/immutable-js
The diff did change as the import order did change.
It SHOULD be safe though to push that on main as the import order should not impact end user.
I ran copilot on that one to see if there is a side effect on the src dir, and here is the result:
After searching and scanning the entire
srcdirectory for side effects, here are the findings:No files in
srcdirectly reference or mutate global objects likeglobalThis,window, self, orglobal.
No files insrcusesetTimeout,setInterval,eval, or similar APIs that would cause top-level side effects.
The only use ofObject.definePropertyis inRecord.jsandHash.js, but these are used to define properties on objects or prototypes, not on global objects. This is a standard, side-effect-free pattern unless the prototype is a global object (which it is not in this context).
No files insrcuserequireorimport()in a way that would cause dynamic side effects.
The onlyconsoleusage inRecord.jsis for warnings, which is not a side effect that would impact library consumers.
No evidence of IIFEs, singletons, or top-level code that mutates global state.
Conclusion:
The code in thesrcdirectory does not contain side effects that would be affected by the order of import statements in your entry file. Sorting imports inImmutable.jsis safe and will not impact end users.