Skip to content

Commit 5830c82

Browse files
Merge pull request #47 from angular/master
Update upstream
2 parents 4863054 + 4ff51bf commit 5830c82

36 files changed

+2320
-1186
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
bower_components/**
21
build/**
32
docs/app/assets/js/angular-bootstrap/**
43
docs/config/templates/**
@@ -8,3 +7,4 @@ src/angular.bind.js
87
src/ngParseExt/ucd.js
98
i18n/closure/**
109
tmp/**
10+
vendor/**

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ performance/temp*.html
1010
*.swp
1111
angular.js.tmproj
1212
node_modules/
13-
bower_components/
1413
angular.xcodeproj
1514
.idea
1615
*.iml
@@ -19,7 +18,6 @@ angular.xcodeproj
1918
libpeerconnection.log
2019
npm-debug.log
2120
/tmp/
22-
/scripts/bower/bower-*
2321
.vscode
2422
*.log
25-
*.stackdump
23+
*.stackdump

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ node_js:
55

66
cache:
77
yarn: true
8-
directories:
9-
- bower_components
108

119
branches:
1210
except:
@@ -32,7 +30,7 @@ before_install:
3230
- export PATH="$HOME/.yarn/bin:$PATH"
3331

3432
before_script:
35-
- du -sh ./node_modules ./bower_components/ || true
33+
- du -sh ./node_modules || true
3634
- "./scripts/travis/before_build.sh"
3735
script:
3836
- "./scripts/travis/build.sh"

DEVELOPERS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
## <a name="setup"> Development Setup
1010

1111
This document describes how to set up your development environment to build and test AngularJS, and
12-
explains the basic mechanics of using `git`, `node`, `yarn`, `grunt`, and `bower`.
12+
explains the basic mechanics of using `git`, `node`, `yarn` and `grunt`.
1313

1414
### Installing Dependencies
1515

@@ -64,10 +64,10 @@ cd angular.js
6464
# Add the main AngularJS repository as an upstream remote to your repository:
6565
git remote add upstream "https://github.com/angular/angular.js.git"
6666

67-
# Install node.js dependencies:
67+
# Install JavaScript dependencies:
6868
yarn install
6969

70-
# Build AngularJS (which will install `bower` dependencies automatically):
70+
# Build AngularJS:
7171
yarn grunt package
7272
```
7373

Gruntfile.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,12 @@ module.exports = function(grunt) {
426426
'shell:promises-aplus-tests'
427427
]);
428428
grunt.registerTask('minify', [
429-
'bower',
430429
'clean',
431430
'build',
432431
'minall'
433432
]);
434433
grunt.registerTask('webserver', ['connect:devserver']);
435434
grunt.registerTask('package', [
436-
'bower',
437435
'validate-angular-files',
438436
'clean',
439437
'buildall',

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2010-2017 Google, Inc. http://angularjs.org
3+
Copyright (c) 2010-2018 Google, Inc. http://angularjs.org
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

TRIAGING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ You can mention him in the relevant thread like this: `@btford`.
9595

9696
> Thanks for submitting this issue!
9797
> Unfortunately, we don't think this functionality belongs in core.
98-
> The good news is that you could easily implement this as a third-party module and publish it on Bower and/or to the npm repository.
98+
> The good news is that you could easily implement this as a third-party module and publish it to the npm registry.
9999
100100

101101
## Assigning Work

angularFiles.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ var angularFiles = {
171171
],
172172

173173
'karma': [
174-
'bower_components/jquery/dist/jquery.js',
174+
'node_modules/jquery/dist/jquery.js',
175175
'test/jquery_remove.js',
176176
'@angularSrc',
177177
'@angularSrcModules',
@@ -202,7 +202,7 @@ var angularFiles = {
202202
],
203203

204204
'karmaJquery': [
205-
'bower_components/jquery/dist/jquery.js',
205+
'node_modules/jquery/dist/jquery.js',
206206
'test/jquery_alias.js',
207207
'@angularSrc',
208208
'@angularSrcModules',
@@ -220,8 +220,8 @@ var angularFiles = {
220220
angularFiles['karmaJquery' + jQueryVersion] = []
221221
.concat(angularFiles.karmaJquery)
222222
.map(function(path) {
223-
if (path.startsWith('bower_components/jquery')) {
224-
return path.replace(/^bower_components\/jquery/, 'bower_components/jquery-' + jQueryVersion);
223+
if (path.startsWith('node_modules/jquery')) {
224+
return path.replace(/^node_modules\/jquery/, 'node_modules/jquery-' + jQueryVersion);
225225
}
226226
return path;
227227
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// Override me with ?jquery=/bower_components/jquery/dist/jquery.js
1+
// Override me with ?jquery=/node_modules/jquery/dist/jquery.js
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// Override me with ?jquery=/bower_components/jquery/dist/jquery.js
1+
// Override me with ?jquery=/node_modules/jquery/dist/jquery.js

benchmarks/orderby-bp/jquery-noop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// Override me with ?jquery=/bower_components/jquery/dist/jquery.js
1+
// Override me with ?jquery=/node_modules/jquery/dist/jquery.js

bower.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/config/services/getVersion.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ var path = require('canonical-path');
44
/**
55
* dgService getVersion
66
* @description
7-
* Find the current version of the bower component (or node module)
7+
* Find the current version of the node module
88
*/
99
module.exports = function getVersion(readFilesProcessor) {
10-
var basePath = readFilesProcessor.basePath;
10+
var sourceFolder = path.resolve(readFilesProcessor.basePath, 'node_modules');
11+
var packageFile = 'package.json';
1112

12-
return function(component, sourceFolder, packageFile) {
13-
sourceFolder = path.resolve(basePath, sourceFolder || 'node_modules');
14-
packageFile = packageFile || 'package.json';
15-
return require(path.join(sourceFolder,component,packageFile)).version;
13+
return function(component) {
14+
return require(path.join(sourceFolder, component, packageFile)).version;
1615
};
1716
};

docs/config/templates/app/indexPage.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ <h4 class="search-results-group-heading">{{ key }}</h4>
209209
<p class="pull-right"><a back-to-top>Back to top</a></p>
210210

211211
<p>
212-
Super-powered by Google ©2010-2017
212+
Super-powered by Google ©2010-2018
213213
(<a id="version"
214214
ng-href="https://github.com/angular/angular.js/blob/master/CHANGELOG.md#{{versionNumber}}"
215215
ng-bind-template="v{{version}}" title="Changelog of this version of AngularJS">

docs/gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var rename = require('gulp-rename');
1313

1414
// We indicate to gulp that tasks are async by returning the stream.
1515
// Gulp can then wait for the stream to close before starting dependent tasks.
16-
// See clean and bower for async tasks, and see assets and doc-gen for dependent tasks below
16+
// See clean for an async task, and see assets and doc-gen for dependent tasks below.
1717

1818
var outputFolder = '../build/docs';
1919

karma-shared.conf.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ module.exports = function(config, specificOptions) {
181181
if (process.env.TRAVIS) {
182182
var buildLabel = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
183183

184-
config.logLevel = config.LOG_DEBUG;
185184
// Karma (with socket.io 1.x) buffers by 50 and 50 tests can take a long time on IEs;-)
186185
config.browserNoActivityTimeout = 120000;
187186

lib/grunt/plugins.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
/* eslint-disable no-invalid-this */
44

5-
var bower = require('bower');
65
var util = require('./utils.js');
76
var npmRun = require('npm-run');
87

@@ -63,15 +62,4 @@ module.exports = function(grunt) {
6362
grunt.registerTask('collect-errors', 'Combine stripped error files', function() {
6463
util.collectErrors();
6564
});
66-
67-
grunt.registerTask('bower', 'Install Bower packages.', function() {
68-
var done = this.async();
69-
70-
bower.commands.install()
71-
.on('log', function(result) {
72-
grunt.log.ok('bower: ' + result.id + ' ' + result.data.endpoint.name);
73-
})
74-
.on('error', grunt.fail.warn.bind(grunt.fail))
75-
.on('end', done);
76-
});
7765
};

lib/grunt/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ module.exports = {
187187
'java ' +
188188
this.java32flags() + ' ' +
189189
this.memoryRequirement() + ' ' +
190-
'-cp bower_components/closure-compiler/compiler.jar' + classPathSep +
191-
'bower_components/ng-closure-runner/ngcompiler.jar ' +
190+
'-cp vendor/closure-compiler/compiler.jar' + classPathSep +
191+
'vendor/ng-closure-runner/ngcompiler.jar ' +
192192
'org.angularjs.closurerunner.NgClosureRunner ' +
193193
'--compilation_level ' + compilationLevel + ' ' +
194194
'--language_in ECMASCRIPT5_STRICT ' +

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"angular-benchpress": "0.x.x",
2424
"benchmark": "1.x.x",
2525
"bootstrap": "3.1.1",
26-
"bower": "~1.3.9",
2726
"browserstacktunnel-wrapper": "2.0.0",
2827
"canonical-path": "0.0.2",
2928
"changez": "^2.1.1",
@@ -57,11 +56,13 @@
5756
"gulp-sourcemaps": "^1.2.2",
5857
"gulp-uglify": "^1.0.1",
5958
"gulp-util": "^3.0.1",
60-
"jasmine-core": "2.5.2",
59+
"jasmine-core": "^2.8.0",
6160
"jasmine-node": "^2.0.0",
6261
"jasmine-reporters": "^2.2.0",
63-
"jquery": "^3.2.1",
64-
"karma": "^1.7.0",
62+
"jquery": "3.2.1",
63+
"jquery-2.1": "npm:jquery@2.1.4",
64+
"jquery-2.2": "npm:jquery@2.2.4",
65+
"karma": "^2.0.0",
6566
"karma-browserstack-launcher": "^1.2.0",
6667
"karma-chrome-launcher": "^2.1.1",
6768
"karma-firefox-launcher": "^1.0.1",

scripts/travis/before_build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ fi
1818

1919
# unit runs the docs tests too which need a built version of the code
2020
if [[ "$JOB" = unit-* ]]; then
21-
grunt bower
2221
grunt validate-angular-files
2322
grunt build
2423
fi
@@ -28,4 +27,4 @@ fi
2827
if [ "$JOB" != "ci-checks" ]; then
2928
echo "wait_for_browser_provider"
3029
./scripts/travis/wait_for_browser_provider.sh
31-
fi
30+
fi

src/angular.prefix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license AngularJS v"NG_VERSION_FULL"
3-
* (c) 2010-2017 Google, Inc. http://angularjs.org
3+
* (c) 2010-2018 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
66
(function(window) {

src/loader.prefix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license AngularJS v"NG_VERSION_FULL"
3-
* (c) 2010-2017 Google, Inc. http://angularjs.org
3+
* (c) 2010-2018 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
66
'use strict';

src/module.prefix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license AngularJS v"NG_VERSION_FULL"
3-
* (c) 2010-2017 Google, Inc. http://angularjs.org
3+
* (c) 2010-2018 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
66
(function(window, angular) {

test/AngularSpec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,10 +1035,13 @@ describe('angular', function() {
10351035

10361036
}
10371037

1038-
var originalFunction;
1038+
var originalPrototype = window.Function.prototype;
10391039

10401040
beforeEach(function() {
10411041
spyOn(window, 'Function');
1042+
// Jasmine 2.7+ doesn't support spying on Function, so we have restore the prototype
1043+
// as Jasmine will use Function internally
1044+
window.Function.prototype = originalPrototype;
10421045
});
10431046

10441047
afterEach(function() {

test/e2e/fixtures/ng-jq-jquery/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<script>
88
var jQuery_2_1_0 = jQuery.noConflict();
99
</script>
10-
<script src="../../../../bower_components/jquery/dist/jquery.js"></script>
10+
<script src="../../../../node_modules/jquery/dist/jquery.js"></script>
1111
<script src="angular.js"></script>
1212
<script src="script.js"></script>
1313
</body>

test/e2e/fixtures/ng-jq/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<body>
44
<span>{{jqueryVersion}}</span>
55

6-
<script src="../../../../bower_components/jquery/dist/jquery.js"></script>
6+
<script src="../../../../node_modules/jquery/dist/jquery.js"></script>
77
<script type="text/javascript">
88
// Verify that empty ng-jq is not accessing `window['']`.
99
// (See https://github.com/angular/angular.js/issues/12741 for more details)

test/e2e/tools/fixture.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function generateFixture(test, query) {
6565
}
6666
}
6767
if (!/^\d+\.\d+.*$/.test(query.jquery)) {
68-
$(jquery).attr('src', '/bower_components/jquery/dist/jquery.js');
68+
$(jquery).attr('src', '/node_modules/jquery/dist/jquery.js');
6969
} else {
7070
$(jquery).attr('src', '//ajax.googleapis.com/ajax/libs/jquery/' + query.jquery + '/jquery.js');
7171
}

test/ngSanitize/sanitizeSpec.js

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -246,24 +246,37 @@ describe('HTML', function() {
246246
.toEqual('<p>text1text2</p>');
247247
});
248248

249-
it('should throw on clobbered elements', function() {
250-
inject(function($sanitize) {
251-
expect(function() {
252-
$sanitize('<form><input name="parentNode" /></form>');
253-
}).toThrowMinErr('$sanitize', 'elclob');
249+
describe('clobbered elements', function() {
254250

255-
expect(function() {
256-
$sanitize('<form><div><div><input name="parentNode" /></div></div></form>');
257-
}).toThrowMinErr('$sanitize', 'elclob');
251+
it('should throw on a form with an input named "parentNode"', function() {
252+
inject(function($sanitize) {
258253

259-
expect(function() {
260-
$sanitize('<form><input name="nextSibling" /></form>');
261-
}).toThrowMinErr('$sanitize', 'elclob');
254+
expect(function() {
255+
$sanitize('<form><input name="parentNode" /></form>');
256+
}).toThrowMinErr('$sanitize', 'elclob');
262257

263-
expect(function() {
264-
$sanitize('<form><div><div><input name="nextSibling" /></div></div></form>');
265-
}).toThrowMinErr('$sanitize', 'elclob');
258+
expect(function() {
259+
$sanitize('<form><div><div><input name="parentNode" /></div></div></form>');
260+
}).toThrowMinErr('$sanitize', 'elclob');
261+
});
266262
});
263+
264+
if (!/Edge\/16/.test(window.navigator.userAgent)) {
265+
// Skip test on Edge 16 due to browser bug.
266+
it('should throw on a form with an input named "nextSibling"', function() {
267+
inject(function($sanitize) {
268+
269+
expect(function() {
270+
$sanitize('<form><input name="nextSibling" /></form>');
271+
}).toThrowMinErr('$sanitize', 'elclob');
272+
273+
expect(function() {
274+
$sanitize('<form><div><div><input name="nextSibling" /></div></div></form>');
275+
}).toThrowMinErr('$sanitize', 'elclob');
276+
277+
});
278+
});
279+
}
267280
});
268281

269282
// See https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449

0 commit comments

Comments
 (0)