Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add es6-shim as polyfill and minify core vendor scripts #12317

Merged
merged 2 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions apps/files/tests/js/filelistSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ describe('OCA.Files.FileList tests', function() {
done();
});
});
it('Restores thumbnail if a file could not be moved', function() {
it('Restores thumbnail if a file could not be moved', function(done) {
return fileList.move('One.txt', '/somedir').then(function(){

expect(fileList.findFileEl('One.txt').find('.thumbnail').parent().attr('class'))
Expand All @@ -922,6 +922,7 @@ describe('OCA.Files.FileList tests', function() {

expect(OC.TestUtil.getImageUrl(fileList.findFileEl('One.txt').find('.thumbnail')))
.toEqual(OC.imagePath('core', 'filetypes/text.svg'));
done();
});
});
});
Expand Down Expand Up @@ -1766,7 +1767,12 @@ describe('OCA.Files.FileList tests', function() {
});
it('dropping files on breadcrumb calls move operation', function(done) {
var testDir = '/subdir/two/three with space/four/five';
var moveStub = sinon.stub(filesClient, 'move').returns($.Deferred().promise());
var moveStub = sinon.stub(filesClient, 'move');
var resolve1, resolve2;
var deferredMove1 = $.Deferred();
var deferredMove2 = $.Deferred();
moveStub.onCall(0).returns(deferredMove1.promise());
moveStub.onCall(1).returns(deferredMove2.promise());
fileList.changeDirectory(testDir);
deferredList.resolve(200, [testRoot].concat(testFiles));
var $crumb = fileList.breadcrumb.$el.find('.crumb:eq(4)');
Expand All @@ -1782,8 +1788,7 @@ describe('OCA.Files.FileList tests', function() {
$('<tr data-file="Two.jpg" data-dir="' + testDir + '"></tr>')
]);
// simulate drop event
return fileList._onDropOnBreadCrumb(new $.Event('drop', {target: $crumb}), ui).then(function(){

var result = fileList._onDropOnBreadCrumb(new $.Event('drop', {target: $crumb}), ui).then(function(){
expect(moveStub.callCount).toEqual(2);
expect(moveStub.getCall(0).args[0]).toEqual(testDir + '/One.txt');
expect(moveStub.getCall(0).args[1]).toEqual('/subdir/two/three with space/One.txt');
Expand All @@ -1792,6 +1797,9 @@ describe('OCA.Files.FileList tests', function() {
moveStub.restore();
done();
});
deferredMove1.resolve(201);
deferredMove2.resolve(201);
return result;
});
it('dropping files on same dir breadcrumb does nothing', function() {
var testDir = '/subdir/two/three with space/four/five';
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"bootstrap": "3.3.7",
"clipboard": "1.7.1",
"davclient.js": "https://github.com/evert/davclient.js.git#0.1.2",
"es6-promise": "https://github.com/jakearchibald/es6-promise.git#2.3.0",
"handlebars": "4.0.5",
"jcrop": "0.9.12",
"jquery": "2.1.4",
Expand All @@ -33,6 +32,7 @@
"snapjs": "2.0.0-rc1",
"strengthify": "0.5.5",
"underscore": "1.8.3",
"zxcvbn": "4.4.2"
"zxcvbn": "4.4.2",
"es6-shim": "^0.35.4"
}
}
4 changes: 2 additions & 2 deletions core/js/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"jquery/dist/jquery.min.js",
"jquery-migrate/jquery-migrate.min.js",
"jquery-ui/ui/minified/jquery-ui.custom.min.js",
"underscore/underscore.js",
"underscore/underscore-min.js",
"moment/min/moment-with-locales.min.js",
"handlebars/handlebars.min.js",
"blueimp-md5/js/md5.min.js",
"bootstrap/js/tooltip.js",
"backbone/backbone.js",
"es6-promise/dist/es6-promise.js",
"es6-shim/es6-shim.min.js",
"davclient.js/lib/client.js",
"clipboard/dist/clipboard.min.js",
"autosize/dist/autosize.min.js",
Expand Down
14 changes: 6 additions & 8 deletions core/vendor/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ README*
# underscore
underscore/**
!underscore/.bower.json
!underscore/underscore.js
!underscore/underscore-min.js
!underscore/LICENSE

# blueimp-md5
Expand Down Expand Up @@ -135,13 +135,11 @@ davclient.js/**
!davclient.js/lib/client.js
!davclient.js/LICENSE

# es6-promise
es6-promise/**
!es6-promise/.bower.json
!es6-promise/LICENSE
!es6-promise/dist
es6-promise/dist/*
!es6-promise/dist/es6-promise.js
# es6-shim
es6-shim/**
!es6-shim/.bower.json
!es6-shim/LICENSE
!es6-shim/es6-shim.min.js

# base64
base64/*min.js
Expand Down
7,547 changes: 2,522 additions & 5,025 deletions core/vendor/core.js

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions core/vendor/es6-shim/.bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "es6-shim",
"repo": "paulmillr/es6-shim",
"description": "ECMAScript 6 (Harmony) compatibility shims for legacy JavaScript engines",
"keywords": [
"ecmascript",
"harmony",
"es6",
"shim",
"promise",
"promises",
"setPrototypeOf",
"map",
"set",
"__proto__"
],
"main": "es6-shim.js",
"scripts": [
"es6-shim.js"
],
"dependencies": {},
"development": {},
"ignore": [
"**/.*",
"node_modules",
"components",
"test"
],
"homepage": "https://github.com/paulmillr/es6-shim",
"version": "0.35.4",
"_release": "0.35.4",
"_resolution": {
"type": "version",
"tag": "0.35.4",
"commit": "271142ca5c58b7bfec6970b1c070515da0d8ef98"
},
"_source": "https://github.com/paulmillr/es6-shim.git",
"_target": "^0.35.4",
"_originalSource": "es6-shim"
}
26 changes: 26 additions & 0 deletions core/vendor/es6-shim/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
The project was initially based on [es6-shim by Axel Rauschmayer](https://github.com/rauschma/es6-shim).

Current maintainers are: [Paul Miller](http://paulmillr.com), [Jordan Harband](https://github.com/ljharb), and [C. Scott Ananian](http://cscott.net).

The MIT License (MIT)

Copyright (c) 2013-2016 Paul Miller (http://paulmillr.com) and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

12 changes: 12 additions & 0 deletions core/vendor/es6-shim/es6-shim.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions core/vendor/underscore/underscore-min.js

Large diffs are not rendered by default.

Loading