diff --git a/.eslintignore b/.eslintignore index dc7259927e1c..6d8222eb45db 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ -bower_components/** build/** docs/app/assets/js/angular-bootstrap/** docs/config/templates/** @@ -8,3 +7,4 @@ src/angular.bind.js src/ngParseExt/ucd.js i18n/closure/** tmp/** +vendor/** diff --git a/.gitignore b/.gitignore index 42c5e13b4421..2da934151e89 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ performance/temp*.html *.swp angular.js.tmproj node_modules/ -bower_components/ angular.xcodeproj .idea *.iml @@ -19,7 +18,6 @@ angular.xcodeproj libpeerconnection.log npm-debug.log /tmp/ -/scripts/bower/bower-* .vscode *.log -*.stackdump \ No newline at end of file +*.stackdump diff --git a/.travis.yml b/.travis.yml index 9748e1317f30..e425d58ec8b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,6 @@ node_js: cache: yarn: true - directories: - - bower_components branches: except: @@ -32,7 +30,7 @@ before_install: - export PATH="$HOME/.yarn/bin:$PATH" before_script: - - du -sh ./node_modules ./bower_components/ || true + - du -sh ./node_modules || true - "./scripts/travis/before_build.sh" script: - "./scripts/travis/build.sh" diff --git a/DEVELOPERS.md b/DEVELOPERS.md index d70897f9ddb9..fed99b90c94b 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -8,7 +8,7 @@ ## Development Setup This document describes how to set up your development environment to build and test AngularJS, and -explains the basic mechanics of using `git`, `node`, `yarn`, `grunt`, and `bower`. +explains the basic mechanics of using `git`, `node`, `yarn` and `grunt`. ### Installing Dependencies @@ -63,10 +63,10 @@ cd angular.js # Add the main AngularJS repository as an upstream remote to your repository: git remote add upstream "https://github.com/angular/angular.js.git" -# Install node.js dependencies: +# Install JavaScript dependencies: yarn install -# Build AngularJS (which will install `bower` dependencies automatically): +# Build AngularJS: yarn grunt package ``` @@ -483,4 +483,4 @@ You can see an example of a well-defined example [in the `ngRepeat` documentatio [karma-browserstack]: https://github.com/karma-runner/karma-browserstack-launcher [karma-saucelabs]: https://github.com/karma-runner/karma-sauce-launcher [unit-testing]: https://docs.angularjs.org/guide/unit-testing -[yarn-install]: https://yarnpkg.com/en/docs/install \ No newline at end of file +[yarn-install]: https://yarnpkg.com/en/docs/install diff --git a/Gruntfile.js b/Gruntfile.js index c9c32ca8d71a..0b2423e8c9e5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -426,14 +426,12 @@ module.exports = function(grunt) { 'shell:promises-aplus-tests' ]); grunt.registerTask('minify', [ - 'bower', 'clean', 'build', 'minall' ]); grunt.registerTask('webserver', ['connect:devserver']); grunt.registerTask('package', [ - 'bower', 'validate-angular-files', 'clean', 'buildall', diff --git a/TRIAGING.md b/TRIAGING.md index 0dc6ee357232..f1819e3588f5 100644 --- a/TRIAGING.md +++ b/TRIAGING.md @@ -95,7 +95,7 @@ You can mention him in the relevant thread like this: `@btford`. > Thanks for submitting this issue! > Unfortunately, we don't think this functionality belongs in core. -> 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. +> The good news is that you could easily implement this as a third-party module and publish it to the npm registry. ## Assigning Work diff --git a/angularFiles.js b/angularFiles.js index 7c4062d41ad4..01bb6422b1b2 100644 --- a/angularFiles.js +++ b/angularFiles.js @@ -171,7 +171,7 @@ var angularFiles = { ], 'karma': [ - 'bower_components/jquery/dist/jquery.js', + 'node_modules/jquery/dist/jquery.js', 'test/jquery_remove.js', '@angularSrc', '@angularSrcModules', @@ -202,7 +202,7 @@ var angularFiles = { ], 'karmaJquery': [ - 'bower_components/jquery/dist/jquery.js', + 'node_modules/jquery/dist/jquery.js', 'test/jquery_alias.js', '@angularSrc', '@angularSrcModules', @@ -220,8 +220,8 @@ var angularFiles = { angularFiles['karmaJquery' + jQueryVersion] = [] .concat(angularFiles.karmaJquery) .map(function(path) { - if (path.startsWith('bower_components/jquery')) { - return path.replace(/^bower_components\/jquery/, 'bower_components/jquery-' + jQueryVersion); + if (path.startsWith('node_modules/jquery')) { + return path.replace(/^node_modules\/jquery/, 'node_modules/jquery-' + jQueryVersion); } return path; }); diff --git a/benchmarks/animation-bp/jquery-noop.js b/benchmarks/animation-bp/jquery-noop.js index 8cac7fe4a149..de6781358dc1 100644 --- a/benchmarks/animation-bp/jquery-noop.js +++ b/benchmarks/animation-bp/jquery-noop.js @@ -1 +1 @@ -// Override me with ?jquery=/bower_components/jquery/dist/jquery.js +// Override me with ?jquery=/node_modules/jquery/dist/jquery.js diff --git a/benchmarks/largetable-bp/jquery-noop.js b/benchmarks/largetable-bp/jquery-noop.js index 8cac7fe4a149..de6781358dc1 100644 --- a/benchmarks/largetable-bp/jquery-noop.js +++ b/benchmarks/largetable-bp/jquery-noop.js @@ -1 +1 @@ -// Override me with ?jquery=/bower_components/jquery/dist/jquery.js +// Override me with ?jquery=/node_modules/jquery/dist/jquery.js diff --git a/benchmarks/orderby-bp/jquery-noop.js b/benchmarks/orderby-bp/jquery-noop.js index 8cac7fe4a149..de6781358dc1 100644 --- a/benchmarks/orderby-bp/jquery-noop.js +++ b/benchmarks/orderby-bp/jquery-noop.js @@ -1 +1 @@ -// Override me with ?jquery=/bower_components/jquery/dist/jquery.js +// Override me with ?jquery=/node_modules/jquery/dist/jquery.js diff --git a/bower.json b/bower.json deleted file mode 100644 index 099d5b1ed3e6..000000000000 --- a/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "angularjs", - "license": "MIT", - "devDependencies": { - "jquery": "3.2.1", - "jquery-2.2": "jquery#2.2.4", - "jquery-2.1": "jquery#2.1.4", - "closure-compiler": "https://dl.google.com/closure-compiler/compiler-20140814.zip", - "ng-closure-runner": "https://raw.github.com/angular/ng-closure-runner/v0.2.4/assets/ng-closure-runner.zip" - } -} diff --git a/docs/config/services/getVersion.js b/docs/config/services/getVersion.js index 7de01030b6ec..cc88b395e228 100644 --- a/docs/config/services/getVersion.js +++ b/docs/config/services/getVersion.js @@ -4,7 +4,7 @@ var path = require('canonical-path'); /** * dgService getVersion * @description - * Find the current version of the bower component (or node module) + * Find the current version of the node module */ module.exports = function getVersion(readFilesProcessor) { var basePath = readFilesProcessor.basePath; diff --git a/docs/gulpfile.js b/docs/gulpfile.js index e45c504b6537..19a47be57eed 100644 --- a/docs/gulpfile.js +++ b/docs/gulpfile.js @@ -13,7 +13,7 @@ var rename = require('gulp-rename'); // We indicate to gulp that tasks are async by returning the stream. // Gulp can then wait for the stream to close before starting dependent tasks. -// See clean and bower for async tasks, and see assets and doc-gen for dependent tasks below +// See clean for an async task, and see assets and doc-gen for dependent tasks below. var outputFolder = '../build/docs'; diff --git a/lib/grunt/plugins.js b/lib/grunt/plugins.js index acce4b797ae7..2d71b85501eb 100644 --- a/lib/grunt/plugins.js +++ b/lib/grunt/plugins.js @@ -2,7 +2,6 @@ /* eslint-disable no-invalid-this */ -var bower = require('bower'); var util = require('./utils.js'); var npmRun = require('npm-run'); @@ -63,15 +62,4 @@ module.exports = function(grunt) { grunt.registerTask('collect-errors', 'Combine stripped error files', function() { util.collectErrors(); }); - - grunt.registerTask('bower', 'Install Bower packages.', function() { - var done = this.async(); - - bower.commands.install() - .on('log', function(result) { - grunt.log.ok('bower: ' + result.id + ' ' + result.data.endpoint.name); - }) - .on('error', grunt.fail.warn.bind(grunt.fail)) - .on('end', done); - }); }; diff --git a/lib/grunt/utils.js b/lib/grunt/utils.js index 952768da7239..a4c4f2ef71e3 100644 --- a/lib/grunt/utils.js +++ b/lib/grunt/utils.js @@ -187,8 +187,8 @@ module.exports = { 'java ' + this.java32flags() + ' ' + this.memoryRequirement() + ' ' + - '-cp bower_components/closure-compiler/compiler.jar' + classPathSep + - 'bower_components/ng-closure-runner/ngcompiler.jar ' + + '-cp node_modules/closure-compiler/compiler.jar' + classPathSep + + 'vendor/ng-closure-runner/ngcompiler.jar ' + 'org.angularjs.closurerunner.NgClosureRunner ' + '--compilation_level ' + compilationLevel + ' ' + '--language_in ECMASCRIPT5_STRICT ' + diff --git a/package.json b/package.json index bb62da46e9c6..f03050fa08da 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "angular-benchpress": "0.x.x", "benchmark": "1.x.x", "bootstrap": "3.1.1", - "bower": "~1.3.9", "browserstacktunnel-wrapper": "2.0.0", "canonical-path": "0.0.2", "changez": "^2.1.1", @@ -37,6 +36,7 @@ "dgeni-packages": "^0.16.4", "event-stream": "~3.1.0", "glob": "^6.0.1", + "google-closure-compiler": "20171203.0.0", "google-code-prettify": "1.0.1", "grunt": "^1.0.1", "grunt-bump": "^0.8.0", @@ -60,7 +60,9 @@ "jasmine-core": "2.5.2", "jasmine-node": "^2.0.0", "jasmine-reporters": "^2.2.0", - "jquery": "^3.2.1", + "jquery": "3.2.1", + "jquery-2.1": "npm:jquery@2.1.4", + "jquery-2.2": "npm:jquery@2.2.4", "karma": "^1.7.0", "karma-browserstack-launcher": "^1.2.0", "karma-chrome-launcher": "^2.1.1", @@ -75,6 +77,7 @@ "log4js": "^0.6.27", "lunr": "^0.7.2", "marked": "~0.3.0", + "ng-closure-runner": "angular/ng-closure-runner#v0.2.4", "node-html-encoder": "0.0.2", "npm-run": "^4.1.0", "open-sans-fontface": "^1.4.0", diff --git a/scripts/travis/before_build.sh b/scripts/travis/before_build.sh index e1d83d7977ad..ca44cb37d7dd 100755 --- a/scripts/travis/before_build.sh +++ b/scripts/travis/before_build.sh @@ -18,7 +18,6 @@ fi # unit runs the docs tests too which need a built version of the code if [[ "$JOB" = unit-* ]]; then - grunt bower grunt validate-angular-files grunt build fi @@ -28,4 +27,4 @@ fi if [ "$JOB" != "ci-checks" ]; then echo "wait_for_browser_provider" ./scripts/travis/wait_for_browser_provider.sh -fi \ No newline at end of file +fi diff --git a/test/e2e/fixtures/ng-jq-jquery/index.html b/test/e2e/fixtures/ng-jq-jquery/index.html index 15c4a6c0cf30..535ff3fdca26 100644 --- a/test/e2e/fixtures/ng-jq-jquery/index.html +++ b/test/e2e/fixtures/ng-jq-jquery/index.html @@ -7,7 +7,7 @@ - + diff --git a/test/e2e/fixtures/ng-jq/index.html b/test/e2e/fixtures/ng-jq/index.html index 5c73233a8fc7..1e1c6cbdfcbc 100644 --- a/test/e2e/fixtures/ng-jq/index.html +++ b/test/e2e/fixtures/ng-jq/index.html @@ -3,7 +3,7 @@ {{jqueryVersion}} - +