Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
106b85d843 | |||
826afc922c | |||
902695ce19 | |||
2cb775b21b | |||
810586737b | |||
7bdb792504 | |||
43d5105e58 | |||
559c98367f | |||
a02eda5923 | |||
41b5ea12f7 | |||
597d14f0b1 | |||
6ae8a3e1c4 |
@ -16,10 +16,6 @@ test --test_tag_filters=-manual
|
||||
# (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)
|
||||
build --announce_rc
|
||||
|
||||
# Create dist/bin symlink to $(bazel info bazel-bin)
|
||||
# We use this when uploading artifacts after the build finishes
|
||||
build --symlink_prefix=dist/
|
||||
|
||||
# Workaround https://github.com/bazelbuild/bazel/issues/3645
|
||||
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
|
||||
# Limit Bazel to consuming resources that fit in CircleCI "xlarge" class
|
||||
|
@ -90,25 +90,6 @@ jobs:
|
||||
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
||||
- run: yarn bazel test //... --build_tag_filters=-ivy-only,local --test_tag_filters=-ivy-only,local
|
||||
|
||||
# CircleCI will allow us to go back and view/download these artifacts from past builds.
|
||||
# Also we can use a service like https://buildsize.org/ to automatically track binary size of these artifacts.
|
||||
# The destination keys need be format {projectName}/{context}/{fileName} so that the github-robot can process them for size calculations
|
||||
# projectName should remain consistant to group files
|
||||
# context and fileName can be almost anything (within usual URI rules)
|
||||
# There should only be exactly 2 forward slashes in the path
|
||||
# This is so they're backwards compatiable with the existing data we have on bundle sizes
|
||||
- store_artifacts:
|
||||
path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js
|
||||
destination: core/hello_world/bundle
|
||||
- store_artifacts:
|
||||
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js
|
||||
destination: core/todo/bundle
|
||||
- store_artifacts:
|
||||
path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js.br
|
||||
destination: core/hello_world/bundle.br
|
||||
- store_artifacts:
|
||||
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.br
|
||||
destination: core/todo/bundle.br
|
||||
- save_cache:
|
||||
key: *cache_key
|
||||
paths:
|
||||
@ -148,7 +129,29 @@ jobs:
|
||||
- *yarn_install
|
||||
- *setup_bazel_remote_execution
|
||||
|
||||
- run: yarn test-ivy-aot //...
|
||||
# We need to explicitly specify the --symlink_prefix option because otherwise we would
|
||||
# not be able to easily find the output bin directory when uploading artifacts for size
|
||||
# measurements.
|
||||
- run: yarn test-ivy-aot //... --symlink_prefix=dist/
|
||||
|
||||
# Publish bundle artifacts which will be used to calculate the size change. **Note**: Make
|
||||
# sure that the size plugin from the Angular robot fetches the artifacts from this CircleCI
|
||||
# job (see .github/angular-robot.yml). Additionally any artifacts need to be stored with the
|
||||
# following path format: "{projectName}/{context}/{fileName}". This format is necessary
|
||||
# because otherwise the bot is not able to pick up the artifacts from CircleCI. See:
|
||||
# https://github.com/angular/github-robot/blob/master/functions/src/plugins/size.ts#L392-L394
|
||||
- store_artifacts:
|
||||
path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js
|
||||
destination: core/hello_world/bundle
|
||||
- store_artifacts:
|
||||
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js
|
||||
destination: core/todo/bundle
|
||||
- store_artifacts:
|
||||
path: dist/bin/packages/core/test/bundling/hello_world/bundle.min.js.br
|
||||
destination: core/hello_world/bundle.br
|
||||
- store_artifacts:
|
||||
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.br
|
||||
destination: core/todo/bundle.br
|
||||
|
||||
test_aio:
|
||||
<<: *job_defaults
|
||||
|
2
.github/angular-robot.yml
vendored
2
.github/angular-robot.yml
vendored
@ -4,7 +4,7 @@
|
||||
size:
|
||||
disabled: false
|
||||
maxSizeIncrease: 2000
|
||||
circleCiStatusName: "ci/circleci: test"
|
||||
circleCiStatusName: "ci/circleci: test_ivy_aot"
|
||||
|
||||
# options for the merge plugin
|
||||
merge:
|
||||
|
@ -53,7 +53,7 @@ node_repositories(
|
||||
node_version = "10.9.0",
|
||||
package_json = ["//:package.json"],
|
||||
preserve_symlinks = True,
|
||||
yarn_version = "1.9.2",
|
||||
yarn_version = "1.12.1",
|
||||
)
|
||||
|
||||
yarn_install(
|
||||
|
@ -11,13 +11,13 @@ Install the CLI using the `npm` package manager:
|
||||
npm install -g @angular/cli
|
||||
</code-example>
|
||||
|
||||
For details about changes between versions, and information about updating from previous releases,
|
||||
For details about changes between versions, and information about updating from previous releases,
|
||||
see the Releases tab on GitHub: https://github.com/angular/angular-cli/releases
|
||||
|
||||
## Basic workflow
|
||||
|
||||
Invoke the tool on the command line through the `ng` executable.
|
||||
Online help is available on the command line.
|
||||
Invoke the tool on the command line through the `ng` executable.
|
||||
Online help is available on the command line.
|
||||
Enter the following to list commands or options for a given command (such as [generate](cli/generate)) with a short description.
|
||||
|
||||
<code-example format="." language="bash">
|
||||
@ -33,36 +33,35 @@ cd my-first-project
|
||||
ng serve
|
||||
</code-example>
|
||||
|
||||
In your browser, open http://localhost:4200/ to see the new app run.
|
||||
In your browser, open http://localhost:4200/ to see the new app run.
|
||||
When you use the [ng serve](cli/serve) command to build an app and serve it locally, the server automatically rebuilds the app and reloads the page when you change any of the source files.
|
||||
|
||||
## Workspaces and project files
|
||||
|
||||
The [ng new](cli/new) command creates an *Angular workspace* folder and generates a new app skeleton.
|
||||
The [ng new](cli/new) command creates an *Angular workspace* folder and generates a new app skeleton.
|
||||
A workspace can contain multiple apps and libraries.
|
||||
The initial app created by the [ng new](cli/new) command is at the top level of the workspace.
|
||||
The initial app created by the [ng new](cli/new) command is at the top level of the workspace.
|
||||
When you generate an additional app or library in a workspace, it goes into a `projects/` subfolder.
|
||||
|
||||
A newly generated app contains the source files for a root module, with a root component and template.
|
||||
A newly generated app contains the source files for a root module, with a root component and template.
|
||||
Each app has a `src` folder that contains the logic, data, and assets.
|
||||
|
||||
You can edit the generated files directly, or add to and modify them using CLI commands.
|
||||
Use the [ng generate](cli/generate) command to add new files for additional components and services, and code for new pipes, directives, and so on.
|
||||
You can edit the generated files directly, or add to and modify them using CLI commands.
|
||||
Use the [ng generate](cli/generate) command to add new files for additional components and services, and code for new pipes, directives, and so on.
|
||||
Commands such as [add](cli/add) and [generate](cli/generate), which create or operate on apps and libraries, must be executed from within a workspace or project folder.
|
||||
|
||||
* See more about the [Workspace file structure](guide/file-structure).
|
||||
|
||||
### Workspace and project configuration
|
||||
|
||||
A single workspace configuration file, `angular.json`, is created at the top level of the workspace.
|
||||
A single workspace configuration file, `angular.json`, is created at the top level of the workspace.
|
||||
This is where you can set per-project defaults for CLI command options, and specify configurations to use when the CLI builds a project for different targets.
|
||||
|
||||
The [ng config](cli/config) command lets you set and retrieve configuration values from the command line, or you can edit the `angular.json` file directly.
|
||||
Note that option names in the configuration file must use [camelCase](guide/glossary#case-types), while option names supplied to commands can use either camelCase or dash-case.
|
||||
The [ng config](cli/config) command lets you set and retrieve configuration values from the command line, or you can edit the `angular.json` file directly.
|
||||
Note that option names in the configuration file must use [camelCase](guide/glossary#case-types), while option names supplied to commands can use either camelCase or dash-case.
|
||||
|
||||
* See more about [Workspace Configuration](guide/workspace-config).
|
||||
* See the [complete schema](https://github.com/angular/angular-cli/wiki/angular-workspace) for `angular.json`.
|
||||
<!-- * Learn more about *configuration options for Angular(links to new guide or topics TBD)*. -->
|
||||
|
||||
|
||||
## CLI command-language syntax
|
||||
|
||||
@ -72,20 +71,20 @@ Command syntax is shown as follows:
|
||||
|
||||
* Most commands, and some options, have aliases. Aliases are shown in the syntax statement for each command.
|
||||
|
||||
* Option names are prefixed with a double dash (--).
|
||||
Option aliases are prefixed with a single dash (-).
|
||||
* Option names are prefixed with a double dash (--).
|
||||
Option aliases are prefixed with a single dash (-).
|
||||
Arguments are not prefixed.
|
||||
For example: `ng build my-app -c production`
|
||||
|
||||
* Typically, the name of a generated artifact can be given as an argument to the command or specified with the --name option.
|
||||
* Typically, the name of a generated artifact can be given as an argument to the command or specified with the --name option.
|
||||
|
||||
* Argument and option names can be given in either
|
||||
[camelCase or dash-case](guide/glossary#case-types).
|
||||
* Argument and option names can be given in either
|
||||
[camelCase or dash-case](guide/glossary#case-types).
|
||||
`--myOptionName` is equivalent to `--my-option-name`.
|
||||
|
||||
### Boolean and enumerated options
|
||||
|
||||
Boolean options have two forms: `--thisOption` sets the flag, `--noThisOption` clears it.
|
||||
Boolean options have two forms: `--thisOption` sets the flag, `--noThisOption` clears it.
|
||||
If neither option is supplied, the flag remains in its default state, as listed in the reference documentation.
|
||||
|
||||
Allowed values are given with each enumerated option description, with the default value in **bold**.
|
||||
@ -96,7 +95,6 @@ Options that specify files can be given as absolute paths, or as paths relative
|
||||
|
||||
### Schematics
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
@ -56,7 +56,9 @@ A component and its template together define a *view*. A component can contain a
|
||||
When you create a component, it's associated directly with a single view, called the *host view*. The host view can be the root of a view hierarchy, which can contain *embedded views*, which are in turn the host views of other components. Those components can be in the same NgModule, or can be imported from other NgModules. Views in the tree can be nested to any depth.
|
||||
|
||||
<div class="alert is-helpful">
|
||||
**Note:** The hierarchical structure of views is a key factor in the way Angular detects and responds to changes in the DOM and app data.
|
||||
|
||||
**Note:** The hierarchical structure of views is a key factor in the way Angular detects and responds to changes in the DOM and app data.
|
||||
|
||||
</div>
|
||||
|
||||
## NgModules and JavaScript modules
|
||||
|
@ -32,11 +32,11 @@ For example:
|
||||
|
||||
The base file `environment.ts`, contains the default environment settings. For example:
|
||||
|
||||
<code-example language="none" class="code-shell">
|
||||
```
|
||||
export const environment = {
|
||||
production: false
|
||||
};
|
||||
</code-example>
|
||||
```
|
||||
|
||||
The `build` command uses this as the build target when no environment is specified.
|
||||
You can add further variables, either as additional properties on the environment object, or as separate objects.
|
||||
@ -144,7 +144,11 @@ You can add additional configurations as required. To add a staging environment,
|
||||
You can add more configuration options to this target environment as well.
|
||||
Any option that your build supports can be overridden in a build target configuration.
|
||||
|
||||
To build using the staging configuration, run `ng build --configuration=staging`.
|
||||
To build using the staging configuration, run the following command:
|
||||
|
||||
<code-example language="sh" class="code-shell">
|
||||
ng build --configuration=staging
|
||||
</code-example>
|
||||
|
||||
You can also configure the `serve` command to use the targeted build configuration if you add it to the "serve:configurations" section of `angular.json`:
|
||||
|
||||
|
@ -71,7 +71,7 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.9.0 <11.0.0",
|
||||
"yarn": ">=1.9.2 <2.0.0"
|
||||
"yarn": ">=1.10.1 <1.13.0"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
@ -1,9 +1,5 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
// Reflect.metadata polyfill is only needed in the JIT mode which we use only for unit tests
|
||||
import 'core-js/es6/reflect';
|
||||
import 'core-js/es7/reflect';
|
||||
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
|
@ -12,7 +12,7 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.9.0 <11.0.0",
|
||||
"yarn": ">=1.9.2 <2.0.0"
|
||||
"yarn": ">=1.10.1 <1.13.0"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
@ -36,7 +36,7 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi
|
||||
check_bazel_version("0.17.0")
|
||||
node_repositories(
|
||||
node_version = "10.9.0",
|
||||
yarn_version = "1.9.2",
|
||||
yarn_version = "1.12.1",
|
||||
)
|
||||
|
||||
yarn_install(
|
||||
|
@ -13,8 +13,8 @@
|
||||
"@angular/bazel": "file:../angular/dist/packages-dist/bazel",
|
||||
"@angular/compiler": "file:../angular/dist/packages-dist/compiler",
|
||||
"@angular/compiler-cli": "file:../angular/dist/packages-dist/compiler-cli",
|
||||
"@bazel/karma": "0.20.3",
|
||||
"@bazel/typescript": "0.20.3",
|
||||
"@bazel/karma": "0.21.0",
|
||||
"@bazel/typescript": "0.21.0",
|
||||
"@types/jasmine": "2.8.8",
|
||||
"@types/source-map": "0.5.1",
|
||||
"protractor": "5.1.2",
|
||||
|
@ -9,7 +9,7 @@
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.9.0 <11.0.0",
|
||||
"yarn": ">=1.9.2 <2.0.0"
|
||||
"yarn": ">=1.10.1 <1.13.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -36,7 +36,7 @@
|
||||
"// 1": "dependencies are used locally and by bazel",
|
||||
"dependencies": {
|
||||
"@angular-devkit/schematics": "^0.5.5",
|
||||
"@bazel/typescript": "0.20.3",
|
||||
"@bazel/typescript": "0.21.0",
|
||||
"@schematics/angular": "^0.5.4",
|
||||
"@types/chokidar": "1.7.3",
|
||||
"@types/convert-source-map": "^1.5.1",
|
||||
@ -91,7 +91,7 @@
|
||||
"devDependencies": {
|
||||
"@bazel/bazel": "^0.18.1",
|
||||
"@bazel/ibazel": "^0.1.1",
|
||||
"@bazel/karma": "0.20.3",
|
||||
"@bazel/karma": "0.21.0",
|
||||
"@types/angular": "^1.6.47",
|
||||
"@types/base64-js": "1.2.5",
|
||||
"@types/jasminewd2": "^2.0.4",
|
||||
|
@ -25,15 +25,15 @@ def rules_angular_dependencies():
|
||||
_maybe(
|
||||
http_archive,
|
||||
name = "build_bazel_rules_nodejs",
|
||||
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.15.3.zip",
|
||||
strip_prefix = "rules_nodejs-0.15.3",
|
||||
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip",
|
||||
strip_prefix = "rules_nodejs-0.16.2",
|
||||
)
|
||||
|
||||
_maybe(
|
||||
http_archive,
|
||||
name = "build_bazel_rules_typescript",
|
||||
url = "https://github.com/bazelbuild/rules_typescript/archive/8ea1a55cf5cf8be84ddfeefc0940769b80da792f.zip",
|
||||
strip_prefix = "rules_typescript-8ea1a55cf5cf8be84ddfeefc0940769b80da792f",
|
||||
url = "https://github.com/bazelbuild/rules_typescript/archive/0.21.0.zip",
|
||||
strip_prefix = "rules_typescript-0.21.0",
|
||||
)
|
||||
|
||||
# Needed for Remote Execution
|
||||
|
@ -12,7 +12,7 @@
|
||||
},
|
||||
"typings": "./src/ngc-wrapped/index.d.ts",
|
||||
"dependencies": {
|
||||
"@bazel/typescript": "^0.20.3",
|
||||
"@bazel/typescript": "^0.21.0",
|
||||
"@types/node": "6.0.84",
|
||||
"shelljs": "0.8.2",
|
||||
"tsickle": "0.32.1"
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import * as ng from '@angular/compiler-cli';
|
||||
import {BazelOptions, CachedFileLoader, CompilerHost, FileCache, FileLoader, UncachedFileLoader, constructManifest, debug, fixUmdModuleDeclarations, parseTsconfig, resolveNormalizedPath, runAsWorker, runWorkerLoop} from '@bazel/typescript';
|
||||
import {BazelOptions, CachedFileLoader, CompilerHost, FileCache, FileLoader, UncachedFileLoader, constructManifest, debug, parseTsconfig, resolveNormalizedPath, runAsWorker, runWorkerLoop} from '@bazel/typescript';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as tsickle from 'tsickle';
|
||||
@ -21,9 +21,6 @@ const NGC_ASSETS = /\.(css|html|ngsummary\.json)$/;
|
||||
|
||||
const BAZEL_BIN = /\b(blaze|bazel)-out\b.*?\bbin\b/;
|
||||
|
||||
// TODO(alexeagle): probably not needed, see
|
||||
// https://github.com/bazelbuild/rules_typescript/issues/28
|
||||
const ALLOW_NON_HERMETIC_READS = true;
|
||||
// Note: We compile the content of node_modules with plain ngc command line.
|
||||
const ALL_DEPS_COMPILED_WITH_BAZEL = false;
|
||||
|
||||
@ -58,7 +55,6 @@ export function runOneBuild(args: string[], inputs?: {[path: string]: string}):
|
||||
const compilerOpts = ng.createNgCompilerOptions(basePath, config, tsOptions);
|
||||
const tsHost = ts.createCompilerHost(compilerOpts, true);
|
||||
const {diagnostics} = compile({
|
||||
allowNonHermeticReads: ALLOW_NON_HERMETIC_READS,
|
||||
allDepsCompiledWithBazel: ALL_DEPS_COMPILED_WITH_BAZEL,
|
||||
compilerOpts,
|
||||
tsHost,
|
||||
@ -84,9 +80,8 @@ export function relativeToRootDirs(filePath: string, rootDirs: string[]): string
|
||||
return filePath;
|
||||
}
|
||||
|
||||
export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true, compilerOpts,
|
||||
tsHost, bazelOpts, files, inputs, expectedOuts, gatherDiagnostics}: {
|
||||
allowNonHermeticReads: boolean,
|
||||
export function compile({allDepsCompiledWithBazel = true, compilerOpts, tsHost, bazelOpts, files,
|
||||
inputs, expectedOuts, gatherDiagnostics}: {
|
||||
allDepsCompiledWithBazel?: boolean,
|
||||
compilerOpts: ng.CompilerOptions,
|
||||
tsHost: ts.CompilerHost, inputs?: {[path: string]: string},
|
||||
@ -104,7 +99,7 @@ export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true,
|
||||
}
|
||||
|
||||
if (inputs) {
|
||||
fileLoader = new CachedFileLoader(fileCache, allowNonHermeticReads);
|
||||
fileLoader = new CachedFileLoader(fileCache);
|
||||
// Resolve the inputs to absolute paths to match TypeScript internals
|
||||
const resolvedInputs: {[path: string]: string} = {};
|
||||
const inputKeys = Object.keys(inputs);
|
||||
@ -186,8 +181,7 @@ export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true,
|
||||
}
|
||||
|
||||
const bazelHost = new CompilerHost(
|
||||
files, compilerOpts, bazelOpts, tsHost, fileLoader, allowNonHermeticReads,
|
||||
generatedFileModuleResolver);
|
||||
files, compilerOpts, bazelOpts, tsHost, fileLoader, generatedFileModuleResolver);
|
||||
|
||||
// Also need to disable decorator downleveling in the BazelHost in Ivy mode.
|
||||
if (isInIvyMode) {
|
||||
@ -295,10 +289,7 @@ export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true,
|
||||
program, bazelHost, bazelHost, compilerOpts, targetSourceFile, writeFile,
|
||||
cancellationToken, emitOnlyDtsFiles, {
|
||||
beforeTs: customTransformers.before,
|
||||
afterTs: [
|
||||
...(customTransformers.after || []),
|
||||
fixUmdModuleDeclarations((sf: ts.SourceFile) => bazelHost.amdModuleName(sf)),
|
||||
],
|
||||
afterTs: customTransformers.after,
|
||||
});
|
||||
|
||||
if (!gatherDiagnostics) {
|
||||
|
@ -379,7 +379,7 @@ export abstract class AbstractControl {
|
||||
|
||||
/**
|
||||
* Marks the control as `dirty`. A control becomes dirty when
|
||||
* the control's is changed through the UI; compare `markAsTouched`.
|
||||
* the control's value is changed through the UI; compare `markAsTouched`.
|
||||
*
|
||||
* @param opts Configuration options that determine how the control propagates changes
|
||||
* and emits events after marking is applied.
|
||||
@ -868,6 +868,7 @@ export abstract class AbstractControl {
|
||||
*
|
||||
* console.log(control.value); // 'Drew'
|
||||
* console.log(control.status); // 'DISABLED'
|
||||
* ```
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
|
@ -35,7 +35,7 @@ fi
|
||||
#######################
|
||||
|
||||
setEnvVar NODE_VERSION 10.9.0
|
||||
setEnvVar YARN_VERSION 1.9.2
|
||||
setEnvVar YARN_VERSION 1.12.1
|
||||
setEnvVar CHROMIUM_VERSION 561733 # Chrome 68 linux stable, see https://www.chromium.org/developers/calendar
|
||||
setEnvVar CHROMEDRIVER_VERSION_ARG "--versions.chrome 2.41"
|
||||
setEnvVar SAUCE_CONNECT_VERSION 4.4.9
|
||||
|
@ -6,13 +6,17 @@ set -u -e -o pipefail
|
||||
# Query Bazel for npm_package and ng_package rules with tags=["release-with-framework"]
|
||||
# Publish them to npm (tagged next)
|
||||
|
||||
# We need to resolve the Bazel binary in the node modules because running Bazel
|
||||
# through `yarn bazel` causes additional output that throws off the command stdout.
|
||||
BAZEL_BIN=$(yarn bin)/bazel
|
||||
|
||||
# query for all npm packages to be released as part of the framework release
|
||||
NPM_PACKAGE_LABELS=`bazel query --output=label 'attr("tags", "\[.*release-with-framework.*\]", //packages/...) intersect kind(".*_package", //packages/...)'`
|
||||
NPM_PACKAGE_LABELS=`${BAZEL_BIN} query --output=label 'attr("tags", "\[.*release-with-framework.*\]", //packages/...) intersect kind(".*_package", //packages/...)'`
|
||||
# build all npm packages in parallel
|
||||
bazel build $NPM_PACKAGE_LABELS
|
||||
${BAZEL_BIN} build $NPM_PACKAGE_LABELS
|
||||
# publish all packages in sequence to make it easier to spot any errors or warnings
|
||||
for packageLabel in $NPM_PACKAGE_LABELS; do
|
||||
echo "publishing $packageLabel"
|
||||
bazel run -- ${packageLabel}.publish --access public --tag latest
|
||||
${BAZEL_BIN} run -- ${packageLabel}.publish --access public --tag latest
|
||||
done
|
||||
|
||||
|
@ -6,12 +6,16 @@ set -u -e -o pipefail
|
||||
# Query Bazel for npm_package and ng_package rules with tags=["release-with-framework"]
|
||||
# Publish them to npm (tagged next)
|
||||
|
||||
# We need to resolve the Bazel binary in the node modules because running Bazel
|
||||
# through `yarn bazel` causes additional output that throws off the command stdout.
|
||||
BAZEL_BIN=$(yarn bin)/bazel
|
||||
|
||||
# query for all npm packages to be released as part of the framework release
|
||||
NPM_PACKAGE_LABELS=`bazel query --output=label 'attr("tags", "\[.*release-with-framework.*\]", //packages/...) intersect kind(".*_package", //packages/...)'`
|
||||
NPM_PACKAGE_LABELS=`${BAZEL_BIN} query --output=label 'attr("tags", "\[.*release-with-framework.*\]", //packages/...) intersect kind(".*_package", //packages/...)'`
|
||||
# build all npm packages in parallel
|
||||
bazel build $NPM_PACKAGE_LABELS
|
||||
${BAZEL_BIN} build $NPM_PACKAGE_LABELS
|
||||
# publish all packages in sequence to make it easier to spot any errors or warnings
|
||||
for packageLabel in $NPM_PACKAGE_LABELS; do
|
||||
echo "publishing $packageLabel"
|
||||
bazel run -- ${packageLabel}.publish --access public --tag next
|
||||
${BAZEL_BIN} run -- ${packageLabel}.publish --access public --tag next
|
||||
done
|
||||
|
@ -4,8 +4,8 @@
|
||||
"@angular/bazel": "6.1.9",
|
||||
"@angular/compiler": "6.1.9",
|
||||
"@angular/compiler-cli": "6.1.9",
|
||||
"@bazel/karma": "0.20.3",
|
||||
"@bazel/typescript": "0.20.3",
|
||||
"@bazel/karma": "0.21.0",
|
||||
"@bazel/typescript": "0.21.0",
|
||||
"typescript": "~3.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -25,9 +25,9 @@
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@bazel/karma@0.20.3":
|
||||
version "0.20.3"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.20.3.tgz#a63bb82b4887ae8c0d01f3028c6fa4764470851d"
|
||||
"@bazel/karma@0.21.0":
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.21.0.tgz#c5ed4c141f44d0e7e18586ad4cff5bd54f70f3cc"
|
||||
dependencies:
|
||||
jasmine-core "2.8.0"
|
||||
karma alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a
|
||||
@ -40,13 +40,12 @@
|
||||
requirejs "2.3.5"
|
||||
tmp "0.0.33"
|
||||
|
||||
"@bazel/typescript@0.20.3":
|
||||
version "0.20.3"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.20.3.tgz#51dcc369c2af0d7f2311d6e692d07776492060f4"
|
||||
"@bazel/typescript@0.21.0":
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.21.0.tgz#41c304f77a42c6a016280d0f4c20e0749c3f4b2a"
|
||||
dependencies:
|
||||
protobufjs "5.0.3"
|
||||
source-map-support "0.5.9"
|
||||
tsickle "0.28.0"
|
||||
tsutils "2.27.2"
|
||||
|
||||
"@bazel/typescript@^0.15.0":
|
||||
@ -1694,7 +1693,7 @@ karma-sourcemap-loader@0.3.7:
|
||||
dependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
|
||||
karma@alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a:
|
||||
"karma@github:alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a":
|
||||
version "1.7.1"
|
||||
resolved "https://codeload.github.com/alexeagle/karma/tar.gz/fa1a84ac881485b5657cb669e9b4e5da77b79f0a"
|
||||
dependencies:
|
||||
@ -3017,15 +3016,6 @@ tsickle@0.25.x:
|
||||
source-map "^0.5.6"
|
||||
source-map-support "^0.4.2"
|
||||
|
||||
tsickle@0.28.0:
|
||||
version "0.28.0"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.28.0.tgz#6cd6fa004766c6ad9261b599c83866ee97cc7875"
|
||||
dependencies:
|
||||
minimist "^1.2.0"
|
||||
mkdirp "^0.5.1"
|
||||
source-map "^0.6.0"
|
||||
source-map-support "^0.5.0"
|
||||
|
||||
tsickle@^0.32.1:
|
||||
version "0.32.1"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.32.1.tgz#f16e94ba80b32fc9ebe320dc94fbc2ca7f3521a5"
|
||||
|
27
yarn.lock
27
yarn.lock
@ -49,10 +49,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.1.1.tgz#f970c08b4e4efb0ab17e04ade3cc610554f33bed"
|
||||
integrity sha1-+XDAi05O+wqxfgSt48xhBVTzO+0=
|
||||
|
||||
"@bazel/karma@0.20.3":
|
||||
version "0.20.3"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.20.3.tgz#a63bb82b4887ae8c0d01f3028c6fa4764470851d"
|
||||
integrity sha512-IgWfTpK9XLEI977DS2kHIEO1QfFTEOBxeNDDjHtd1onmzyMCLROphTOBZ/g42ybUIWyJhS9DK4U3bLSMQE0Bng==
|
||||
"@bazel/karma@0.21.0":
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.21.0.tgz#c5ed4c141f44d0e7e18586ad4cff5bd54f70f3cc"
|
||||
integrity sha512-V5kxijZ7j/6x7+yNxPhhPrjO0APtNrlr5Gg/I9JRy3/SE3Y88yrPNIiEApLkfYWYWGQuoJO2LifUZA8BOXwLEA==
|
||||
dependencies:
|
||||
jasmine-core "2.8.0"
|
||||
karma alexeagle/karma#fa1a84ac881485b5657cb669e9b4e5da77b79f0a
|
||||
@ -65,14 +65,13 @@
|
||||
requirejs "2.3.5"
|
||||
tmp "0.0.33"
|
||||
|
||||
"@bazel/typescript@0.20.3":
|
||||
version "0.20.3"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.20.3.tgz#51dcc369c2af0d7f2311d6e692d07776492060f4"
|
||||
integrity sha512-BZmfzaNkgS++53CGEUk5p9FXOG+k8FNWCDbxzYljoIGP60aIkw4UgRQ24ReBwhCMg6M6KW609yje7AvDZkA6bg==
|
||||
"@bazel/typescript@0.21.0":
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.21.0.tgz#41c304f77a42c6a016280d0f4c20e0749c3f4b2a"
|
||||
integrity sha512-ASXj0RFybmqoa3LwqkTU3gNkX9bY9wL/VDNo5hlp9pynYWl4RMpe9V3m/qDIdtSuLJ+qD+Z3FKT/OcpWQHMlYA==
|
||||
dependencies:
|
||||
protobufjs "5.0.3"
|
||||
source-map-support "0.5.9"
|
||||
tsickle "0.28.0"
|
||||
tsutils "2.27.2"
|
||||
|
||||
"@schematics/angular@^0.5.4":
|
||||
@ -8304,16 +8303,6 @@ trim-off-newlines@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
|
||||
integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM=
|
||||
|
||||
tsickle@0.28.0:
|
||||
version "0.28.0"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.28.0.tgz#6cd6fa004766c6ad9261b599c83866ee97cc7875"
|
||||
integrity sha512-cb/Z4NlKMPGiIIbgmklfBJIxDl4EQoYqC+0/BnPxZWzWcUvikeOHFkkkEmabJVqKh47jUqOwU/uMAu6UvhicZg==
|
||||
dependencies:
|
||||
minimist "^1.2.0"
|
||||
mkdirp "^0.5.1"
|
||||
source-map "^0.6.0"
|
||||
source-map-support "^0.5.0"
|
||||
|
||||
tsickle@0.32.1:
|
||||
version "0.32.1"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.32.1.tgz#f16e94ba80b32fc9ebe320dc94fbc2ca7f3521a5"
|
||||
|
Reference in New Issue
Block a user