diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 000000000000..9b2abeb660ab --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory" : "bower_components" +} diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000000..8d1c3c310286 --- /dev/null +++ b/.clang-format @@ -0,0 +1,3 @@ +Language: JavaScript +BasedOnStyle: Google +ColumnLimit: 100 diff --git a/.gitignore b/.gitignore index 5e26662be8bd..f6961d018196 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,18 @@ +.DS_STORE + # Don’t commit the following directories created by pub. +packages +pubspec.lock +.pub +.packages + /dist/ -packages/ .buildlog node_modules -.pub -.DS_STORE +bower_components + +# Or broccoli working directory +tmp # Or the files created by dart2js. *.dart.js @@ -13,13 +21,30 @@ node_modules *.js.deps *.js.map +# Or type definitions we mirror from github +**/typings/**/*.d.ts +**/typings/tsd.cached.json + # Include when developing application packages. pubspec.lock .c9 .idea/ +.settings/ *.swo +modules/.settings +.vscode +modules/.vscode # Don't check in secret files *secret.js +# Ignore npm debug log +npm-debug.log + /docs/bower_components/ + +# build-analytics +.build-analytics + +# built dart payload tests +/modules_dart/payload/**/build diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000000..fae6e3d04b2c --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +4.2.1 diff --git a/.travis.yml b/.travis.yml index a983b75b6567..0ed61009acfa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,133 @@ language: node_js sudo: false node_js: -- '0.10' +- '4.2.1' + +branches: + except: + - g3sync + +cache: + directories: + - node_modules + - $HOME/.pub-cache + env: global: - KARMA_BROWSERS=DartiumWithWebPlatform - E2E_BROWSERS=Dartium - LOGS_DIR=/tmp/angular-build/logs + - SAUCE_USERNAME=angular-ci + - SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987 + - BROWSER_STACK_USERNAME=angularteam1 + - BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB - ARCH=linux-x64 + - DART_DEV_VERSION=latest + - DART_STABLE_VERSION=latest + # Token for tsd to increase github rate limit + # See https://github.com/DefinitelyTyped/tsd#tsdrc + # This does not use http://docs.travis-ci.com/user/environment-variables/#Secure-Variables + # because those are not visible for pull requests, and those should also be reliable. + # This SSO token belongs to github account angular-github-ratelimit-token which has no access + # (password is in Valentine) + - TSDRC='{"token":"ef474500309daea53d5991b3079159a29520a40b"}' + # GITHUB_TOKEN_ANGULAR + - secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo=" matrix: - - MODE=js DART_CHANNEL=dev -# Dissabled until Dart v1.9 hits stable -# - MODE=dart DART_CHANNEL=stable - - MODE=dart DART_CHANNEL=dev + # Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete. + - MODE=dart DART_CHANNEL=stable DART_VERSION=$DART_STABLE_VERSION + - MODE=dart DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION + - MODE=saucelabs DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION + - MODE=browserstack DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION + - MODE=dart_experimental DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION + - MODE=js DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION + - MODE=router DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION + - MODE=build_only DART_CHANNEL=stable DART_VERSION=$DART_STABLE_VERSION + - MODE=lint DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION + - MODE=payload DART_CHANNEL=stable DART_VERSION=$DART_STABLE_VERSION + +matrix: + allow_failures: + - env: "MODE=saucelabs DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION" + - env: "MODE=browserstack DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION" + - env: "MODE=dart_experimental DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION" + # TODO(alxhub): remove when dartdoc #1039 is in dev channel + - env: "MODE=dart DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION" + +addons: + firefox: "38.0" before_install: +- node tools/analytics/build-analytics start ci job +- node tools/analytics/build-analytics start ci before_install +- echo ${TSDRC} > .tsdrc - export DISPLAY=:99.0 - export GIT_SHA=$(git rev-parse HEAD) - ./scripts/ci/init_android.sh -- ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${ARCH} +- ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${DART_VERSION} ${ARCH} - sh -e /etc/init.d/xvfb start - if [[ -e SKIP_TRAVIS_TESTS ]]; then { cat SKIP_TRAVIS_TESTS ; exit 0; } fi +- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && SAUCE_USERNAME="angular2-ci" && SAUCE_ACCESS_KEY="693ebc16208a-0b5b-1614-8d66-a2662f4e" || true' +- node tools/analytics/build-analytics success ci before_install + +install: + - node tools/analytics/build-analytics start ci install + # Check the size of caches + - du -sh ./node_modules || true + # Install npm dependecies + - npm install + - node tools/analytics/build-analytics success ci install + before_script: +- node tools/analytics/build-analytics start ci before_script - mkdir -p $LOGS_DIR +- ./scripts/ci/presubmit-queue-setup.sh +- node tools/analytics/build-analytics success ci before_script + script: +- node tools/analytics/build-analytics start ci script - ./scripts/ci/build_and_test.sh ${MODE} +- node tools/analytics/build-analytics success ci script + after_script: +- node tools/analytics/build-analytics start ci after_script - ./scripts/ci/print-logs.sh +- ./scripts/ci/after-script.sh +- ./scripts/publish/publish-build-artifacts.sh +- node tools/analytics/build-analytics success ci after_script +- if [[ $TRAVIS_TEST_RESULT -eq 0 ]]; then node tools/analytics/build-analytics success ci job; else node tools/analytics/build-analytics error ci job; fi + +notifications: + webhooks: + urls: + - https://webhooks.gitter.im/e/1ef62e23078036f9cee4 + # trigger Buildtime Trend Service to parse Travis CI log + - https://buildtimetrend.herokuapp.com/travis + on_success: always # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: false # default: false + slack: + secure: EP4MzZ8JMyNQJ4S3cd5LEPWSMjC7ZRdzt3veelDiOeorJ6GwZfCDHncR+4BahDzQAuqyE/yNpZqaLbwRWloDi15qIUsm09vgl/1IyNky1Sqc6lEknhzIXpWSalo4/T9ZP8w870EoDvM/UO+LCV99R3wS8Nm9o99eLoWVb2HIUu0= + +deploy: + - provider: gcs + # This is for project angular-github-babysitter + access_key_id: GOOGIOQTDBEOPBUAWFZQ + secret_access_key: + secure: "MEDggllZ5fw4wI9CEUi8WR6jKsKXqdRF/DLxSNC2JpzM5RlVeBm0uqjntYT1Cf1dASvQ2/+vZCUikL/3A48NcoEYRHXGmxu8D6t/SvleQD8Xv434xFOdsa2QqP/HiCtqCLOI5jJz1JVoB5nNyKKZ33ogTUL1LV1TfcrAioyizW8=" + # this bucket has a lifecycle to delete after 90 days: + # $ echo '{"rule": [{"action": {"type": "Delete"}, "condition": {"age": 90}}]}' > lifecycle.json + # $ gsutil lifecycle set lifecycle.json gs://angular2-snapshots + bucket: angular2-snapshots + # don't delete generated files + skip_cleanup: true + # serve to public at https://storage.googleapis.com/angular2-snapshots/SHA/dist.tgz + acl: public-read + # upload the .tgz archive created in scripts/ci/build_and_test.sh + local-dir: deploy + # create a "subdirectory" for each commit + upload-dir: $TRAVIS_COMMIT + on: + repo: angular/angular + condition: "$MODE = build_only" + part : "$partial = private" diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000000..640f797b1f9e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,1990 @@ + +# 2.0.0-beta.0 somnambulant-inauguration (2015-12-15) + +**Enjoy!** + + + +# 2.0.0-alpha.55 (2015-12-15) + + +### Bug Fixes + +* **router:** export ROUTER_LINK_DSL_PROVIDER and hide MockPopStateEvent ([fc75220](https://github.com/angular/angular/commit/fc75220)) + +### Features + +* **core:** enable dev mode by default ([3dca9d5](https://github.com/angular/angular/commit/3dca9d5)) + + +### BREAKING CHANGES + +* Before +Previously Angular would run in dev prod mode by default, and you could enable the dev mode by calling enableDevMode. +After +Now, Angular runs in the dev mode by default, and you can enable the prod mode by calling enableProdMode. + + + + +# 2.0.0-alpha.54 (2015-12-15) + + +### Bug Fixes + +* **bundles:** don't include RxJS in System.register bundles ([77b7cae](https://github.com/angular/angular/commit/77b7cae)) +* **bundles:** remove ngUpgrade from the angular2.js bundle ([283962f](https://github.com/angular/angular/commit/283962f)), closes [#5739](https://github.com/angular/angular/issues/5739) [#5854](https://github.com/angular/angular/issues/5854) +* **bundles:** remove polyfills from angular2.js bundle ([2983558](https://github.com/angular/angular/commit/2983558)), closes [#5881](https://github.com/angular/angular/issues/5881) +* **bundles:** rename the testing.js bundle to testing.dev.js ([d55655f](https://github.com/angular/angular/commit/d55655f)), closes [#5899](https://github.com/angular/angular/issues/5899) [#5776](https://github.com/angular/angular/issues/5776) +* **bundles:** rename UMD bundles ([61b9468](https://github.com/angular/angular/commit/61b9468)), closes [#5898](https://github.com/angular/angular/issues/5898) + + +### BREAKING CHANGES + +* System.register testing bundle was renamed: +`testing.js` -> `testing.dev.js` + +* UMD bundles were renamed: + * `angular2.umd.js` -> `angular2-all.umd.js` + * `angular2-testing.umd.js` -> `angular2-all-testing.umd.js` + +* RxJS used to be bundled with Angular 2 code and this is not the case +any more. RxJS needs to be loaded explicitly. + +* Previously `angular2.js`, `angular2.min.js` and `angular2.dev.js` bundles +would have zone.js and reflect-metadata pre-appended. New bundles don't +contain zone.js nor reflect-metadata - those external dependencies can +be easily loaded into a browser using `angular2-polyfills.js` + +* `ngUpgrade` related symbols are no longer part of the `angular2.js` +bundle. `ngUpgrade` has a dedicated `upgrade.js` bundle now. + + + + + +# 2.0.0-alpha.53 (2015-12-13) + + +### Bug Fixes + +* **angular2:** don't export compiler bits as public API ([20c6eeb](https://github.com/angular/angular/commit/20c6eeb)), closes [#5815](https://github.com/angular/angular/issues/5815) [#5797](https://github.com/angular/angular/issues/5797) +* **angular2:** remove `angular2.ts` module ([200dc00](https://github.com/angular/angular/commit/200dc00)), closes [#5815](https://github.com/angular/angular/issues/5815) [#5844](https://github.com/angular/angular/issues/5844) +* **animate:** ensure transition properties are removed once the animation is over ([b8e69a2](https://github.com/angular/angular/commit/b8e69a2)) +* **async:** improve Rx support in ObservableWrapper ([4a17e69](https://github.com/angular/angular/commit/4a17e69)) +* **async:** support BehaviorSubjects in async pipe ([398f024](https://github.com/angular/angular/commit/398f024)) +* **bundles:** don't use angular2/angular2 in config of System.register bundles ([8c69497](https://github.com/angular/angular/commit/8c69497)) +* **changelog:** fix ngFor on template ([3190c59](https://github.com/angular/angular/commit/3190c59)), closes [#5785](https://github.com/angular/angular/issues/5785) +* **compiler:** remove AppRootUrl ([ed2c25e](https://github.com/angular/angular/commit/ed2c25e)) +* **core:** workaround for typescript@1.7.3 breakage #5784 ([30e25ac](https://github.com/angular/angular/commit/30e25ac)), closes [#5784](https://github.com/angular/angular/issues/5784) +* **dom_renderer:** moveNodeAfterSiblings should not detach the reference node ([edcb34d](https://github.com/angular/angular/commit/edcb34d)), closes [#5077](https://github.com/angular/angular/issues/5077) [#5759](https://github.com/angular/angular/issues/5759) +* **HtmlParser:** allow ng-content elements regardless the namespace ([080469f](https://github.com/angular/angular/commit/080469f)), closes [#5745](https://github.com/angular/angular/issues/5745) +* **parse5:** support comment nodes with getText and setText ([693d9dc](https://github.com/angular/angular/commit/693d9dc)), closes [#5805](https://github.com/angular/angular/issues/5805) +* **public_spec:** check exports of barrels instead of angular2/angular2 ([979162d](https://github.com/angular/angular/commit/979162d)), closes [#5841](https://github.com/angular/angular/issues/5841) +* **styles:** Escape \r characters in compiled text ([92ddc62](https://github.com/angular/angular/commit/92ddc62)), closes [#5772](https://github.com/angular/angular/issues/5772) [#5835](https://github.com/angular/angular/issues/5835) +* **TemplateParser:** match element and attributes regardless the namespace ([7c13372](https://github.com/angular/angular/commit/7c13372)) +* **upgrade:** allow directives with empty template ([2ca5e38](https://github.com/angular/angular/commit/2ca5e38)) +* **web_workers:** remove unnecessary setup module and AppRootUrl ([a885f37](https://github.com/angular/angular/commit/a885f37)), closes [#5820](https://github.com/angular/angular/issues/5820) + +### Features + +* **benchpress:** add receivedData + requestCount to PerflogMetric ([fe1dd77](https://github.com/angular/angular/commit/fe1dd77)), closes [#5750](https://github.com/angular/angular/issues/5750) +* **dom_renderer:** add setBindingDebugInfo method ([79399e1](https://github.com/angular/angular/commit/79399e1)), closes [#5227](https://github.com/angular/angular/issues/5227) +* **facade:** do not reexport Observable from angular2/core ([43f42d9](https://github.com/angular/angular/commit/43f42d9)) +* **Headers:** implement `toJSON` ([0cb32c2](https://github.com/angular/angular/commit/0cb32c2)) +* **renderer:** use a comment instead of an element when stamping out template>` elements ([194dc7d](https://github.com/angular/angular/commit/194dc7d)), closes [#4805](https://github.com/angular/angular/issues/4805) + + +### BREAKING CHANGES + +* `Observable` are no more re-exported from `angular2/core` + + Before + ``` + import {Observable} from 'angular2/core' + ``` + After + ``` + import {Observable} from 'rxjs/Observable'; + ``` + +* The setupWebWorker function exported from +angular2/platform/worker_app no longer returns a promise of providers, +but instead synchronously returns providers. +Related to #5815 + +* `angular2/angular2` was removed. Use the correct import from one of the barrels. E.g. `angular2/core`, `angular2/platform/browser`, `angular2/common`, … +Note: This only applies to JavaScript, Dart is not changed. + +* The following symbols are not exported from angular2/angular2 any more: +`UrlResolver`, `AppRootUrl`, `getUrlScheme`, `DEFAULT_PACKAGE_URL_PROVIDER`. +Use imports from `angular2/compiler` instead. + + + + +# 2.0.0-alpha.52 (2015-12-10) + + +### Features + +* **core:** case-sensitive camelCase templates (kebab-case removal) ([da9b46a](https://github.com/angular/angular/commit/da9b46a)) + + +### BREAKING CHANGES + +* Angular templates are now case-sensitive and use camelCase instead of kebab-case (dash-case). + + Before: + + ``` +

+ + + + +