Compare commits

...

25 Commits

Author SHA1 Message Date
cf86f72eb7 release: cut the v10.0.0-rc.2 release 2020-06-01 10:51:58 -07:00
61486f14f1 build: remove wombot proxy registry from package.jsons for release (#37378)
Due to an outage with the proxy we rely on for publishing, we need
to temporarily directly publish to NPM using our own angular
credentials again.

PR Close #37378
2020-06-01 12:41:19 -04:00
d16a7f3ecc fix(core): reenable decorator downleveling for Angular npm packages (#37317)
In #37221 we disabled tsickle passes from transforming the tsc output that is used to publish all
Angular framework and components packages (@angular/*).

This change however revealed a bug in the ngc that caused __decorate and __metadata calls to still
be emitted in the JS code even though we don't depend on them.

Additionally it was these calls that caused code in @angular/material packages to fail at runtime
due to circular dependency in the emitted decorator code documeted as
https://github.com/microsoft/TypeScript/issues/27519.

This change partially rolls back #37221 by reenabling the decorator to static fields (static
properties) downleveling.

This is just a temporary workaround while we are also fixing root cause in `ngc` - tracked as
FW-2199.

Resolves FW-2198.
Related to FW-2196

PR Close #37317
2020-05-29 18:52:01 -04:00
82761ec50e docs: Mention Bazel builder and schematics in Deprecations section (#37190)
This commit adds Bazel builder and schematics to the global list of
deprecations in Angular. A link to the migration doc is added.

PR Close #37190
2020-05-28 21:35:41 -04:00
235bfa77a9 docs(bazel): Mention Architect prototype and Slack Channel (#37190)
This commit adds a link to the Bazel prototype for orchestrating
multiple CLI architects and also adds a link to the #angular channel in
the Bazel Slack workspace.

PR Close #37190
2020-05-28 21:35:41 -04:00
299ae1bb1c docs: Cleanup Bazel schematics deprecation doc (#37190)
This commit improves some wording in the deprecation doc for Bazel
builder and schematics in `@angular/bazel` and fixes the formatting.

PR Close #37190
2020-05-28 21:35:41 -04:00
80f7522dab refactor(bazel): Remove schematics and builder from package.json (#37190)
This commit removes the fields for ng-add, schematics and builder from
package.json of `@angular/bazel`.

PR Close #37190
2020-05-28 21:35:41 -04:00
028921e369 docs: Add guide/bazel to Service Worker navigationUrls (#37190)
This commit adds an exception for "guide/bazel" to the navigationUrls in
the Service Worker config. This is needed for redirection to work.

PR Close #37190
2020-05-28 21:35:41 -04:00
a4e11bb524 docs: Redirect /guide/bazel to deprecation doc in Angular repo (#37190)
This commit adds a 301 redirect for /guide/bazel on angular.io to the
deprecation doc for Angular Bazel schematics in Angular repo.

PR Close #37190
2020-05-28 21:35:41 -04:00
a4131752d2 test: remove Bazel schematics integration test (#37190)
This commit removes the integration test for schematics in
`@angular/bazel` that is used to generate a Bazel builder. The Bazel
builder has been deprecated.

PR Close #37190
2020-05-28 21:35:40 -04:00
060dcfbba1 ci: Remove aio/content/guide/bazel.md from pullapprove (#37190)
This commit removes aio/content/guide/bazel.md from the Bazel list in
pullapprove since Bazel builder has been deprecated and the doc has been
deleted.

PR Close #37190
2020-05-28 21:35:40 -04:00
4be7008f80 docs: Remove 'Building with Bazel' section (#37190)
This commit removes "Building with Bazel" section from angular.io
navigation list and Angular CLI landing page.

PR Close #37190
2020-05-28 21:35:40 -04:00
4a0d05515e refactor(bazel): Remove Schematics for Bazel Builder (#37190)
This commit removes `ng-add` and `ng-new` schematics for the Bazel
Builder, and update the corresponding BUILD files.

PR Close #37190
2020-05-28 21:35:40 -04:00
83ab99c746 docs: Remove Bazel builder from @angular/bazel (#37190)
This commit adds a deprecation doc for Bazel builder in
`@angular/bazel` and removes the corresponding guide in angular.io.

PR Close #37190
2020-05-28 21:35:40 -04:00
270da1f69f build(docs-infra): upgrade cli command docs sources to 14af4e07c (#37310)
Updating [angular#10.0.x](https://github.com/angular/angular/tree/10.0.x) from [cli-builds#10.0.x](https://github.com/angular/cli-builds/tree/10.0.x).

##
Relevant changes in [commit range](200a21f8a...14af4e07c):

**Modified**
- help/generate.json

PR Close #37310
2020-05-28 18:43:44 -04:00
6b0e46e36c docs: fix typo in committer.md (#37171)
Fix a type of COMMITTER.md, the url of the pullapprove service should be https://docs.pullapprove.com/,
now the document has an additional `https` prefix.

PR Close #37171
2020-05-28 18:43:05 -04:00
3642707145 build: use static patch value for targetting branches in merge config (#37299)
Due to the desired patch branch (10.0.x) being on a semver version
that is unreleased as stable (there is no 10.0.0 on latest, it is on
next) our logic for determining target patch branches does not work.

This change is a workaround to unblock merging in the repo while a
longer term answer is discovered.

PR Close #37299
2020-05-28 15:18:20 -07:00
0ea76edfd8 build: migrate ng-dev config to .ng-dev directory (#37299)
Migrate to using .ng-dev directory for ng-dev configuration to allow
better management of the configuration using multiple files.  The
intention is to prevent the config file from becoming unruly.

PR Close #37299
2020-05-28 15:18:20 -07:00
d493a83b2b docs(platform-server): fix renderModule usage guidance with Ivy (#37296)
Before the introduction of the Ivy renderer, users would compile
their applications and use the resulting factories for SSR, since
these post-compilation artifacts ensured faster delivery. Thus,
using the original module as the rendering entrypoint was
considered suboptimal and was discouraged.

However, with the introduction of Ivy, this guidance is no longer
applicable since these factories are no longer generated.
Comparable speed is achieved using the factory-less module
renderer, and so we update the guiance in the docs for the method.

PR Close #37296
2020-05-28 16:07:32 -04:00
f1721d5cef build: update requiredBaseCommit for patch branch merges (#37316)
Updates the requiredBaseCommit for merging to patch branch to the
latest commit message validation fix found in the 10.0.x branch.

Previously, the patch branch commit used was for the 9.1.x branch.

PR Close #37316
2020-05-28 16:06:08 -04:00
5b3fd6aa82 docs: add IE mobile to deprecated browsers (#37313)
Mobile versions of IE should also be deprecated, as the same reasons for deprecating IE 9 and 10 apply.

PR Close #37313
2020-05-27 17:23:18 -04:00
6f829180f7 build: update license headers to reference Google LLC (#37205)
Update the license headers throughout the repository to reference Google LLC
rather than Google Inc, for the required license headers.

PR Close #37205
2020-05-26 14:27:01 -04:00
27b95ba64a build: Update file-header lint rule to Google LLC (#37205)
Update the file-header lint rule to properly reference Google LLC
rather than Google Inc, for the required headers.

PR Close #37205
2020-05-26 14:27:01 -04:00
ef405b1e90 build: deprecate old merge script (#37247)
Deprecate the old merge script as it no longer correctly chooses
the patch branch due to relying on numerical sorting order from
git.  Git actually provides a lexicographical sorting order.  This
that 9.0.x will be chosen rather than 10.0.x as it is sorted based
the 9 vs 1, rather than 9 vs 10.

PR Close #37247
2020-05-26 14:25:44 -04:00
441073bad5 feat(dev-infra): expose script for determining merge branches (#37217)
The components repo and framework repository follow the same patch
branch concept. We should be able to share a script for determining
these merge branches.

Additonally the logic has been improved compared to the old merge script because
we no longer consult `git ls-remote` unless really needed. Currently,
`git ls-remote` is always consulted, even though not necessarily needed.

This can slow down the merge script and the caretaker process when a
couple of PRs are merged (personally saw around ~4 seconds per merge).

Additionally, the new logic is more strict and will ensure (in most
cases) that no wrong patch/minor branch is determined. Previously,
the script just used the lexicographically greatest patch branch.
This _could_ be wrong when a new patch branch has been created too
early, or by accident.

PR Close #37217
2020-05-21 10:38:19 -07:00
4442 changed files with 5174 additions and 16147 deletions

View File

@ -1,6 +1,4 @@
import {exec} from 'shelljs';
import {MergeConfig} from './dev-infra/pr/merge/config';
import {MergeConfig} from '../dev-infra/pr/merge/config';
// The configuration for `ng-dev commit-message` commands.
const commitMessage = {
@ -82,33 +80,11 @@ const github = {
name: 'angular',
};
/**
* Gets the name of the current patch branch. The patch branch is determined by
* looking for upstream branches that follow the format of `{major}.{minor}.x`.
*/
const getPatchBranchName = (): string => {
const branches =
exec(
`git ls-remote --heads https://github.com/${github.owner}/${github.name}.git`,
{silent: true})
.trim()
.split('\n');
for (let i = branches.length - 1; i >= 0; i--) {
const branchName = branches[i];
const matches = branchName.match(/refs\/heads\/([0-9]+\.[0-9]+\.x)/);
if (matches !== null) {
return matches[1];
}
}
throw Error('Could not determine patch branch name.');
};
// Configuration for the `ng-dev pr merge` command. The command can be used
// for merging upstream pull requests into branches based on a PR target label.
const merge = () => {
const patchBranch = getPatchBranchName();
// TODO: resume dynamically determining patch branch
const patch = '10.0.x';
const config: MergeConfig = {
githubApiMerge: false,
claSignedLabel: 'cla: yes',
@ -121,18 +97,18 @@ const merge = () => {
},
{
pattern: 'PR target: patch-only',
branches: [patchBranch],
branches: [patch],
},
{
pattern: 'PR target: master & patch',
branches: ['master', patchBranch],
branches: ['master', patch],
},
],
requiredBaseCommits: {
// PRs that target either `master` or the patch branch, need to be rebased
// on top of the latest commit message validation fix.
'master': '4341743b4a6d7e23c6f944aa9e34166b701369a1',
[patchBranch]: '2a53f471592f424538802907aca1f60f1177a86d'
[patch]: '4341743b4a6d7e23c6f944aa9e34166b701369a1'
},
};
return config;

View File

@ -648,7 +648,6 @@ groups:
- >
contains_any_globs(files, [
'packages/bazel/**',
'aio/content/guide/bazel.md'
])
reviewers:
users:
@ -953,6 +952,7 @@ groups:
'.circleci/**',
'.devcontainer/**',
'.github/**',
'.ng-dev/**',
'.vscode/**',
'.yarn/**',
'dev-infra/**',

View File

@ -1,3 +1,14 @@
<a name="10.0.0-rc.2"></a>
# [10.0.0-rc.2](https://github.com/angular/angular/compare/10.0.0-rc.0...10.0.0-rc.2) (2020-06-01)
### Bug Fixes
* **core:** reenable decorator downleveling for Angular npm packages ([#37317](https://github.com/angular/angular/issues/37317)) ([d16a7f3](https://github.com/angular/angular/commit/d16a7f3)), closes [#37221](https://github.com/angular/angular/issues/37221) [#37221](https://github.com/angular/angular/issues/37221)
Note: the 10.0.0-rc.1 release on npm accidentally glitched-out midway, so we cut 10.0.0-rc.2 instead. oops :-)
<a name="10.0.0-rc.0"></a>
# [10.0.0-rc.0](https://github.com/angular/angular/compare/10.0.0-next.9...10.0.0-rc.0) (2020-05-21)

View File

@ -109,9 +109,3 @@ Options that specify files can be given as absolute paths, or as paths relative
The [ng generate](cli/generate) and [ng add](cli/add) commands take as an argument the artifact or library to be generated or added to the current project.
In addition to any general options, each artifact or library defines its own options in a *schematic*.
Schematic options are supplied to the command in the same format as immediate command options.
### Building with Bazel
Optionally, you can configure the Angular CLI to use [Bazel](https://docs.bazel.build) as the build tool. For more information, see [Building with Bazel](guide/bazel).

View File

@ -1,122 +0,0 @@
# Building with Bazel
This guide explains how to build and test Angular apps with Bazel.
<div class="alert is-helpful">
This guide assumes you are already familiar with developing and building Angular applications using the [CLI](cli).
It describes features which are part of Angular Labs, and are not considered a stable, supported API.
</div>
## Using Bazel with the Angular CLI
The `@angular/bazel` package provides a builder that allows Angular CLI to use Bazel as the build tool.
To opt-in an existing application, run
```sh
ng add @angular/bazel
```
To use Bazel in a new application, first install `@angular/bazel` globally
```sh
npm install -g @angular/bazel
```
then create the new application with
```sh
ng new --collection=@angular/bazel
```
Now when you use Angular CLI build commands such as `ng build` and `ng serve`,
Bazel is used behind the scenes.
Outputs from Bazel appear in the `dist/bin` folder.
> The command-line output includes extra logging from Bazel.
> We plan to reduce this in the future.
### Removing Bazel
If you need to opt-out from using Bazel, you can restore the backup files:
- `/angular.json.bak` replaces `/angular.json`
## Advanced configuration
<div class="alert is-helpful">
Editing the Bazel configuration may prevent you opting out of Bazel.
Custom behaviors driven by Bazel won't be available in other Builders.
This section assumes you are familiar with [Bazel](https://docs.bazel.build).
</div>
You can manually adjust the Bazel configuration to:
* customize the build steps
* parallellize the build for scale and incrementality
Create the initial Bazel configuration files by running the following command:
```sh
ng build --leaveBazelFilesOnDisk
```
Now you'll find new files in the Angular workspace:
* `/WORKSPACE` tells Bazel how to download external dependencies.
* `/BUILD.bazel` and `/src/BUILD.bazel` tell Bazel about your source code.
You can find a full-featured example with custom Bazel configurations at https://github.com/bazelbuild/rules_nodejs/tree/master/examples/angular.
Documentation for using Bazel for frontend projects is linked from https://docs.bazel.build/versions/master/bazel-and-javascript.html.
## Running Bazel directly
In some cases you'll want to bypass the Angular CLI builder, and run the Bazel CLI directly.
The Bazel tool is managed by the `@bazel/bazelisk` package (similar to how Node.js can be managed by `nvm`).
You can install it globally to get the `bazelisk` command in your path, or use `$(npm bin)/bazelisk` in place of bazelisk below.
The common commands in Bazel are:
* `bazelisk build [targets]`: Compile the default output artifacts of the given targets.
* `bazelisk test [targets]`: For whichever `*_test` targets are found in the patterns, run the tests.
* `bazelisk run [target]`: Compile the program represented by target, and then run it.
To repeat the command any time the inputs change (watch mode), replace `bazelisk` with `ibazel` in these commands.
The output locations are printed in the output.
Full documentation for the Bazel CLI is at https://docs.bazel.build/versions/master/command-line-reference.html.
## Querying the build graph
Because Bazel constructs a graph out of your targets, you can find lots of useful information.
Using the graphviz optional dependency, you'll have a program `dot`, which you can use with `bazel query`:
```bash
$ bazel query --output=graph ... | dot -Tpng > graph.png
```
See https://docs.bazel.build/versions/master/query-how-to.html for more details on `bazel query`.
## Customizing `BUILD.bazel` files
"Rules" are like plugins for Bazel. Many rule sets are available. This guide documents the ones maintained by the Angular team at Google.
Rules are used in `BUILD.bazel` files, which are markers for the packages in your workspace. Each `BUILD.bazel` file declares a separate package to Bazel, though you can have more coarse-grained distributions so that the packages you publish (for example, to `npm`) can be made up of many Bazel packages.
In the `BUILD.bazel` file, each rule must first be imported, using the `load` statement. Then the rule is called with some attributes, and the result of calling the rule is that you've declared to Bazel how it can derive some outputs given some inputs and dependencies. Then later, when you run a `bazel` command line, Bazel loads all the rules you've declared to determine an absolute ordering of what needs to be run. Note that only the rules needed to produce the requested output will actually be executed.
A list of common rules for frontend development is documented in the README at https://github.com/bazelbuild/rules_nodejs/.

View File

@ -54,16 +54,17 @@ Angular supports most recent browsers. This includes the following specific vers
</td>
<td>
<div> 11, 10*, 9* ("compatibility view" mode not supported) </div>
<div>*deprecated in v10, see the <a href="/guide/deprecations#ie-9-10">deprecations guide</a>.</div>
<div>*deprecated in v10, see the {@link guide/deprecations#ie-9-10-and-mobile deprecations guide}.</div>
</td>
</tr>
<tr>
<tr>
<td>
IE Mobile
IE Mobile*
</td>
<td>
11
<div>*deprecated in v10, see the {@link guide/deprecations#ie-9-10-and-mobile deprecations guide}.</div>
</td>
</tr>
<tr>

View File

@ -35,6 +35,7 @@ v9 - v12
| Area | API or Feature | May be removed in |
| ----------------------------- | --------------------------------------------------------------------------- | ----------------- |
| `@angular/bazel` | [`Bazel builder and schematics`](#bazelbuilder) | v10 |
| `@angular/common` | [`ReflectiveInjector`](#reflectiveinjector) | <!--v8--> v11 |
| `@angular/common` | [`CurrencyPipe` - `DEFAULT_CURRENCY_CODE`](api/common/CurrencyPipe#currency-code-deprecation) | <!--v9--> v11 |
| `@angular/core` | [`CollectionChangeRecord`](#core) | <!--v7--> v11 |
@ -59,7 +60,7 @@ v9 - v12
| `@angular/core/testing` | [`TestBed.get`](#testing) | <!--v9--> v12 |
| `@angular/router` | [`ActivatedRoute` params and `queryParams` properties](#activatedroute-props) | unspecified |
| template syntax | [`/deep/`, `>>>`, and `::ng-deep`](#deep-component-style-selector) | <!--v7--> unspecified |
| browser support | [`IE 9 and 10`](#ie-9-10) | <!--v10--> v11 |
| browser support | [`IE 9 and 10, IE mobile`](#ie-9-10-and-mobile) | <!--v10--> v11 |
@ -160,7 +161,11 @@ Tip: In the [API reference section](api) of this doc site, deprecated APIs are i
This section lists all of the currently-deprecated features, which includes template syntax, configuration options, and any other deprecations not listed in the [Deprecated APIs](#deprecated-apis) section above. It also includes deprecated API usage scenarios or API combinations, to augment the information above.
{@a bazelbuilder}
### Bazel builder and schematics
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/src/schematics/README.md).
{@a wtf}
### Web Tracing Framework integration
@ -459,17 +464,17 @@ export class MyModule {
```
{@a ie-9-10}
### IE 9 and 10 support
{@a ie-9-10-and-mobile}
### IE 9, 10, and IE mobile support
Support for IE 9 and 10 has been deprecated and will be removed in a future version.
Support for IE 9 and 10 has been deprecated, as well as support for IE Mobile. These will be dropped in a future version.
Supporting outdated browsers like these increases bundle size, code complexity, and test load, and also requires time and effort that could be spent on improvements to the framework.
For example, fixing issues can be more difficult, as a straightforward fix for modern browsers could break old ones that have quirks due to not receiving updates from vendors.
The final decision was made on three key points:
* __Vendor support__: Microsoft dropped support of IE 9 and 10 on 1/12/16, meaning they no longer provide security updates or technical support.
* __Usage statistics__: We looked at usage trends for IE 9 and 10 from various sources and all indicated that usage percentages were extremely small (fractions of 1%).
* __Feedback from partners__: We also reached out to some of our Angular customers and none expressed concern about dropping IE 9 and 10 support.
* __Vendor support__: Microsoft dropped support of IE 9 and 10 on 1/12/16, meaning they no longer provide security updates or technical support. Additionally, Microsoft dropped support for of Windows 10 Mobile in December 2019.
* __Usage statistics__: We looked at usage trends for IE 9 and 10 (as well as IE Mobile) from various sources and all indicated that usage percentages were extremely small (fractions of 1%).
* __Feedback from partners__: We also reached out to some of our Angular customers and none expressed concern about dropping IE 9, 10, nor IE Mobile support.
{@a wrapped-value}

View File

@ -628,11 +628,6 @@
"title": "Building & Serving",
"tooltip": "Building and serving Angular apps."
},
{
"url": "guide/bazel",
"title": "Building with Bazel",
"tooltip": "How to set up your environment to build and test with Bazel."
},
{
"url": "guide/testing",
"title": "Testing",

View File

@ -18,6 +18,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/src/schematics/README.md"},
{"type": 301, "source": "/guide/cli-quickstart", "destination": "/start"},
{"type": 301, "source": "/guide/service-worker-getstart", "destination": "/guide/service-worker-getting-started"},
{"type": 301, "source": "/guide/service-worker-comm", "destination": "/guide/service-worker-communications"},

View File

@ -94,6 +94,7 @@
"!/api/testing/**",
"!/docs/?*",
"!/docs/*/**",
"!/guide/bazel",
"!/guide/change-log",
"!/getting-started",
"!/getting-started.html",

View File

@ -23,7 +23,7 @@
"build-local-with-viewengine": "yarn ~~build",
"prebuild-local-with-viewengine-ci": "node scripts/switch-to-viewengine && yarn setup-local-ci",
"build-local-with-viewengine-ci": "yarn ~~build --progress=false",
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 200a21f8a",
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 14af4e07c",
"lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint",
"test": "yarn check-env && ng test",
"pree2e": "yarn check-env && yarn update-webdriver",

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,9 +1,9 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
export const x = 100;
export const x = 100;

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
@ -44,4 +44,4 @@ function createPackage(tutorialName) {
}
module.exports = { createPackage };
module.exports = { createPackage };

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
@ -43,4 +43,4 @@ function createPackage(guideName) {
});
}
module.exports = { createPackage };
module.exports = { createPackage };

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
@ -39,4 +39,4 @@ function createPackage() {
}
module.exports = { createPackage };
module.exports = { createPackage };

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
@ -44,4 +44,4 @@ function createPackage(tutorialName) {
}
module.exports = { createPackage };
module.exports = { createPackage };

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
@ -34,11 +34,11 @@ var CIconfiguration = {
'Android10': {unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}},
// Disable all Safari and iOS tests because of incorrect results
// ex:
// Mobile Safari 13.0.0 (iOS 13.0.0) styling static template only should capture static values in TStylingKey FAILED
// Expected $.content = 'dynamic' to equal '"dynamic"'.
// Mobile Safari 12.0.0 (iOS 12.0.0) styling should handle values wrapped into SafeValue FAILED
// Expected 'url("http://angular-ci.local:9876/1.png")' to contain 'url("/1.png")'.s
// Tracking in: https://github.com/angular/angular/issues/36975
// Mobile Safari 13.0.0 (iOS 13.0.0) styling static template only should capture static values in
// TStylingKey FAILED Expected $.content = 'dynamic' to equal '"dynamic"'. Mobile Safari 12.0.0
// (iOS 12.0.0) styling should handle values wrapped into SafeValue FAILED Expected
// 'url("http://angular-ci.local:9876/1.png")' to contain 'url("/1.png")'.s Tracking in:
// https://github.com/angular/angular/issues/36975
'Safari12': {unitTest: {target: 'SL', required: false}, e2e: {target: null, required: true}},
'Safari13': {unitTest: {target: 'SL', required: false}, e2e: {target: null, required: true}},
'iOS12': {unitTest: {target: 'SL', required: false}, e2e: {target: null, required: true}},
@ -152,17 +152,12 @@ var sauceAliases = {
return customLaunchers[item].base == 'SauceLabs';
}),
'DESKTOP': [
'SL_CHROME', 'SL_FIREFOX', 'SL_IE9', 'SL_IE10', 'SL_IE11', 'SL_EDGE', 'SL_SAFARI12', 'SL_SAFARI13', 'SL_FIREFOXESR'
],
'MOBILE': [
'SL_ANDROID7', 'SL_ANDROID8', 'SL_ANDROID9', 'SL_ANDROID10', 'SL_IOS12', 'SL_IOS13'
],
'ANDROID': [
'SL_ANDROID7', 'SL_ANDROID8', 'SL_ANDROID9', 'SL_ANDROID10'
],
'FIREFOX': [
'SL_FIREFOXESR'
'SL_CHROME', 'SL_FIREFOX', 'SL_IE9', 'SL_IE10', 'SL_IE11', 'SL_EDGE', 'SL_SAFARI12',
'SL_SAFARI13', 'SL_FIREFOXESR'
],
'MOBILE': ['SL_ANDROID7', 'SL_ANDROID8', 'SL_ANDROID9', 'SL_ANDROID10', 'SL_IOS12', 'SL_IOS13'],
'ANDROID': ['SL_ANDROID7', 'SL_ANDROID8', 'SL_ANDROID9', 'SL_ANDROID10'],
'FIREFOX': ['SL_FIREFOXESR'],
'IE': ['SL_IE9', 'SL_IE10', 'SL_IE11'],
'IOS': ['SL_IOS12', 'SL_IOS13'],
'SAFARI': ['SL_SAFARI12', 'SL_SAFARI13'],
@ -177,11 +172,14 @@ var browserstackAliases = {
return customLaunchers[item].base == 'BrowserStack';
}),
'DESKTOP': [
'BS_CHROME', 'BS_FIREFOX', 'BS_IE9', 'BS_IE10', 'BS_IE11', 'BS_EDGE',
],
'MOBILE': [
'BS_ANDROID7', 'BS_WINDOWSPHONE'
'BS_CHROME',
'BS_FIREFOX',
'BS_IE9',
'BS_IE10',
'BS_IE11',
'BS_EDGE',
],
'MOBILE': ['BS_ANDROID7', 'BS_WINDOWSPHONE'],
'ANDROID': ['BS_ANDROID7'],
'IE': ['BS_IE9', 'BS_IE10', 'BS_IE11'],
'IOS': [],

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,7 +1,7 @@
#!/usr/bin/env ts-node
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -11,6 +11,7 @@ ts_library(
"@npm//@octokit/rest",
"@npm//@types/inquirer",
"@npm//@types/node",
"@npm//@types/semver",
"@npm//@types/yargs",
"@npm//chalk",
],

View File

@ -0,0 +1,68 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as semver from 'semver';
import {exec} from '../../utils/shelljs';
/**
* Helper function that can be used to determine merge branches based on a given
* project version. The function determines merge branches primarily through the
* specified version, but falls back to consulting the NPM registry when needed.
*
* Consulting the NPM registry for determining the patch branch may slow down merging,
* so whenever possible, the branches are determined statically based on the current
* version. In some cases, consulting the NPM registry is inevitable because for major
* pre-releases, we cannot determine the latest stable minor version from the current
* pre-release version.
*/
export function determineMergeBranches(
currentVersion: string, npmPackageName: string): {minor: string, patch: string} {
const projectVersion = semver.parse(currentVersion);
if (projectVersion === null) {
throw Error('Cannot parse version set in project "package.json" file.');
}
const {major, minor, patch, prerelease} = projectVersion;
const isMajor = minor === 0 && patch === 0;
const isMinor = minor !== 0 && patch === 0;
// If there is no prerelease, then we compute patch and minor branches based
// on the current version major and minor.
if (prerelease.length === 0) {
return {minor: `${major}.x`, patch: `${major}.${minor}.x`};
}
// If current version is set to a minor prerelease, we can compute the merge branches
// statically. e.g. if we are set to `9.3.0-next.0`, then our merge branches should
// be set to `9.x` and `9.2.x`.
if (isMinor) {
return {minor: `${major}.x`, patch: `${major}.${minor - 1}.x`};
} else if (!isMajor) {
throw Error('Unexpected version. Cannot have prerelease for patch version.');
}
// If we are set to a major prerelease, we cannot statically determine the stable patch
// branch (as the latest minor segment is unknown). We determine it by looking in the NPM
// registry for the latest stable release that will tell us about the current minor segment.
// e.g. if the current major is `v10.0.0-next.0`, then we need to look for the latest release.
// Let's say this is `v9.2.6`. Our patch branch will then be called `9.2.x`.
const latestVersion = exec(`yarn -s info ${npmPackageName} dist-tags.latest`).trim();
if (!latestVersion) {
throw Error('Could not determine version of latest release.');
}
const expectedMajor = major - 1;
const parsedLatestVersion = semver.parse(latestVersion);
if (parsedLatestVersion === null) {
throw Error(`Could not parse latest version from NPM registry: ${latestVersion}`);
} else if (parsedLatestVersion.major !== expectedMajor) {
throw Error(
`Expected latest release to have major version: v${expectedMajor}, ` +
`but got: v${latestVersion}`);
}
return {patch: `${expectedMajor}.${parsedLatestVersion.minor}.x`, minor: `${expectedMajor}.x`};
}

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -16,6 +16,7 @@
"inquirer": "<from-root>",
"minimatch": "<from-root>",
"multimatch": "<from-root>",
"semver": "<from-root>",
"shelljs": "<from-root>",
"typed-graphqlify": "<from-root>",
"yaml": "<from-root>",

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
@ -37,7 +37,7 @@ export type NgDevConfig<T = {}> = CommonConfig&T;
* The filename expected for creating the ng-dev config, without the file
* extension to allow either a typescript or javascript file to be used.
*/
const CONFIG_FILE_NAME = '.ng-dev-config';
const CONFIG_FILE_PATH = '.ng-dev/config';
/** The configuration for ng-dev. */
let CONFIG: {}|null = null;
@ -50,7 +50,7 @@ export function getConfig(): NgDevConfig {
// If the global config is not defined, load it from the file system.
if (CONFIG === null) {
// The full path to the configuration file.
const configPath = join(getRepoBaseDir(), CONFIG_FILE_NAME);
const configPath = join(getRepoBaseDir(), CONFIG_FILE_PATH);
// Set the global config object.
CONFIG = readConfigFile(configPath);
}

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -7,7 +7,7 @@ As a contributor, see the instructions in [CONTRIBUTING.md](../CONTRIBUTING.md).
# Change approvals
Change approvals in our monorepo are managed via [PullApprove](https://https://docs.pullapprove.com/) and are configured via the [`.pullapprove`](../.pullapprove) file.
Change approvals in our monorepo are managed via [PullApprove](https://docs.pullapprove.com/) and are configured via the [`.pullapprove`](../.pullapprove) file.
# Merging

View File

@ -61,8 +61,8 @@
"bundle": "TODO(i): temporarily increase the payload size limit from 105779 - this is due to a closure issue related to ESM reexports that still needs to be investigated",
"bundle": "TODO(i): we should define ngDevMode to false in Closure, but --define only works in the global scope.",
"bundle": "TODO(i): (FW-2164) TS 3.9 new class shape seems to have broken Closure in big ways. The size went from 169991 to 252338",
"bundle": "TODO(i): after removal of tsickle from ngc-wrapped / ng_package, we had to switch to SIMPLE optimizations which increased the size from 252338 to 1218969, see PR#37221 for more info",
"bundle": 1218969
"bundle": "TODO(i): after removal of tsickle from ngc-wrapped / ng_package, we had to switch to SIMPLE optimizations which increased the size from 252338 to 1200475, see PR#37221 and PR#37317 for more info",
"bundle": 1200475
}
}
}

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -33,15 +33,6 @@ INTEGRATION_TESTS = {
"no-ivy-aot",
],
},
"bazel-schematics": {
"tags": [
# Bazel-in-bazel tests are resource intensive and should not be over-parallized
# as they will complete for the resources of other parallel tests slowing
# everything down. Ask Bazel to allocate multiple CPUs for these tests with "cpu:n" tag.
"cpu:3",
"no-ivy-aot",
],
},
"cli-hello-world": {"commands": "payload_size_tracking"},
"cli-hello-world-ivy-compat": {"commands": "payload_size_tracking"},
"cli-hello-world-ivy-i18n": {

View File

@ -1,4 +1,4 @@
# Copyright Google Inc. All Rights Reserved.
# Copyright Google LLC All Rights Reserved.
#
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.io/license

View File

@ -1 +0,0 @@
/demo

View File

@ -1,35 +0,0 @@
{
"name": "bazel-schematics",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"@angular-devkit/build-angular": "file:../../node_modules/@angular-devkit/build-angular",
"@angular/animations": "file:../../dist/packages-dist/animations",
"@angular/bazel": "file:../../dist/packages-dist/bazel",
"@angular/cli": "file:../../node_modules/@angular/cli",
"@angular/common": "file:../../dist/packages-dist/common",
"@angular/compiler": "file:../../dist/packages-dist/compiler",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@angular/core": "file:../../dist/packages-dist/core",
"@angular/forms": "file:../../dist/packages-dist/forms",
"@angular/language-service": "file:../../dist/packages-dist/language-service",
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
"@angular/router": "file:../../dist/packages-dist/router",
"@types/node": "file:../../node_modules/@types/node",
"patch-package": "^6.2.1",
"protractor": "file:../../node_modules/protractor",
"puppeteer": "file:../../node_modules/puppeteer",
"typescript": "file:../../node_modules/typescript",
"tslib": "file:../../node_modules/tslib"
},
"//resolutions-comment": "Ensure a single version of webdriver-manager which comes from root node_modules that has already run webdriver-manager update",
"resolutions": {
"**/webdriver-manager": "file:../../node_modules/webdriver-manager"
},
"scripts": {
"test": "./test.sh",
"postinstall": "patch-package"
}
}

View File

@ -1,25 +0,0 @@
diff --git a/node_modules/@angular/bazel/src/builders/files/WORKSPACE.template b/node_modules/@angular/bazel/src/builders/files/WORKSPACE.template
index 9aad043..e767dc6 100755
--- a/node_modules/@angular/bazel/src/builders/files/WORKSPACE.template
+++ b/node_modules/@angular/bazel/src/builders/files/WORKSPACE.template
@@ -10,7 +10,7 @@
# imports also make sense when referencing the published package.
workspace(
name = "project",
- managed_directories = {"@npm": ["node_modules"]},
+ # managed_directories = {"@npm": ["node_modules"]},
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
@@ -67,6 +67,11 @@ node_repositories(
yarn_install(
name = "npm",
package_json = "//:package.json",
+ # Turn off symlink_node_modules here as it causes flakiness with missing
+ # files in node_modules.
+ # TODO: track down the root cause of the flakiness; current suspect is that
+ # it is an issue with managed_directories when resources are limited
+ symlink_node_modules = False,
yarn_lock = "//:yarn.lock",
)

View File

@ -1,94 +0,0 @@
#!/usr/bin/env bash
set -eux -o pipefail
# sedi makes `sed -i` work on both OSX & Linux
# See https://stackoverflow.com/questions/2320564/i-need-my-sed-i-command-for-in-place-editing-to-work-with-both-gnu-sed-and-bsd
function sedi () {
case $(uname) in
Darwin*) sedi=('-i' '') ;;
*) sedi='-i' ;;
esac
sed "${sedi[@]}" "$@"
}
function installLocalPackages() {
# Install Angular packages that are built locally from HEAD.
# This also gets around the bug whereby yarn caches local `file://` urls.
# See https://github.com/yarnpkg/yarn/issues/2165
readonly pwd=$(pwd)
readonly packages=(
animations common compiler core forms platform-browser
platform-browser-dynamic router bazel compiler-cli language-service
)
local local_packages=()
for package in "${packages[@]}"; do
local_packages+=("@angular/${package}@file:${pwd}/../node_modules/@angular/${package}")
done
# keep protractor, typescript, tslib, and @types/node versions in sync with the ones used in this repo
local_packages+=("protractor@file:${pwd}/../node_modules/protractor")
local_packages+=("typescript@file:${pwd}/../node_modules/typescript")
local_packages+=("tslib@file:${pwd}/../node_modules/tslib")
local_packages+=("@types/node@file:${pwd}/../node_modules/@types/node")
# add protractor, puppeteer & webdriver-manager so we get the chrome & chromedriver binaries
# that have already been downloaded at the root
local_packages+=("puppeteer@file:${pwd}/../node_modules/puppeteer")
local_packages+=("webdriver-manager@file:${pwd}/../node_modules/webdriver-manager")
yarn add --ignore-scripts --silent "${local_packages[@]}" --cache-folder ./.yarn_local_cache
}
function patchKarmaConf() {
sedi "s#module.exports#process.env.CHROME_BIN = require\('puppeteer'\).executablePath\(\); module.exports#" ./karma.conf.js
sedi "s#browsers\: \['Chrome'\],#customLaunchers\: \{ ChromeHeadlessNoSandbox\: \{ base\: 'ChromeHeadless', flags\: \['--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage', '--hide-scrollbars', '--mute-audio'\] \} \}, browsers\: \['ChromeHeadlessNoSandbox'\],#" ./karma.conf.js
}
function patchProtractorConf() {
sedi "s#browserName\: 'chrome'#browserName\: 'chrome', chromeOptions\: \{ binary: require\('puppeteer'\).executablePath\(\), args: \['--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage', '--hide-scrollbars', '--mute-audio'\] \},#" ./e2e/protractor.conf.js
}
function testBazel() {
# Set up
ng version
rm -rf demo
# Create project
ng new demo --collection=@angular/bazel --routing --skip-git --skip-install --style=scss
cd demo
# Use a local yarn cache folder so we don't access the global yarn cache
mkdir .yarn_local_cache
patchKarmaConf
patchProtractorConf
installLocalPackages
ng generate component widget --style=css
ng build
ng test
ng e2e
ng e2e --prod
if [ -e 'WORKSPACE' ] || [ -e 'BUILD.bazel' ]; then
echo 'WORKSPACE / BUILD.bazel file should not exist in project'
exit 1
fi
}
function testNonBazel() {
# Replace angular.json that uses Bazel builder with the default generated by CLI
mv ./angular.json.bak ./angular.json
rm -rf dist src/main.dev.ts src/main.prod.ts
# disable CLI's version check (if version is 0.0.0, then no version check happens)
yarn --cwd node_modules/@angular/cli version --new-version 0.0.0 --no-git-tag-version
# re-add build-angular
yarn add --dev file:../node_modules/@angular-devkit/build-angular --cache-folder ./.yarn_local_cache
ng build --progress=false
ng test --progress=false --watch=false
ng e2e --port 0 --configuration=production --webdriver-update=false
}
testBazel
# this test verifies that users can undo bazel - the value of this is questionable
# because there are way too many manual steps and it would be easier for users to
# just revert the diff created by `ng add @angular/bazel`
testNonBazel

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -90,13 +90,9 @@ assertSucceeded "Expected 'ngcc' to log 'Compiling'."
grep "ApplicationModule.ɵmod = ɵngcc0.ɵɵdefineNgModule" node_modules/@angular/core/esm2015/src/application_module.js
assertSucceeded "Expected 'ngcc' to correctly compile 'ApplicationModule' in '@angular/core' (esm2015)."
# TODO: This assertion is disabled because @angular/core is no longer processed by tsickle which creates the static properties.
# We should either remove this assertion or use a syntentic JS file as input.
# Discuss with the ngcc folks.
#
# Did it place the `setClassMetadata` call correctly?
# cat node_modules/@angular/core/fesm2015/core.js | awk 'ORS=" "' | grep "ApplicationRef.ctorParameters.*setClassMetadata(ApplicationRef"
# assertSucceeded "Expected 'ngcc' to place 'setClassMetadata' after static properties like 'ctorParameters' in '@angular/core' (fesm2015)."
cat node_modules/@angular/core/fesm2015/core.js | awk 'ORS=" "' | grep "ApplicationRef.ctorParameters.*setClassMetadata(ApplicationRef"
assertSucceeded "Expected 'ngcc' to place 'setClassMetadata' after static properties like 'ctorParameters' in '@angular/core' (fesm2015)."
# Did it transform @angular/core typing files correctly?
@ -123,13 +119,19 @@ assertSucceeded "Expected 'ngcc' to log 'Compiling'."
assertSucceeded "Expected 'ngcc' to generate an abstract directive definition for 'MatMenuBase' in '@angular/material' (esm5)."
# TODO: This assertion is disabled because @angular/common no longer contains __decorate calls.
# We should either remove this assertion or use a syntentic JS file as input.
# Discuss with the ngcc folks.
# Did it handle namespace imported decorators in UMD using `__decorate` syntax?
grep "type: i0.Injectable" node_modules/@angular/common/bundles/common.umd.js
assertSucceeded "Expected 'ngcc' to correctly handle '__decorate' syntax in '@angular/common' (umd)."
#grep "type: i0.Injectable" node_modules/@angular/common/bundles/common.umd.js
#assertSucceeded "Expected 'ngcc' to correctly handle '__decorate' syntax in '@angular/common' (umd)."
# TODO: This assertion is disabled because @angular/common no longer contains __decorate calls.
# We should either remove this assertion or use a syntentic JS file as input.
# Discuss with the ngcc folks.
# (and ensure the @angular/common package is indeed using `__decorate` syntax)
grep "JsonPipe = __decorate(" node_modules/@angular/common/bundles/common.umd.js.__ivy_ngcc_bak
assertSucceeded "Expected '@angular/common' (umd) to actually use '__decorate' syntax."
#grep "JsonPipe = __decorate(" node_modules/@angular/common/bundles/common.umd.js.__ivy_ngcc_bak
#assertSucceeded "Expected '@angular/common' (umd) to actually use '__decorate' syntax."
# Did it handle namespace imported decorators in UMD using static properties?

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,6 +1,6 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license

View File

@ -1,5 +1,3 @@
import "tslib";
import "@angular/animations";
import "@angular/core";

View File

@ -1,3 +1 @@
import "tslib";
import "@angular/core";

View File

@ -1,7 +1,5 @@
import "rxjs";
import "tslib";
import "rxjs/operators";
const __globalThis = "undefined" !== typeof globalThis && globalThis;

View File

@ -1,5 +1,3 @@
import "tslib";
import "@angular/core";
import "@angular/common";

View File

@ -1,5 +1,3 @@
import "tslib";
import "@angular/common";
import "@angular/core";

View File

@ -1,5 +1,3 @@
import "tslib";
import "@angular/common";
import "@angular/core";

Some files were not shown because too many files have changed in this diff Show More