From f0e56083e01718d87a97b7987ee44eb04358ccda Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 23 Oct 2019 18:30:47 +0200 Subject: [PATCH] build: update node and yarn to latest stable versions Some CI jobs currently fail because db283f11eaf895e1e0b084a826cc9e3d6218e695 removed Node v11 from the supported node versions. Some of CI jobs use Node V11 though, so they currently fail. e.g. https://circleci.com/gh/angular/components/89692. In order to fix this, we ensure that we use consistent versions. For Node, we use the current active LTS version (v12). And for Yarn, we use the latest stable yarn version. --- .circleci/config.yml | 34 +++---- WORKSPACE | 11 ++- package.json | 9 +- tools/public_api_guard/cdk/a11y.d.ts | 10 +- tools/public_api_guard/cdk/testing.d.ts | 10 +- .../material/bottom-sheet.d.ts | 2 +- yarn.lock | 91 +------------------ 7 files changed, 41 insertions(+), 126 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3a6a4b9ed43e..dbadd120af8b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,23 +7,24 @@ # To validate changes, use an online parser, eg. # http://yaml-online-parser.appspot.com/ -var_1: &docker_image circleci/node:10.16 +var_1: &docker_image circleci/node:12.9.1 +var_2: &docker-firefox-image circleci/node:12.9.1-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. # Read more here: https://circleci.com/docs/2.0/caching/#restoring-cache. -var_2: &cache_key v4-ng-mat-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }} -var_3: &cache_fallback_key v4-ng-mat- +var_3: &cache_key v4-ng-mat-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }} +var_4: &cache_fallback_key v4-ng-mat- # Settings common to each job -var_4: &job_defaults +var_5: &job_defaults working_directory: ~/ng docker: - image: *docker_image # Job step for checking out the source code from GitHub. This also ensures that the source code # is rebased on top of master. -var_5: &checkout_code +var_6: &checkout_code checkout: # After checkout, rebase on top of master. By default, PRs are not rebased on top of master, # which we want. See https://discuss.circleci.com/t/1662 @@ -31,7 +32,7 @@ var_5: &checkout_code # Restores the cache that could be available for the current Yarn lock file. The cache usually # includes the node modules and the Bazel repository cache. -var_6: &restore_cache +var_7: &restore_cache restore_cache: keys: - *cache_key @@ -39,7 +40,7 @@ var_6: &restore_cache # Saves the cache for the current Yarn lock file. We store the node modules and the Bazel # repository cache in order to make subsequent builds faster. -var_7: &save_cache +var_8: &save_cache save_cache: key: *cache_key paths: @@ -47,36 +48,30 @@ var_7: &save_cache - "~/bazel_repository_cache" # Decryption token that is used to decode the GCP credentials file in ".circleci/gcp_token". -var_8: &gcp_decrypt_token "angular" +var_9: &gcp_decrypt_token "angular" # Job step that ensures that the node module dependencies are installed and up-to-date. We use # Yarn with the frozen lockfile option in order to make sure that lock file and package.json are # in sync. Unlike in Travis, we don't need to manually purge the node modules if stale because # CircleCI automatically discards the cache if the checksum of the lock file has changed. -var_9: &yarn_install +var_10: &yarn_install run: name: "Installing project dependencies" command: yarn install --frozen-lockfile --non-interactive # Anchor that can be used to download and install Yarn globally in the bash environment. -var_10: &yarn_download +var_11: &yarn_download run: name: "Downloading and installing Yarn" command: | touch $BASH_ENV - curl -o- -L https://yarnpkg.com/install.sh | PROFILE=$BASH_ENV bash -s -- --version "1.17.3" + curl -o- -L https://yarnpkg.com/install.sh | PROFILE=$BASH_ENV bash -s -- --version "1.19.1" # Sets up the Bazel config which is specific for CircleCI builds. -var_11: &setup_bazel_ci_config +var_12: &setup_bazel_ci_config run: name: "Setting up Bazel configuration for CI" command: | echo "import %workspace%/.circleci/bazel.rc" >> ./.bazelrc -# Sets up a different Docker image that includes a moe recent Firefox version which -# is needed for headless testing. -var_12: &docker-firefox-image - # TODO(devversion): Temporarily use a image that includes Firefox 62 because the - # ngcontainer image does include an old Firefox version that does not support headless. - - image: circleci/node:11.4.0-browsers # Attaches the release output which has been stored in the workspace to the current job. # https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs @@ -369,7 +364,8 @@ jobs: # Job that runs the local browser tests against the Angular Github snapshots # ---------------------------------------------------------------------------- snapshot_tests_local_browsers: - docker: *docker-firefox-image + docker: + - image: *docker-firefox-image resource_class: xlarge environment: GCP_DECRYPT_TOKEN: *gcp_decrypt_token diff --git a/WORKSPACE b/WORKSPACE index a37f8e3bb415..e45a8e2efa3a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -25,12 +25,17 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi check_bazel_version("0.27.0") node_repositories( + node_repositories = { + "12.9.1-darwin_amd64": ("node-v12.9.1-darwin-x64.tar.gz", "node-v12.9.1-darwin-x64", "9aaf29d30056e2233fd15dfac56eec12e8342d91bb6c13d54fb5e599383dddb9"), + "12.9.1-linux_amd64": ("node-v12.9.1-linux-x64.tar.xz", "node-v12.9.1-linux-x64", "680a1263c9f5f91adadcada549f0a9c29f1b26d09658d2b501c334c3f63719e5"), + "12.9.1-windows_amd64": ("node-v12.9.1-win-x64.zip", "node-v12.9.1-win-x64", "6a4e54bda091bd02dbd8ff1b9f6671e036297da012a53891e3834d4bf4bed297"), + }, # For deterministic builds, specify explicit NodeJS and Yarn versions. - node_version = "10.16.0", + node_version = "12.9.1", yarn_repositories = { - "1.17.3": ("yarn-v1.17.3.tar.gz", "yarn-v1.17.3", "e3835194409f1b3afa1c62ca82f561f1c29d26580c9e220c36866317e043c6f3"), + "1.19.1": ("yarn-v1.19.1.tar.gz", "yarn-v1.19.1", "34293da6266f2aae9690d59c2d764056053ff7eebc56b80b8df05010c3da9343"), }, - yarn_version = "1.17.3", + yarn_version = "1.19.1", ) yarn_install( diff --git a/package.json b/package.json index 0bf6cab58390..64b9b3d876e9 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ }, "license": "MIT", "engines": { - "node": "^10.13.0", - "yarn": ">= 1.17.3" + "node": "^12.0.0", + "yarn": ">= 1.19.1" }, "scripts": { "postinstall": "node --preserve-symlinks --preserve-symlinks-main tools/bazel/postinstall-patches.js | ngcc --properties main", @@ -134,7 +134,7 @@ "minimist": "^1.2.0", "mock-fs": "^4.7.0", "moment": "^2.18.1", - "node-sass": "^4.11.0", + "node-sass": "^4.12.0", "parse5": "^5.0.0", "protractor": "^5.4.2", "resolve-bin": "^0.4.0", @@ -158,6 +158,7 @@ "vrsource-tslint-rules": "5.1.1" }, "resolutions": { - "dgeni-packages/typescript": "3.6.4" + "dgeni-packages/typescript": "3.6.4", + "**/graceful-fs": "4.2.2" } } diff --git a/tools/public_api_guard/cdk/a11y.d.ts b/tools/public_api_guard/cdk/a11y.d.ts index 9026cda42123..65646f963cfa 100644 --- a/tools/public_api_guard/cdk/a11y.d.ts +++ b/tools/public_api_guard/cdk/a11y.d.ts @@ -54,13 +54,13 @@ export declare class FocusKeyManager extends ListKeyManager, origin: FocusOrigin, options?: FocusOptions): void; focusVia(element: HTMLElement, origin: FocusOrigin, options?: FocusOptions): void; - monitor(element: ElementRef, checkChildren?: boolean): Observable; + focusVia(element: ElementRef, origin: FocusOrigin, options?: FocusOptions): void; monitor(element: HTMLElement, checkChildren?: boolean): Observable; + monitor(element: ElementRef, checkChildren?: boolean): Observable; ngOnDestroy(): void; - stopMonitoring(element: ElementRef): void; stopMonitoring(element: HTMLElement): void; + stopMonitoring(element: ElementRef): void; } export interface FocusOptions { @@ -119,8 +119,8 @@ export declare class ListKeyManager { setNextItemActive(): void; setPreviousItemActive(): void; skipPredicate(predicate: (item: T) => boolean): this; - updateActiveItem(item: T): void; updateActiveItem(index: number): void; + updateActiveItem(item: T): void; withAllowedModifierKeys(keys: ListKeyManagerModifierKey[]): this; withHorizontalOrientation(direction: 'ltr' | 'rtl' | null): this; withTypeAhead(debounceInterval?: number): this; @@ -143,10 +143,10 @@ export declare function LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY(): null; export declare class LiveAnnouncer implements OnDestroy { constructor(elementToken: any, _ngZone: NgZone, _document: any, _defaultOptions?: LiveAnnouncerDefaultOptions | undefined); + announce(message: string): Promise; announce(message: string, politeness?: AriaLivePoliteness): Promise; announce(message: string, duration?: number): Promise; announce(message: string, politeness?: AriaLivePoliteness, duration?: number): Promise; - announce(message: string): Promise; clear(): void; ngOnDestroy(): void; } diff --git a/tools/public_api_guard/cdk/testing.d.ts b/tools/public_api_guard/cdk/testing.d.ts index 5a20f2c54c05..e520c2dd6d24 100644 --- a/tools/public_api_guard/cdk/testing.d.ts +++ b/tools/public_api_guard/cdk/testing.d.ts @@ -19,8 +19,8 @@ export declare abstract class ComponentHarness { protected locatorFor(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; protected locatorForAll(selector: string): AsyncFactoryFn; protected locatorForAll(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; - protected locatorForOptional(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; protected locatorForOptional(selector: string): AsyncFactoryFn; + protected locatorForOptional(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; protected waitForTasksOutsideAngular(): Promise; } @@ -47,12 +47,12 @@ export declare abstract class HarnessEnvironment implements HarnessLoader, Lo harnessLoaderFor(selector: string): Promise; harnessLoaderForAll(selector: string): Promise; harnessLoaderForOptional(selector: string): Promise; - locatorFor(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; locatorFor(selector: string): AsyncFactoryFn; - locatorForAll(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; + locatorFor(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; locatorForAll(selector: string): AsyncFactoryFn; - locatorForOptional(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; + locatorForAll(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; locatorForOptional(selector: string): AsyncFactoryFn; + locatorForOptional(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; abstract waitForTasksOutsideAngular(): Promise; } @@ -86,8 +86,8 @@ export interface LocatorFactory { locatorFor(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; locatorForAll(selector: string): AsyncFactoryFn; locatorForAll(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; - locatorForOptional(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; locatorForOptional(selector: string): AsyncFactoryFn; + locatorForOptional(harnessType: ComponentHarnessConstructor | HarnessPredicate): AsyncFactoryFn; waitForTasksOutsideAngular(): Promise; } diff --git a/tools/public_api_guard/material/bottom-sheet.d.ts b/tools/public_api_guard/material/bottom-sheet.d.ts index 84172bf2f18e..02a295bdf734 100644 --- a/tools/public_api_guard/material/bottom-sheet.d.ts +++ b/tools/public_api_guard/material/bottom-sheet.d.ts @@ -7,8 +7,8 @@ export declare class MatBottomSheet implements OnDestroy { constructor(_overlay: Overlay, _injector: Injector, _parentBottomSheet: MatBottomSheet, _location?: Location | undefined, _defaultOptions?: MatBottomSheetConfig | undefined); dismiss(): void; ngOnDestroy(): void; - open(template: TemplateRef, config?: MatBottomSheetConfig): MatBottomSheetRef; open(component: ComponentType, config?: MatBottomSheetConfig): MatBottomSheetRef; + open(template: TemplateRef, config?: MatBottomSheetConfig): MatBottomSheetRef; } export declare const matBottomSheetAnimations: { diff --git a/yarn.lock b/yarn.lock index dcea39bc4ec9..b48209d17a4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5430,28 +5430,11 @@ got@^6.7.1: unzip-response "^2.0.1" url-parse-lax "^1.0.0" -graceful-fs@^3.0.0: - version "3.0.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" - integrity sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg= - dependencies: - natives "^1.1.0" - -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - -graceful-fs@^4.2.0: +graceful-fs@4.2.2, graceful-fs@^3.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@~1.2.0: version "4.2.2" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== -graceful-fs@~1.2.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" - integrity sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q= - graphviz@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/graphviz/-/graphviz-0.0.8.tgz#e599e40733ef80e1653bfe89a5f031ecf2aa4aaa" @@ -7181,11 +7164,6 @@ lodash._shimkeys@~2.4.1: dependencies: lodash._objecttypes "~2.4.1" -lodash.assign@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= - lodash.clonedeep@^4.3.2: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -7325,11 +7303,6 @@ lodash.keys@~2.4.1: lodash._shimkeys "~2.4.1" lodash.isobject "~2.4.1" -lodash.mergewith@^4.6.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" - integrity sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ== - lodash.noop@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c" @@ -8113,11 +8086,6 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -nan@^2.10.0: - version "2.11.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" - integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA== - nan@^2.12.1: version "2.13.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" @@ -8155,11 +8123,6 @@ nash@^3.0.0: lodash "^4.17.5" minimist "^1.1.0" -natives@^1.1.0: - version "1.1.6" - resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.6.tgz#a603b4a498ab77173612b9ea1acdec4d980f00bb" - integrity sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA== - needle@^2.2.1: version "2.3.1" resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.1.tgz#d272f2f4034afb9c4c9ab1379aabc17fc85c9388" @@ -8264,7 +8227,7 @@ node-releases@^1.1.23: dependencies: semver "^5.3.0" -node-sass@^4.10.0: +node-sass@^4.10.0, node-sass@^4.12.0, node-sass@^4.8.3: version "4.12.0" resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.12.0.tgz#0914f531932380114a30cc5fa4fa63233a25f017" integrity sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ== @@ -8287,56 +8250,6 @@ node-sass@^4.10.0: stdout-stream "^1.4.0" "true-case-path" "^1.0.2" -node-sass@^4.11.0: - version "4.11.0" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.11.0.tgz#183faec398e9cbe93ba43362e2768ca988a6369a" - integrity sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA== - dependencies: - async-foreach "^0.1.3" - chalk "^1.1.1" - cross-spawn "^3.0.0" - gaze "^1.0.0" - get-stdin "^4.0.1" - glob "^7.0.3" - in-publish "^2.0.0" - lodash.assign "^4.2.0" - lodash.clonedeep "^4.3.2" - lodash.mergewith "^4.6.0" - meow "^3.7.0" - mkdirp "^0.5.1" - nan "^2.10.0" - node-gyp "^3.8.0" - npmlog "^4.0.0" - request "^2.88.0" - sass-graph "^2.2.4" - stdout-stream "^1.4.0" - "true-case-path" "^1.0.2" - -node-sass@^4.8.3: - version "4.10.0" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.10.0.tgz#dcc2b364c0913630945ccbf7a2bbf1f926effca4" - integrity sha512-fDQJfXszw6vek63Fe/ldkYXmRYK/QS6NbvM3i5oEo9ntPDy4XX7BcKZyTKv+/kSSxRtXXc7l+MSwEmYc0CSy6Q== - dependencies: - async-foreach "^0.1.3" - chalk "^1.1.1" - cross-spawn "^3.0.0" - gaze "^1.0.0" - get-stdin "^4.0.1" - glob "^7.0.3" - in-publish "^2.0.0" - lodash.assign "^4.2.0" - lodash.clonedeep "^4.3.2" - lodash.mergewith "^4.6.0" - meow "^3.7.0" - mkdirp "^0.5.1" - nan "^2.10.0" - node-gyp "^3.8.0" - npmlog "^4.0.0" - request "^2.88.0" - sass-graph "^2.2.4" - stdout-stream "^1.4.0" - "true-case-path" "^1.0.2" - node-source-walk@^4.0.0, node-source-walk@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/node-source-walk/-/node-source-walk-4.2.0.tgz#c2efe731ea8ba9c03c562aa0a9d984e54f27bc2c"