Skip to content

Releases: willstocks/dynamically-polyfill-features-for-a-script

v0.0.9

29 May 13:05
77b4f32
Compare
Choose a tag to compare

README Changes

  • [New] Added NPM installation instructions and version badge

Script Changes

  • [New] Added module.exports for NPM purposes

Related issues:

v0.0.9-beta.1

29 May 12:54
fbc236b
Compare
Choose a tag to compare
v0.0.9-beta.1 Pre-release
Pre-release

README Changes

  • [New] Added NPM installation instructions and version badge

Script Changes

  • [New] Added module.exports for NPM purposes

Related issues:

v0.0.8

12 Mar 13:33
5ff9a6c
Compare
Choose a tag to compare

README Changes

  • [Enhancement] Updated script size statistics

Bug fixes

  • [Fix] Tweaked if within checking(check)

Script Changes

  • [New] Include typeOf check (see #23)
  • [Enhancement] Converted most in's to .hasOwnProperty()

Related issues:

#23
#27

v0.0.8-beta.1

12 Mar 13:11
b781982
Compare
Choose a tag to compare
v0.0.8-beta.1 Pre-release
Pre-release

README Changes

  • [Enhancement] Updated script size statistics

Bug fixes

  • [Fix] Tweaked if within checking(check)

Script Changes

  • [New] Include typeOf check (see #23)
  • [Enhancement] Converted most in's to .hasOwnProperty()

Related issues:

#23
#27

v0.0.7

25 Feb 10:19
9ebaf5e
Compare
Choose a tag to compare

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

20 Feb 09:53
5396ccb
Compare
Choose a tag to compare

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 the polyfillReq 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 nested if'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 if if (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:

Fixes #1
Fixes #17
Fixes #20
Fixes #21
Fixes #22

v0.0.6-beta.3

19 Feb 16:22
e5de255
Compare
Choose a tag to compare
v0.0.6-beta.3 Pre-release
Pre-release

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 the polyfillReq 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 nested if'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 if if (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 nested if's into a single if
  • [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

12 Feb 11:54
6ad00f8
Compare
Choose a tag to compare
v0.0.6-beta.2 Pre-release
Pre-release

README Changes

  • Update script size statistics based on cognitive complexity improvements

Script Changes

  • Reduce cognitive complexity within checking() by combining nested if's into a single if
  • 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

12 Feb 11:24
51bfdbc
Compare
Choose a tag to compare
v0.0.6-beta.1 Pre-release
Pre-release

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

11 Feb 09:40
2fa37e8
Compare
Choose a tag to compare

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 and function checkNativeSupport have now all been combined into a single, function: function dynamicPolyfill - closes #14
  • Allow array to be passed for:
    • features (parameter 1)
    • scriptURL (parameter 2)
    • initFunction (parameter 3)
      You can still pass simple strings to each if you want though
      Closes #10 and closes #8
  • 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 unnecessary var (var fn = new Function) which has been instead moved inline into the try{}. See #12.
  • fns in loadPolyfill 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!)