Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
08468c2
build: update to latest version of Angular and update bazel setup
devversion Oct 6, 2021
06eabbf
refactor: privately expose types needed for mixins to avoid broken ty…
devversion Oct 6, 2021
24df908
build: no longer keep track of UMD globals for package output
devversion Oct 6, 2021
b5095f8
build: generate linked ESM bundles of framework packages
devversion Oct 6, 2021
dfedea9
build: remove view engine workarounds for old APF output
devversion Oct 6, 2021
f1ff405
build: switch devmode output to ES2020 and ESM
devversion Oct 6, 2021
c632e81
build: remove all usages of the `entry_point` attribute on `ng_package`
devversion Oct 6, 2021
138c67b
build: make custom devserver work with e2e tests
devversion Oct 6, 2021
c3a18a8
build: replace gulp setup with bundling script for legacy remote brow…
devversion Oct 6, 2021
3db7926
build: update linker integration test to work with Angular v13
devversion Oct 6, 2021
81f03e8
build: update tooling to no longer support view engine mode
devversion Oct 6, 2021
1030d25
build: update e2e-app and dev-app to use esbuild
devversion Oct 6, 2021
e9ae554
build: run esbuild as build step before running browser or e2e tests
devversion Oct 6, 2021
6fb8b0d
build: update prerender test to work with ESM APF v13 packages
devversion Oct 6, 2021
cf5a63f
refactor: update ESM incompatible code to work with ESM compilation
devversion Oct 6, 2021
030d824
build: remove ngcc compatibility CI test jobs
devversion Oct 6, 2021
37f5779
build: remove unused linker-process bazel rule
devversion Oct 6, 2021
cc03d2a
build: ensure schematic code runs as commonjs in NPM output
devversion Oct 6, 2021
43d4b33
build: add subpath export for `fesm2020` bundles of components-examples
devversion Oct 6, 2021
3eae85d
build: add `exports` entries for Sass module resolution
devversion Oct 7, 2021
9c25a85
build: update node version used in bazel
devversion Oct 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ build:release --stamp
build:snapshot-build --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=snapshot"
build:snapshot-build --stamp

################################
# View Engine / Ivy toggle #
################################
build:view-engine --define=angular_ivy_enabled=False
build:ivy --define=angular_ivy_enabled=True
####################################
# Bazel custom flags #
####################################
build --flag_alias=partial_compilation=@npm//@angular/bazel/src:partial_compilation

# Set Ivy as the default
build --config=ivy
##################################
# Always enable Ivy compilation #
##################################
build --define=angular_ivy_enabled=True

################################
# Remote Execution Setup #
Expand Down
137 changes: 5 additions & 132 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# To validate changes, use an online parser, eg.
# http://yaml-online-parser.appspot.com/

var_1: &docker_image circleci/node:16.6.0
var_2: &docker-firefox-image circleci/node:16.6.0-browsers
var_1: &docker_image circleci/node:16.10.0
var_2: &docker-firefox-image circleci/node:16.10.0-browsers

# **Note**: When updating the beginning of the cache key, also update the cache key to match
# the new cache key prefix. This allows us to take advantage of CircleCI's fallback caching.
Expand Down Expand Up @@ -197,28 +197,6 @@ jobs:
- run: bazel build --build_tag_filters=-docs-package,-release-package -- src/...
- *slack_notify_on_failure

# -----------------------------------
# Job which ensures that all non-test Bazel targets build properly
# in View Engine configuration.
# -----------------------------------
view_engine_build:
<<: *job_defaults
resource_class: xlarge
environment:
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
steps:
- checkout_and_rebase
- *restore_cache
- *setup_bazel_ci_config
- *setup_bazel_remote_execution
- *yarn_install
- *setup_bazel_binary

# Exclude release and docs packages here as those will be built within
# the "build_release_packages" and "publish_snapshots" jobs.
- run: bazel build --build_tag_filters=-docs-package,-release-package --config=view-engine -- src/...
- *slack_notify_on_failure

# --------------------------------------------------------------------------------------------
# Job that runs API golden tests in "tools/public_api_guard".
# This job fails whenever an API has been updated but not explicitly approved through goldens.
Expand Down Expand Up @@ -338,10 +316,10 @@ jobs:
- *setup_bazel_binary

- run:
name: Checking rollup globals
name: Checking package externals
command: |
bazel build //:rollup_globals
yarn check-rollup-globals $(bazel info bazel-bin)/rollup_globals.json
bazel build //:package_externals
yarn check-package-externals $(bazel info bazel-bin)/package_externals.json

- run:
name: Checking entry-points configuration
Expand Down Expand Up @@ -456,54 +434,6 @@ jobs:
- run: ./scripts/circleci/publish-snapshots.sh
- *slack_notify_on_failure

