Skip to content

Commit 52b3e9c

Browse files
devversionamysorto
authored andcommitted
build: update to latest version of shared dev-infra code
Updates to the latest version of the shared dev-infra code. Also this commit adds `yargs` as a needed dependency for some Bazel tooling exposed by the dev-infra package, notably the http server rule. with that, we also remove minimist in favor of Yargs, like we did in other Angular repositories before as well.
1 parent 2162369 commit 52b3e9c

File tree

6 files changed

+256
-42
lines changed

6 files changed

+256
-42
lines changed

.github/workflows/dev-infra.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- uses: angular/dev-infra/github-actions/commit-message-based-labels@613f706bc2467da4064f51be09ba0f8f1c3cb57e
12+
- uses: angular/dev-infra/github-actions/commit-message-based-labels@8298e121c51960857ef39abc16b743775ff6be68
1313
with:
1414
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}

.github/workflows/lock-closed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
lock_closed:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: angular/dev-infra/github-actions/lock-closed@613f706bc2467da4064f51be09ba0f8f1c3cb57e
12+
- uses: angular/dev-infra/github-actions/lock-closed@8298e121c51960857ef39abc16b743775ff6be68
1313
with:
1414
lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@angular/bazel": "13.2.0-rc.1",
7575
"@angular/cli": "13.2.0-rc.1",
7676
"@angular/compiler-cli": "13.2.0-rc.1",
77-
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#5847aa4e7ebe7de9fc772bf37e76bcdb8c8207a1",
77+
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#2b0196f6ebf6de2e62836e962b9f42007e6cf5d6",
7878
"@angular/localize": "13.2.0-rc.1",
7979
"@angular/platform-browser-dynamic": "13.2.0-rc.1",
8080
"@angular/platform-server": "13.2.0-rc.1",
@@ -152,7 +152,6 @@
152152
"@types/jasmine": "^3.6.0",
153153
"@types/luxon": "^1.27.0",
154154
"@types/marked": "^2.0.0",
155-
"@types/minimist": "^1.2.0",
156155
"@types/node": "^14.14.22",
157156
"@types/node-fetch": "^2.5.5",
158157
"@types/parse5": "^6.0.0",
@@ -162,6 +161,7 @@
162161
"@types/send": "^0.14.5",
163162
"@types/shelljs": "^0.8.9",
164163
"@types/yaml": "^1.9.7",
164+
"@types/yargs": "^17.0.8",
165165
"autoprefixer": "^10.2.5",
166166
"browser-sync": "2.26.13",
167167
"chalk": "^4.1.0",
@@ -193,7 +193,6 @@
193193
"madge": "^4.0.0",
194194
"marked": "^2.0.0",
195195
"minimatch": "^3.0.4",
196-
"minimist": "^1.2.0",
197196
"moment": "^2.18.1",
198197
"node-fetch": "^2.6.0",
199198
"parse5": "^6.0.1",
@@ -216,10 +215,11 @@
216215
"tsickle": "0.39.1",
217216
"tslint": "^6.1.3",
218217
"tsutils": "^3.21.0",
219-
"typescript-4.4": "npm:[email protected]",
220218
"typescript": "~4.5.2",
219+
"typescript-4.4": "npm:[email protected]",
221220
"vrsource-tslint-rules": "6.0.0",
222-
"yaml": "^1.10.0"
221+
"yaml": "^1.10.0",
222+
"yargs": "^17.2.1"
223223
},
224224
"resolutions": {
225225
"@angular/dev-infra-private/typescript": "~4.5.2",

scripts/create-package-archives.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@
1212
const {join} = require('path');
1313
const {rm, mkdir, test, ls, set, exec, cd} = require('shelljs');
1414
const {red, green} = require('chalk');
15-
const minimist = require('minimist');
15+
const yargs = require('yargs');
1616

1717
const projectDir = join(__dirname, '../');
1818
const archivesDir = 'dist/release-archives';
1919
const releasesDir = 'dist/releases';
20-
let {suffix} = minimist(process.argv.slice(2), {string: ['suffix']});
21-
22-
if (!suffix) {
23-
console.error(red('No suffix specified. Pass one with --suffix <text>'));
24-
process.exit(1);
25-
}
20+
const {suffix} = yargs(process.argv.slice(2))
21+
.option('suffix', {type: 'string', demandOption: true})
22+
.strict()
23+
.parseSync();
2624

2725
// Fail if any ShellJS command fails.
2826
set('-e');

scripts/run-component-tests.js

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* --no-watch | Watch mode is enabled by default. This flag opts-out to standard Bazel.
1818
*/
1919

20-
const minimist = require('minimist');
20+
const yargs = require('yargs');
2121
const shelljs = require('shelljs');
2222
const chalk = require('chalk');
2323
const path = require('path');
@@ -35,15 +35,25 @@ shelljs.set('-e');
3535
shelljs.cd(projectDir);
3636

3737
// Extracts the supported command line options.
38-
const {
39-
_: components,
40-
local,
41-
firefox,
42-
watch,
43-
} = minimist(args, {
44-
boolean: ['local', 'firefox', 'watch'],
45-
default: {watch: true},
46-
});
38+
const {components, local, firefox, watch} = yargs(args)
39+
.command('* <components..>', 'Run tests for specified components', args =>
40+
args.positional('components', {type: 'array'}),
41+
)
42+
.option('local', {
43+
type: 'boolean',
44+
description: 'Whether test should run in local mode. You can manually connect a browser then.',
45+
})
46+
.option('firefox', {
47+
type: 'boolean',
48+
description: 'Whether browser tests should run within Firefox.',
49+
})
50+
.option('watch', {
51+
type: 'boolean',
52+
default: true,
53+
description: 'Whether tests should be re-run automatically upon changes.',
54+
})
55+
.strict()
56+
.parseSync();
4757

4858
// Whether tests for all components should be run.
4959
const all = components.length === 1 && components[0] === 'all';

0 commit comments

Comments
 (0)