Skip to content

Releases: jaydenseric/Hurdler

Version 4.0.1

Choose a tag to compare

@jaydenseric jaydenseric released this 20 Nov 08:16

Fixed markdown issues in the generated readme.

Version 4.0.0

Choose a tag to compare

@jaydenseric jaydenseric released this 20 Nov 07:48

API changes

  • New addHurdle method.
  • New validateHash method that checks if a provided URL hash matches the configured format.
  • More specific naming for callbacks.
  • Callbacks now receive an element argument instead of receiving the element being bound this. Arrow functions can now be used in application code; no more const self = this!
  • Removed session features. They were rarely used as better solutions to their original use case have been found. This reduces complexity and simplifies documentation.
  • The old setHash method has been renamed setTarget, and accepts an element instead of an ID.
  • The old getTargetId method has been deprecated. You can get the current target element by reading a new target property.
  • The old clearHash method has been renamed clearTarget, and now only clears the window URL hash if a given element is targeted, or if the URL hash matches the configured Hurdler format. Support for browsers that do not have the history API (IE < 10) has been dropped.
  • The old run method has been renamed sprint and has a more elegant implementation off the back of the other changes.
    • Errors in hurdle tests are no longer caught and deliberately silenced.
    • Only DOM elements are iterated, instead of every DOM node type.

Optimizations

  • No longer implementing UMD. It adds too much junk to everyone’s application bundles. The main entrypoint is now plain CommonJS and the module entrypoint is still there for bundlers that can handle ES6 modules.
  • Dropped the ES6 class in favor of prototype to significantly cut down the amount of transpiled code.

Dev

  • Updated dev dependencies.
  • More standard Babel setup in place of the old Rollup way.
  • Using whitelist files approach instead of the old .npmignore file since it seems to be working ok these days.

Docs

  • Improved readme:
    • Logo tweaked and now pointing to the relevant version in the Github repo, via RawGit.
    • Added a lingo table and better explained the project.
    • Using documentation.js and tidy-markdown in place of jsdoc-to-markdown for generating the API in the readme from the source JSDoc.
  • Added new lingo keywords to the package.json.
  • Improved license comment block. Smaller and makes more sense when found in the middle of a minified bundle.

Version 3.0.0

Choose a tag to compare

@jaydenseric jaydenseric released this 14 Nov 00:24
  • Development dependencies and scripts managed via NPM.
  • Published to NPM.
  • Now an ES6 class module with Babel transpilation.
  • Implements UMD.
  • Improved JSDoc and updated readme.
  • Git ignoring .DS_Store files.
  • Removed the old demo until a new one is ready.

Version 2.0.0

Choose a tag to compare

@jaydenseric jaydenseric released this 27 Sep 15:17
Version 2.0.0.

- Hurder.tests renamed to Hurdler.hurdles.
- Callbacks for hurdles found in a run are triggered in order of DOM nesting (fixes #1).
- Hurdles found in a run are now available in the run session for all callbacks.
- Changed this to mean the hash target element within before and after callbacks.
- More reliable array looping.
- Updated demo.
- Updated readme.

Version 1.2.0

Choose a tag to compare

@jaydenseric jaydenseric released this 27 Sep 06:00
Version 1.2.0.

- Fixed an incorrect use of the "this" keyword in the run method.
- Added ability to run callbacks before and after each run.
- Added a demo.
- Updated readme.