Skip to content

Commit 1f73f0d

Browse files
committed
Address PR comments
1 parent 7b9ebfa commit 1f73f0d

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

.changeset/mean-comics-cheat.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@
7171
"@types/child-process-promise": "2.2.1",
7272
"@types/clone": "0.1.30",
7373
"@types/inquirer": "7.3.0",
74+
"@types/listr": "0.14.2",
7475
"@types/long": "4.0.1",
7576
"@types/mocha": "7.0.2",
77+
"@types/mz": "2.7.1",
7678
"@types/node": "12.12.53",
7779
"@types/sinon": "9.0.4",
7880
"@types/sinon-chai": "3.2.4",
7981
"@types/tmp": "0.2.0",
8082
"@types/yargs": "15.0.5",
81-
"@types/listr": "0.14.2",
8283
"@typescript-eslint/eslint-plugin": "2.34.0",
8384
"@typescript-eslint/eslint-plugin-tslint": "2.34.0",
8485
"@typescript-eslint/parser": "2.34.0",
@@ -111,11 +112,11 @@
111112
"karma-coverage-istanbul-reporter": "2.1.1",
112113
"karma-firefox-launcher": "1.3.0",
113114
"karma-mocha": "2.0.1",
115+
"karma-mocha-reporter": "2.2.5",
114116
"karma-safari-launcher": "1.0.0",
115117
"karma-sauce-launcher": "1.2.0",
116118
"karma-sourcemap-loader": "0.3.7",
117119
"karma-spec-reporter": "0.0.32",
118-
"karma-mocha-reporter": "2.2.5",
119120
"karma-summary-reporter": "1.8.0",
120121
"karma-webpack": "4.0.2",
121122
"lcov-result-merger": "3.1.0",

scripts/check_changeset.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
* limitations under the License.
1616
*/
1717

18-
const { resolve } = require('path');
19-
const { spawn, exec } = require('child-process-promise');
20-
const chalk = require('chalk');
21-
const simpleGit = require('simple-git/promise');
22-
const fs = require('mz/fs');
18+
import { resolve } from 'path';
19+
import chalk from 'chalk';
20+
import simpleGit from 'simple-git/promise';
21+
import fs from 'mz/fs';
2322

2423
const root = resolve(__dirname, '..');
2524
const git = simpleGit(root);
@@ -34,7 +33,7 @@ async function getDiffData(): Promise<{
3433
const diff = await git.diff(['--name-only', 'origin/master...HEAD']);
3534
const changedFiles = diff.split('\n');
3635
let changesetFile = '';
37-
const changedPackagesMap: { [key: string]: boolean } = {};
36+
const changedPackagesMap = new Set();
3837
for (const filename of changedFiles) {
3938
// Check for an existing .changeset
4039
const changesetMatch = filename.match(/^\.changeset\/[a-zA-Z-]+\.md/);
@@ -51,7 +50,7 @@ async function getDiffData(): Promise<{
5150
));
5251
if (changedPackage) {
5352
// Add the package itself.
54-
changedPackagesMap[changedPackage.name] = true;
53+
changedPackagesMap.add(changedPackage.name);
5554
}
5655
}
5756
}
@@ -86,10 +85,11 @@ async function main() {
8685
changedPkg => !changesetPackages.includes(changedPkg)
8786
);
8887
if (missingPackages.length > 0) {
89-
// console.warn(chalk.yellow(`Warning: The following packages were `
90-
// + `changed but not added to the changeset file, make sure this was `
91-
// + `intentional:\n${missingPackages.join('\n')}`));
92-
// process.exit(1);
88+
/**
89+
* Sets Github Actions output for a step. Pass missing package list to next
90+
* step. See:
91+
* https://github.com/actions/toolkit/blob/master/docs/commands.md#set-outputs
92+
*/
9393
console.log(
9494
`::set-output name=MISSING_PACKAGES::${missingPackages
9595
.map(pkg => `- ${pkg}`)

yarn.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,6 +2371,13 @@
23712371
resolved "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz#b17f16cf933597e10d6d78eae3251e692ce8b0ce"
23722372
integrity sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==
23732373

2374+
2375+
version "2.7.1"
2376+
resolved "https://registry.npmjs.org/@types/mz/-/mz-2.7.1.tgz#1ac1d69b039c8b3cbe603972b5c12d3167a84f58"
2377+
integrity sha512-H86h7KmRDVs9UeSiQvtUeVhS+WYpJSYSsZrRvNYpGWGiytEqxwEtvgRnINESQtCgnojIH2wS2WgaMTJP0firBw==
2378+
dependencies:
2379+
"@types/node" "*"
2380+
23742381
23752382
version "2.5.7"
23762383
resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c"

0 commit comments

Comments
 (0)