diff --git a/.circleci/bazel.rc b/.circleci/bazel.rc new file mode 100644 index 0000000000..921c6293cf --- /dev/null +++ b/.circleci/bazel.rc @@ -0,0 +1,25 @@ +# These options are enabled when running on CI +# We do this by copying this file to /etc/bazel.bazelrc at the start of the build. +# See remote cache documentation in /docs/BAZEL.md + +# Don't be spammy in the logs +build --noshow_progress + +# Don't run manual tests +test --test_tag_filters=-manual + +# Enable experimental CircleCI bazel remote cache proxy +# See remote cache documentation in /docs/BAZEL.md +build --experimental_remote_spawn_cache --remote_rest_cache=http://localhost:7643 + +# Prevent unstable environment variables from tainting cache keys +build --experimental_strict_action_env + +# Workaround https://github.com/bazelbuild/bazel/issues/3645 +# Bazel doesn't calculate the memory ceiling correctly when running under Docker. +# Limit Bazel to consuming resources that fit in CircleCI "medium" class which is the default: +# https://circleci.com/docs/2.0/configuration-reference/#resource_class +build --local_resources=3072,2.0,1.0 + +# Retry in the event of flakes, eg. https://circleci.com/gh/angular/angular/31309 +test --flaky_test_attempts=2 diff --git a/.circleci/config.yml b/.circleci/config.yml index 0c08ea1b8b..a2d8f0dbf1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,8 +12,15 @@ ## IMPORTANT # If you change the `docker_image` version, also change the `cache_key` suffix and the version of # `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file. -var_1: &docker_image angular/ngcontainer:0.0.8 -var_2: &cache_key angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.0.8 +var_1: &docker_image angular/ngcontainer:0.1.0 +var_2: &cache_key angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.1.0 + +# See remote cache documentation in /docs/BAZEL.md +var_3: &setup-bazel-remote-cache + run: + name: Start up bazel remote cache proxy + command: ~/bazel-remote-proxy -backend circleci:// + background: true # Settings common to each job anchor_1: &job_defaults @@ -34,10 +41,15 @@ jobs: steps: - checkout: <<: *post_checkout - # Check BUILD.bazel formatting before we have a node_modules directory - # Then we don't need any exclude pattern to avoid checking those files - - run: 'buildifier -mode=check $(find . -type f \( -name BUILD.bazel -or -name BUILD \)) || - (echo "BUILD files not formatted. Please run ''yarn buildifier''" ; exit 1)' + # See remote cache documentation in /docs/BAZEL.md + - run: .circleci/setup_cache.sh + - run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc + - *setup-bazel-remote-cache + + - run: 'yarn buildifier -mode=check || + (echo -e "\nBUILD files not formatted. Please run ''yarn buildifier''" ; exit 1)' + - run: 'yarn skylint || + (echo -e "\n.bzl files have lint errors. Please run ''yarn skylint''"; exit 1)' - restore_cache: key: *cache_key @@ -51,15 +63,29 @@ jobs: steps: - checkout: <<: *post_checkout + # See remote cache documentation in /docs/BAZEL.md + - run: .circleci/setup_cache.sh + - run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc + - *setup-bazel-remote-cache + - restore_cache: key: *cache_key - + - run: bazel info release - run: bazel run @yarn//:yarn # Use bazel query so that we explicitly ask for all buildable targets to be built as well # This avoids waiting for a build command to finish before running the first test # See https://github.com/bazelbuild/bazel/issues/4257 - - run: bazel query --output=label '//packages/... union @angular//...' | xargs bazel test --config=ci + - run: bazel query --output=label '//modules/... union //packages/... union //tools/...' | xargs bazel test + + # CircleCI will allow us to go back and view/download these artifacts from past builds. + # Also we can use a service like https://buildsize.org/ to automatically track binary size of these artifacts. + - store_artifacts: + path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js + destination: packages/core/test/bundling/hello_world/bundle.min.js + - store_artifacts: + path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js.brotli + destination: packages/core/test/bundling/hello_world/bundle.min.js.brotli - save_cache: key: *cache_key diff --git a/.circleci/setup_cache.sh b/.circleci/setup_cache.sh new file mode 100755 index 0000000000..232596df4a --- /dev/null +++ b/.circleci/setup_cache.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# Install bazel remote cache proxy +# This is temporary until the feature is no longer experimental on CircleCI. +# See remote cache documentation in /docs/BAZEL.md + +set -u -e + +readonly DOWNLOAD_URL="https://5-116431813-gh.circle-artifacts.com/0/pkg/bazel-remote-proxy-$(uname -s)_$(uname -m)" + +curl --fail -o ~/bazel-remote-proxy "$DOWNLOAD_URL" +chmod +x ~/bazel-remote-proxy diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 3c9805e95a..b72a3a45f6 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -25,7 +25,7 @@ ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. ## Minimal reproduction of the problem with instructions ## What is the motivation / use case for changing the behavior? diff --git a/.github/angular-robot.yml b/.github/angular-robot.yml new file mode 100644 index 0000000000..40eda24d69 --- /dev/null +++ b/.github/angular-robot.yml @@ -0,0 +1,102 @@ +# Configuration for angular-robot + +# options for the merge plugin +merge: + # the status will be added to your pull requests + status: + # set to true to disable + disabled: false + # the name of the status + context: "ci/angular: merge status" + # text to show when all checks pass + successText: "All checks passed!" + # text to show when some checks are failing + failureText: "The following checks are failing:" + + # the g3 status will be added to your pull requests if they include files that match the patterns + g3Status: + # set to true to disable + disabled: false + # the name of the status + context: "google3" + # text to show when the status is pending + pendingDesc: "Googler: test this change in google3 http://go/angular-g3sync" + # text to show when the status is success + successDesc: "Does not affect google3" + # list of patterns to check for the files changed by the PR + # this list must be manually kept in sync with google3/third_party/javascript/angular2/copy.bara.sky + include: + - "BUILD.bazel" + - "LICENSE" + - "WORKSPACE" + - "modules/**" + - "packages/**" + # list of patterns to ignore for the files changed by the PR + exclude: + - "packages/language-service/**" + - "**/.gitignore" + - "**/.gitkeep" + + # comment that will be added to a PR when there is a conflict, leave empty or set to false to disable + mergeConflictComment: "Hi @{{PRAuthor}}! This PR has merge conflicts due to recent upstream merges. +\nPlease help to unblock it by resolving these conflicts. Thanks!" + + # label to monitor + mergeLabel: "PR action: merge" + + # list of checks that will determine if the merge label can be added + checks: + # whether the PR shouldn't have a conflict with the base branch + noConflict: true + # list of labels that a PR needs to have, checked with a regexp (e.g. "PR target:" will work for the label "PR target: master") + requiredLabels: + - "PR target: *" + - "cla: yes" + + # list of labels that a PR shouldn't have, checked after the required labels with a regexp + forbiddenLabels: + - "PR target: TBD" + - "PR action: cleanup" + - "PR action: review" + - "PR state: blocked" + - "cla: no" + + # list of PR statuses that need to be successful + requiredStatuses: + - "continuous-integration/travis-ci/pr" + - "code-review/pullapprove" + - "ci/circleci: build" + - "ci/circleci: lint" + + # the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable + # {{MERGE_LABEL}} will be replaced by the value of the mergeLabel option + # {{PLACEHOLDER}} will be replaced by the list of failing checks + mergeRemovedComment: "I see that you just added the `{{MERGE_LABEL}}` label, but the following checks are still failing: +\n{{PLACEHOLDER}} +\n +\n**If you want your PR to be merged, it has to pass all the CI checks.** +\n +\nIf you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help." + +# options for the triage plugin +triage: + # number of the milestone to apply when the issue has not been triaged yet + needsTriageMilestone: 83, + # number of the milestone to apply when the issue is triaged + defaultMilestone: 82, + # arrays of labels that determine if an issue is triaged + triagedLabels: + - + - "type: bug/fix" + - "severity*" + - "freq*" + - "comp: *" + - + - "type: feature" + - "comp: *" + - + - "type: refactor" + - "comp: *" + - + - "type: RFC / Discussion / question" + - "comp: *" diff --git a/.pullapprove.yml b/.pullapprove.yml index 6d4e0aef5f..235010747c 100644 --- a/.pullapprove.yml +++ b/.pullapprove.yml @@ -10,11 +10,11 @@ # brocco - Mike Brocchi # chuckjaz - Chuck Jazdzewski # filipesilva - Filipe Silva -# Foxandxss - Jesús Rodríguez # gkalpak - George Kalpakas # hansl - Hans Larsen # IgorMinar - Igor Minar # jasonaden - Jason Aden +# kapunahelewong - Kapunahele Wong # kara - Kara Erickson # matsko - Matias Niemelä # mhevery - Misko Hevery @@ -44,6 +44,7 @@ groups: all: users: all required: 1 + rejection_value: -999 # In this group, your self-approval does not count author_approval: auto: false @@ -91,7 +92,8 @@ groups: users: - alexeagle #primary - chuckjaz - - IgorMinar + - IgorMinar #fallback + - mhevery - vikerman #fallback build-and-ci: @@ -127,8 +129,9 @@ groups: files: - "packages/core/*" users: - - chuckjaz #primary - - mhevery + - mhevery #primary + - chuckjaz + - kara - vicb - IgorMinar #fallback @@ -139,7 +142,6 @@ groups: - "packages/platform-browser/animations/*" users: - matsko #primary - - chuckjaz #fallback - mhevery #fallback - IgorMinar #fallback @@ -171,6 +173,7 @@ groups: - hansl - filipesilva #fallback - brocco #fallback + - IgorMinar #fallback compiler-cli: conditions: @@ -204,6 +207,12 @@ groups: conditions: files: - "packages/forms/*" + - "aio/content/guide/forms.md" + - "aio/content/guide/form-validation.md" + - "aio/content/guide/reactive-forms.md" + - "aio/content/examples/forms/*" + - "aio/content/examples/form-validation/*" + - "aio/content/examples/reactive-forms/*" users: - kara #primary - tinayuangao #secondary @@ -216,9 +225,8 @@ groups: - "packages/common/http/*" - "packages/http/*" users: - - vikerman #primary - - alxhub - - IgorMinar #fallback + - alxhub #primary + - IgorMinar - mhevery #fallback language-service: @@ -237,7 +245,7 @@ groups: files: - "packages/router/*" users: - - jasonaden + - jasonaden #primary - vicb - IgorMinar #fallback - mhevery #fallback @@ -268,8 +276,7 @@ groups: - "packages/platform-server/*" users: - vikerman #primary - # needs secondary - - alxhub + - alxhub #secondary - vicb - IgorMinar #fallback - mhevery #fallback @@ -327,11 +334,11 @@ groups: - "aio/content/navigation.json" - "aio/content/license.md" users: + - kapunahelewong - stephenfluin - - Foxandxss - petebacondarwin - gkalpak - - IgorMinar #fallback + - IgorMinar - mhevery #fallback angular.io-marketing: @@ -345,5 +352,5 @@ groups: - stephenfluin - petebacondarwin - gkalpak - - IgorMinar #fallback + - IgorMinar - mhevery #fallback diff --git a/.travis.yml b/.travis.yml index 4326581272..6309b272b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,6 @@ env: - CI_MODE=aio - CI_MODE=aio_e2e AIO_SHARD=0 - CI_MODE=aio_e2e AIO_SHARD=1 - - CI_MODE=bazel matrix: fast_finish: true diff --git a/BUILD.bazel b/BUILD.bazel index bea8d6fcf0..3ae5672cf0 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -24,9 +24,7 @@ filegroup( "typescript", "zone.js", "tsutils", - "@types/jasmine", - "@types/node", - "@types/source-map", + "@types", "tsickle", "hammerjs", "protobufjs", @@ -34,6 +32,7 @@ filegroup( "reflect-metadata", "source-map-support", "minimist", + "tslib", ] for ext in [ "*.js", "*.json", diff --git a/CHANGELOG.md b/CHANGELOG.md index 4102638a18..983b2ccd65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,309 @@ + +# [6.0.0-beta.5](https://github.com/angular/angular/compare/6.0.0-beta.4...6.0.0-beta.5) (2018-02-22) + +### Bug Fixes + +* **animations:** report correct totalTime value even during noOp animations ([#22225](https://github.com/angular/angular/issues/22225)) ([e1bf067](https://github.com/angular/angular/commit/e1bf067)) +* **common:** correct mapping of Observable methods ([#20518](https://github.com/angular/angular/issues/20518)) ([2639b4b](https://github.com/angular/angular/commit/2639b4b)), closes [#20516](https://github.com/angular/angular/issues/20516) +* **common:** then and else template might be set to null ([#22298](https://github.com/angular/angular/issues/22298)) ([8115edc](https://github.com/angular/angular/commit/8115edc)) +* **compiler-cli:** add missing entry point to package, update tsickle ([#22295](https://github.com/angular/angular/issues/22295)) ([28ac244](https://github.com/angular/angular/commit/28ac244)) +* **core:** properly handle function without prototype in reflector ([#22284](https://github.com/angular/angular/issues/22284)) ([a7ebf5a](https://github.com/angular/angular/commit/a7ebf5a)), closes [#19978](https://github.com/angular/angular/issues/19978) +* **core:** require factory to be provided for shakeable InjectionToken ([#22207](https://github.com/angular/angular/issues/22207)) ([f755db7](https://github.com/angular/angular/commit/f755db7)), closes [#22205](https://github.com/angular/angular/issues/22205) +* **forms:** set state before emitting a value from ngModelChange ([#21514](https://github.com/angular/angular/issues/21514)) ([3e6a86f](https://github.com/angular/angular/commit/3e6a86f)), closes [#21513](https://github.com/angular/angular/issues/21513) +* **core:** set `preserveWhitespaces` to false by default ([#22046](https://github.com/angular/angular/issues/22046)) ([f1a0632](https://github.com/angular/angular/commit/f1a0632)), closes [#22027](https://github.com/angular/angular/issues/22027) + +### Features + +* **common:** better error message when non-template element used in NgIf ([#22274](https://github.com/angular/angular/issues/22274)) ([67cf11d](https://github.com/angular/angular/commit/67cf11d)), closes [#16410](https://github.com/angular/angular/issues/16410) +* **compiler-cli:** Check unvalidated combination of ngc and TypeScript ([#22293](https://github.com/angular/angular/issues/22293)) ([3ceee99](https://github.com/angular/angular/commit/3ceee99)), closes [#20669](https://github.com/angular/angular/issues/20669) +* **core:** support metadata reflection for native class types ([#22356](https://github.com/angular/angular/issues/22356)) ([5c89d6b](https://github.com/angular/angular/commit/5c89d6b)), closes [#21731](https://github.com/angular/angular/issues/21731) +* **platform-browser:** do not throw error when Hammer.js not loaded ([#22257](https://github.com/angular/angular/issues/22257)) ([991300b](https://github.com/angular/angular/commit/991300b)), closes [#16992](https://github.com/angular/angular/issues/16992) +* **platform-browser:** fix [#19604](https://github.com/angular/angular/issues/19604), can config hammerOptions ([#21979](https://github.com/angular/angular/issues/21979)) ([1d571b2](https://github.com/angular/angular/commit/1d571b2)) + +### BREAKING CHANGES + +* **animations:** When animation is triggered within a disabled zone, the +associated event (which an instance of AnimationEvent) will no longer +report the totalTime as 0 (it will emit the actual time of the +animation). To detect if an animation event is reporting a disabled +animation then the `event.disabled` property can be used instead. + +* **forms:** ngModelChange is now emitted after the value/validity is updated on its control. + +Previously, ngModelChange was emitted before its underlying control was updated. +This was fine if you passed through the value directly through the $event keyword, e.g. + +``` + + +onChange(value) { + console.log(value); // would log updated value +} +``` + +However, if you had a handler for the ngModelChange event that checked the value through the control, +you would get the old value rather than the updated value. e.g: + +``` + + +onChange(ngModel: NgModel) { + console.log(ngModel.value); // would log old value, not updated value +} +``` + +Now the value and validity will be updated before the ngModelChange event is emitted, +so the same setup will log the updated value. + +``` +onChange(ngModel: NgModel) { + console.log(ngModel.value); // will log updated value +} +``` + +We think this order will be less confusing when the control is checked directly. +You will only need to update your app if it has relied on this bug to keep track of the old control value. +If that is the case, you should be able to track the old value directly by saving it on your component. + + +## [5.2.6](https://github.com/angular/angular/compare/5.2.5...5.2.6) (2018-02-22) + +### Bug Fixes + +* **common:** correct mapping of Observable methods ([#20518](https://github.com/angular/angular/issues/20518)) ([ce5e8fa](https://github.com/angular/angular/commit/ce5e8fa)), closes [#20516](https://github.com/angular/angular/issues/20516) +* **common:** then and else template might be set to null ([#22298](https://github.com/angular/angular/issues/22298)) ([af6a056](https://github.com/angular/angular/commit/af6a056)) +* **compiler-cli:** add missing entry point to package, update tsickle ([#22295](https://github.com/angular/angular/issues/22295)) ([c5418c7](https://github.com/angular/angular/commit/c5418c7)) +* **core:** properly handle function without prototype in reflector ([#22284](https://github.com/angular/angular/issues/22284)) ([5ec38f2](https://github.com/angular/angular/commit/5ec38f2)), closes [#19978](https://github.com/angular/angular/issues/19978) +* **core:** support metadata reflection for native class types ([#22356](https://github.com/angular/angular/issues/22356)) ([ee91de9](https://github.com/angular/angular/commit/ee91de9)), closes [#21731](https://github.com/angular/angular/issues/21731) + + +# [6.0.0-beta.4](https://github.com/angular/angular/compare/6.0.0-beta.3...6.0.0-beta.4) (2018-02-14) + +### Bug Fixes + +* **bazel:** allow TS to read ambient typings ([#21876](https://github.com/angular/angular/issues/21876)) ([b081dfe](https://github.com/angular/angular/commit/b081dfe)), closes [#21872](https://github.com/angular/angular/issues/21872) +* **bazel:** improve error message for missing assets ([#22096](https://github.com/angular/angular/issues/22096)) ([dcf64a0](https://github.com/angular/angular/commit/dcf64a0)), closes [#22095](https://github.com/angular/angular/issues/22095) +* **common:** add locale currency values ([#21783](https://github.com/angular/angular/issues/21783)) ([420cc7a](https://github.com/angular/angular/commit/420cc7a)), closes [#20385](https://github.com/angular/angular/issues/20385) +* **common:** round currencies based on decimal digits in `CurrencyPipe` ([#21783](https://github.com/angular/angular/issues/21783)) ([44154e7](https://github.com/angular/angular/commit/44154e7)), closes [#10189](https://github.com/angular/angular/issues/10189) +* **common:** weaken AsyncPipe transform signature ([#22169](https://github.com/angular/angular/issues/22169)) ([be59c3a](https://github.com/angular/angular/commit/be59c3a)) +* **compiler:** make unary plus operator consistent to JavaScript ([#22154](https://github.com/angular/angular/issues/22154)) ([72f8abd](https://github.com/angular/angular/commit/72f8abd)), closes [#22089](https://github.com/angular/angular/issues/22089) +* **core:** add stacktrace in log when error during cleanup component in TestBed ([#22162](https://github.com/angular/angular/issues/22162)) ([16d1700](https://github.com/angular/angular/commit/16d1700)) +* **core:** ensure initial value of QueryList length ([#21980](https://github.com/angular/angular/issues/21980)) ([#21982](https://github.com/angular/angular/issues/21982)) ([e56de10](https://github.com/angular/angular/commit/e56de10)), closes [#21980](https://github.com/angular/angular/issues/21980) +* **core:** use appropriate inert document strategy for Firefox & Safari ([#17019](https://github.com/angular/angular/issues/17019)) ([a751649](https://github.com/angular/angular/commit/a751649)) +* **forms:** make Validators.email support optional controls ([#20869](https://github.com/angular/angular/issues/20869)) ([140e7c0](https://github.com/angular/angular/commit/140e7c0)) +* **forms:** prevent event emission on enable/disable when emitEvent is false ([#12366](https://github.com/angular/angular/issues/12366)) ([#21018](https://github.com/angular/angular/issues/21018)) ([0bcfae7](https://github.com/angular/angular/commit/0bcfae7)) +* **forms:** set state before emitting a value from ngModelChange ([#21514](https://github.com/angular/angular/issues/21514)) ([9744a1c](https://github.com/angular/angular/commit/9744a1c)), closes [#21513](https://github.com/angular/angular/issues/21513) +* **language-service:** correct instructions to install the language service ([#22000](https://github.com/angular/angular/issues/22000)) ([b37cee3](https://github.com/angular/angular/commit/b37cee3)) +* **platform-browser:** add @Injectable where it was missing ([#22005](https://github.com/angular/angular/issues/22005)) ([0a1a397](https://github.com/angular/angular/commit/0a1a397)) +* **platform-browser:** support 0/false/null values in transfer_state ([#22179](https://github.com/angular/angular/issues/22179)) ([6435ecd](https://github.com/angular/angular/commit/6435ecd)) + + +### Features + +* **bazel:** allow explicit specification of factories ([#22003](https://github.com/angular/angular/issues/22003)) ([e442881](https://github.com/angular/angular/commit/e442881)) +* **compiler:** mark @NgModules in provider lists for identification at runtime ([#22005](https://github.com/angular/angular/issues/22005)) ([2d5e7d1](https://github.com/angular/angular/commit/2d5e7d1)) +* **forms:** multiple validators for array method ([#20766](https://github.com/angular/angular/issues/20766)) ([941e88f](https://github.com/angular/angular/commit/941e88f)), closes [#20665](https://github.com/angular/angular/issues/20665) +* change @Injectable() to support tree-shakeable tokens ([#22005](https://github.com/angular/angular/issues/22005)) ([235a235](https://github.com/angular/angular/commit/235a235)) + + +## [5.2.5](https://github.com/angular/angular/compare/5.2.4...5.2.5) (2018-02-14) + +### Bug Fixes + +* **aio:** update Firebase redirects and SW routes ([#21763](https://github.com/angular/angular/pull/21763)) ([#22104](https://github.com/angular/angular/pull/22104)) ([15ff7ba](https://github.com/angular/angular/commit/15ff7ba)), closes [#21377](https://github.com/angular/angular/issues/21377) +* **bazel:** allow TS to read ambient typings ([#21876](https://github.com/angular/angular/issues/21876)) ([d57fd0b](https://github.com/angular/angular/commit/d57fd0b)), closes [#21872](https://github.com/angular/angular/issues/21872) +* **bazel:** improve error message for missing assets ([#22096](https://github.com/angular/angular/issues/22096)) ([c5ec8d9](https://github.com/angular/angular/commit/c5ec8d9)), closes [#22095](https://github.com/angular/angular/issues/22095) +* **common:** weaken AsyncPipe transform signature ([#22169](https://github.com/angular/angular/issues/22169)) ([c6bdc83](https://github.com/angular/angular/commit/c6bdc83)) +* **compiler:** make unary plus operator consistent to JavaScript ([#22154](https://github.com/angular/angular/issues/22154)) ([1b8ea10](https://github.com/angular/angular/commit/1b8ea10)), closes [#22089](https://github.com/angular/angular/issues/22089) +* **core:** add stacktrace in log when error during cleanup component in TestBed ([#22162](https://github.com/angular/angular/issues/22162)) ([c4f841f](https://github.com/angular/angular/commit/c4f841f)) +* **core:** ensure initial value of QueryList length ([#21980](https://github.com/angular/angular/issues/21980)) ([#21982](https://github.com/angular/angular/issues/21982)) ([47b73fd](https://github.com/angular/angular/commit/47b73fd)), closes [#21980](https://github.com/angular/angular/issues/21980) +* **core:** use appropriate inert document strategy for Firefox & Safari ([#17019](https://github.com/angular/angular/issues/17019)) ([47b71d9](https://github.com/angular/angular/commit/47b71d9)) +* **forms:** prevent event emission on enable/disable when emitEvent is false ([#12366](https://github.com/angular/angular/issues/12366)) ([#21018](https://github.com/angular/angular/issues/21018)) ([56b9591](https://github.com/angular/angular/commit/56b9591)) +* **language-service:** correct instructions to install the language service ([#22000](https://github.com/angular/angular/issues/22000)) ([0b23573](https://github.com/angular/angular/commit/0b23573)) +* **platform-browser:** support 0/false/null values in transfer_state ([#22179](https://github.com/angular/angular/issues/22179)) ([da6ab91](https://github.com/angular/angular/commit/da6ab91)) + + +# [6.0.0-beta.3](https://github.com/angular/angular/compare/6.0.0-beta.2...6.0.0-beta.3) (2018-02-07) + +### Bug Fixes + +* **common:** don't convert null to a string when flushing a mock request ([#21417](https://github.com/angular/angular/issues/21417)) ([8b14488](https://github.com/angular/angular/commit/8b14488)), closes [#20744](https://github.com/angular/angular/issues/20744) +* **core:** fix [#20582](https://github.com/angular/angular/issues/20582), don't need to wrap zone in location change listener ([#20640](https://github.com/angular/angular/issues/20640)) ([f791e9f](https://github.com/angular/angular/commit/f791e9f)) +* **core:** fix proper propagation of subscriptions in EventEmitter ([#22016](https://github.com/angular/angular/issues/22016)) ([e81606c](https://github.com/angular/angular/commit/e81606c)), closes [#21999](https://github.com/angular/angular/issues/21999) +* **core:** should check Zone existance when scheduleMicroTask ([#20656](https://github.com/angular/angular/issues/20656)) ([3a86940](https://github.com/angular/angular/commit/3a86940)) +* **forms:** publish missing types ([#19941](https://github.com/angular/angular/issues/19941)) ([2707012](https://github.com/angular/angular/commit/2707012)) +* **ivy:** generate correct interpolations ([#21946](https://github.com/angular/angular/issues/21946)) ([3cc1d76](https://github.com/angular/angular/commit/3cc1d76)) +* **ivy:** generate lifecycle pattern ([#21865](https://github.com/angular/angular/issues/21865)) ([f816666](https://github.com/angular/angular/commit/f816666)) +* **ivy:** improve `bindV` perf and memory usage ([#21881](https://github.com/angular/angular/issues/21881)) ([0846784](https://github.com/angular/angular/commit/0846784)) +* **ivy:** remove unnecessary parameter of NgOnChangesFeature ([#21879](https://github.com/angular/angular/issues/21879)) ([65cf1ad](https://github.com/angular/angular/commit/65cf1ad)) + + +### Features + +* **compiler-cli:** reflect static methods added to classes in metadata ([#21926](https://github.com/angular/angular/issues/21926)) ([eb8ddd2](https://github.com/angular/angular/commit/eb8ddd2)) +* **ivy:** add canonical example of a pipe. ([#21834](https://github.com/angular/angular/issues/21834)) ([743d8bc](https://github.com/angular/angular/commit/743d8bc)) +* **ivy:** add support for attributes on ng-content nodes ([#21935](https://github.com/angular/angular/issues/21935)) ([1aa2947](https://github.com/angular/angular/commit/1aa2947)) +* **ivy:** memoize array literals in render3 ([#21973](https://github.com/angular/angular/issues/21973)) ([4d62be6](https://github.com/angular/angular/commit/4d62be6)) + + +### Performance Improvements + +* **ivy:** improve Uglify configuration in hello world integration test ([#21985](https://github.com/angular/angular/issues/21985)) ([7e51e52](https://github.com/angular/angular/commit/7e51e52)) + + + + +## [5.2.4](https://github.com/angular/angular/compare/5.2.3...5.2.4) (2018-02-07) + + +### Bug Fixes + +* **common:** don't convert null to a string when flushing a mock request ([#21417](https://github.com/angular/angular/issues/21417)) ([c4fb696](https://github.com/angular/angular/commit/c4fb696)), closes [#20744](https://github.com/angular/angular/issues/20744) +* **core:** fix [#20582](https://github.com/angular/angular/issues/20582), don't need to wrap zone in location change listener ([#22007](https://github.com/angular/angular/issues/22007)) ([ce51ea9](https://github.com/angular/angular/commit/ce51ea9)) +* **core:** fix proper propagation of subscriptions in EventEmitter ([#22016](https://github.com/angular/angular/issues/22016)) ([c6645e7](https://github.com/angular/angular/commit/c6645e7)), closes [#21999](https://github.com/angular/angular/issues/21999) +* **core:** should check Zone existance when scheduleMicroTask ([#20656](https://github.com/angular/angular/issues/20656)) ([aa9ba7f](https://github.com/angular/angular/commit/aa9ba7f)) + + + + +# [6.0.0-beta.2](https://github.com/angular/angular/compare/6.0.0-beta.1...6.0.0-beta.2) (2018-01-31) + + +### Features + +* **router:** add navigationSource and restoredState to NavigationStart event ([#21728](https://github.com/angular/angular/issues/21728)) ([c40ae7f](https://github.com/angular/angular/commit/c40ae7f)) +* **service-worker:** add helper script which will uninstall SW ([#21863](https://github.com/angular/angular/issues/21863)) ([b10540a](https://github.com/angular/angular/commit/b10540a)) + + + + +## [5.2.3](https://github.com/angular/angular/compare/5.2.2...5.2.3) (2018-01-31) + + +### Bug Fixes + +* **common:** allow HttpInterceptors to inject HttpClient ([#19809](https://github.com/angular/angular/issues/19809)) ([ed2b717](https://github.com/angular/angular/commit/ed2b717)), closes [#18224](https://github.com/angular/angular/issues/18224) +* **common:** generate closure-locale data file with exported plural functions ([#21873](https://github.com/angular/angular/issues/21873)) ([c2f5ed5](https://github.com/angular/angular/commit/c2f5ed5)), closes [#21870](https://github.com/angular/angular/issues/21870) +* **core:** fix retrieving the binding name when an expression changes ([#21814](https://github.com/angular/angular/issues/21814)) ([81d64d6](https://github.com/angular/angular/commit/81d64d6)), closes [#21735](https://github.com/angular/angular/issues/21735) [#21788](https://github.com/angular/angular/issues/21788) +* **forms:** allow FormBuilder to create controls with any formState type ([#20917](https://github.com/angular/angular/issues/20917)) ([56f3e18](https://github.com/angular/angular/commit/56f3e18)), closes [#20368](https://github.com/angular/angular/issues/20368) +* **forms:** inserting and removing controls should work in re-bound form arrays ([#21822](https://github.com/angular/angular/issues/21822)) ([fad99cc](https://github.com/angular/angular/commit/fad99cc)), closes [#21501](https://github.com/angular/angular/issues/21501) +* **language-service:** ensure correct paths are passed to TypeScript ([#21812](https://github.com/angular/angular/issues/21812)) ([250c8da](https://github.com/angular/angular/commit/250c8da)) +* **language-service:** spell diagnostics correctly ([#21812](https://github.com/angular/angular/issues/21812)) ([778e6e7](https://github.com/angular/angular/commit/778e6e7)) +* **router:** remove [@internal](https://github.com/internal) tag on ParamInheritanceType ([#21773](https://github.com/angular/angular/issues/21773)) ([35a0721](https://github.com/angular/angular/commit/35a0721)), closes [#21456](https://github.com/angular/angular/issues/21456) + + + + +# [6.0.0-beta.1](https://github.com/angular/angular/compare/6.0.0-beta.0...6.0.0-beta.1) (2018-01-25) + + +### Bug Fixes + +* **common:** A null value should remove the style on IE ([#21679](https://github.com/angular/angular/issues/21679)) ([7d49443](https://github.com/angular/angular/commit/7d49443)), closes [#21064](https://github.com/angular/angular/issues/21064) +* avoid triggering a cli bug ([#21611](https://github.com/angular/angular/issues/21611)) ([0eabd07](https://github.com/angular/angular/commit/0eabd07)) +* **common:** don't remove special characters when extracting CLDR data ([#21626](https://github.com/angular/angular/issues/21626)) ([135a282](https://github.com/angular/angular/commit/135a282)) +* **common:** extract plural function from i18n locale data files for TS 2.6 ([#21626](https://github.com/angular/angular/issues/21626)) ([97b18b2](https://github.com/angular/angular/commit/97b18b2)), closes [#21608](https://github.com/angular/angular/issues/21608) +* **common:** fallback to last defined value for named date and time formats ([#21299](https://github.com/angular/angular/issues/21299)) ([879756d](https://github.com/angular/angular/commit/879756d)), closes [#21282](https://github.com/angular/angular/issues/21282) +* **compiler:** add support for marker tags in xliff serializers ([#21250](https://github.com/angular/angular/issues/21250)) ([f74130c](https://github.com/angular/angular/commit/f74130c)), closes [#21078](https://github.com/angular/angular/issues/21078) +* **compiler:** Don't strip `/*# sourceURL ... */` ([#16088](https://github.com/angular/angular/issues/16088)) ([5f681f9](https://github.com/angular/angular/commit/5f681f9)) +* **compiler:** fix ICU select messages to use male/female/other ([#21713](https://github.com/angular/angular/issues/21713)) ([cb5090c](https://github.com/angular/angular/commit/cb5090c)) +* **compiler-cli:** do not fold errors past calls in the collector ([#21708](https://github.com/angular/angular/issues/21708)) ([dd86790](https://github.com/angular/angular/commit/dd86790)) +* **compiler-cli:** do not lower expressions in non-modules ([#21649](https://github.com/angular/angular/issues/21649)) ([7f93aad](https://github.com/angular/angular/commit/7f93aad)) +* **router:** don't use ParamsInheritanceStrategy in declarations ([#21574](https://github.com/angular/angular/issues/21574)) ([925e654](https://github.com/angular/angular/commit/925e654)), closes [#21456](https://github.com/angular/angular/issues/21456) + + +### Features + +* **compiler:** implement "enableIvy" compiler option ([#21427](https://github.com/angular/angular/issues/21427)) ([64d16de](https://github.com/angular/angular/commit/64d16de)) +* **core:** optional generic type for ElementRef ([#20765](https://github.com/angular/angular/issues/20765)) ([d3d9aac](https://github.com/angular/angular/commit/d3d9aac)), closes [#13139](https://github.com/angular/angular/issues/13139) + + + + +## [5.2.2](https://github.com/angular/angular/compare/5.2.1...5.2.2) (2018-01-25) + + +### Bug Fixes + +* **common:** A null value should remove the style on IE ([#21679](https://github.com/angular/angular/issues/21679)) ([c12ea3a](https://github.com/angular/angular/commit/c12ea3a)), closes [#21064](https://github.com/angular/angular/issues/21064) +* **common:** don't remove special characters when extracting CLDR data ([#21626](https://github.com/angular/angular/issues/21626)) ([a62c186](https://github.com/angular/angular/commit/a62c186)) +* **common:** extract plural function from i18n locale data files for TS 2.6 ([#21626](https://github.com/angular/angular/issues/21626)) ([71f9eaa](https://github.com/angular/angular/commit/71f9eaa)), closes [#21608](https://github.com/angular/angular/issues/21608) +* **common:** fallback to last defined value for named date and time formats ([#21299](https://github.com/angular/angular/issues/21299)) ([982eb7b](https://github.com/angular/angular/commit/982eb7b)), closes [#21282](https://github.com/angular/angular/issues/21282) +* **compiler:** add support for marker tags in xliff serializers ([#21250](https://github.com/angular/angular/issues/21250)) ([02352bc](https://github.com/angular/angular/commit/02352bc)), closes [#21078](https://github.com/angular/angular/issues/21078) +* **compiler:** Don't strip `/*# sourceURL ... */` ([#16088](https://github.com/angular/angular/issues/16088)) ([de6c644](https://github.com/angular/angular/commit/de6c644)) +* **compiler:** fix ICU select messages to use male/female/other ([#21713](https://github.com/angular/angular/issues/21713)) ([8e44577](https://github.com/angular/angular/commit/8e44577)) +* **compiler-cli:** do not fold errors past calls in the collector ([#21708](https://github.com/angular/angular/issues/21708)) ([52970c0](https://github.com/angular/angular/commit/52970c0)) +* **compiler-cli:** do not lower expressions in non-modules ([#21649](https://github.com/angular/angular/issues/21649)) ([ba4ea82](https://github.com/angular/angular/commit/ba4ea82)) +* **router:** don't use ParamsInheritanceStrategy in declarations ([#21574](https://github.com/angular/angular/issues/21574)) ([8b3fbb5](https://github.com/angular/angular/commit/8b3fbb5)), closes [#21456](https://github.com/angular/angular/issues/21456) + + + + +# [6.0.0-beta.0](https://github.com/angular/angular/compare/5.2.0...6.0.0-beta.0) (2018-01-17) + + +### Bug Fixes + +* **animations:** fix increment/decrement aliases example ([#18323](https://github.com/angular/angular/issues/18323)) ([d2aa8ac](https://github.com/angular/angular/commit/d2aa8ac)) +* **benchpress:** should still support selenium_webdriver < 3.6.0 ([#21477](https://github.com/angular/angular/issues/21477)) ([9b84a32](https://github.com/angular/angular/commit/9b84a32)) +* **common:** set correct timezone for ISO8601 dates in Safari ([#21506](https://github.com/angular/angular/issues/21506)) ([05208b8](https://github.com/angular/angular/commit/05208b8)), closes [#21491](https://github.com/angular/angular/issues/21491) +* **compiler:** cache external reference resolution ([#21359](https://github.com/angular/angular/issues/21359)) ([e3e2fc0](https://github.com/angular/angular/commit/e3e2fc0)) +* **compiler:** make `.ngsummary.json` files idempotent ([#21448](https://github.com/angular/angular/issues/21448)) ([e64b1e9](https://github.com/angular/angular/commit/e64b1e9)) +* **core:** fix chained http call ([#20924](https://github.com/angular/angular/issues/20924)) ([7e3f9a4](https://github.com/angular/angular/commit/7e3f9a4)), closes [#20921](https://github.com/angular/angular/issues/20921) +* **ivy:** Add workaround for AJD in google3 ([#21488](https://github.com/angular/angular/issues/21488)) ([6af3672](https://github.com/angular/angular/commit/6af3672)) +* **language-service:** Clear caches when program changes ([#21337](https://github.com/angular/angular/issues/21337)) ([43e1520](https://github.com/angular/angular/commit/43e1520)), closes [#19405](https://github.com/angular/angular/issues/19405) +* **service-worker:** properly handle invalid hashes in all scenarios ([#21288](https://github.com/angular/angular/issues/21288)) ([3951098](https://github.com/angular/angular/commit/3951098)) + + +### Features + +* **bazel:** allow ng_module rules to control whether type checking is enabled ([#21460](https://github.com/angular/angular/issues/21460)) ([cffa0fe](https://github.com/angular/angular/commit/cffa0fe)) +* **core:** add binding name to content changed error ([#20352](https://github.com/angular/angular/issues/20352)) ([d3bf54b](https://github.com/angular/angular/commit/d3bf54b)) +* **forms:** handle string with and without line boundary on pattern validator ([#19256](https://github.com/angular/angular/issues/19256)) ([54bf179](https://github.com/angular/angular/commit/54bf179)) + + +### Performance Improvements + +* **ivy:** add missing dom element in render3_function tree benchmark ([#21476](https://github.com/angular/angular/issues/21476)) ([9b5a485](https://github.com/angular/angular/commit/9b5a485)) + + + + +## [5.2.1](https://github.com/angular/angular/compare/5.2.0...5.2.1) (2018-01-17) + + +### Bug Fixes + +* **animations:** fix increment/decrement aliases example ([#18323](https://github.com/angular/angular/issues/18323)) ([48c1898](https://github.com/angular/angular/commit/48c1898)) +* **benchpress:** should still support selenium_webdriver < 3.6.0 ([#21477](https://github.com/angular/angular/issues/21477)) ([3c6a506](https://github.com/angular/angular/commit/3c6a506)) +* **common:** set correct timezone for ISO8601 dates in Safari ([#21506](https://github.com/angular/angular/issues/21506)) ([8e9cd57](https://github.com/angular/angular/commit/8e9cd57)), closes [#21491](https://github.com/angular/angular/issues/21491) +* **compiler:** cache external reference resolution ([#21359](https://github.com/angular/angular/issues/21359)) ([c32e833](https://github.com/angular/angular/commit/c32e833)) +* **compiler:** make `.ngsummary.json` files idempotent ([#21448](https://github.com/angular/angular/issues/21448)) ([a931a41](https://github.com/angular/angular/commit/a931a41)) +* **core:** fix chained http call ([#20924](https://github.com/angular/angular/issues/20924)) ([54e7576](https://github.com/angular/angular/commit/54e7576)), closes [#20921](https://github.com/angular/angular/issues/20921) +* **language-service:** Clear caches when program changes ([#21337](https://github.com/angular/angular/issues/21337)) ([cc9419d](https://github.com/angular/angular/commit/cc9419d)), closes [#19405](https://github.com/angular/angular/issues/19405) +* **service-worker:** properly handle invalid hashes in all scenarios ([#21288](https://github.com/angular/angular/issues/21288)) ([51eb3d4](https://github.com/angular/angular/commit/51eb3d4)) + + +### Features + +* **core:** add binding name to content changed error ([#20352](https://github.com/angular/angular/issues/20352)) ([4556532](https://github.com/angular/angular/commit/4556532)) +* **forms:** handle string with and without line boundary on pattern validator ([#19256](https://github.com/angular/angular/issues/19256)) ([75f8522](https://github.com/angular/angular/commit/75f8522)) + + + + +# [5.2.0](https://github.com/angular/angular/compare/5.2.0-rc.0...5.2.0) (2018-01-10) + + +### Bug Fixes + +* **bazel:** Give correct module names for ES6 output ([#21320](https://github.com/angular/angular/issues/21320)) ([9728dce](https://github.com/angular/angular/commit/9728dce)), closes [#21022](https://github.com/angular/angular/issues/21022) +* **benchpress:** forward compat with selenium_webdriver 3.6.0 ([#21399](https://github.com/angular/angular/issues/21399)) ([6040ee3](https://github.com/angular/angular/commit/6040ee3)) +* **benchpress:** work around missing events from Chrome 63 ([#21396](https://github.com/angular/angular/issues/21396)) ([fa03ae1](https://github.com/angular/angular/commit/fa03ae1)) +* **common:** export currencies via `getCurrencySymbol` ([#20983](https://github.com/angular/angular/issues/20983)) ([fecf768](https://github.com/angular/angular/commit/fecf768)) + +Note: Due to an animation fix back in 5.1.1 ([c2b3792](https://github.com/angular/angular/commit/c2b3792a3b5fa5215fe2ef7e0ac6511086ffe4c1)) which allows for nested :leave queries to work within animation sequences, all elements that are dynamically inserted (*ngIf, *ngFor, etc…) now contain the special CSS class: “ng-star-inserted”. This may cause failures within unit tests if there are any assertions that match against element.className directly. (An easy fix for this is to match using a regular expression instead of asserting the className string directly.) + # [5.2.0-rc.0](https://github.com/angular/angular/compare/5.2.0-beta.1...5.2.0-rc.0) (2018-01-04) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a97199884..74cec311bc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,7 @@ and help you to craft the change so that it is successfully accepted into the pr Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available. -We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using http://plnkr.co. Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like: +We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal reproduction scenario using http://plnkr.co. Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like: - version of Angular used - 3rd-party libraries and their versions @@ -61,7 +61,7 @@ A minimal reproduce scenario using http://plnkr.co/ allows us to quickly confirm We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it. -Unfortunately we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced. +Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced. You can file new issues by filling out our [new issue form](https://github.com/angular/angular/issues/new). @@ -72,7 +72,7 @@ Before you submit your Pull Request (PR) consider the following guidelines: 1. Search [GitHub](https://github.com/angular/angular/pulls) for an open or closed PR that relates to your submission. You don't want to duplicate effort. 1. Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs. - We cannot accept code without this. + We cannot accept code without this. Make sure you sign with the primary email address of the Git identity that has been granted access to the Angular repository. 1. Fork the angular/angular repo. 1. Make your changes in a new git branch: @@ -173,12 +173,12 @@ The **header** is mandatory and the **scope** of the header is optional. Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools. -Footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any. +The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any. Samples: (even more [samples](https://github.com/angular/angular/commits/master)) ``` -docs(changelog): update change log to beta.5 +docs(changelog): update changelog to beta.5 ``` ``` fix(release): need to depend on latest rxjs and zone.js @@ -203,7 +203,7 @@ Must be one of the following: * **test**: Adding missing tests or correcting existing tests ### Scope -The scope should be the name of the npm package affected (as perceived by person reading changelog generated from commit messages. +The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages. The following is the list of supported scopes: @@ -232,10 +232,10 @@ There are currently a few exceptions to the "use package name" rule: * none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`) ### Subject -The subject contains succinct description of the change: +The subject contains a succinct description of the change: * use the imperative, present tense: "change" not "changed" nor "changes" -* don't capitalize first letter +* don't capitalize the first letter * no dot (.) at the end ### Body @@ -259,6 +259,19 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise * For corporations we'll need you to [print, sign and one of scan+email, fax or mail the form][corporate-cla]. +
+ + If you have more than one Git identity, you must make sure that you sign the CLA using the primary email address associated with the ID that has been granted access to the Angular repository. Git identities can be associated with more than one email address, and only one is primary. Here are some links to help you sort out multiple Git identities and email addresses: + + * https://help.github.com/articles/setting-your-commit-email-address-in-git/ + * https://stackoverflow.com/questions/37245303/what-does-usera-committed-with-userb-13-days-ago-on-github-mean + * https://help.github.com/articles/about-commit-email-addresses/ + * https://help.github.com/articles/blocking-command-line-pushes-that-expose-your-personal-email-address/ + + Note that if you have more than one Git identity, it is important to verify that you are logged in with the same ID with which you signed the CLA, before you commit changes. If not, your PR will fail the CLA check. + +
+ [angular-group]: https://groups.google.com/forum/#!forum/angular [coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md diff --git a/README.md b/README.md index 8949113a75..8a945ef2ad 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ [![CircleCI](https://circleci.com/gh/angular/angular/tree/master.svg?style=shield)](https://circleci.com/gh/angular/angular/tree/master) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=LzF3RzBVVGt6VWE2S0hHaC9uYllOZz09LS1BVjNTclBKV0x4eVRlcjA4QVY1M0N3PT0=--eb4ce8c8dc2c1c5b2b5352d473ee12a73ac20e06)](https://www.browserstack.com/automate/public-build/LzF3RzBVVGt6VWE2S0hHaC9uYllOZz09LS1BVjNTclBKV0x4eVRlcjA4QVY1M0N3PT0=--eb4ce8c8dc2c1c5b2b5352d473ee12a73ac20e06) [![Join the chat at https://gitter.im/angular/angular](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular/angular?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Issue Stats](http://issuestats.com/github/angular/angular/badge/pr?style=flat)](http://issuestats.com/github/angular/angular) -[![Issue Stats](http://issuestats.com/github/angular/angular/badge/issue?style=flat)](http://issuestats.com/github/angular/angular) [![npm version](https://badge.fury.io/js/%40angular%2Fcore.svg)](https://www.npmjs.com/@angular/core) diff --git a/WORKSPACE b/WORKSPACE index c40e30c0ea..e6a50b61ec 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,46 +1,49 @@ -workspace(name = "angular_src") +workspace(name = "angular") -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") +# Using a pre-release snapshot to pick up a commit that makes all nodejs_binary +# programs produce source-mapped stack traces and uglify sourcemaps. +RULES_NODEJS_VERSION = "4303cbef12e5e252ad66cc35cff1123e3a44ee83" -git_repository( +http_archive( name = "build_bazel_rules_nodejs", - remote = "https://github.com/bazelbuild/rules_nodejs.git", - tag = "0.3.1", + url = "https://github.com/bazelbuild/rules_nodejs/archive/%s.zip" % RULES_NODEJS_VERSION, + strip_prefix = "rules_nodejs-%s" % RULES_NODEJS_VERSION, + sha256 = "fccb9a7122f339d89c9994dc0fea33c737dd76e66281d0da0cb841da5f1edec7", ) load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories") -check_bazel_version("0.8.1") +check_bazel_version("0.9.0") node_repositories(package_json = ["//:package.json"]) -git_repository( +RULES_TYPESCRIPT_VERSION = "d3cc5cd72d89aee0e4c2553ae1b99c707ecbef4e" + +http_archive( name = "build_bazel_rules_typescript", - remote = "https://github.com/bazelbuild/rules_typescript.git", -# tag = "0.7.1+", - commit = "89d2c75066bea3d9c942f29dd1d2ea543c58d6d5" + url = "https://github.com/bazelbuild/rules_typescript/archive/%s.zip" % RULES_TYPESCRIPT_VERSION, + strip_prefix = "rules_typescript-%s" % RULES_TYPESCRIPT_VERSION, + sha256 = "a233fcca41c3e59f639ac71c396edb30e9e9716cf8ed5fb20b51ff8910d5d895", ) -load("@build_bazel_rules_typescript//:setup.bzl", "ts_setup_workspace") +load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") ts_setup_workspace() -local_repository( - name = "angular", - path = "packages/bazel", -) - local_repository( name = "rxjs", path = "node_modules/rxjs/src", ) -git_repository( +# This commit matches the version of buildifier in angular/ngcontainer +# If you change this, also check if it matches the version in the angular/ngcontainer +# version in /.circleci/config.yml +BAZEL_BUILDTOOLS_VERSION = "b3b620e8bcff18ed3378cd3f35ebeb7016d71f71" + +http_archive( name = "com_github_bazelbuild_buildtools", - remote = "https://github.com/bazelbuild/buildtools.git", - # Note, this commit matches the version of buildifier in angular/ngcontainer - # If you change this, also check if it matches the version in the angular/ngcontainer - # version in /.circleci/config.yml - commit = "b3b620e8bcff18ed3378cd3f35ebeb7016d71f71", + url = "https://github.com/bazelbuild/buildtools/archive/%s.zip" % BAZEL_BUILDTOOLS_VERSION, + strip_prefix = "buildtools-%s" % BAZEL_BUILDTOOLS_VERSION, + sha256 = "dad19224258ed67cbdbae9b7befb785c3b966e5a33b04b3ce58ddb7824b97d73", ) http_archive( @@ -54,3 +57,31 @@ load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_too go_rules_dependencies() go_register_toolchains() + +# Fetching the Bazel source code allows us to compile the Skylark linter +http_archive( + name = "io_bazel", + url = "https://github.com/bazelbuild/bazel/archive/9755c72b48866ed034bd28aa033e9abd27431b1e.zip", + strip_prefix = "bazel-9755c72b48866ed034bd28aa033e9abd27431b1e", + sha256 = "5b8443fc3481b5fcd9e7f348e1dd93c1397f78b223623c39eb56494c55f41962", +) + +# We have a source dependency on the Devkit repository, because it's built with +# Bazel. +# This allows us to edit sources and have the effect appear immediately without +# re-packaging or "npm link"ing. +# Even better, things like aspects will visit the entire graph including +# ts_library rules in the devkit repository. +http_archive( + name = "angular_devkit", + url = "https://github.com/angular/devkit/archive/v0.3.1.zip", + strip_prefix = "devkit-0.3.1", + sha256 = "31d4b597fe9336650acf13df053c1c84dcbe9c29c6a833bcac3819cd3fd8cad3", +) + +http_archive( + name = "org_brotli", + url = "https://github.com/google/brotli/archive/v1.0.2.zip", + strip_prefix = "brotli-1.0.2", + sha256 = "b43d5d6bc40f2fa6c785b738d86c6bbe022732fe25196ebbe43b9653a025920d", +) diff --git a/aio/.angular-cli.json b/aio/.angular-cli.json index 10b25f2812..8e6e6f240a 100644 --- a/aio/.angular-cli.json +++ b/aio/.angular-cli.json @@ -39,7 +39,7 @@ ], "e2e": { "protractor": { - "config": "./protractor.conf.js" + "config": "tests/e2e/protractor.conf.js" } }, "lint": [ @@ -50,18 +50,21 @@ "project": "src/tsconfig.spec.json" }, { - "project": "e2e/tsconfig.e2e.json" + "project": "tests/e2e/tsconfig.e2e.json" } ], "test": { "karma": { - "config": "./karma.conf.js" + "config": "src/karma.conf.js" } }, "defaults": { "styleExt": "scss", "component": { "inlineStyle": true + }, + "build": { + "namedChunks": true } } } diff --git a/aio/README.md b/aio/README.md index 1370345551..dde1c957d9 100644 --- a/aio/README.md +++ b/aio/README.md @@ -4,7 +4,7 @@ Everything in this folder is part of the documentation project. This includes * the web site for displaying the documentation * the dgeni configuration for converting source files to rendered files that can be viewed in the web site. -* the tooling for setting up examples for development; and generating plunkers and zip files from the examples. +* the tooling for setting up examples for development; and generating live-example and zip files from the examples. ## Developer tasks @@ -13,7 +13,7 @@ You should run all these tasks from the `angular/aio` folder. Here are the most important tasks you might need to use: * `yarn` - install all the dependencies. -* `yarn setup` - install all the dependencies, boilerplate, plunkers, zips and run dgeni on the docs. +* `yarn setup` - install all the dependencies, boilerplate, stackblitz, zips and run dgeni on the docs. * `yarn setup-local` - same as `setup`, but use the locally built Angular packages for aio and docs examples boilerplate. * `yarn build` - create a production build of the application (after installing dependencies, boilerplate, etc). @@ -32,7 +32,7 @@ Here are the most important tasks you might need to use: * `yarn boilerplate:add` - generate all the boilerplate code for the examples, so that they can be run locally. Add the option `--local` to use your local version of Angular contained in the "dist" folder. * `yarn boilerplate:remove` - remove all the boilerplate code that was added via `yarn boilerplate:add`. -* `yarn generate-plunkers` - generate the plunker files that are used by the `live-example` tags in the docs. +* `yarn generate-stackblitz` - generate the stackblitz files that are used by the `live-example` tags in the docs. * `yarn generate-zips` - generate the zip files from the examples. Zip available via the `live-example` tags in the docs. * `yarn example-e2e` - run all e2e tests for examples @@ -68,6 +68,11 @@ The content is written in markdown. All other content is written using markdown in text files, located in the `angular/aio/content` folder. More specifically, there are sub-folders that contain particular types of content: guides, tutorial and marketing. +* **Code examples**: code examples need to be testable to ensure their accuracy. +Also, our examples have a specific look and feel and allow the user to copy the source code. For larger +examples they are rendered in a tabbed interface (e.g. template, HTML, and TypeScript on separate +tabs). Additionally, some are live examples, which provide links where the code can be edited, executed, and/or downloaded. For details on working with code examples, please read the [Code snippets](https://angular.io/guide/docs-style-guide#code-snippets), [Source code markup](https://angular.io/guide/docs-style-guide#source-code-markup), and [Live examples](https://angular.io/guide/docs-style-guide#live-examples) pages of the [Authors Style Guide](https://angular.io/guide/docs-style-guide). + We use the [dgeni](https://github.com/angular/dgeni) tool to convert these files into docs that can be viewed in the doc-viewer. The [Authors Style Guide](https://angular.io/guide/docs-style-guide) prescribes guidelines for @@ -100,8 +105,7 @@ The general setup is as follows: * Open a terminal, ensure the dependencies are installed; run an initial doc generation; then start the doc-viewer: ```bash -yarn -yarn docs +yarn setup yarn start ``` diff --git a/aio/content/examples/.DS_Store b/aio/content/examples/.DS_Store new file mode 100644 index 0000000000..55dd692a1c Binary files /dev/null and b/aio/content/examples/.DS_Store differ diff --git a/aio/content/examples/.gitignore b/aio/content/examples/.gitignore index aa10a7c858..fcc840006f 100644 --- a/aio/content/examples/.gitignore +++ b/aio/content/examples/.gitignore @@ -76,8 +76,8 @@ aot-compiler/**/*.factory.d.ts # universal !universal/webpack.server.config.js -# plunkers -*plnkr.no-link.html +# stackblitz +*stackblitz.no-link.html # ngUpgrade testing !upgrade-phonecat-*/**/karma.conf.js diff --git a/aio/content/examples/ajs-quick-reference/plnkr.json b/aio/content/examples/ajs-quick-reference/stackblitz.json similarity index 88% rename from aio/content/examples/ajs-quick-reference/plnkr.json rename to aio/content/examples/ajs-quick-reference/stackblitz.json index 1ff34275f7..6b91b367d2 100644 --- a/aio/content/examples/ajs-quick-reference/plnkr.json +++ b/aio/content/examples/ajs-quick-reference/stackblitz.json @@ -1,6 +1,5 @@ { "description": "AngularJS to Angular Quick Reference", - "basePath": "src/", "files":[ "!**/*.d.ts", "!**/*.js", diff --git a/aio/content/examples/animations/plnkr.json b/aio/content/examples/animations/stackblitz.json similarity index 80% rename from aio/content/examples/animations/plnkr.json rename to aio/content/examples/animations/stackblitz.json index f047395e7f..4fface319e 100644 --- a/aio/content/examples/animations/plnkr.json +++ b/aio/content/examples/animations/stackblitz.json @@ -1,6 +1,5 @@ { "description": "Angular Animations", - "basePath": "src/", "files":[ "!**/*.d.ts", "!**/*.js" diff --git a/aio/content/examples/architecture/plnkr.json b/aio/content/examples/architecture/stackblitz.json similarity index 58% rename from aio/content/examples/architecture/plnkr.json rename to aio/content/examples/architecture/stackblitz.json index b2f47131df..c2d31783ea 100644 --- a/aio/content/examples/architecture/plnkr.json +++ b/aio/content/examples/architecture/stackblitz.json @@ -1,9 +1,9 @@ { "description": "Intro to Angular", - "basePath": "src/", "files":[ "!**/*.d.ts", "!**/*.js", - "!app/hero-list.component.1.*" - ] + "!**/*.[1].*" + ], + "file": "src/app/app.module.ts" } diff --git a/aio/content/examples/attribute-directives/src/app/dummy.module.1.ts b/aio/content/examples/attribute-directives/src/app/dummy.module.1.ts index 7ba41d53bb..14f0216f05 100644 --- a/aio/content/examples/attribute-directives/src/app/dummy.module.1.ts +++ b/aio/content/examples/attribute-directives/src/app/dummy.module.1.ts @@ -1,4 +1,4 @@ -// Not used. Keep away from plunker +// Not used. Keep away from stackblitz // Keeps ATLS from complaining about undeclared directives. import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; diff --git a/aio/content/examples/attribute-directives/plnkr.json b/aio/content/examples/attribute-directives/stackblitz.json similarity index 73% rename from aio/content/examples/attribute-directives/plnkr.json rename to aio/content/examples/attribute-directives/stackblitz.json index b13ed925a4..32e9661d60 100644 --- a/aio/content/examples/attribute-directives/plnkr.json +++ b/aio/content/examples/attribute-directives/stackblitz.json @@ -1,10 +1,9 @@ { "description": "Attribute Directive", - "basePath": "src/", "files":[ "!**/*.d.ts", "!**/*.js", - "!app/*.[0,1,2,3].*" + "!**/*.[1,2,3].*" ], "tags": ["attribute", "directive"] } diff --git a/aio/content/examples/bootstrapping/bs-config.1.json b/aio/content/examples/bootstrapping/bs-config.1.json new file mode 100644 index 0000000000..4e58595267 --- /dev/null +++ b/aio/content/examples/bootstrapping/bs-config.1.json @@ -0,0 +1,8 @@ +{ + "server": { + "baseDir": "src", + "routes": { + "/node_modules": "node_modules" + } + } +} diff --git a/aio/content/examples/bootstrapping/e2e/app.e2e-spec.ts b/aio/content/examples/bootstrapping/e2e/app.e2e-spec.ts new file mode 100644 index 0000000000..cd4922ccd3 --- /dev/null +++ b/aio/content/examples/bootstrapping/e2e/app.e2e-spec.ts @@ -0,0 +1,14 @@ +import { AppPage } from './app.po'; + +describe('feature-modules App', () => { + let page: AppPage; + + beforeEach(() => { + page = new AppPage(); + }); + + it('should display message saying app works', () => { + page.navigateTo(); + expect(page.getParagraphText()).toEqual('app works!'); + }); +}); diff --git a/aio/content/examples/ngmodule/example-config.json b/aio/content/examples/bootstrapping/example-config.json similarity index 100% rename from aio/content/examples/ngmodule/example-config.json rename to aio/content/examples/bootstrapping/example-config.json diff --git a/aio/content/examples/bootstrapping/src/app/app.component.css b/aio/content/examples/bootstrapping/src/app/app.component.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/aio/content/examples/bootstrapping/src/app/app.component.html b/aio/content/examples/bootstrapping/src/app/app.component.html new file mode 100644 index 0000000000..b6931b538a --- /dev/null +++ b/aio/content/examples/bootstrapping/src/app/app.component.html @@ -0,0 +1,3 @@ +

