Skip to content

Patch port of various build changes #23440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ jobs:
- *setup_bazel_binary

- run: yarn build-and-check-release-output
- run: yarn check-tools
- run: yarn check-tooling-setup

# TODO(devversion): replace this with bazel tests that run Madge. This is
# cumbersome and doesn't guarantee no circular deps for other entry-points.
Expand Down
38 changes: 16 additions & 22 deletions .ng-dev/merge.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
import {DevInfraMergeConfig} from '@angular/dev-infra-private/ng-dev/pr/merge/config';
import {getDefaultTargetLabelConfiguration} from '@angular/dev-infra-private/ng-dev/pr/merge/defaults';
import {github} from './github';
import {release} from './release';
import {MergeConfig} from '@angular/dev-infra-private/ng-dev/pr/merge/config';

/**
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
* are respected by the merge script (e.g. the target labels).
*/
export const merge: DevInfraMergeConfig['merge'] = async api => {
return {
// By default, the merge script merges locally with `git cherry-pick` and autosquash.
// This has the downside of pull requests showing up as `Closed` instead of `Merged`.
// In the components repository, since we don't use fixup or squash commits, we can
// use the Github API merge strategy. That way we ensure that PRs show up as `Merged`.
githubApiMerge: {
default: 'squash',
labels: [
{pattern: 'preserve commits', method: 'rebase'}
]
},
claSignedLabel: 'cla: yes',
mergeReadyLabel: 'merge ready',
commitMessageFixupLabel: 'commit message fixup',
caretakerNoteLabel: 'caretaker note',
labels: await getDefaultTargetLabelConfiguration(api, github, release),
};
export const merge: MergeConfig = {
// By default, the merge script merges locally with `git cherry-pick` and autosquash.
// This has the downside of pull requests showing up as `Closed` instead of `Merged`.
// In the components repository, since we don't use fixup or squash commits, we can
// use the Github API merge strategy. That way we ensure that PRs show up as `Merged`.
githubApiMerge: {
default: 'squash',
labels: [
{pattern: 'preserve commits', method: 'rebase'}
]
},
claSignedLabel: 'cla: yes',
mergeReadyLabel: 'merge ready',
commitMessageFixupLabel: 'commit message fixup',
caretakerNoteLabel: 'caretaker note',
};
10 changes: 10 additions & 0 deletions .ng-dev/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"strict": true,
"target": "es2015",
"module": "commonjs",
"noEmit": true,
"skipLibCheck": true,
"types": []
},
}
39 changes: 19 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
"deploy-dev-app": "node ./scripts/deploy-dev-app.js",
"breaking-changes": "ts-node --project scripts/tsconfig.json scripts/breaking-changes.ts",
"gulp": "gulp",
"~~stage-release": "ts-node --project tools/legacy-release/tsconfig.json tools/legacy-release/stage-release.ts",
"~~publish-release": "ts-node --project tools/legacy-release/tsconfig.json tools/legacy-release/publish-release.ts",
"check-entry-point-setup": "node ./scripts/check-entry-point-setup.js",
"check-rollup-globals": "ts-node --project scripts/tsconfig.json scripts/check-rollup-globals.ts",
"changelog": "ts-node --project tools/release/tsconfig.json tools/release/changelog.ts",
Expand All @@ -49,18 +47,18 @@
"integration-tests:size-test": "bazel test //integration/size-test/...",
"check-mdc-tests": "ts-node --project scripts/tsconfig.json scripts/check-mdc-tests.ts",
"check-mdc-exports": "ts-node --project scripts/tsconfig.json scripts/check-mdc-exports.ts",
"check-tools": "yarn tsc --project tools/tsconfig-ci.json",
"check-tooling-setup": "yarn tsc --project tools/tsconfig-ci.json && yarn tsc --project .ng-dev/tsconfig.json",
"tsc": "node ./node_modules/typescript/bin/tsc",
"prepare": "husky install"
},
"version": "12.2.2",
"dependencies": {
"@angular/animations": "12.1.2",
"@angular/common": "12.1.2",
"@angular/compiler": "12.1.2",
"@angular/core": "12.1.2",
"@angular/forms": "12.1.2",
"@angular/platform-browser": "12.1.2",
"@angular/animations": "12.2.2",
"@angular/common": "12.2.2",
"@angular/compiler": "12.2.2",
"@angular/core": "12.2.2",
"@angular/forms": "12.2.2",
"@angular/platform-browser": "12.2.2",
"@types/googlemaps": "^3.43.1",
"@types/youtube": "^0.0.42",
"core-js-bundle": "^3.8.2",
Expand All @@ -72,16 +70,16 @@
"zone.js": "~0.11.3"
},
"devDependencies": {
"@angular-devkit/build-optimizer": "0.1201.0",
"@angular-devkit/core": "12.1.2",
"@angular-devkit/schematics": "12.1.2",
"@angular/bazel": "https://github.com/angular/bazel-builds.git#2566cc859235399edc72749a957f1cdcba2dc121",
"@angular/compiler-cli": "12.1.2",
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#6254699cc7ccff62be948dc5edcdea87a936ff24",
"@angular/localize": "12.1.2",
"@angular/platform-browser-dynamic": "12.1.2",
"@angular/platform-server": "12.1.2",
"@angular/router": "12.1.2",
"@angular-devkit/build-optimizer": "0.1202.2",
"@angular-devkit/core": "12.2.2",
"@angular-devkit/schematics": "12.2.2",
"@angular/bazel": "12.2.2",
"@angular/compiler-cli": "12.2.2",
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#56655ed6ccf24b7f3ad6b9ccdd1ef2896c7fa9f4",
"@angular/localize": "12.2.2",
"@angular/platform-browser-dynamic": "12.2.2",
"@angular/platform-server": "12.2.2",
"@angular/router": "12.2.2",
"@axe-core/webdriverjs": "^4.1.0",
"@babel/core": "^7.13.10",
"@babel/traverse": "^7.13.0",
Expand Down Expand Up @@ -146,7 +144,7 @@
"@octokit/rest": "18.3.5",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@schematics/angular": "12.1.2",
"@schematics/angular": "12.2.2",
"@types/browser-sync": "^2.26.1",
"@types/fs-extra": "^9.0.5",
"@types/glob": "^7.1.3",
Expand Down Expand Up @@ -185,6 +183,7 @@
"inquirer": "^8.0.0",
"jasmine": "^3.6.0",
"jasmine-core": "^3.6.0",
"jsonc-parser": "^3.0.0",
"kagekiri": "^1.4.1",
"karma": "^4.4.1",
"karma-browserstack-launcher": "^1.6.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-packages-dist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function buildReleasePackages(useIvy: boolean, distPath: string,
const targets = exec(queryPackagesCmd, true).split(/\r?\n/);
const packageNames = getPackageNamesOfTargets(targets);
const bazelBinPath = exec(`${bazelCmd} info bazel-bin`, true);
const getOutputPath = pkgName => join(bazelBinPath, 'src', pkgName, 'npm_package');
const getOutputPath = (pkgName: string) => join(bazelBinPath, 'src', pkgName, 'npm_package');

// Build with "--config=release" or `--config=snapshot-build` so that Bazel
// runs the workspace stamping script. The stamping script ensures that the
Expand Down
2 changes: 1 addition & 1 deletion scripts/caretaking/resync-caretaker-app-prs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Octokit from '@octokit/rest';
import {Octokit} from '@octokit/rest';
import * as fetch from 'node-fetch';

const apiBaseUrl = 'https://test-jperrott.firebaseio.com/pulls';
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-mdc-exports-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ export const config = {
// Irrelevant for the MDC implementation, because the slider doesn't dispatch any events.
'MatSliderChange'
]
}
} as {[entryPointName: string]: string[]}
};
9 changes: 7 additions & 2 deletions scripts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
"lib": ["es2016"],
"moduleResolution": "node",
"types": ["node"],
"strictNullChecks": true,
"strict": true,
"noEmit": true,
"skipLibCheck": true,
"downlevelIteration": true
}
},
// The `firebase-functions` folder has its own `package.json` and does
// not pass type-checking. This excludes it from being checked.
"exclude": ["caretaking/firebase-functions/**"]
}
1 change: 1 addition & 0 deletions src/cdk/schematics/testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ts_library(
"@npm//@types/jasmine",
"@npm//@types/node",
"@npm//fs-extra",
"@npm//jsonc-parser",
"@npm//rxjs",
],
)
12 changes: 7 additions & 5 deletions src/cdk/schematics/testing/test-case-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
* 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 {getSystemPath, JsonParseMode, parseJson, Path} from '@angular-devkit/core';

