Releases: willstocks/dynamically-polyfill-features-for-a-script
Releases · willstocks/dynamically-polyfill-features-for-a-script
v0.0.9
v0.0.9-beta.1
README Changes
- [New] Added NPM installation instructions and version badge
Script Changes
- [New] Added
module.exports
for NPM purposes
Related issues:
v0.0.8
v0.0.8-beta.1
v0.0.7
README Changes
- [Enhancement] Updated minified script size statistics based on new minification method
Bug fixes
- [Fix] UglifyJS was mangling the
.min.js
version of the file, so much so that it straight up wouldn't work in some browsers/environments. Stripped out the uglification and for now have gone with a "simple" minification method (via Google's Closure Compiler)
v0.0.6
README Changes
- [New] Add "with inline comments" size stat
- [New] Added a GitHub hit counter (because that's How Idiots Track Success)
- [Enhancement] Updated script size statistics
- [Enhancement] Updated script size stats now there's
Promise
support
Bug fixes
- [Fix] Re-add missing
}
- [Fix]
dynamicPolyfill()
was passing each polyfill item through to polyfill.io individually, rather than all at once. This was resulting in each item within an array (for example, 3 items needing polyfill) having it's own polyfill.io request - a waste of 2 requests for example! - [Fix] Fix an issue where polyfill's were being individually called, due to missing
.join(",");
on the end of filtering through thepolyfillReq
array
Script Changes
- [New] Included polyfill for
Promise
dependency (see #1) - [New] Added a
lastWord in firstWord.prototype != true
and split out checks for array items containing.
's into nestedif
's as we were getting false positives 😢 - [Enhancement] JSLint'ed the scripts - now we have nice and consistent formatting!
- [Enhancement] Move a couple of
var
's around, so that if they're not needed (aka ifif (check.indexOf(splitChars) >= 1)
is not true) don't use them/don't generate the overhead - [Enhancement] Store the polyfill.io URL as a
const
so it can be reused (rather than having duplicates all over the place!) - [Enhancement] Furthermore, if nothing needed polyfilling, we were still calling out to polyfill.io for absolutely nothing... a wasted request!
- [Enhancement] Minified using Uglify: The minified output (1079 bytes, saved 69.48%)
File additions
- [New] Create a version of the script with inline comments, so that people can understand what each line is doing and why... might help with further development?
Related issues:
v0.0.6-beta.3
README Changes
- [New] Added a GitHub hit counter (because that's How Idiots Track Success)
- [Enhancement] Updated script size stats now there's
Promise
support
Bug fixes
- [Fix] Fix an issue where polyfill's were being individually called, due to missing
.join(",");
on the end of filtering through thepolyfillReq
array
Script Changes
- [New] Included polyfill for
Promise
dependency (see #1) - [New] Added a
lastWord in firstWord.prototype != true
and split out checks for array items containing.
's into nestedif
's as we were getting false positives 😢 - [Enhancement] JSLint'ed the scripts - now we have nice and consistent formatting!
- [Enhancement] Move a couple of
var
's around, so that if they're not needed (aka ifif (check.indexOf(splitChars) >= 1)
is not true) don't use them/don't generate the overhead - [Enhancement] Store the polyfill.io URL as a
const
so it can be reused (rather than having duplicates all over the place!)
Previous Beta
README Changes
- [Enhancement] Updated script size statistics
- [New] Add "with inline comments" size stat
- [Enhancement] Update script size statistics based on cognitive complexity improvements
Bug fixes
- [Fix] Re-add missing
}
- [Fix]
dynamicPolyfill()
was passing each polyfill item through to polyfill.io individually, rather than all at once. This was resulting in each item within an array (for example, 3 items needing polyfill) having it's own polyfill.io request - a waste of 2 requests for example! See #22
Script Changes
- [Enhancement] Furthermore, if nothing needed polyfilling, we were still calling out to polyfill.io for absolutely nothing... a wasted request! See #21.
- [Enhancement] Minified using Uglify: The minified output (1079 bytes, saved 69.48%)
- [Enhancement] Reduce cognitive complexity within
checking()
by combining nestedif
's into a singleif
- [Enhancement] Minified using Uglify again: The minified output (1061 bytes, saved 69.18%)
File additions
Create a version of the script with inline comments, so that people can understand what each line is doing and why... might help with further development? See #20
v0.0.6-beta.2
README Changes
- Update script size statistics based on cognitive complexity improvements
Script Changes
- Reduce cognitive complexity within
checking()
by combining nestedif
's into a singleif
- Minified using Uglify again: The minified output (1061 bytes, saved 69.18%)
Previous Beta
README Changes
- Updated script size statistics
- Add "with inline comments" size stat
Bug fixes
- Re-add missing
}
Script Changes
dynamicPolyfill()
was passing each polyfill item through to polyfill.io individually, rather than all at once. This was resulting in each item within an array (for example, 3 items needing polyfill) having it's own polyfill.io request - a waste of 2 requests for example! See #22- Furthermore, if nothing needed polyfilling, we were still calling out to polyfill.io for absolutely nothing... a wasted request! See #21.
- Minified using Uglify: The minified output (1079 bytes, saved 69.48%)
File additions
Create a version of the script with inline comments, so that people can understand what each line is doing and why... might help with further development? See #20
v0.0.6-beta.1
README Changes
- Updated script size statistics
- Add "with inline comments" size stat
Bug fixes
- Re-add missing
}
Script Changes
dynamicPolyfill()
was passing each polyfill item through to polyfill.io individually, rather than all at once. This was resulting in each item within an array (for example, 3 items needing polyfill) having it's own polyfill.io request - a waste of 2 requests for example! See #22- Furthermore, if nothing needed polyfilling, we were still calling out to polyfill.io for absolutely nothing... a wasted request! See #21.
- Minified using Uglify: The minified output (1079 bytes, saved 69.48%)
File additions
Create a version of the script with inline comments, so that people can understand what each line is doing and why... might help with further development? See #20
v0.0.5
README
Updated parameter details
Updated example scripts
Updated deployment instructions (include "local")
Updated stats
The actual scripts
Major overhaul:
- I realised I had two functions that were simply there to call other functions. They weren't doing anything for themselves! Therefore,
function dynamicPolyfill
,function pageLoaded
andfunction checkNativeSupport
have now all been combined into a single, function:function dynamicPolyfill
- closes #14 - Allow array to be passed for:
- Iterate through array values using
Array.forEach()
- Split out
loadMyScript
repeated code into a helper function - minimising duplication! See #12. - Refactored init function to include a micro-helper function to avoid duplication! See #12.
initialiseMyScript
is no longer called from the "core"pageLoaded
function - instead it is called depending on whether the scripts that are to be used have loaded or not. See #12.initialiseMyScript
had an unnecessaryvar
(var fn = new Function
) which has been instead moved inline into thetry{}
. See #12.fns
inloadPolyfill
was unused... not sure how it even got there! See #12.- Fix erroneous
try{}catch{}
- Remove
console.log
from dynamicPolyfill.js that shouldn't have remained - Fix issue where if
initFunction
wasn't an array, it wouldn't execute - Order functions logically
- Inline comments to explain what each step is doing
- Retain backwards compatibility!
- Support for Safari and its weird behaviours. Closes #13.
- General tidying up of code. See #12.
- Formatting fixes
- Add various
console
messages to dynamicpolyfill-consolemessages.js for troubleshooting/debugging/fun purposes [NOW DEPRECATED]
Deprecated dynamicpolyfill-consolemessages.js
due to complexity to maintain (if you really want it - log an issue and I'll re-add it!)