From 68a6a075f4aeab1788a1bba736bfcb428cfbbacb Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 3 May 2022 18:34:54 +0000 Subject: [PATCH] build: clean up references to old `master` branch (#45856) Cleans up all references to the `master` branch we renamed to `main` across Angular. PR Close #45856 --- .circleci/config.yml | 6 +- .circleci/rebase-pr.js | 8 --- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/angular-robot.yml | 4 +- .github/workflows/scorecard.yml | 6 +- .gitmessage | 6 +- CONTRIBUTING.md | 14 ++--- README.md | 4 +- .../docs/vm-setup--update-docker-container.md | 2 +- .../scripts/update-preview-server.sh | 4 +- .../src/app/app.component.router.spec.ts | 2 +- aio/content/examples/universal/server.ts | 2 +- aio/content/guide/aot-compiler.md | 4 +- .../guide/contributors-guide-overview.md | 2 +- aio/content/guide/deployment.md | 6 +- aio/content/guide/deprecations.md | 6 +- aio/content/guide/docs-style-guide.md | 4 +- aio/content/guide/glossary.md | 4 +- aio/content/guide/http.md | 2 +- aio/content/guide/i18n-common-locale-id.md | 2 +- aio/content/guide/language-service.md | 2 +- aio/content/guide/releases.md | 4 +- aio/content/guide/reviewing-content.md | 6 +- aio/content/guide/schematics-authoring.md | 2 +- aio/content/guide/schematics-for-libraries.md | 4 +- aio/content/guide/schematics.md | 4 +- aio/content/guide/security.md | 2 +- aio/content/guide/updating-search-keywords.md | 4 +- aio/content/guide/updating.md | 4 +- aio/content/guide/workspace-config.md | 16 ++--- aio/content/guide/zone.md | 8 +-- aio/content/marketing/contribute.html | 6 +- aio/content/marketing/docs.md | 2 +- aio/content/tutorial/toh-pt6.md | 2 +- aio/firebase.json | 4 +- aio/scripts/check-environment.js | 2 +- aio/scripts/deploy-to-firebase/index.mjs | 2 +- .../deployment/shared/URLS_TO_REDIRECT.txt | 4 +- .../tag-defs/nocollapse.js | 2 +- .../cli-docs-package/extract-cli-commands.js | 2 +- devtools/CONTRIBUTING.md | 18 +++--- .../projects/ng-devtools-backend/README.md | 4 +- devtools/projects/ng-devtools/README.md | 4 +- devtools/projects/protocol/README.md | 4 +- devtools/projects/shared-utils/README.md | 2 +- docs/BRANCHES.md | 46 +++++++------- docs/COMMITTER.md | 2 +- docs/DEVELOPER.md | 4 +- docs/SAVED_REPLIES.md | 4 +- docs/TRIAGE_AND_LABELS.md | 6 +- integration/README.md | 8 +-- integration/animations/README.md | 2 +- .../cli-hello-world-ivy-compat/README.md | 2 +- .../cli-hello-world-ivy-minimal/README.md | 2 +- integration/cli-hello-world-mocha/README.md | 2 +- integration/cli-hello-world/README.md | 2 +- integration/forms/README.md | 2 +- integration/ivy-i18n/README.md | 2 +- integration/ng_update_migrations/README.md | 2 +- integration/standalone-bootstrap/README.md | 2 +- packages/bazel/src/ng_module/ng_module.bzl | 2 +- packages/benchpress/package.json | 2 +- packages/compiler-cli/package.json | 2 +- packages/core/test/render3/load_domino.ts | 3 +- .../misc/angular-in-memory-web-api/README.md | 62 +++++++++---------- packages/router/package.json | 4 +- packages/zone.js/DEVELOPER.md | 8 +-- ...r-to-patch.js => compare-main-to-patch.js} | 34 +++++----- yarn.lock.readme.md | 4 +- 70 files changed, 200 insertions(+), 215 deletions(-) rename scripts/{compare-master-to-patch.js => compare-main-to-patch.js} (87%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 70cbb29828f..acdd0ca634a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,8 +64,6 @@ var_10: &only_on_main_branch branches: only: - main - # TODO(BRANCH_RENAME_CLEANUP): remove - - master # Filter to run a job on all releasable branches. var_11: &only_release_branches @@ -73,8 +71,6 @@ var_11: &only_release_branches branches: only: - main - # TODO(BRANCH_RENAME_CLEANUP): remove - - master - /\d+\.\d+\.x/ # CircleCI orbs @@ -308,7 +304,7 @@ jobs: path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.br destination: core/todo/bundle.br - # NOTE: This is currently limited to master builds only. See the `monitoring` configuration. + # NOTE: This is currently limited to main builds only. See the `monitoring` configuration. saucelabs: executor: name: default-executor diff --git a/.circleci/rebase-pr.js b/.circleci/rebase-pr.js index 53c84d2d822..059f64d7093 100644 --- a/.circleci/rebase-pr.js +++ b/.circleci/rebase-pr.js @@ -101,14 +101,6 @@ function getRefFromBranchList(gitOutput) { return 1; } - // TODO(BRANCH_RENAME_CLEANUP): remove - if (a === 'master') { - return -1; - } - if (b === 'master') { - return 1; - } - const aIsSemver = semverRegex.test(a); const bIsSemver = semverRegex.test(b); if (aIsSemver && bIsSemver) { diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3b5c28f180e..f42cf0d02a9 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -10,5 +10,5 @@ contact_links: url: https://github.com/angular/components/issues/new/choose about: Issues and feature requests for Angular Material - name: Support Request - url: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question + url: https://github.com/angular/angular/blob/main/CONTRIBUTING.md#question about: Questions and requests for support diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ffec1591b65..21e3a6dbb08 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,7 @@ ## PR Checklist Please check if your PR fulfills the following requirements: -- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit +- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) diff --git a/.github/angular-robot.yml b/.github/angular-robot.yml index f2d982b2520..e4d247cc441 100644 --- a/.github/angular-robot.yml +++ b/.github/angular-robot.yml @@ -97,7 +97,7 @@ merge: # 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. "target:" will work for the label "target: master") + # list of labels that a PR needs to have, checked with a regexp. requiredLabels: - 'target: *' @@ -119,7 +119,7 @@ merge: # 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." + 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 `main`, please try rebasing to `main` 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: diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index b282165223d..c22e410728c 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -4,11 +4,7 @@ on: schedule: - cron: '0 0 * * 0' push: - branches: [ - main, - # TODO(BRANCH_RENAME_CLEANUP): remove - master, - ] + branches: [main] workflow_dispatch: # Declare default permissions as read only. diff --git a/.gitmessage b/.gitmessage index 67573abc8f3..26b38a342d8 100644 --- a/.gitmessage +++ b/.gitmessage @@ -74,7 +74,7 @@ Fixes # # ============================= # # The full specification of the Angular Commit Message Format can be found at -# https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit +# https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit # # The following is an excerpt of the specification with the most commonly needed info. # @@ -108,10 +108,10 @@ Fixes # # │ platform-browser-dynamic|platform-server|router|service-worker| # │ upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve| # │ devtools -# │ https://github.com/angular/angular/blob/master/CONTRIBUTING.md#scope +# │ https://github.com/angular/angular/blob/main/CONTRIBUTING.md#scope # │ # └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|style|test -# https://github.com/angular/angular/blob/master/CONTRIBUTING.md#type +# https://github.com/angular/angular/blob/main/CONTRIBUTING.md#type # # # Commit Message Body diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8a8c0805369..82f1413b971 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,7 +94,7 @@ Before you submit your Pull Request (PR) consider the following guidelines: 5. In your forked repository, make your changes in a new git branch: ```shell - git checkout -b my-fix-branch master + git checkout -b my-fix-branch main ``` 6. Create your patch, **including appropriate test cases**. @@ -117,7 +117,7 @@ Before you submit your Pull Request (PR) consider the following guidelines: git push origin my-fix-branch ``` -11. In GitHub, send a pull request to `angular:master`. +11. In GitHub, send a pull request to `angular:main`. ### Reviewing a Pull Request @@ -181,10 +181,10 @@ After your pull request is merged, you can safely delete your branch and pull th git push origin --delete my-fix-branch ``` -* Check out the master branch: +* Check out the main branch: ```shell - git checkout master -f + git checkout main -f ``` * Delete the local branch: @@ -193,10 +193,10 @@ After your pull request is merged, you can safely delete your branch and pull th git branch -D my-fix-branch ``` -* Update your master with the latest upstream version: +* Update your local `main` with the latest upstream version: ```shell - git pull --ff upstream master + git pull --ff upstream main ``` @@ -397,7 +397,7 @@ The following documents can help you sort out issues with GitHub accounts and mu [coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md [commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit# [corporate-cla]: https://cla.developers.google.com/about/google-corporate -[dev-doc]: https://github.com/angular/angular/blob/master/docs/DEVELOPER.md +[dev-doc]: https://github.com/angular/angular/blob/main/docs/DEVELOPER.md [github]: https://github.com/angular/angular [discord]: https://discord.gg/angular [individual-cla]: https://cla.developers.google.com/about/google-individual diff --git a/README.md b/README.md index 4157a1982a0..0d274ff3783 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@

- - CI status + + CI status   Angular on npm diff --git a/aio/aio-builds-setup/docs/vm-setup--update-docker-container.md b/aio/aio-builds-setup/docs/vm-setup--update-docker-container.md index e30758207a3..4b3c35b22d4 100644 --- a/aio/aio-builds-setup/docs/vm-setup--update-docker-container.md +++ b/aio/aio-builds-setup/docs/vm-setup--update-docker-container.md @@ -6,7 +6,7 @@ Assuming you have cloned the repository containing the preview server code (as d [here](vm-setup--create-docker-image.md)), you can use the `update-preview-server.sh` script on the VM host to update the preview server based on changes in the source code. -The script will pull the latest changes from the origin's master branch and examine if there have +The script will pull the latest changes from the origin's main branch and examine if there have been any changes in files inside the preview server source code directory (see below). If there are, it will create a new image and verify that it works as expected. Finally, it will stop and remove the old docker container and image, create a new container based on the new image and start it. diff --git a/aio/aio-builds-setup/scripts/update-preview-server.sh b/aio/aio-builds-setup/scripts/update-preview-server.sh index 122d8064b5d..efe4c0d9c4e 100755 --- a/aio/aio-builds-setup/scripts/update-preview-server.sh +++ b/aio/aio-builds-setup/scripts/update-preview-server.sh @@ -25,8 +25,8 @@ readonly CONTAINER_NAME=aio readonly lastDeployedCommit=$(git rev-parse HEAD) echo "Currently at commit $lastDeployedCommit." - # Pull latest master from origin. - git pull origin master + # Pull latest main from origin. + git pull origin main # Do not update the server unless files inside `aio-builds-setup/` have changed # or the last attempt failed (identified by the provisional image still being around). diff --git a/aio/content/examples/testing/src/app/app.component.router.spec.ts b/aio/content/examples/testing/src/app/app.component.router.spec.ts index c6676a19c32..fecc510f009 100644 --- a/aio/content/examples/testing/src/app/app.component.router.spec.ts +++ b/aio/content/examples/testing/src/app/app.component.router.spec.ts @@ -1,5 +1,5 @@ // For more examples: -// https://github.com/angular/angular/blob/master/modules/@angular/router/test/integration.spec.ts +// https://github.com/angular/angular/blob/main/packages/router/test/integration.spec.ts import { waitForAsync, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; diff --git a/aio/content/examples/universal/server.ts b/aio/content/examples/universal/server.ts index 8b9339e753e..e550fb5ba79 100644 --- a/aio/content/examples/universal/server.ts +++ b/aio/content/examples/universal/server.ts @@ -15,7 +15,7 @@ export function app() { const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index'; // #docregion ngExpressEngine - // Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine) + // Our Universal express-engine (found @ https://github.com/angular/universal/tree/main/modules/express-engine) server.engine('html', ngExpressEngine({ bootstrap: AppServerModule, })); diff --git a/aio/content/guide/aot-compiler.md b/aio/content/guide/aot-compiler.md index e432b330a22..26aeeaec488 100644 --- a/aio/content/guide/aot-compiler.md +++ b/aio/content/guide/aot-compiler.md @@ -109,7 +109,7 @@ You can think of `.metadata.json` as a diagram of the overall structure of a dec

@@ -389,7 +389,7 @@ export class TypicalModule {} The Angular [`RouterModule`](api/router/RouterModule) exports two macro static methods, `forRoot` and `forChild`, to help declare root and child routes. -Review the [source code](https://github.com/angular/angular/blob/master/packages/router/src/router_module.ts#L139 "RouterModule.forRoot source code") +Review the [source code](https://github.com/angular/angular/blob/main/packages/router/src/router_module.ts#L139 "RouterModule.forRoot source code") for these methods to see how macros can simplify configuration of complex [NgModules](guide/ngmodules). diff --git a/aio/content/guide/contributors-guide-overview.md b/aio/content/guide/contributors-guide-overview.md index c469189bbff..ceeef495923 100644 --- a/aio/content/guide/contributors-guide-overview.md +++ b/aio/content/guide/contributors-guide-overview.md @@ -6,7 +6,7 @@ The topics in this section cover ways in which you can contribute to the Angular ## Before you begin -Before you get started with your contributions, we recommend that you review [Contributing to Angular](https://github.com/angular/angular/blob/master/CONTRIBUTING.md). That topic explains many of the tasks and guidelines you need to know before you make your first pull request. +Before you get started with your contributions, we recommend that you review [Contributing to Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md). That topic explains many of the tasks and guidelines you need to know before you make your first pull request. ## Contributing to Angular diff --git a/aio/content/guide/deployment.md b/aio/content/guide/deployment.md index 2b8c090edb8..55d71f192b4 100644 --- a/aio/content/guide/deployment.md +++ b/aio/content/guide/deployment.md @@ -152,7 +152,7 @@ To deploy your Angular application to [GitHub Pages](https://help.github.com/art 1. When the build is complete, make a copy of `docs/index.html` and name it `docs/404.html`. 1. Commit your changes and push. -1. On the GitHub project page, go to Settings and scroll down to the GitHub Pages section to configure the site to [publish from the docs folder](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/#publishing-your-github-pages-site-from-a-docs-folder-on-your-master-branch). +1. On the GitHub project page, go to Settings and scroll down to the GitHub Pages section to configure the site to [publish from the docs folder](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source). 1. Click Save. 1. Click on the GitHub Pages link at the top of the GitHub Pages section to see your deployed application. The format of the link is `https://.github.io/`. @@ -206,7 +206,7 @@ The list is by no means exhaustive, but should provide you with a good starting | [Nginx](https://nginx.org) | Use `try_files`, as described in [Front Controller Pattern Web Apps](https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#front-controller-pattern-web-apps), modified to serve `index.html`: try_files $uri $uri/ /index.html; | | [Ruby](https://www.ruby-lang.org) | Create a Ruby server using \([sinatra](http://sinatrarb.com)\) with a basic Ruby file that configures the server `server.rb`: require 'sinatra' # Folder structure # . # -- server.rb # -- public #    |-- project-name #        |-- index.html get '/' do   folderDir = settings.public_folder + '/project-name' # ng build output folder   send_file File.join(folderDir, 'index.html') end | | [IIS](https://www.iis.net) | Add a rewrite rule to `web.config`, similar to the one shown [here](https://stackoverflow.com/a/26152011): <system.webServer>   <rewrite>     <rules>       <rule name="Angular Routes" stopProcessing="true">         <match url=".*" />         <conditions logicalGrouping="MatchAll">           <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />           <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />         </conditions>         <action type="Rewrite" url="/index.html" />       </rule>     </rules>   </rewrite> </system.webServer> | -| [GitHub Pages](https://pages.github.com) | You can't [directly configure](https://github.com/isaacs/github/issues/408) the GitHub Pages server, but you can add a 404 page. Copy `index.html` into `404.html`. It will still be served as the 404 response, but the browser will process that page and load the application properly. It's also a good idea to [serve from `docs` on master](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/#publishing-your-github-pages-site-from-a-docs-folder-on-your-master-branch) and to [create a `.nojekyll` file](https://www.bennadel.com/blog/3181-including-node-modules-and-vendors-folders-in-your-github-pages-site.htm) | +| [GitHub Pages](https://pages.github.com) | You can't [directly configure](https://github.com/isaacs/github/issues/408) the GitHub Pages server, but you can add a 404 page. Copy `index.html` into `404.html`. It will still be served as the 404 response, but the browser will process that page and load the application properly. It's also a good idea to [serve from `docs` on main](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source) and to [create a `.nojekyll` file](https://www.bennadel.com/blog/3181-including-node-modules-and-vendors-folders-in-your-github-pages-site.htm) | | [Firebase hosting](https://firebase.google.com/docs/hosting) | Add a [rewrite rule](https://firebase.google.com/docs/hosting/url-redirects-rewrites#section-rewrites). "rewrites": [ {   "source": "**",   "destination": "/index.html" } ] | @@ -293,7 +293,7 @@ Because lazy-loaded modules aren't imported in JavaScript, bundlers exclude them Bundlers don't know about the router configuration and can't create separate bundles for lazy-loaded modules. You would have to create these bundles manually. -The CLI runs the [Angular Ahead-of-Time Webpack Plugin](https://github.com/angular/angular-cli/tree/master/packages/ngtools/webpack) which automatically recognizes lazy-loaded `NgModules` and creates separate bundles for them. +The CLI runs the [Angular Ahead-of-Time Webpack Plugin](https://github.com/angular/angular-cli/tree/main/packages/ngtools/webpack) which automatically recognizes lazy-loaded `NgModules` and creates separate bundles for them. diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md index 33270229760..c0bae0fe1a9 100644 --- a/aio/content/guide/deprecations.md +++ b/aio/content/guide/deprecations.md @@ -84,7 +84,7 @@ v14 - v17 | template syntax | [`/deep/`, `>>>`, and `::ng-deep`](#deep-component-style-selector) | unspecified | | template syntax | [`bind-`, `on-`, `bindon-`, and `ref-`](#bind-syntax) | v15 | -For information about Angular CDK and Angular Material deprecations, see the [changelog](https://github.com/angular/components/blob/master/CHANGELOG.md). +For information about Angular CDK and Angular Material deprecations, see the [changelog](https://github.com/angular/components/blob/main/CHANGELOG.md). ## Deprecated APIs @@ -225,7 +225,7 @@ It also includes deprecated API usage scenarios or API combinations, to augment Bazel builder and schematics were introduced in Angular Labs to let users try out Bazel without having to manage Bazel version and BUILD files. This feature has been deprecated. -For more information, please refer to the [migration doc](https://github.com/angular/angular/blob/master/packages/bazel/docs/BAZEL_SCHEMATICS.md). +For more information, please refer to the [migration doc](https://github.com/angular/angular/blob/main/packages/bazel/docs/BAZEL_SCHEMATICS.md). @@ -475,7 +475,7 @@ For full rationale and discussion behind this deprecation, see [RFC: Internet Ex
-**NOTE**:
+**NOTE**:
IE11 will be supported in Angular v12 LTS releases through November 2022.
diff --git a/aio/content/guide/docs-style-guide.md b/aio/content/guide/docs-style-guide.md index 4d477f0fb60..d291514c1b6 100644 --- a/aio/content/guide/docs-style-guide.md +++ b/aio/content/guide/docs-style-guide.md @@ -330,7 +330,7 @@ Unless otherwise commented, all code snippets in this page are from sample sourc
-The documentation tooling reports an error if the file identified in the path does not exist or is in the [`.git-ignore` file](https://github.com/angular/angular/blob/master/aio/content/examples/.gitignore). +The documentation tooling reports an error if the file identified in the path does not exist or is in the [`.git-ignore` file](https://github.com/angular/angular/blob/main/aio/content/examples/.gitignore). Most `.js` files are in `.git-ignore`. To include an ignored code file in your project and display it in a guide, remove it from `.git-ignore`. @@ -355,7 +355,7 @@ The following example focuses on the `AppModule` class and its `@NgModule()` met To render the above example, the HTML in the Markdown file is as follows: diff --git a/aio/content/guide/glossary.md b/aio/content/guide/glossary.md index 19d60ac9b9a..e355de47095 100644 --- a/aio/content/guide/glossary.md +++ b/aio/content/guide/glossary.md @@ -1163,8 +1163,8 @@ Learn more about zones in this [Brian Ford video][YoutubeWatchV3iqtmusceU]. [AngularBlogAPlanForVersion80AndIvyB3318dfc19f7]: https://blog.angular.io/a-plan-for-version-8-0-and-ivy-b3318dfc19f7 "A plan for version 8.0 and Ivy | Angular Blog" -[GithubAngularAngularCliTreePrimaryPackagesAngularDevkitBuildAngularSrcBuildersBrowser]: https://github.com/angular/angular-cli/tree/master/packages/angular_devkit/build_angular/src/builders/browser "packages/angular_devkit/build_angular/src/builders/browser | angular/angular-cli | GitHub" -[GithubAngularAngularCliTreePrimaryPackagesAngularDevkitBuildAngularSrcBuildersKarma]: https://github.com/angular/angular-cli/tree/master/packages/angular_devkit/build_angular/src/builders/karma "packages/angular_devkit/build_angular/src/builders/karma | angular/angular-cli | GitHub" +[GithubAngularAngularCliTreePrimaryPackagesAngularDevkitBuildAngularSrcBuildersBrowser]: https://github.com/angular/angular-cli/tree/main/packages/angular_devkit/build_angular/src/builders/browser "packages/angular_devkit/build_angular/src/builders/browser | angular/angular-cli | GitHub" +[GithubAngularAngularCliTreePrimaryPackagesAngularDevkitBuildAngularSrcBuildersKarma]: https://github.com/angular/angular-cli/tree/main/packages/angular_devkit/build_angular/src/builders/karma "packages/angular_devkit/build_angular/src/builders/karma | angular/angular-cli | GitHub" [GithubPalantirTslint]: https://palantir.github.io/tslint "TSLint | Palantir | GitHub" diff --git a/aio/content/guide/http.md b/aio/content/guide/http.md index 270fa5d2ff8..1892a8fa986 100644 --- a/aio/content/guide/http.md +++ b/aio/content/guide/http.md @@ -42,7 +42,7 @@ These `ConfigService` imports are typical. You can run the that accompanies this guide. The sample app does not require a data server. -It relies on the [Angular *in-memory-web-api*](https://github.com/angular/angular/tree/master/packages/misc/angular-in-memory-web-api), which replaces the *HttpClient* module's `HttpBackend`. +It relies on the [Angular *in-memory-web-api*](https://github.com/angular/angular/tree/main/packages/misc/angular-in-memory-web-api), which replaces the *HttpClient* module's `HttpBackend`. The replacement service simulates the behavior of a REST-like backend. Look at the `AppModule` *imports* to see how it is configured. diff --git a/aio/content/guide/i18n-common-locale-id.md b/aio/content/guide/i18n-common-locale-id.md index 02f0f736b12..17d76468dc9 100644 --- a/aio/content/guide/i18n-common-locale-id.md +++ b/aio/content/guide/i18n-common-locale-id.md @@ -72,7 +72,7 @@ To change the source locale of your project for the build, complete the followin -[GithubAngularAngularTreeMasterPackagesCommonLocales]: https://github.com/angular/angular/tree/master/packages/common/locales "angular/packages/common/locales | angular/angular | GitHub" +[GithubAngularAngularTreeMasterPackagesCommonLocales]: https://github.com/angular/angular/tree/main/packages/common/locales "angular/packages/common/locales | angular/angular | GitHub" [LocStandardsIso6392]: https://www.loc.gov/standards/iso639-2 "ISO 639-2 Registration Authority | Library of Congress" diff --git a/aio/content/guide/language-service.md b/aio/content/guide/language-service.md index 0b85f31f582..6dcc345e0cc 100644 --- a/aio/content/guide/language-service.md +++ b/aio/content/guide/language-service.md @@ -158,7 +158,7 @@ The Angular Language Services then looks at `data.---` within its context, asks ## More information -* For more in-depth information on the implementation, see the [Angular Language Service API](https://github.com/angular/angular/blob/master/packages/language-service/src/types.ts) +* For more in-depth information on the implementation, see the [Angular Language Service API](https://github.com/angular/angular/blob/main/packages/language-service/src/types.ts) * For more on the design considerations and intentions, see [design documentation here](https://github.com/angular/vscode-ng-language-service/wiki/Design) * See also [Chuck Jazdzewski's presentation](https://www.youtube.com/watch?v=ez3R0Gi4z5A&t=368s) on the Angular Language Service from [ng-conf](https://www.ng-conf.org) 2017 diff --git a/aio/content/guide/releases.md b/aio/content/guide/releases.md index ef7c6710190..0fd00857724 100644 --- a/aio/content/guide/releases.md +++ b/aio/content/guide/releases.md @@ -147,7 +147,7 @@ To help ensure that you have sufficient time and a clear path to update, this is | Deprecation stages | Details | |:--- |:--- | -| Announcement | We announce deprecated APIs and features in the [change log](https://github.com/angular/angular/blob/master/CHANGELOG.md "Angular change log"). Deprecated APIs appear in the [documentation](api?status=deprecated) with ~~strikethrough~~. When we announce a deprecation, we also announce a recommended update path. For convenience, [Deprecations](guide/deprecations) contains a summary of deprecated APIs and features. | +| Announcement | We announce deprecated APIs and features in the [change log](https://github.com/angular/angular/blob/main/CHANGELOG.md "Angular change log"). Deprecated APIs appear in the [documentation](api?status=deprecated) with ~~strikethrough~~. When we announce a deprecation, we also announce a recommended update path. For convenience, [Deprecations](guide/deprecations) contains a summary of deprecated APIs and features. | | Deprecation period | When an API or a feature is deprecated, it is still present in the next two major releases. After that, deprecated APIs and features are candidates for removal. A deprecation can be announced in any release, but the removal of a deprecated API or feature happens only in major release. Until a deprecated API or feature is removed, it is maintained according to the LTS support policy, meaning that only critical and security issues are fixed. | | npm dependencies | We only make npm dependency updates that require changes to your applications in a major release. In minor releases, we update peer dependencies by expanding the supported versions, but we do not require projects to update these dependencies until a future major version. This means that during minor Angular releases, npm dependency updates within Angular applications and libraries are optional. | @@ -157,7 +157,7 @@ To help ensure that you have sufficient time and a clear path to update, this is Angular is a collection of many packages, sub-projects, and tools. To prevent accidental use of private APIs and so that you can clearly understand what is covered by the practices described here — we document what is and is not considered our public API surface. -For details, see [Supported Public API Surface of Angular](https://github.com/angular/angular/blob/master/docs/PUBLIC_API.md "Supported Public API Surface of Angular"). +For details, see [Supported Public API Surface of Angular](https://github.com/angular/angular/blob/main/docs/PUBLIC_API.md "Supported Public API Surface of Angular"). Any changes to the public API surface are done using the versioning, support, and depreciation policies previously described. diff --git a/aio/content/guide/reviewing-content.md b/aio/content/guide/reviewing-content.md index efbf5e3bdde..5ba30c875b8 100644 --- a/aio/content/guide/reviewing-content.md +++ b/aio/content/guide/reviewing-content.md @@ -8,7 +8,7 @@ This topic describes how you can help keep Angular content up-to-date by reviewi ## Before you begin You can review content even if you've never contributed to Angular before. -However, you may find it helpful to have the [Contributing to Angular](https://github.com/angular/angular/blob/master/CONTRIBUTING.md) guide available if you're filing your first pull request in the repository. +However, you may find it helpful to have the [Contributing to Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md) guide available if you're filing your first pull request in the repository. ## Reviewing content (`@reviewed`) @@ -39,8 +39,8 @@ You can also review any topic that you like. `@reviewed 2021-03-23` 1. Read through the topic. -1. If the topic requires an update, either [file an issue](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#submit-issue) that describes the update required, or [create a pull request](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#submit-pr) with the update. -1. Update the `@reviewed` tag, either through the [GitHub user interface](guide/updating-content-github-ui) or through Angular's [standard pull request process](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#submit-pr). +1. If the topic requires an update, either [file an issue](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#submit-issue) that describes the update required, or [create a pull request](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#submit-pr) with the update. +1. Update the `@reviewed` tag, either through the [GitHub user interface](guide/updating-content-github-ui) or through Angular's [standard pull request process](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#submit-pr). diff --git a/aio/content/guide/schematics-authoring.md b/aio/content/guide/schematics-authoring.md index 7b883894b5b..fa5dac53ca8 100644 --- a/aio/content/guide/schematics-authoring.md +++ b/aio/content/guide/schematics-authoring.md @@ -95,7 +95,7 @@ For example, the hypothetical "Hello World" schematic might have the following s } -See examples of schema files for the Angular CLI command schematics in [`@schematics/angular`](https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/application/schema.json). +See examples of schema files for the Angular CLI command schematics in [`@schematics/angular`](https://github.com/angular/angular-cli/blob/main/packages/schematics/angular/application/schema.json). ### Schematic prompts diff --git a/aio/content/guide/schematics-for-libraries.md b/aio/content/guide/schematics-for-libraries.md index 6faf8c54217..a5107488cf9 100644 --- a/aio/content/guide/schematics-for-libraries.md +++ b/aio/content/guide/schematics-for-libraries.md @@ -178,7 +178,7 @@ The Schematics framework provides a file templating system, which supports both The system operates on placeholders defined inside files or paths that loaded in the input `Tree`. It fills these in using values passed into the `Rule`. -For details of these data structures and syntax, see the [Schematics README](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/README.md). +For details of these data structures and syntax, see the [Schematics README](https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/schematics/README.md). 1. Create the main file `index.ts` and add the source code for your schematic factory function. 1. First, import the schematics definitions you will need. @@ -260,7 +260,7 @@ See a complete example of the following schematic rule function. -For more information about rules and utility methods, see [Provided Rules](https://github.com/angular/angular-cli/tree/master/packages/angular_devkit/schematics#provided-rules). +For more information about rules and utility methods, see [Provided Rules](https://github.com/angular/angular-cli/tree/main/packages/angular_devkit/schematics#provided-rules). ## Running your library schematic diff --git a/aio/content/guide/schematics.md b/aio/content/guide/schematics.md index 9bc01e068d1..bbc57fa15b3 100644 --- a/aio/content/guide/schematics.md +++ b/aio/content/guide/schematics.md @@ -39,7 +39,7 @@ A JSON schema associated with a schematic tells the Angular CLI what options are These defaults can be overridden by providing a different value for an option on the command line. See [Workspace Configuration](guide/workspace-config) for information about how to change the generation option defaults for your workspace. -The JSON schemas for the default schematics used by the CLI to generate projects and parts of projects are collected in the package [`@schematics/angular`](https://github.com/angular/angular-cli/tree/master/packages/schematics/angular). +The JSON schemas for the default schematics used by the CLI to generate projects and parts of projects are collected in the package [`@schematics/angular`](https://github.com/angular/angular-cli/tree/main/packages/schematics/angular). The schema describes the options available to the CLI for each of the `ng generate` sub-commands, as shown in the `--help` output. ## Developing schematics for libraries @@ -115,7 +115,7 @@ If there are inconsistencies \(for example, if peer dependencies cannot be match We recommend that you do not force an update of all dependencies by default. Try updating specific dependencies first. -For more about how the `ng update` command works, see [Update Command](https://github.com/angular/angular-cli/blob/master/docs/specifications/update.md). +For more about how the `ng update` command works, see [Update Command](https://github.com/angular/angular-cli/blob/main/docs/specifications/update.md).
diff --git a/aio/content/guide/security.md b/aio/content/guide/security.md index cc40ccfd9d4..3e834dfc67e 100644 --- a/aio/content/guide/security.md +++ b/aio/content/guide/security.md @@ -27,7 +27,7 @@ For more information about how Google handles security issues, see [Google's sec | Practices | Details | |:--- |:--- | -| Keep current with the latest Angular library releases | We regularly update the Angular libraries, and these updates might fix security defects discovered in previous versions. Check the Angular [change log](https://github.com/angular/angular/blob/master/CHANGELOG.md) for security-related updates. | +| Keep current with the latest Angular library releases | We regularly update the Angular libraries, and these updates might fix security defects discovered in previous versions. Check the Angular [change log](https://github.com/angular/angular/blob/main/CHANGELOG.md) for security-related updates. | | Don't modify your copy of Angular | Private, customized versions of Angular tend to fall behind the current version and might not include important security fixes and enhancements. Instead, share your Angular improvements with the community and make a pull request. | | Avoid Angular APIs marked in the documentation as "*Security Risk*" | For more information, see the [Trusting safe values](guide/security#bypass-security-apis) section of this page. | diff --git a/aio/content/guide/updating-search-keywords.md b/aio/content/guide/updating-search-keywords.md index 4514248d8c4..15fb4a43657 100644 --- a/aio/content/guide/updating-search-keywords.md +++ b/aio/content/guide/updating-search-keywords.md @@ -13,7 +13,7 @@ Updating search keywords can help bring users to the content they need faster. ## Before you begin You can update search keywords for a topic even if you've never contributed to Angular before. -However, you may find it helpful to have the [Contributing to Angular](https://github.com/angular/angular/blob/master/CONTRIBUTING.md) guide available if you're filing your first pull request in the repository. +However, you may find it helpful to have the [Contributing to Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md) guide available if you're filing your first pull request in the repository. ## Updating search keywords @@ -23,7 +23,7 @@ To update search keywords: 1. Decide what search keywords you'd like to add to the topic. For information on how to format keywords, see [Search keywords format](#format). -1. Update the `@searchKeywords` tag, either through the [GitHub user interface](guide/updating-content-github-ui) or through Angular's [standard pull request process](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#submit-pr). +1. Update the `@searchKeywords` tag, either through the [GitHub user interface](guide/updating-content-github-ui) or through Angular's [standard pull request process](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#submit-pr). If a topic does not have a `@searchKeywords` tag, you can add it to the end of the topic. diff --git a/aio/content/guide/updating.md b/aio/content/guide/updating.md index 3c1d631b70d..3ab1515f30b 100644 --- a/aio/content/guide/updating.md +++ b/aio/content/guide/updating.md @@ -27,7 +27,7 @@ To be notified when new releases are available, follow [@angular](https://twitte What's new? What's changed? We share the most important things you need to know on the Angular blog in [release announcements]( https://blog.angular.io/tagged/release%20notes "Angular blog - release announcements"). -To review a complete list of changes, organized by version, see the [Angular change log](https://github.com/angular/angular/blob/master/CHANGELOG.md "Angular change log"). +To review a complete list of changes, organized by version, see the [Angular change log](https://github.com/angular/angular/blob/main/CHANGELOG.md "Angular change log"). @@ -72,7 +72,7 @@ It also describes supported update paths. [Angular blog - announcements about releases prior to August 2017](https://blog.angularjs.org/search?q=available&by-date=true "Angular blog announcements about releases prior to August 2017") * Release details: - [Angular change log](https://github.com/angular/angular/blob/master/CHANGELOG.md "Angular change log") + [Angular change log](https://github.com/angular/angular/blob/main/CHANGELOG.md "Angular change log") * Update instructions: [Angular Update Guide](https://update.angular.io/ "Angular Update Guide") diff --git a/aio/content/guide/workspace-config.md b/aio/content/guide/workspace-config.md index e6094ceae17..ec07a206203 100644 --- a/aio/content/guide/workspace-config.md +++ b/aio/content/guide/workspace-config.md @@ -118,7 +118,7 @@ Individual schematics for the default Angular CLI `ng generate` sub-commands are Specify the schematic name for a subcommand in the format `schematic-package:schematic-name`; for example, the schematic for generating a component is `@schematics/angular:component`. -The JSON schemas for the default schematics used by the CLI to generate projects and parts of projects are collected in the package [`@schematics/angular`](https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/application/schema.json). +The JSON schemas for the default schematics used by the CLI to generate projects and parts of projects are collected in the package [`@schematics/angular`](https://github.com/angular/angular-cli/blob/main/packages/schematics/angular/application/schema.json). The schema describes the options available to the CLI for each of the `ng generate` sub-commands, as shown in the `--help` output. The fields given in the schema correspond to the allowed argument values and defaults for the CLI sub-command options. @@ -138,15 +138,15 @@ See [Angular CLI Builders](guide/cli-builder). ### Default Architect builders and targets Angular defines default builders for use with specific CLI commands, or with the general `ng run` command. -The JSON schemas that define the options and defaults for each of these default builders are collected in the [`@angular-devkit/build-angular`](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/builders.json) package. +The JSON schemas that define the options and defaults for each of these default builders are collected in the [`@angular-devkit/build-angular`](https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/builders.json) package. The schemas configure options for the following builders. -* [app-shell](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/builders/app-shell/schema.json) -* [browser](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/builders/browser/schema.json) -* [dev-server](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/builders/dev-server/schema.json) -* [extract-i18n](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/builders/extract-i18n/schema.json) -* [karma](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/builders/karma/schema.json) -* [server](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/builders/server/schema.json) +* [app-shell](https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/app-shell/schema.json) +* [browser](https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/browser/schema.json) +* [dev-server](https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/dev-server/schema.json) +* [extract-i18n](https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/extract-i18n/schema.json) +* [karma](https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/karma/schema.json) +* [server](https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/server/schema.json) ### Configuring builder targets diff --git a/aio/content/guide/zone.md b/aio/content/guide/zone.md index 39a08874883..dce30cafb62 100644 --- a/aio/content/guide/zone.md +++ b/aio/content/guide/zone.md @@ -243,7 +243,7 @@ zone.run(() => { This new context, `zoneThis`, can be retrieved from the `setTimeout()` callback function, and this context is the same when the `setTimeout()` is scheduled. -To get the context, you can call [`Zone.current`](https://github.com/angular/angular/blob/master/packages/zone.js/lib/zone.ts). +To get the context, you can call [`Zone.current`](https://github.com/angular/angular/blob/main/packages/zone.js/lib/zone.ts). ## Zones and async lifecycle hooks @@ -321,7 +321,7 @@ task state changed in the zone: { microTask: false, -All of the functions of `Zone` are provided by a library called [Zone.js](https://github.com/angular/angular/tree/master/packages/zone.js/README.md). +All of the functions of `Zone` are provided by a library called [Zone.js](https://github.com/angular/angular/tree/main/packages/zone.js/README.md). This library implements those features by intercepting asynchronous APIs through monkey patching. Monkey patching is a technique to add or modify the default behavior of a function at runtime without changing the source code. @@ -336,7 +336,7 @@ This service creates a zone named `angular` to automatically trigger change dete ### NgZone `run()` and `runOutsideOfAngular()` `Zone` handles most asynchronous APIs such as `setTimeout()`, `Promise.then()`, and `addEventListener()`. -For the full list, see the [Zone Module document](https://github.com/angular/angular/blob/master/packages/zone.js/MODULE.md). +For the full list, see the [Zone Module document](https://github.com/angular/angular/blob/main/packages/zone.js/MODULE.md). Therefore in those asynchronous APIs, you don't need to trigger change detection manually. There are still some third party APIs that Zone does not handle. @@ -431,7 +431,7 @@ import 'zone.js'; // Included with Angular CLI. -For more information about what you can configure, see the [Zone.js](https://github.com/angular/angular/tree/master/packages/zone.js) documentation. +For more information about what you can configure, see the [Zone.js](https://github.com/angular/angular/tree/main/packages/zone.js) documentation. ### NoopZone diff --git a/aio/content/marketing/contribute.html b/aio/content/marketing/contribute.html index 0b6e5bd01cc..105b6783b22 100644 --- a/aio/content/marketing/contribute.html +++ b/aio/content/marketing/contribute.html @@ -17,7 +17,7 @@ - + Contribute @@ -31,7 +31,7 @@ - + Contribute @@ -45,7 +45,7 @@ - + Contribute diff --git a/aio/content/marketing/docs.md b/aio/content/marketing/docs.md index d71fa49d0e5..4dbd1c569c6 100644 --- a/aio/content/marketing/docs.md +++ b/aio/content/marketing/docs.md @@ -49,7 +49,7 @@ We want to hear from you. [Report problems or submit suggestions for future docs Contribute to Angular docs by creating [pull requests](https://github.com/angular/angular/pulls "Angular Github pull requests") on the Angular Github repository. -See [Contributing to Angular](https://github.com/angular/angular/blob/master/CONTRIBUTING.md "Contributing guide") +See [Contributing to Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md "Contributing guide") for information about submission guidelines. Our community values respectful, supportive communication. diff --git a/aio/content/tutorial/toh-pt6.md b/aio/content/tutorial/toh-pt6.md index faccb63c444..ece73349126 100644 --- a/aio/content/tutorial/toh-pt6.md +++ b/aio/content/tutorial/toh-pt6.md @@ -27,7 +27,7 @@ Next, still in the `AppModule`, add `HttpClientModule` to the `imports` array: ## Simulate a data server -This tutorial sample mimics communication with a remote data server by using the [In-memory Web API](https://github.com/angular/angular/tree/master/packages/misc/angular-in-memory-web-api "In-memory Web API") module. +This tutorial sample mimics communication with a remote data server by using the [In-memory Web API](https://github.com/angular/angular/tree/main/packages/misc/angular-in-memory-web-api "In-memory Web API") module. After installing the module, the application will make requests to and receive responses from the `HttpClient` without knowing that the *In-memory Web API* is intercepting those requests, applying them to an in-memory data store, and returning simulated responses. diff --git a/aio/firebase.json b/aio/firebase.json index a340f9e1172..afd4d6a7663 100644 --- a/aio/firebase.json +++ b/aio/firebase.json @@ -60,7 +60,7 @@ {"type": 301, "source": "/docs/*/latest/quickstart.html", "destination": "/start"}, {"type": 301, "source": "/docs/*/latest/guide/server-communication.html", "destination": "/guide/http"}, {"type": 301, "source": "/docs/*/latest/guide/style-guide.html", "destination": "/guide/styleguide"}, - {"type": 301, "source": "/guide/bazel", "destination": "https://github.com/angular/angular/blob/master/packages/bazel/docs/BAZEL_SCHEMATICS.md"}, + {"type": 301, "source": "/guide/bazel", "destination": "https://github.com/angular/angular/blob/main/packages/bazel/docs/BAZEL_SCHEMATICS.md"}, {"type": 301, "source": "/guide", "destination": "/docs"}, {"type": 301, "source": "/guide/cli-quickstart", "destination": "/start"}, {"type": 301, "source": "/guide/i18n", "destination": "/guide/i18n-overview"}, @@ -70,7 +70,7 @@ {"type": 301, "source": "/guide/webpack", "destination": "https://v5.angular.io/guide/webpack"}, {"type": 301, "source": "/guide/setup", "destination": "/guide/setup-local"}, {"type": 301, "source": "/guide/setup-systemjs-anatomy", "destination": "/guide/file-structure"}, - {"type": 301, "source": "/guide/change-log", "destination": "https://github.com/angular/angular/blob/master/CHANGELOG.md"}, + {"type": 301, "source": "/guide/change-log", "destination": "https://github.com/angular/angular/blob/main/CHANGELOG.md"}, {"type": 301, "source": "/guide/quickstart", "destination": "/start"}, {"type": 301, "source": "/getting-started", "destination": "/start"}, {"type": 301, "source": "/getting-started/:rest*", "destination": "/start/:rest*"}, diff --git a/aio/scripts/check-environment.js b/aio/scripts/check-environment.js index cd571b64ac5..a0cd387b0b5 100644 --- a/aio/scripts/check-environment.js +++ b/aio/scripts/check-environment.js @@ -34,7 +34,7 @@ try { console.error( 'Your environment doesn\'t provide the prerequisite dependencies.\n' + 'Please fix the issues listed above and then rerun the command.\n' + - 'Check out https://github.com/angular/angular/blob/master/aio/README.md for more info.'); + 'Check out https://github.com/angular/angular/blob/main/aio/README.md for more info.'); process.exit(1); } diff --git a/aio/scripts/deploy-to-firebase/index.mjs b/aio/scripts/deploy-to-firebase/index.mjs index 5901762861d..3481066fc75 100644 --- a/aio/scripts/deploy-to-firebase/index.mjs +++ b/aio/scripts/deploy-to-firebase/index.mjs @@ -27,7 +27,7 @@ * | deploying | RC | - | rc | * | from? | | | redirectVersionDomainToRc(*) | * | |--------|---------------------------------|---------------------------------| - * | | main | next | next | + * | | MAIN | next | next | * | | | redirectVersionDomainToNext(**) | redirectVersionDomainToNext(**) | * |-----------|--------|---------------------------------|---------------------------------| * diff --git a/aio/tests/deployment/shared/URLS_TO_REDIRECT.txt b/aio/tests/deployment/shared/URLS_TO_REDIRECT.txt index 5c3b5751002..64d230e3e53 100644 --- a/aio/tests/deployment/shared/URLS_TO_REDIRECT.txt +++ b/aio/tests/deployment/shared/URLS_TO_REDIRECT.txt @@ -199,8 +199,8 @@ /getting-started/data --> /start/start-data /getting-started/forms --> /start/start-forms /getting-started/deployment --> /start/start-deployment -/guide/bazel --> https://github.com/angular/angular/blob/master/packages/bazel/docs/BAZEL_SCHEMATICS.md -/guide/change-log --> https://github.com/angular/angular/blob/master/CHANGELOG.md +/guide/bazel --> https://github.com/angular/angular/blob/main/packages/bazel/docs/BAZEL_SCHEMATICS.md +/guide/change-log --> https://github.com/angular/angular/blob/main/CHANGELOG.md /guide/cli-quickstart --> /start /guide/displaying-data --> /start#template-syntax /guide/i18n --> /guide/i18n-overview diff --git a/aio/tools/transforms/angular-api-package/tag-defs/nocollapse.js b/aio/tools/transforms/angular-api-package/tag-defs/nocollapse.js index 71c62ca5362..b23ee66b8ed 100644 --- a/aio/tools/transforms/angular-api-package/tag-defs/nocollapse.js +++ b/aio/tools/transforms/angular-api-package/tag-defs/nocollapse.js @@ -1,6 +1,6 @@ // A fake annotation to prevent Closure compiler from modifying the // associated code. -// See https://github.com/angular/angular/blob/master/packages/compiler-cli/src/transformers/nocollapse_hack.ts +// See https://github.com/angular/angular/blob/main/packages/compiler-cli/src/transformers/nocollapse_hack.ts // We must provide a tag-def for it or the doc-gen will error. module.exports = function() { return {name: 'nocollapse'}; diff --git a/aio/tools/transforms/cli-docs-package/extract-cli-commands.js b/aio/tools/transforms/cli-docs-package/extract-cli-commands.js index 13eed587965..ab62d411d78 100644 --- a/aio/tools/transforms/cli-docs-package/extract-cli-commands.js +++ b/aio/tools/transforms/cli-docs-package/extract-cli-commands.js @@ -2,7 +2,7 @@ const {resolve} = require('canonical-path'); const sh = require('shelljs'); const {CONTENTS_PATH} = require('../config'); -const cliGitRef = process.argv[2] || 'master'; // Can be a branch, commit or tag. +const cliGitRef = process.argv[2] || 'main'; // Can be a branch, commit or tag. const pkgContent = JSON.stringify({ dependencies: { '@angular/cli': `https://github.com/angular/cli-builds#${cliGitRef}`, diff --git a/devtools/CONTRIBUTING.md b/devtools/CONTRIBUTING.md index 9e1c86f07b3..82f692df39b 100644 --- a/devtools/CONTRIBUTING.md +++ b/devtools/CONTRIBUTING.md @@ -69,7 +69,7 @@ Before you submit your Pull Request (PR) consider the following guidelines: - In your forked repository, make your changes in a new git branch: ```shell - git checkout -b my-fix-branch master + git checkout -b my-fix-branch main ``` - Create your patch, **including appropriate test cases**. @@ -90,7 +90,7 @@ Before you submit your Pull Request (PR) consider the following guidelines: git push origin my-fix-branch ``` -- In GitHub, send a pull request to `angular:master`. +- In GitHub, send a pull request to `angular:main`. - If we suggest changes then: - Make the required updates. @@ -98,7 +98,7 @@ Before you submit your Pull Request (PR) consider the following guidelines: - Rebase your branch and force push to your GitHub repository (this will update your Pull Request): ```shell - git rebase master -i + git rebase upstream/main -i git push -f ``` @@ -107,7 +107,7 @@ That's it! Thank you for your contribution! #### After your pull request is merged After your pull request is merged, you can safely delete your branch and pull the changes -from the master (upstream) repository: +from the upstream repository: - Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: @@ -115,10 +115,10 @@ from the master (upstream) repository: git push origin --delete my-fix-branch ``` -- Check out the master branch: +- Check out the main branch: ```shell - git checkout master -f + git checkout main -f ``` - Delete the local branch: @@ -127,10 +127,10 @@ from the master (upstream) repository: git branch -D my-fix-branch ``` -- Update your master with the latest upstream version: +- Update your local `main` with the latest upstream version: ```shell - git pull --ff upstream master + git pull --ff upstream main ``` ## Coding Rules @@ -166,7 +166,7 @@ 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. -Samples: (even more [samples](https://github.com/angular/angular/commits/master/devtools)) +Samples: (even more [samples](https://github.com/angular/angular/commits/main/devtools)) ``` docs(changelog): update change log to beta.5 diff --git a/devtools/projects/ng-devtools-backend/README.md b/devtools/projects/ng-devtools-backend/README.md index 192741e2e50..de5c5260cbe 100644 --- a/devtools/projects/ng-devtools-backend/README.md +++ b/devtools/projects/ng-devtools-backend/README.md @@ -5,7 +5,7 @@ This library was generated with [Angular CLI](https://github.com/angular/angular ## Code scaffolding Run `ng generate component component-name --project ng-devtools-backend` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ng-devtools-backend`. -> Note: Don't forget to add `--project ng-devtools-backend` or else it will be added to the default project in your `angular.json` file. +> Note: Don't forget to add `--project ng-devtools-backend` or else it will be added to the default project in your `angular.json` file. ## Build @@ -21,4 +21,4 @@ Run `ng test ng-devtools-backend` to execute the unit tests via [Karma](https:// ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/devtools/projects/ng-devtools/README.md b/devtools/projects/ng-devtools/README.md index 3cba6524815..37bc538c1b4 100644 --- a/devtools/projects/ng-devtools/README.md +++ b/devtools/projects/ng-devtools/README.md @@ -5,7 +5,7 @@ This library was generated with [Angular CLI](https://github.com/angular/angular ## Code scaffolding Run `ng generate component component-name --project ng-devtools` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ng-devtools`. -> Note: Don't forget to add `--project ng-devtools` or else it will be added to the default project in your `angular.json` file. +> Note: Don't forget to add `--project ng-devtools` or else it will be added to the default project in your `angular.json` file. ## Build @@ -21,4 +21,4 @@ Run `ng test ng-devtools` to execute the unit tests via [Karma](https://karma-ru ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/devtools/projects/protocol/README.md b/devtools/projects/protocol/README.md index 6a18baf0185..03ae622be01 100644 --- a/devtools/projects/protocol/README.md +++ b/devtools/projects/protocol/README.md @@ -5,7 +5,7 @@ This library was generated with [Angular CLI](https://github.com/angular/angular ## Code scaffolding Run `ng generate component component-name --project protocol` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project protocol`. -> Note: Don't forget to add `--project protocol` or else it will be added to the default project in your `angular.json` file. +> Note: Don't forget to add `--project protocol` or else it will be added to the default project in your `angular.json` file. ## Build @@ -21,4 +21,4 @@ Run `ng test protocol` to execute the unit tests via [Karma](https://karma-runne ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/devtools/projects/shared-utils/README.md b/devtools/projects/shared-utils/README.md index e9053181dff..c795428c013 100644 --- a/devtools/projects/shared-utils/README.md +++ b/devtools/projects/shared-utils/README.md @@ -22,4 +22,4 @@ Run `ng test shared-utils` to execute the unit tests via [Karma](https://karma-r ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/docs/BRANCHES.md b/docs/BRANCHES.md index e4270c1abcc..b3b7a1d445a 100644 --- a/docs/BRANCHES.md +++ b/docs/BRANCHES.md @@ -17,8 +17,8 @@ distribution tags](https://docs.npmjs.com/cli/v6/commands/npm-dist-tag#purpose) ## Branch naming -Angular's main branch is `master`. This branch always represents the absolute latest changes. The -code on master always represents a pre-release version, often published with the `next` tag on npm. +Angular's main branch is `main`. This branch always represents the absolute latest changes. The +code on `main` always represents a pre-release version, often published with the `next` tag on npm. For each minor and major version increment, a new branch is created. These branches use a naming scheme matching `\d+\.\d+\.x` and receive subsequent patch changes for that version range. For @@ -32,17 +32,17 @@ Angular releases a major version roughly every six months. Following a major rel through a consistent lifecycle to the next major release, and repeat. At a high level, this process proceeds as follows: -* A major release occurs. The `master` branch now represents the next minor version. -* Six weeks later, a minor release occurs. The `master` branch now represents the next minor +* A major release occurs. The `main` branch now represents the next minor version. +* Six weeks later, a minor release occurs. The `main` branch now represents the next minor version. -* Six weeks later, a second minor release occurs. The `master` branch now represents the next major +* Six weeks later, a second minor release occurs. The `main` branch now represents the next major version. * Three months later, a major release occurs and the process repeats. ### Example -* Angular publishes `11.0.0`. At this point in time, the `master` branch represents `11.1.0`. -* Six weeks later, we publish `11.1.0` and `master` represents `11.2.0`. -* Six weeks later, we publish `11.2.0` and `master` represents `12.0.0`. +* Angular publishes `11.0.0`. At this point in time, the `main` branch represents `11.1.0`. +* Six weeks later, we publish `11.1.0` and `main` represents `11.2.0`. +* Six weeks later, we publish `11.2.0` and `main` represents `12.0.0`. * Three months later, this cycle repeats with the publication of `12.0.0`. ### Feature freeze and release candidates @@ -50,11 +50,11 @@ process proceeds as follows: Before publishing minor and major versions as `latest` on npm, they go through a feature freeze and a release candidate (RC) phase. -**Feature freeze** means that `master` is forked into a branch for a specific version, with no +**Feature freeze** means that `main` is forked into a branch for a specific version, with no additional features permitted before releasing as `latest` to npm. This branch becomes the **active -RC branch**. Upon branching, the `master` branch increments to the next minor or major pre-release +RC branch**. Upon branching, the `main` branch increments to the next minor or major pre-release version. One week after feature freeze, the first RC is published with the `next` tag on npm from -the active RC branch. Patch bug fixes continue to merge into `master`, the active RC branch, and +the active RC branch. Patch bug fixes continue to merge into `main`, the active RC branch, and the active patch branch during this entire period. One to three weeks after publishing the first RC, the active RC branch is published as `latest` on @@ -68,14 +68,14 @@ Every pull request has a **base branch**: ![Screenshot of a GitHub PR with the base branch highlighted](./images/pr-base-branch-screenshot.png) This base branch represents the latest branch that will receive the change. Most pull requests -should specify `master`. However, some changes will explicitly use an earlier branch, such as +should specify `main`. However, some changes will explicitly use an earlier branch, such as `11.1.x`, in order to patch an older version. Specific GitHub labels, described below, control the additional branches into which a pull request will be cherry-picked. ### Labelling pull requests There are five labels that target PRs to versions: - + | Label | Description | |---------------|-----------------------------------------------------------------------------| | target: major | A change that includes a backwards-incompatible behavior or API change. | @@ -92,17 +92,17 @@ The vast majority of pull requests will target `major`, `minor`, or `patch` base the code change. In rare cases, a pull request will specify `target: rc` or `target: lts` to explicitly target a special branch. -Breaking changes, marked with `target: major`, can only be merged when `master` represents the next +Breaking changes, marked with `target: major`, can only be merged when `main` represents the next major version. ### Pull request examples -| I want to... | Target branch | Target label | Your change will land in... | -|-------------------------------------------------------------|-------------------------|--------------|------------------------------------------------------------------------------------------------------------------------------| -| Make a non-breaking bug fix | `master` | `patch` | `master`, the active patch branch, and the active RC branch if there is one | -| Introduce a new feature | `master` | `minor` | `master` (any time) | -| Make a breaking change | `master` | `major` | `master` (only when `master` represents the next major version) | -| Make a critical security fix | `master` | `lts` | `master`, the active patch branch, the active RC branch if there is one, and all branches for versions within the LTS window | -| Bump the version of an RC | the active RC branch | `rc` | The active RC branch | -| Fix an RC bug for a major release feature | `master` | `rc` | `master` and the active RC branch | -| Backport a bug fix to the `latest` npm version during an RC | the active patch branch | `patch` | the active patch branch only | +| I want to... | Target branch | Target label | Your change will land in... | +| ----------------------------------------------------------- | ----------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------- | +| Make a non-breaking bug fix | `main` | `patch` | `main`, the active patch branch, and the active RC branch if there is one | +| Introduce a new feature | `main` | `minor` | `main` (any time) | +| Make a breaking change | `main` | `major` | `main` (only when `main` represents the next major version) | +| Make a critical security fix | `main` | `lts` | `main`, the active patch branch, the active RC branch if there is one, and all branches for versions within the LTS window | +| Bump the version of an RC | the active RC branch | `rc` | The active RC branch | +| Fix an RC bug for a major release feature | `main` | `rc` | `main` and the active RC branch | +| Backport a bug fix to the `latest` npm version during an RC | the active patch branch | `patch` | the active patch branch only | diff --git a/docs/COMMITTER.md b/docs/COMMITTER.md index 59a058a63c1..6bae5141585 100644 --- a/docs/COMMITTER.md +++ b/docs/COMMITTER.md @@ -12,7 +12,7 @@ Change approvals in our monorepo are managed via [PullApprove](https://docs.pull # Merging Once a change has all of the required approvals, either the last approver or the PR author (if PR author has the project collaborator status) -should mark the PR with the `action: merge` label and the correct [target label](https://github.com/angular/angular/blob/master/docs/TRIAGE_AND_LABELS.md#pr-target). +should mark the PR with the `action: merge` label and the correct [target label](https://github.com/angular/angular/blob/main/docs/TRIAGE_AND_LABELS.md#pr-target). This signals to the caretaker that the PR should be merged. See [merge instructions](CARETAKER.md). # Who is the Caretaker? diff --git a/docs/DEVELOPER.md b/docs/DEVELOPER.md index c3301c0e868..79213fffe11 100644 --- a/docs/DEVELOPER.md +++ b/docs/DEVELOPER.md @@ -13,7 +13,7 @@ It also explains the basic mechanics of using `git`, `node`, and `yarn`. * [Publishing Snapshot Builds](#publishing-snapshot-builds) * [Bazel Support](#bazel-support) -See the [contribution guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md) +See the [contribution guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md) if you'd like to contribute to Angular. ## Prerequisite Software @@ -113,7 +113,7 @@ Angular uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to for If the source code is not properly formatted, the CI will fail and the PR cannot be merged. You can automatically format your code by running: -- `yarn ng-dev format changed [shaOrRef]`: format only files changed since the provided sha/ref. `shaOrRef` defaults to `master`. +- `yarn ng-dev format changed [shaOrRef]`: format only files changed since the provided sha/ref. `shaOrRef` defaults to `main`. - `yarn ng-dev format all`: format _all_ source code - `yarn ng-dev format files `: format only provided files diff --git a/docs/SAVED_REPLIES.md b/docs/SAVED_REPLIES.md index 6d801b945fd..5b247038bd5 100644 --- a/docs/SAVED_REPLIES.md +++ b/docs/SAVED_REPLIES.md @@ -34,7 +34,7 @@ Thanks for reporting this issue. However this issue is a duplicate of an existin ## Angular: Insufficient Information Provided (v2) ``` -Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out [our submission guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#submit-issue) to understand why we can't act on issues that are lacking important information. +Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out [our submission guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#submit-issue) to understand why we can't act on issues that are lacking important information. If the problem still exists in your application, please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template. @@ -69,5 +69,5 @@ If the problem still exists in your application, please [open a new issue](https ``` Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on [StackOverflow](https://stackoverflow.com/) using tag `angular`. -If you are wondering why we don't resolve support issues via the issue tracker, please [check out this explanation](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question). +If you are wondering why we don't resolve support issues via the issue tracker, please [check out this explanation](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#question). ``` diff --git a/docs/TRIAGE_AND_LABELS.md b/docs/TRIAGE_AND_LABELS.md index 0f535698a6d..82891105288 100644 --- a/docs/TRIAGE_AND_LABELS.md +++ b/docs/TRIAGE_AND_LABELS.md @@ -162,7 +162,7 @@ When a PR is ready for review, a review should be requested using the Reviewers ## PR Target -In our git workflow, we merge changes either to the `master` branch, the active patch branch (e.g. `5.0.x`), or to both. +In our git workflow, we merge changes either to the `main` branch, the active patch branch (e.g. `5.0.x`), or to both. The decision about the target must be done by the PR author and/or reviewer. This decision is then honored when the PR is being merged by the caretaker. @@ -183,7 +183,7 @@ Special Cases: Notes: - To land a change only in a patch/RC branch, without landing it in any other active release-train branch (such - as `master`), the patch/RC branch can be targeted in the GitHub UI with the appropriate + as `main`), the patch/RC branch can be targeted in the GitHub UI with the appropriate `target: patch`/`target: rc` label. - `target: lts` PRs must target the specific LTS branch they would need to merge into in the GitHub UI, in cases which a change is desired in multiple LTS branches, individual PRs for each LTS branch must be created @@ -214,7 +214,7 @@ Only the `action: merge` label means that the PR is ready for merging. Managed by googlebot. Indicates whether a PR has a CLA on file for its author(s). -Only issues with `cla:yes` should be merged into master. +Only issues with `cla:yes` should be merged into main. ### `aio: preview` * _**Who adds it:** Any team member. (Typically the author or a reviewer.)_ diff --git a/integration/README.md b/integration/README.md index 9479ab7e18a..f0066da7393 100644 --- a/integration/README.md +++ b/integration/README.md @@ -167,10 +167,10 @@ See: https://stackoverflow.com/questions/50642308/webdriverexception-unknown-err If size regression occurs, one way to debug is to get a build which shows the code before and after. Here are the steps to do that. -1. Check out both the `master` branch as well as your change (let's refer to it as `change` branch) into two different working locations. (A suggested way to do this is using `git worktree`.) -2. In both `master` and `change` locations update the failing tests `package.json` with `NG_BUILD_DEBUG_OPTIMIZE=minify` environment variable so that the resulting build would contain a human readable but optimized output. As an example: +1. Check out both the `main` branch as well as your change (let's refer to it as `change` branch) into two different working locations. (A suggested way to do this is using `git worktree`.) +2. In both `main` and `change` locations update the failing tests `package.json` with `NG_BUILD_DEBUG_OPTIMIZE=minify` environment variable so that the resulting build would contain a human readable but optimized output. As an example: - Open `integration/cli-hello-world/package.json` and prefix `NG_BUILD_DEBUG_OPTIMIZE=minify` into the `build` rule. Resulting in something like: `"build": "NG_BUILD_DEBUG_OPTIMIZE=minify ng build --prod",` - Run `bazel test //integration/cli-hello-world:test --test_output=streamed --cache_test_results=no` to run the test. - Open the test temporary directory as printed out by Bazel. - - Diff the `master` vs `change` to see the differences. `myDiffTool change/integration/cli-hello-world/dist/main-es2015.*.js master/integration/cli-hello-world/dist/main-es2015.*.js` - - The above should give you a better understanding as to what has changed and what is causing the regression. \ No newline at end of file + - Diff the `main` vs `change` to see the differences. `myDiffTool change/integration/cli-hello-world/dist/main-es2015.*.js main/integration/cli-hello-world/dist/main-es2015.*.js` + - The above should give you a better understanding as to what has changed and what is causing the regression. diff --git a/integration/animations/README.md b/integration/animations/README.md index 0654121da52..624985a1067 100644 --- a/integration/animations/README.md +++ b/integration/animations/README.md @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protra ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/integration/cli-hello-world-ivy-compat/README.md b/integration/cli-hello-world-ivy-compat/README.md index bbd445ee656..5591e2f216e 100644 --- a/integration/cli-hello-world-ivy-compat/README.md +++ b/integration/cli-hello-world-ivy-compat/README.md @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protra ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/integration/cli-hello-world-ivy-minimal/README.md b/integration/cli-hello-world-ivy-minimal/README.md index 0ec74d010b1..c412ac58e92 100644 --- a/integration/cli-hello-world-ivy-minimal/README.md +++ b/integration/cli-hello-world-ivy-minimal/README.md @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protra ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/integration/cli-hello-world-mocha/README.md b/integration/cli-hello-world-mocha/README.md index 3442175b433..17ac293e973 100644 --- a/integration/cli-hello-world-mocha/README.md +++ b/integration/cli-hello-world-mocha/README.md @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protra ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/integration/cli-hello-world/README.md b/integration/cli-hello-world/README.md index 3442175b433..17ac293e973 100644 --- a/integration/cli-hello-world/README.md +++ b/integration/cli-hello-world/README.md @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protra ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/integration/forms/README.md b/integration/forms/README.md index a625d1f0914..3e8906dd2e0 100644 --- a/integration/forms/README.md +++ b/integration/forms/README.md @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protra ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/integration/ivy-i18n/README.md b/integration/ivy-i18n/README.md index c6a21334700..8172880abdf 100644 --- a/integration/ivy-i18n/README.md +++ b/integration/ivy-i18n/README.md @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protra ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/integration/ng_update_migrations/README.md b/integration/ng_update_migrations/README.md index ebef9378a67..b1b66d97e23 100644 --- a/integration/ng_update_migrations/README.md +++ b/integration/ng_update_migrations/README.md @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protra ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/integration/standalone-bootstrap/README.md b/integration/standalone-bootstrap/README.md index 599a7bed317..ccf35273fb7 100644 --- a/integration/standalone-bootstrap/README.md +++ b/integration/standalone-bootstrap/README.md @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protra ## Further help -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). diff --git a/packages/bazel/src/ng_module/ng_module.bzl b/packages/bazel/src/ng_module/ng_module.bzl index 472bae0a448..04bc4462df7 100644 --- a/packages/bazel/src/ng_module/ng_module.bzl +++ b/packages/bazel/src/ng_module/ng_module.bzl @@ -635,7 +635,7 @@ NG_MODULE_RULE_ATTRS = dict(dict(COMMON_ATTRIBUTES, **NG_MODULE_ATTRIBUTES), **{ # Later packaging rules will point to these generated files as the entry point # into the package. # See the flatModuleOutFile documentation in - # https://github.com/angular/angular/blob/master/packages/compiler-cli/src/transformers/api.ts + # https://github.com/angular/angular/blob/main/packages/compiler-cli/src/transformers/api.ts "flat_module_out_file": attr.string(), # Should the rule generate ngfactory and ngsummary shim files? "generate_ve_shims": attr.bool(default = False), diff --git a/packages/benchpress/package.json b/packages/benchpress/package.json index f760f867de9..0d313f30a75 100644 --- a/packages/benchpress/package.json +++ b/packages/benchpress/package.json @@ -19,7 +19,7 @@ "bugs": { "url": "https://github.com/angular/angular/issues" }, - "homepage": "https://github.com/angular/angular/tree/master/packages/compiler-cli", + "homepage": "https://github.com/angular/angular/tree/main/packages/benchpress", "publishConfig": { "registry": "https://wombat-dressing-room.appspot.com" } diff --git a/packages/compiler-cli/package.json b/packages/compiler-cli/package.json index 7c9f335e3ce..64d4342367d 100644 --- a/packages/compiler-cli/package.json +++ b/packages/compiler-cli/package.json @@ -84,7 +84,7 @@ "bugs": { "url": "https://github.com/angular/angular/issues" }, - "homepage": "https://github.com/angular/angular/tree/master/packages/compiler-cli", + "homepage": "https://github.com/angular/angular/tree/main/packages/compiler-cli", "ng-update": { "packageGroup": "NG_UPDATE_PACKAGE_GROUP" } diff --git a/packages/core/test/render3/load_domino.ts b/packages/core/test/render3/load_domino.ts index 7a53b9a7dd5..5fec458115b 100644 --- a/packages/core/test/render3/load_domino.ts +++ b/packages/core/test/render3/load_domino.ts @@ -8,6 +8,7 @@ // Needed to run animation tests import '@angular/compiler'; // For JIT mode. Must be in front of any other @angular/* imports. + import {ɵgetDOM as getDOM} from '@angular/common'; import {DominoAdapter} from '@angular/platform-server/src/domino_adapter'; @@ -24,7 +25,7 @@ if (typeof window == 'undefined') { (global as any).Event = null; // For animation tests, see - // https://github.com/angular/angular/blob/master/packages/animations/browser/src/render/shared.ts#L140 + // https://github.com/angular/angular/blob/main/packages/animations/browser/src/render/shared.ts#L140 (global as any).Element = domino.impl.Element; (global as any).isBrowser = false; (global as any).isNode = true; diff --git a/packages/misc/angular-in-memory-web-api/README.md b/packages/misc/angular-in-memory-web-api/README.md index e2eb48b07a7..7ef59e82af6 100644 --- a/packages/misc/angular-in-memory-web-api/README.md +++ b/packages/misc/angular-in-memory-web-api/README.md @@ -5,18 +5,18 @@ that emulates CRUD operations over a RESTy API. It intercepts Angular `Http` and `HttpClient` requests that would otherwise go to the remote server and redirects them to an in-memory data store that you control. -See [Austin McDaniel's article](https://medium.com/@amcdnl/mocking-with-angular-more-than-just-unit-testing-cbb7908c9fcc) +See [Austin McDaniel's article](https://medium.com/@amcdnl/mocking-with-angular-more-than-just-unit-testing-cbb7908c9fcc) for a quick introduction. _This package used to live [in its own repository](https://github.com/angular/in-memory-web-api)._ ### _It used to work and now it doesn't :-(_ -Perhaps you installed a new version of this library? Check the -[CHANGELOG.md](https://github.com/angular/angular/blob/master/packages/misc/angular-in-memory-web-api/CHANGELOG.md) +Perhaps you installed a new version of this library? Check the +[CHANGELOG.md](https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/CHANGELOG.md) for breaking changes that may have affected your app. -If that doesn't explain it, create an +If that doesn't explain it, create an [issue on github](https://github.com/angular/angular/issues), preferably with a small repro. @@ -30,7 +30,7 @@ You won't have to build and start a test server. * Share examples with the community in a web coding environment such as Plunker or CodePen. Create Angular issues and StackOverflow answers supported by live code. -* Simulate operations against data collections that aren't yet implemented on your dev/test server. +* Simulate operations against data collections that aren't yet implemented on your dev/test server. You can pass requests thru to the dev/test server for collections that are supported. * Write unit test apps that read and write data. @@ -44,25 +44,25 @@ This can be especially useful for CI (continuous integration) builds. >**LIMITATIONS** > ->The _in-memory-web-api_ exists primarily to support the +>The _in-memory-web-api_ exists primarily to support the [Angular documentation](https://angular.io/docs/ts/latest/ "Angular documentation web site"). It is not supposed to emulate every possible real world web API and is not intended for production use. > ->Most importantly, it is ***always experimental***. -We will make breaking changes and we won't feel bad about it -because this is a development tool, not a production product. +>Most importantly, it is ***always experimental***. +We will make breaking changes and we won't feel bad about it +because this is a development tool, not a production product. We do try to tell you about such changes in the `CHANGELOG.md` and we fix bugs as fast as we can. ## HTTP request handling -This in-memory web api service processes an HTTP request and +This in-memory web api service processes an HTTP request and returns an `Observable` of HTTP `Response` object in the manner of a RESTy web api. It natively handles URI patterns in the form `:base/:collectionName/:id?` Examples: ```ts - // for requests to an `api` base URL that gets heroes from a 'heroes' collection + // for requests to an `api` base URL that gets heroes from a 'heroes' collection GET api/heroes // all heroes GET api/heroes/42 // the hero with id=42 GET api/heroes?name=^j // 'j' is a regex; returns heroes whose name starting with 'j' or 'J' @@ -77,7 +77,7 @@ The in-memory web api service processes these requests against a "database" - a Create an `InMemoryDataService` class that implements `InMemoryDbService`. -At minimum it must implement `createDb` which +At minimum it must implement `createDb` which creates a "database" hash whose keys are collection names and whose values are arrays of collection objects to return or update. For example: @@ -107,7 +107,7 @@ Return the database _object_, an _observable_ of that object, or a _promise_ of * The in-memory web api calls your `InMemoryDbService` data service class's `createDb` method on two occasions. - 1. when it handles the _first_ HTTP request + 1. when it handles the _first_ HTTP request 1. when it receives a `resetdb` [command](#commands). In the command case, the service passes in a `RequestInfo` object, @@ -137,7 +137,7 @@ export class AppModule { ... } **_Notes_** -* Always import the `HttpClientInMemoryWebApiModule` _after_ the `HttpClientModule` +* Always import the `HttpClientInMemoryWebApiModule` _after_ the `HttpClientModule` to ensure that the in-memory backend provider supersedes the Angular version. * You can setup the in-memory web api within a lazy loaded feature module by calling the `.forFeature` method as you would `.forRoot`. @@ -154,12 +154,12 @@ CLI-based apps can exclude the provider in production builds like this: ``` # Examples -The [tests](https://github.com/angular/angular/blob/master/packages/misc/angular-in-memory-web-api/test) +The [tests](https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/test) are a good place to learn how to setup and use this in-memory web api library. See also the example source code in the official Angular.io documentation such as the [HttpClient](https://angular.io/guide/http) guide and the -[Tour of Heroes](https://angular.io/tutorial/toh-pt6). +[Tour of Heroes](https://angular.io/tutorial/toh-pt6). # Advanced Features Some features are not readily apparent in the basic usage described above. @@ -187,10 +187,10 @@ See the `handleRequest` method implementation for details. ## Default delayed response -By default this service adds a 500ms delay +By default this service adds a 500ms delay to all data requests to simulate round-trip latency. ->[Command requests](#commands) have zero added delay as they concern +>[Command requests](#commands) have zero added delay as they concern in-memory service configuration and do not emulate real data requests. You can change or eliminate the latency by setting a different `delay` value: @@ -200,7 +200,7 @@ You can change or eliminate the latency by setting a different `delay` value: ``` ## Simple query strings -Pass custom filters as a regex pattern via query string. +Pass custom filters as a regex pattern via query string. The query string defines which property and value to match. Format: `/app/heroes/?propertyName=regexPattern` @@ -209,13 +209,13 @@ The following example matches all names that start with the letter 'j' or 'J' in `/app/heroes/?name=^j` ->Search pattern matches are case insensitive by default. +>Search pattern matches are case insensitive by default. Set `config.caseSensitiveSearch = true` if needed. ## Pass thru to a live server -If an existing, running remote server should handle requests for collections +If an existing, running remote server should handle requests for collections that are not in the in-memory database, set `Config.passThruUnknownUrl: true`. Then this service will forward unrecognized requests to the remote server via the Angular default `XHR` backend (it depends on whether your using `Http` or `HttpClient`). @@ -224,7 +224,7 @@ via the Angular default `XHR` backend (it depends on whether your using `Http` o ## Commands The client may issue a command request to get configuration state -from the in-memory web api service, reconfigure it, +from the in-memory web api service, reconfigure it, or reset the in-memory database. When the last segment of the _api base path_ is "commands", the `collectionName` is treated as the _command_. @@ -261,7 +261,7 @@ http .map(data => data.data as Hero[]) ) - // execute the request sequence and + // execute the request sequence and // do something with the heroes .subscribe(...) ``` @@ -318,22 +318,22 @@ In this way you can intercept and parse some URLs and leave the others to the de Collection items are presumed to have a primary key property called `id`. -You can specify the `id` while adding a new item. +You can specify the `id` while adding a new item. The service will blindly use that `id`; it does not check for uniqueness. If you do not specify the `id`, the service generates one via the `genId` method. You can override the default id generator with a method called `genId` in your `InMemoryDbService`. -Your method receives the new item's collection and collection name. +Your method receives the new item's collection and collection name. It should return the generated id. -If your generator returns `null`|`undefined`, the service uses the default generator. +If your generator returns `null`|`undefined`, the service uses the default generator. ## _responseInterceptor_ You can change the response returned by the service's default HTTP methods. A typical reason to intercept is to add a header that your application is expecting. -To intercept responses, add a `responseInterceptor` method to your `InMemoryDbService` class. +To intercept responses, add a `responseInterceptor` method to your `InMemoryDbService` class. The service calls your interceptor like this: ```ts responseOptions = this.responseInterceptor(responseOptions, requestInfo); @@ -344,7 +344,7 @@ responseOptions = this.responseInterceptor(responseOptions, requestInfo); You may have HTTP requests that the in-memory web api can't handle properly. -You can override any HTTP method by implementing a method +You can override any HTTP method by implementing a method of that name in your `InMemoryDbService`. Your method's name must be the same as the HTTP method name but **all lowercase**. @@ -358,11 +358,11 @@ Your custom HTTP method must return either: * `Observable` - you handled the request and the response is available from this observable. It _should be "cold"_. -* `null`/`undefined` - you decided not to intervene, +* `null`/`undefined` - you decided not to intervene, perhaps because you wish to intercept only certain paths for the given HTTP method. The service continues with its default processing of the HTTP request. -The `RequestInfo` is an interface defined in `src/in-mem/interfaces.ts`. +The `RequestInfo` is an interface defined in `src/in-mem/interfaces.ts`. Its members include: ```ts req: Request; // the request object from the client @@ -377,7 +377,7 @@ and compose a response. ## In-memory Web Api Examples -The [test fixtures](https://github.com/angular/angular/tree/master/packages/misc/angular-in-memory-web-api/test/fixtures) +The [test fixtures](https://github.com/angular/angular/tree/main/packages/misc/angular-in-memory-web-api/test/fixtures) demonstrates library usage with tested examples. The `HeroInMemDataService` class (in `test/fixtures/hero-in-mem-data-service.ts`) is a Hero-oriented `InMemoryDbService` diff --git a/packages/router/package.json b/packages/router/package.json index 9dd4db547b6..08c9d78894b 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -19,7 +19,7 @@ "bugs": { "url": "https://github.com/angular/angular/issues" }, - "homepage": "https://github.com/angular/angular/tree/master/packages/router", + "homepage": "https://github.com/angular/angular/tree/main/packages/router", "dependencies": { "tslib": "^2.3.0" }, @@ -33,4 +33,4 @@ "packageGroup": "NG_UPDATE_PACKAGE_GROUP" }, "sideEffects": false -} \ No newline at end of file +} diff --git a/packages/zone.js/DEVELOPER.md b/packages/zone.js/DEVELOPER.md index ec9b798f2cd..ff3d6fcace3 100644 --- a/packages/zone.js/DEVELOPER.md +++ b/packages/zone.js/DEVELOPER.md @@ -104,19 +104,19 @@ git push origin "release_${TAG}" #### 2. Cutting a release -Check out the SHA on master which has the changelog commit of the zone.js +Check out the SHA on main which has the changelog commit of the zone.js ``` git fetch upstream -git checkout upstream/master +git checkout upstream/main rm -rf node_modules && yarn install export VERSION=`(node -e "console.log(require('./packages/zone.js/package.json').version)")` export TAG="zone.js-${VERSION}" -export SHA=`git log upstream/master --oneline -n 1000 | grep "release: cut the ${TAG} release" | cut -f 1 -d " "` +export SHA=`git log upstream/main --oneline -n 1000 | grep "release: cut the ${TAG} release" | cut -f 1 -d " "` echo "Releasing '$VERSION' which will be tagged as '$TAG' from SHA '$SHA'." git checkout ${SHA} npm login --registry https://wombat-dressing-room.appspot.com yarn bazel -- run --config=release -- //packages/zone.js:npm_package.publish --access public --tag latest git tag ${TAG} ${SHA} git push upstream ${TAG} -``` \ No newline at end of file +``` diff --git a/scripts/compare-master-to-patch.js b/scripts/compare-main-to-patch.js similarity index 87% rename from scripts/compare-master-to-patch.js rename to scripts/compare-main-to-patch.js index 377bfedc13f..0f1018841ff 100755 --- a/scripts/compare-master-to-patch.js +++ b/scripts/compare-main-to-patch.js @@ -11,12 +11,12 @@ 'use strict'; /** - * This script compares commits in master and patch branches to find the delta between them. This is + * This script compares commits in main and patch branches to find the delta between them. This is * useful for release reviews, to make sure all the necessary commits were included into the patch * branch and there is no discrepancy. * * Additionally, lists all 'feat' commits that were merged to the patch branch to aid in ensuring - * features are only released to master. + * features are only released to main. */ const {exec} = require('shelljs'); @@ -28,8 +28,8 @@ const ignoreCommitPatterns = [ 'release:', 'docs: release notes', // These commits are created to update cli command docs sources with the most recent sha (stored - // in `aio/package.json`). Separate commits are generated for master and patch branches and since - // it's purely an infrastructure-related change, we ignore these commits while comparing master + // in `aio/package.json`). Separate commits are generated for main and patch branches and since + // it's purely an infrastructure-related change, we ignore these commits while comparing main // and patch diffs to look for delta. 'build(docs-infra): upgrade cli command docs sources', ]; @@ -91,7 +91,7 @@ function collectCommitsAsMap(rawGitCommits) { // 15d3e741e9 feat: update the locale files (#33556) // // we extract only "feat: update the locale files" part and use it as a key, since commit SHA - // and PR number may be different for the same commit in master and patch branches. + // and PR number may be different for the same commit in main and patch branches. const key = commit.slice(11).replace(/\(\#\d+\)/g, '').trim(); commitsMap.set(key, [commit, version]); } @@ -134,12 +134,12 @@ function listFeatures(commitsMap) { } function getBranchByTag(tag) { - const version = semver(tag); + const version = semver.parse(tag); return `${version.major}.${version.minor}.x`; // e.g. 9.0.x } function getLatestTag(tags) { - // Exclude Next releases, since we cut them from master, so there is nothing to compare. + // Exclude Next releases, since we cut them from main, so there is nothing to compare. const isNotNextVersion = version => version.indexOf('-next') === -1; return tags.filter(semver.valid) .filter(isNotNextVersion) @@ -152,32 +152,32 @@ function main() { execGitCommand('git fetch upstream'); // Extract tags information and pick the most recent version - // that we'll use later to compare with master. + // that we'll use later to compare with main. const tags = toArray(execGitCommand('git tag')); const latestTag = getLatestTag(tags); // Based on the latest tag, generate the name of the patch branch. const branch = getBranchByTag(latestTag); - // Extract master-only and patch-only commits using `git log` command. - const masterCommits = execGitCommand( - `git log --cherry-pick --oneline --right-only upstream/${branch}...upstream/master`); + // Extract main-only and patch-only commits using `git log` command. + const mainCommits = execGitCommand( + `git log --cherry-pick --oneline --right-only upstream/${branch}...upstream/main`); const patchCommits = execGitCommand( - `git log --cherry-pick --oneline --left-only upstream/${branch}...upstream/master`); + `git log --cherry-pick --oneline --left-only upstream/${branch}...upstream/main`); // Post-process commits and convert raw data into a Map, so that we can diff it easier. - const masterCommitsMap = collectCommitsAsMap(masterCommits); + const mainCommitsMap = collectCommitsAsMap(mainCommits); const patchCommitsMap = collectCommitsAsMap(patchCommits); // tslint:disable-next-line:no-console console.log(` -Comparing branches "${branch}" and master. +Comparing branches "${branch}" and main. -***** Only in MASTER ***** -${diff(masterCommitsMap, patchCommitsMap).join('\n') || 'No extra commits'} +***** Only in MAIN ***** +${diff(mainCommitsMap, patchCommitsMap).join('\n') || 'No extra commits'} ***** Only in PATCH (${branch}) ***** -${diff(patchCommitsMap, masterCommitsMap).join('\n') || 'No extra commits'} +${diff(patchCommitsMap, mainCommitsMap).join('\n') || 'No extra commits'} ***** Features in PATCH (${branch}) - should always be empty ***** ${listFeatures(patchCommitsMap).join('\n') || 'No extra commits'} diff --git a/yarn.lock.readme.md b/yarn.lock.readme.md index a3e74e1c99e..496b62b7e94 100644 --- a/yarn.lock.readme.md +++ b/yarn.lock.readme.md @@ -9,7 +9,7 @@ All of our npm dependencies are locked via the `yarn.lock` file for the followin Before changing a dependency, do the following: -- make sure you are in sync with `upstream/master`: `git fetch upstream && git rebase upstream/master` +- make sure you are in sync with `upstream/main`: `git fetch upstream && git rebase upstream/main` - ensure that your `node_modules` directory is not stale by running `yarn install` @@ -22,4 +22,4 @@ in `package.json` To Remove an existing dependency do the following: run `yarn remove ` -Once you've changed the dependency, commit the changes to `package.json` & `yarn.lock`, and you are done. \ No newline at end of file +Once you've changed the dependency, commit the changes to `package.json` & `yarn.lock`, and you are done.