import {parse} from 'jsonc-parser';
import {getSystemPath, Path} from '@angular-devkit/core';
import {HostTree, Tree} from '@angular-devkit/schematics';
import {SchematicTestRunner, UnitTestTree} from '@angular-devkit/schematics/testing';
import {readFileSync} from 'fs-extra';
Expand Down Expand Up @@ -82,10 +84,10 @@ export async function createTestCaseSetup(migrationName: string, collectionPath:
});

const testAppTsconfigPath = 'projects/cdk-testing/tsconfig.app.json';
// Parse TypeScript configuration files with JSON5 as they could contain comments or
// unquoted properties.
const testAppTsconfig =
parseJson(appTree.readContent(testAppTsconfigPath), JsonParseMode.Json5) as any;
// Parse TypeScript configuration files with JSONC (like the CLI does) as the
// config files could contain comments or trailing commas
const testAppTsconfig = parse(appTree.readContent(testAppTsconfigPath), [],
{allowTrailingComma: true});

// include all TypeScript files in the project. Otherwise all test input
// files won't be part of the program and cannot be migrated.
Expand Down
78 changes: 0 additions & 78 deletions tools/legacy-release/base-release-task.ts

This file was deleted.

60 changes: 0 additions & 60 deletions tools/legacy-release/changelog-commit-template.hbs

This file was deleted.

29 changes: 0 additions & 29 deletions tools/legacy-release/changelog-root-template.hbs

This file was deleted.

Loading