@@ -3,6 +3,7 @@ import pathlib from 'path';
33import utils from 'util' ;
44import * as core from '@actions/core' ;
55import { getExecOutput } from '@actions/exec' ;
6+ import memoize from 'lodash/memoize.js' ;
67import getGitRoot from './gitRoot.js' ;
78
89interface RawPackageRecord < T = boolean | null > {
@@ -51,7 +52,7 @@ type PackageRecord = BundlePackageRecord | TabPackageRecord | BasePackageRecord;
5152 * the master branch\
5253 * Used to determine, particularly for libraries if running tests and tsc are necessary
5354 */
54- export async function checkForChanges ( directory : string ) {
55+ export const checkForChanges = memoize ( async ( directory : string ) => {
5556 const { exitCode } = await getExecOutput (
5657 'git' ,
5758 [ '--no-pager' , 'diff' , '--quiet' , 'origin/master' , '--' , directory ] ,
@@ -61,7 +62,7 @@ export async function checkForChanges(directory: string) {
6162 }
6263 ) ;
6364 return exitCode !== 0 ;
64- }
65+ } ) ;
6566
6667/**
6768 * Retrieves the information for all packages in the repository
@@ -227,6 +228,11 @@ async function main() {
227228 ...libs
228229 } ;
229230
231+ // Remove the root packages from the bundles and tabs collection
232+ // of packages cause they're not supposed be used like that
233+ delete bundles [ '@sourceacademy/bundles' ] ;
234+ delete tabs [ '@sourceacademy/tabs' ] ;
235+
230236 const summaryItems = Object . values ( packages ) . map ( packageInfo => {
231237 const relpath = pathlib . relative ( gitRoot , packageInfo . directory ) ;
232238 return `<div>
0 commit comments