File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 19
19
- name : Yarn install
20
20
run : yarn
21
21
- name : Run changeset script
22
- run : yarn ts- node-script scripts/check_changeset.ts
22
+ run : node scripts/check_changeset.js
23
23
id : check-changeset
24
24
- name : Read output
25
25
run : echo env.MISSING_PACKAGES
Original file line number Diff line number Diff line change @@ -27,14 +27,11 @@ const git = simpleGit(root);
27
27
/**
28
28
* Identify modified packages.
29
29
*/
30
- async function getDiffData ( ) : Promise < {
31
- changedPackages : string [ ] ;
32
- changesetFile : string ;
33
- } | null > {
30
+ async function getDiffData ( ) {
34
31
const diff = await git . diff ( [ '--name-only' , 'origin/master...HEAD' ] ) ;
35
32
const changedFiles = diff . split ( '\n' ) ;
36
33
let changesetFile = '' ;
37
- const changedPackagesMap : { [ key : string ] : boolean } = { } ;
34
+ const changedPackagesMap = { } ;
38
35
for ( const filename of changedFiles ) {
39
36
// Check for an existing .changeset
40
37
const changesetMatch = filename . match ( / ^ \. c h a n g e s e t \/ [ a - z A - Z - ] + \. m d / ) ;
@@ -61,8 +58,8 @@ async function getDiffData(): Promise<{
61
58
return { changedPackages : Object . keys ( changedPackagesMap ) , changesetFile } ;
62
59
}
63
60
64
- async function parseChangesetFile ( changesetFile : string ) {
65
- const fileText : string = await fs . readFile ( changesetFile , 'utf8' ) ;
61
+ async function parseChangesetFile ( changesetFile ) {
62
+ const fileText = await fs . readFile ( changesetFile , 'utf8' ) ;
66
63
const fileParts = fileText . split ( '---\n' ) ;
67
64
const packageLines = fileParts [ 1 ] . split ( '\n' ) ;
68
65
const changesetPackages = packageLines
You can’t perform that action at this time.
0 commit comments