+ {{title}} +

diff --git a/aio/content/examples/bootstrapping/src/app/app.component.spec.ts b/aio/content/examples/bootstrapping/src/app/app.component.spec.ts new file mode 100644 index 0000000000..13c632d676 --- /dev/null +++ b/aio/content/examples/bootstrapping/src/app/app.component.spec.ts @@ -0,0 +1,32 @@ +import { TestBed, async } from '@angular/core/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [ + AppComponent + ], + }); + TestBed.compileComponents(); + }); + + it('should create the app', async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + })); + + it(`should have as title 'app works!'`, async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app.title).toEqual('app works!'); + })); + + it('should render title in a h1 tag', async(() => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.debugElement.nativeElement; + expect(compiled.querySelector('h1').textContent).toContain('app works!'); + })); +}); diff --git a/aio/content/examples/bootstrapping/src/app/app.component.ts b/aio/content/examples/bootstrapping/src/app/app.component.ts new file mode 100644 index 0000000000..ff63e05048 --- /dev/null +++ b/aio/content/examples/bootstrapping/src/app/app.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent { + title = 'app works!'; +} diff --git a/aio/content/examples/bootstrapping/src/app/app.module.ts b/aio/content/examples/bootstrapping/src/app/app.module.ts new file mode 100644 index 0000000000..58c78b33ac --- /dev/null +++ b/aio/content/examples/bootstrapping/src/app/app.module.ts @@ -0,0 +1,34 @@ +// #docplaster +// #docregion whole-ngmodule + +// imports +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { HttpModule } from '@angular/http'; + +import { AppComponent } from './app.component'; +// #docregion directive-import +import { ItemDirective } from './item.directive'; +// #enddocregion directive-import + + +// @NgModule decorator with its metadata +@NgModule({ +// #docregion declarations + declarations: [ + AppComponent, + ItemDirective + ], + // #enddocregion declarations + imports: [ + BrowserModule, + FormsModule, + HttpModule + ], + providers: [], + bootstrap: [AppComponent] +}) +export class AppModule { } + +// #enddocregion whole-ngmodule diff --git a/aio/content/examples/bootstrapping/src/app/item.directive.spec.ts b/aio/content/examples/bootstrapping/src/app/item.directive.spec.ts new file mode 100644 index 0000000000..0c184d30da --- /dev/null +++ b/aio/content/examples/bootstrapping/src/app/item.directive.spec.ts @@ -0,0 +1,8 @@ +import { ItemDirective } from './item.directive'; + +describe('ItemDirective', () => { + it('should create an instance', () => { + const directive = new ItemDirective(); + expect(directive).toBeTruthy(); + }); +}); diff --git a/aio/content/examples/bootstrapping/src/app/item.directive.ts b/aio/content/examples/bootstrapping/src/app/item.directive.ts new file mode 100644 index 0000000000..e8083bb05e --- /dev/null +++ b/aio/content/examples/bootstrapping/src/app/item.directive.ts @@ -0,0 +1,15 @@ +// #docplaster +// #docregion directive + + +import { Directive } from '@angular/core'; + +@Directive({ + selector: '[appItem]' +}) +export class ItemDirective { +// code goes here + constructor() { } + +} +// #enddocregion directive diff --git a/aio/content/examples/bootstrapping/src/index.html b/aio/content/examples/bootstrapping/src/index.html new file mode 100644 index 0000000000..a0df7beafe --- /dev/null +++ b/aio/content/examples/bootstrapping/src/index.html @@ -0,0 +1,14 @@ + + + + + NgmoduleDemo + + + + + + + Loading... + + diff --git a/aio/content/examples/bootstrapping/src/main.ts b/aio/content/examples/bootstrapping/src/main.ts new file mode 100644 index 0000000000..a9ca1caf8c --- /dev/null +++ b/aio/content/examples/bootstrapping/src/main.ts @@ -0,0 +1,11 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/bootstrapping/stackblitz.json b/aio/content/examples/bootstrapping/stackblitz.json new file mode 100644 index 0000000000..3167ca8387 --- /dev/null +++ b/aio/content/examples/bootstrapping/stackblitz.json @@ -0,0 +1,10 @@ +{ + "description": "Bootstrapping", + "files": [ + "!**/*.d.ts", + "!**/*.js", + "!**/*.[1,2].*" + ], + "file": "src/app/app.component.ts", + "tags": ["ngmodules"] +} diff --git a/aio/content/examples/component-interaction/plnkr.json b/aio/content/examples/component-interaction/stackblitz.json similarity index 87% rename from aio/content/examples/component-interaction/plnkr.json rename to aio/content/examples/component-interaction/stackblitz.json index 03bd55cd1a..421ac6f973 100644 --- a/aio/content/examples/component-interaction/plnkr.json +++ b/aio/content/examples/component-interaction/stackblitz.json @@ -1,6 +1,5 @@ { "description": "Component Communication Cookbook samples", - "basePath": "src/", "files":[ "!**/*.d.ts", "!**/*.js" diff --git a/aio/content/examples/component-styles/src/app/hero-app.component.1.css b/aio/content/examples/component-styles/src/app/hero-app.component.css similarity index 100% rename from aio/content/examples/component-styles/src/app/hero-app.component.1.css rename to aio/content/examples/component-styles/src/app/hero-app.component.css diff --git a/aio/content/examples/component-styles/src/app/hero-details.component.css b/aio/content/examples/component-styles/src/app/hero-details.component.css index fd938ca55c..7c381aa8d2 100644 --- a/aio/content/examples/component-styles/src/app/hero-details.component.css +++ b/aio/content/examples/component-styles/src/app/hero-details.component.css @@ -1,5 +1,6 @@ /* #docregion import */ -@import 'hero-details-box.css'; +/* The AOT compiler needs the `./` to show that this is local */ +@import './hero-details-box.css'; /* #enddocregion import */ /* #docregion host */ diff --git a/aio/content/examples/component-styles/src/app/hero-team.component.ts b/aio/content/examples/component-styles/src/app/hero-team.component.ts index b4f3bb5081..62b4ff5abc 100644 --- a/aio/content/examples/component-styles/src/app/hero-team.component.ts +++ b/aio/content/examples/component-styles/src/app/hero-team.component.ts @@ -5,7 +5,8 @@ import { Hero } from './hero'; @Component({ selector: 'app-hero-team', template: ` - + +

Team