# -----------------------------------------------------------------
# Job that ensures that the release output is compatible with ngcc.
# -----------------------------------------------------------------
ngcc_compatibility:
<<: *job_defaults
resource_class: xlarge
steps:
- checkout_and_rebase
- *restore_cache
- *attach_release_output
- *yarn_install

# Copy the release packages into the node modules so that ngcc can process them.
- run: cp -R dist/releases/* node_modules/@angular/
# Delete existing ngcc manifests that would prevent the copied packages
# from being discovered.
- run: rm -f node_modules/__ngcc_entry_points__.json
# Ensure that the job fails if an entry-point cannot be compiled. Also disable
# tsconfig parsing as that causes the release packages to be incorrectly resolved
# to the sources due to path mapping.
- run: yarn ngcc --error-on-failed-entry-point --no-tsconfig
- *slack_notify_on_failure

# -----------------------------------------------------------------
# Job that ensures that the release output is compatible with the
# latest snapshot ngcc changes.
# -----------------------------------------------------------------
ngcc_compatibility_snapshot:
<<: *job_defaults
resource_class: xlarge
steps:
- checkout_and_rebase
- *restore_cache
- *attach_release_output
- *setup_snapshot_builds
- *yarn_install_loose_lockfile

# Copy the release packages into the node modules so that ngcc can process them.
- run: cp -R dist/releases/* node_modules/@angular/
# Delete existing ngcc manifests that would prevent the copied packages
# from being discovered.
- run: rm -f node_modules/__ngcc_entry_points__.json
# Ensure that the job fails if an entry-point cannot be compiled. Also disable
# tsconfig parsing as that causes the release packages to be incorrectly resolved
# to the sources due to path mapping.
- run: yarn ngcc --error-on-failed-entry-point --no-tsconfig
- *slack_notify_on_failure

# ----------------------------------------------------------------------------
# Job that runs the local browser tests against the Angular Github snapshots
# ----------------------------------------------------------------------------
Expand All @@ -525,48 +455,6 @@ jobs:
- run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
- *slack_notify_on_failure

# ----------------------------------------------------------------------------
# Job that runs all Bazel tests against View Engine with the current Angular version
# specified in the project dev dependencies.
# ----------------------------------------------------------------------------
view_engine_test:
<<: *job_defaults
resource_class: xlarge
environment:
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
steps:
- checkout_and_rebase
- *restore_cache
- *setup_bazel_ci_config
- *setup_bazel_remote_execution
- *yarn_install
- *setup_bazel_binary

# Run project tests with NGC and View Engine.
- run: bazel test --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --config=view-engine --build_tests_only -- src/...
- *slack_notify_on_failure

# ----------------------------------------------------------------------------
# Job that runs all Bazel tests against View Engine from angular/angular#master.
# ----------------------------------------------------------------------------
view_engine_snapshot_test_cronjob:
<<: *job_defaults
resource_class: xlarge
environment:
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
steps:
- checkout_and_rebase
- *restore_cache
- *setup_bazel_ci_config
- *setup_bazel_remote_execution
- *setup_snapshot_builds
- *yarn_install_loose_lockfile
- *setup_bazel_binary

# Run project tests with NGC and View Engine.
- run: bazel test --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --config=view-engine --build_tests_only -- src/...
- *slack_notify_on_failure

# ----------------------------------------------------------------------------
# Job that runs all Bazel integration tests.
# ----------------------------------------------------------------------------
Expand All @@ -584,7 +472,6 @@ jobs:
- *setup_bazel_binary

- run: yarn integration-tests:partial-ivy
- run: yarn integration-tests:view-engine
# TODO: Re-enable when there are integration tests that should run with Ivy.
# Currently this command fails as there are no tests.
# - run: yarn integration-tests
Expand Down Expand Up @@ -654,10 +541,6 @@ workflows:
jobs:
- bazel_build:
filters: *ignore_presubmit_branch_filter
- view_engine_build:
filters: *ignore_presubmit_branch_filter
- view_engine_test:
filters: *ignore_presubmit_branch_filter
- api_golden_checks:
filters: *ignore_presubmit_branch_filter
- integration_tests:
Expand All @@ -680,14 +563,6 @@ workflows:
- build_release_packages
- lint:
filters: *ignore_presubmit_branch_filter
- ngcc_compatibility:
filters: *ignore_presubmit_branch_filter
requires:
- build_release_packages
- ngcc_compatibility_snapshot:
filters: *only_main_branch_filter
requires:
- build_release_packages
- publish_snapshots:
filters: *publish_branches_filter
requires:
Expand All @@ -702,8 +577,6 @@ workflows:
# workflow. See: https://circleci.com/ideas/?idea=CCI-I-295
- snapshot_tests_local_browsers:
filters: *only_main_branch_filter
- view_engine_snapshot_test_cronjob:
filters: *only_main_branch_filter
- mdc_snapshot_test_cronjob:
filters: *only_main_branch_filter
- integration_tests_snapshot:
Expand Down
1 change: 0 additions & 1 deletion .ng-dev/pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const pullRequest: PullRequestConfig = {
{pattern: 'preserve commits', method: 'rebase'}
]
},
claSignedLabel: 'cla: yes',
mergeReadyLabel: 'merge ready',
commitMessageFixupLabel: 'commit message fixup',
caretakerNoteLabel: 'caretaker note',
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.6.0
16.10.0
11 changes: 7 additions & 4 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//:rollup-globals.bzl", "ROLLUP_GLOBALS")
load("//:pkg-externals.bzl", "PKG_EXTERNALS")
load("//src/cdk:config.bzl", "CDK_ENTRYPOINTS")
load("//src/cdk-experimental:config.bzl", "CDK_EXPERIMENTAL_ENTRYPOINTS")
load("//src/material:config.bzl", "MATERIAL_ENTRYPOINTS", "MATERIAL_TESTING_ENTRYPOINTS")
Expand All @@ -11,10 +11,13 @@ exports_files([
"package.json",
])

# Target which writes the list of package externals into a JSON file so that the
# Starlark-configured externals (for the NPM package bundling) can be passed to
# the `check-package-externals` Yarn script, which validates our module imports.
genrule(
name = "rollup_globals",
outs = ["rollup_globals.json"],
cmd = "echo '%s' > $@" % ROLLUP_GLOBALS,
name = "package_externals",
outs = ["package_externals.json"],
cmd = "echo '%s' > $@" % PKG_EXTERNALS,
)

entryPoints = ["cdk/%s" % e for e in CDK_ENTRYPOINTS] + \
Expand Down
18 changes: 8 additions & 10 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Add NodeJS rules
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "4e1a5633267a0ca1d550cced2919dd4148575c0bafd47608b88aea79c41b5ca3",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.2.0/rules_nodejs-4.2.0.tar.gz"],
sha256 = "3635797a96c7bfcd0d265dacd722a07335e64d6ded9834af8d3f1b7ba5a25bba",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.3.0/rules_nodejs-4.3.0.tar.gz"],
)

# Add sass rules
Expand All @@ -27,11 +27,10 @@ http_archive(
# for declaring Bazel build setting flags.
http_archive(
name = "bazel_skylib",
sha256 = "ebdf850bfef28d923a2cc67ddca86355a449b5e4f38b0a70e584dc24e5984aa6",
strip_prefix = "bazel-skylib-f80bc733d4b9f83d427ce3442be2e07427b2cc8d",
sha256 = "191ea53b19b7e49b5b63d0ef81d1a6278227f9ac2c09fed1c2b3a75d573f1eeb",
strip_prefix = "bazel-skylib-b2ed61686ebca2a44d44857fef5b3e1d31cc2483",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/f80bc733d4b9f83d427ce3442be2e07427b2cc8d.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/archive/f80bc733d4b9f83d427ce3442be2e07427b2cc8d.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/archive/b2ed61686ebca2a44d44857fef5b3e1d31cc2483.tar.gz",
],
)

Expand All @@ -44,17 +43,16 @@ load("@build_bazel_rules_nodejs//:index.bzl", "check_bazel_version", "node_repos
check_bazel_version("4.0.0")

node_repositories(
node_version = "16.6.0",
node_version = "16.10.0",
package_json = ["//:package.json"],
)

yarn_install(
name = "npm",
# We add the postinstall patches file, and ngcc main fields update script here so
# that Yarn will rerun whenever one of these files has been modified.
# We add the postinstall patches file here so that Yarn will rerun whenever
# the file is modified.
data = [
"//:tools/postinstall/apply-patches.js",
"//:tools/postinstall/update-ngcc-main-fields.js",
],
package_json = "//:package.json",
quiet = False,
Expand Down
44 changes: 0 additions & 44 deletions angular-tsconfig.json

This file was deleted.

24 changes: 0 additions & 24 deletions gulpfile.js

This file was deleted.

2 changes: 1 addition & 1 deletion integration/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ package(default_visibility = ["//visibility:public"])
# available in the runfiles of an action.
js_library(
name = "npm-packages-from-runfiles",
srcs = ["npm-packages-from-runfiles.js"],
srcs = ["npm-packages-from-runfiles.mjs"],
)
3 changes: 2 additions & 1 deletion integration/linker/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_test")
nodejs_test(
name = "linker",
data = [
"link-packages-test.mjs",
"//integration:npm-packages-from-runfiles",
"//src/cdk:npm_package",
"//src/cdk-experimental:npm_package",
Expand All @@ -18,6 +19,6 @@ nodejs_test(
"@npm//chalk",
"@npm//glob",
],
entry_point = "link-packages-test.js",
entry_point = "link-packages-test.mjs",
tags = ["partial-compilation-integration"],
)
Loading