@@ -11,8 +11,16 @@ import {basename, dirname, join, resolve} from 'path';
1111import { gzipSync } from 'zlib' ;
1212
1313const UTF8 = 'utf-8' ;
14- const TEST_MODULES = [
14+ const ALL_MODULES = [
1515 '' ,
16+ 'store' ,
17+ 'indexes' ,
18+ 'metrics' ,
19+ 'relationships' ,
20+ 'queries' ,
21+ 'checkpoints' ,
22+ 'mergeable-store' ,
23+ 'common' ,
1624 'ui-react' ,
1725 'ui-react-dom' ,
1826 'ui-react-inspector' ,
@@ -44,17 +52,6 @@ const TEST_MODULES = [
4452 'synchronizers/synchronizer-ws-server-durable-object' ,
4553 'synchronizers/synchronizer-broadcast-channel' ,
4654] ;
47- const ALL_MODULES = [
48- ...TEST_MODULES ,
49- 'store' ,
50- 'metrics' ,
51- 'indexes' ,
52- 'relationships' ,
53- 'queries' ,
54- 'checkpoints' ,
55- 'mergeable-store' ,
56- 'common' ,
57- ] ;
5855const ALL_DEFINITIONS = [
5956 ...ALL_MODULES ,
6057 '_internal/store' ,
@@ -84,7 +81,6 @@ const getPrettierConfig = async () => ({
8481} ) ;
8582
8683const allOf = ( array , cb ) => Promise . all ( array . map ( cb ) ) ;
87- const testModules = ( cb ) => allOf ( TEST_MODULES , cb ) ;
8884const allModules = ( cb ) => allOf ( ALL_MODULES , cb ) ;
8985const allDefinitions = ( cb ) => allOf ( ALL_DEFINITIONS , cb ) ;
9086
@@ -141,7 +137,6 @@ const gzipFile = async (fileName) =>
141137
142138const copyPackageFiles = async ( forProd = false ) => {
143139 const mins = forProd ? [ null , 'min' ] : [ null ] ;
144- const modules = forProd ? ALL_MODULES : TEST_MODULES ;
145140 const schemas = [ null , 'with-schemas' ] ;
146141
147142 const json = JSON . parse ( await promises . readFile ( 'package.json' , UTF8 ) ) ;
@@ -156,7 +151,7 @@ const copyPackageFiles = async (forProd = false) => {
156151 json . typesVersions = { '*' : { } } ;
157152 json . exports = { } ;
158153 mins . forEach ( ( min ) => {
159- modules . forEach ( ( module ) => {
154+ ALL_MODULES . forEach ( ( module ) => {
160155 schemas . forEach ( ( withSchemas ) => {
161156 const path = [ min , module , withSchemas ]
162157 . filter ( ( part ) => part )
@@ -446,7 +441,7 @@ const tsCheck = async (dir) => {
446441 '--excludeDeclarationFiles' ,
447442 '--excludePathsFromReport=' +
448443 'jest/reporter.js;jest/environment.js;build.ts;ui-react/common.ts;' +
449- TEST_MODULES . map ( ( module ) => `${ module } .ts` ) . join ( ';' ) ,
444+ ALL_MODULES . map ( ( module ) => `${ module } .ts` ) . join ( ';' ) ,
450445 ] ) . unusedExports ,
451446 )
452447 . map (
@@ -669,7 +664,7 @@ export const compileForTest = async () => {
669664 await clearDir ( DIST_DIR ) ;
670665 await copyPackageFiles ( ) ;
671666 await copyDefinitions ( DIST_DIR ) ;
672- await testModules ( async ( module ) => {
667+ await allModules ( async ( module ) => {
673668 await compileModule ( module , DIST_DIR ) ;
674669 } ) ;
675670} ;
0 commit comments