* Update dev dependencies
* Adjust dependencies versions to avoid unmet peer dependency error
* Update Travis CI node version to 8
* Recompile dist
This updates all of the minified files to use the latest uglifyjs version, which results in better compression (by a small margin).
* Remove SauceLabs credentials
SauceLabs is no longer used during builds, so we no longer need to include these encrypted credentials.
* Clean up badges
* Remove SauceLabs from the README
* Misc README fixes
* Disable Travis email notifications
Looks like we accidentally re-enabled these when removing IRC.
* Added deployments to NPM on tagged releases
Previously this was being done manually after each release, which resulted in a few releases not showing up on NPM for a significant amount of time. Now the builds should be automatically pushed, which should hopefully improve a lot of the issues we were seeing.
* Drop IRC notifications
We no longer use this IRC channel.
* Clean up .travis.yml
* Remove grunt ci
This is no longer needed now that we don't do anything special for CI builds. This also allows us to minify during CI builds, which will be useful for the tagged builds which depend on these minified files being up to date (so they can get released as well).
These two are required at build time to generate the full builds
of Select2 (for jQuery Mousewheel) and to inject the AMD loader
(for Almond.js). They are not required for anyone who depends on
Select2, since jQuery Mousewheel is an optional dependency.
This may result in some people needing to add jQuery Mousewheel to
their projects as a required dependency, if they were expecting
it to be added by Select2 before.
* select2.jquery.json - This was previously used by the jQuery Plugin
Registry which was shut down and put into read-only mode a few
years ago. Since nobody else appears to use this file, it doesn't
make sense for us to keep bumping the version in it and keeping it
up to date.
* vendor/ - This was needed back when the full version of Select2
actually bundled its own version of jQuery. Since we never actually
did this, we no longer need to keep the copy of jQuery around.
* Start running tests against jQuery 2.x
We were only running tests against jQuery 1.x before and they were
all passing. This was a problem because apparently all of the data-*
attribute tests fail in jQuery 2.x. We are now running both the
integration and unit tests against both jQuery 1.x and jQuery 2.x.
Right now this resulted in a complete duplication of the test files
because there wasn't an obvious way to run the tests against both
versions. We're going to look into removing this duplication in the
future once the current issues are fixed.
We are also going to look into testing against jQuery 3.x in the
future, since that is also a supported line of jQuery.
* Force the data-* attributes to be parsed
There was a change made that switched us from using `$.data` and
`$.fn.data` internally to using an internal data store (managed
through internal utilities). This had the unfortunate side effect
of breaking the automatic loading of data-* options in versions of
jQuery other than 1.x, which included anything that would be
considered modern jQuery. While the change was made and approved
in good faith, all of the tests passed and the docs pages appeared
to be working, the tests really failed when running on newer versions
of jQuery. This was confirmed when we started running automated tests
against both versions, which confirmed the bug that others have been
seeing for a while.
The change was made becuase calling `$.fn.data` on an element which
contains a reference to itself in the internal jQuery data cache
would cause a stack overflow. This bug was well documented at the
following GitHub ticket and was resolved by no longer using
`$.fn.data`: https://github.com/select2/select2/issues/4014
Unfortunately because `$.fn.data` was no longer being called in a
way such that all of the data attributes would be dumped out, we
needed to find a replacement. The substitute that was given in the
original bug fix worked when the data cache was fully primed, but
we never primed it anywhere so it actually failed in the general
case. That meant we needed to find a way to manually prime it,
which is exactly what this change does.
* Clean up select2/utils
* Add scrollOnSelect as a configurable option
* default scrollOnSelect to true to avoid modifying existing behaviour
* added tests and default option for scrollAfterSelect