From c892eec9500a5a63b156f56bfa6ecd51023ab79c Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Fri, 20 Sep 2024 10:38:14 -0600 Subject: [PATCH] Convert tsconfig to use project references, see https://github.com/phetsims/chipper/issues/1356 --- eslint/.eslintrc.js | 3 + js/grunt/lint.js | 7 +- js/grunt/tasks/lint-all.ts | 3 +- js/grunt/tsc.ts | 2 +- js/scripts/absolute-tsc.js | 2 +- .../addPackageJSONEslintConfigProject.js | 199 +++++ js/scripts/convertToProjectReferences.js | 126 ++++ package.json | 24 +- tsconfig-core.json | 2 +- tsconfig.json | 10 +- tsconfig/all/tsconfig.json | 691 ++++++++++++++---- tsconfig/buildjson/tsconfig.json | 63 ++ 12 files changed, 987 insertions(+), 145 deletions(-) create mode 100644 js/scripts/addPackageJSONEslintConfigProject.js create mode 100644 js/scripts/convertToProjectReferences.js create mode 100644 tsconfig/buildjson/tsconfig.json diff --git a/eslint/.eslintrc.js b/eslint/.eslintrc.js index 946496af8..6c1ea2fed 100644 --- a/eslint/.eslintrc.js +++ b/eslint/.eslintrc.js @@ -206,6 +206,7 @@ module.exports = { '@typescript-eslint/naming-convention': 'off', // TODO: We should decide on the conventions and enable this rule. // Require .toString() to only be called on objects which provide useful information when stringified 🔒 💭 + // TODO: See https://github.com/phetsims/chipper/issues/1466, this takes a very long time at runtime '@typescript-eslint/no-base-to-string': 'error', // Disallow non-null assertion in locations that may be confusing 🔒 🔧 🛠 @@ -233,6 +234,7 @@ module.exports = { '@typescript-eslint/no-extraneous-class': 'off', // It is sometimes useful to have a class with static methods that can call each other // Require Promise-like statements to be handled appropriately ✅ 🛠 💭 + // TODO: See https://github.com/phetsims/chipper/issues/1466, this takes a very long time at runtime '@typescript-eslint/no-floating-promises': 'error', // Disallow iterating over an array with a for-in loop ✅ 💭 @@ -587,6 +589,7 @@ module.exports = { 'explicit-method-return-type': 'error', // Variables that are Properties should end in "Property", like const myProperty = new Property(); + // TODO: See https://github.com/phetsims/chipper/issues/1466, this takes a very long time at runtime 'require-property-suffix': 'error', // Static fields should have the 'readonly' modifier diff --git a/js/grunt/lint.js b/js/grunt/lint.js index f0db9368d..9c9946f9f 100644 --- a/js/grunt/lint.js +++ b/js/grunt/lint.js @@ -56,9 +56,6 @@ function runEslint( repos, options ) { showProgressBar: true }, options ); - const showProgressBar = options.showProgressBar && repos.length > 1; - showProgressBar && showCommandLineProgress( 0, false ); - const patterns = repos.map( repo => `../${repo}/` ); const args = [ 'eslint' ]; @@ -83,7 +80,11 @@ function runEslint( repos, options ) { } } + const showProgressBar = options.showProgressBar && repos.length > 1; + showProgressBar && showCommandLineProgress( 0, false ); + // Always write to the cache, even if it was cleared above. + // TODO: https://github.com/phetsims/chipper/issues/1356 do we need a different cache for different repos or repo combos? We get a speed boost when using repos.join as a filename key args.push( '--cache', '--cache-location', '../chipper/eslint/cache/.eslintcache' ); // Add the '--fix' option if fix is true diff --git a/js/grunt/tasks/lint-all.ts b/js/grunt/tasks/lint-all.ts index 05f1a560c..9ef51eaef 100644 --- a/js/grunt/tasks/lint-all.ts +++ b/js/grunt/tasks/lint-all.ts @@ -32,14 +32,13 @@ const brands = getBrands( grunt, repo, buildLocal ); */ export const lintAll = ( async () => { - console.log( ' task beginning' ); const lintReturnValue = await lint( getPhetLibs( repo, brands ), { cache: cache, fix: fix, chipAway: chipAway } ); -// Output results on errors. + // Output results on errors. if ( !lintReturnValue.ok ) { grunt.fail.fatal( 'Lint failed' ); } diff --git a/js/grunt/tsc.ts b/js/grunt/tsc.ts index cf75b7a1f..e918f69fd 100644 --- a/js/grunt/tsc.ts +++ b/js/grunt/tsc.ts @@ -17,7 +17,7 @@ const execute = require( '../../../perennial-alias/js/common/execute' ); */ const tsc = async function( path: string, commandLineArgs: string[] = [] ): Promise<{ execResult: { stdout: string; stderr: string; code: number }; time: number }> { - const args = [ '../chipper/node_modules/typescript/bin/tsc', ...commandLineArgs ]; + const args = [ '../chipper/node_modules/typescript/bin/tsc', '-b', ...commandLineArgs ]; return execute( 'node', args, path, { errors: 'resolve' } ); diff --git a/js/scripts/absolute-tsc.js b/js/scripts/absolute-tsc.js index eb024bb8f..cfddb8a69 100644 --- a/js/scripts/absolute-tsc.js +++ b/js/scripts/absolute-tsc.js @@ -49,7 +49,7 @@ if ( !args || args.length === 0 ) { // console.log( 'changes detected...' ); - const results = await execute( 'node', [ `${__dirname}/../../../chipper/node_modules/typescript/bin/tsc` ], args[ 0 ], { + const results = await execute( 'node', [ `${__dirname}/../../../chipper/node_modules/typescript/bin/tsc`, '-b' ], args[ 0 ], { errors: 'resolve', // TODO: it would be nice not to need this, https://github.com/phetsims/chipper/issues/1415 diff --git a/js/scripts/addPackageJSONEslintConfigProject.js b/js/scripts/addPackageJSONEslintConfigProject.js new file mode 100644 index 000000000..81558572d --- /dev/null +++ b/js/scripts/addPackageJSONEslintConfigProject.js @@ -0,0 +1,199 @@ +// Copyright 2024, University of Colorado Boulder + +/** + * Script: updateEslintConfig.js + * Description: Iterates through a list of repositories, checks for package.json, + * and updates or creates eslintConfig to include parserOptions.project. + * + * TODO: https://github.com/phetsims/chipper/issues/1356 delete script + * @author Sam Reid (PhET Interactive Simulations) + */ + +// eslint-disable-next-line no-property-in-require-statement +const fs = require( 'fs' ).promises; +const path = require( 'path' ); +const os = require( 'os' ); + +/** + * Utility function to check if a file exists. + * @param {string} filepath - Path to the file. + * @returns {Promise} - True if exists, else false. + */ +async function fileExists( filepath ) { + try { + await fs.access( filepath ); + return true; + } + catch( err ) { + return false; + } +} + +/** + * Utility function to safely parse JSON. + * @param {string} data - JSON string. + * @param {string} repoName - Name of the repository (for logging). + * @returns {Object|null} - Parsed JSON object or null if error. + */ +function safeJsonParse( data, repoName ) { + try { + return JSON.parse( data ); + } + catch( err ) { + console.error( `Error parsing JSON in "${repoName}": ${err.message}` ); + return null; + } +} + +/** + * Main function to execute the script logic. + */ +async function main() { + try { + const homeDir = os.homedir(); + const rootDir = path.join( homeDir, 'phet', 'root' ); + const activeReposPath = path.join( rootDir, 'perennial', 'data', 'active-repos' ); + + // Read the list of active repositories + const reposData = await fs.readFile( activeReposPath, 'utf-8' ); + const repoNames = reposData.split( /\r?\n/ ).map( line => line.trim() ).filter( line => line.length > 0 ); + + console.log( `Found ${repoNames.length} active repositories.` ); + + for ( const repoName of repoNames ) { + const repoPath = path.join( rootDir, repoName ); + const packageJsonPath = path.join( repoPath, 'package.json' ); + + const hasPackageJson = await fileExists( packageJsonPath ); + + if ( !hasPackageJson ) { + console.warn( `Skipping repository "${repoName}" as it lacks package.json.` ); + continue; + } + + console.log( `Processing repository: ${repoName}` ); + + // Read and parse package.json + let packageJson; + try { + const packageData = await fs.readFile( packageJsonPath, 'utf-8' ); + packageJson = safeJsonParse( packageData, repoName ); + if ( !packageJson ) { + console.error( `Skipping repository "${repoName}" due to JSON parse error.` ); + continue; + } + } + catch( err ) { + console.error( `Error reading package.json in "${repoName}": ${err.message}` ); + continue; + } + + // Initialize eslintConfig if it doesn't exist + if ( !packageJson.eslintConfig ) { + packageJson.eslintConfig = { + extends: '../chipper/eslint/sim_eslintrc.js' + }; + console.log( `Created eslintConfig for "${repoName}".` ); + } + else { + // Ensure "extends" includes the required path + if ( !packageJson.eslintConfig.extends ) { + packageJson.eslintConfig.extends = '../chipper/eslint/sim_eslintrc.js'; + console.log( `Added extends to eslintConfig for "${repoName}".` ); + } + else if ( typeof packageJson.eslintConfig.extends === 'string' ) { + if ( !packageJson.eslintConfig.extends.includes( '../chipper/eslint/sim_eslintrc.js' ) ) { + // Convert to array if it's a string and doesn't include the required extend + packageJson.eslintConfig.extends = [ + packageJson.eslintConfig.extends, + '../chipper/eslint/sim_eslintrc.js' + ]; + console.log( `Extended eslintConfig for "${repoName}".` ); + } + } + else if ( Array.isArray( packageJson.eslintConfig.extends ) ) { + if ( !packageJson.eslintConfig.extends.includes( '../chipper/eslint/sim_eslintrc.js' ) ) { + packageJson.eslintConfig.extends.push( '../chipper/eslint/sim_eslintrc.js' ); + console.log( `Appended extends to eslintConfig for "${repoName}".` ); + } + } + // If eslintConfig.extends is neither string nor array, log a warning + else { + console.warn( `Unexpected format for eslintConfig.extends in "${repoName}". Skipping extends modification.` ); + } + } + + // Initialize overrides if it doesn't exist + if ( !packageJson.eslintConfig.overrides ) { + packageJson.eslintConfig.overrides = []; + console.log( `Created overrides array in eslintConfig for "${repoName}".` ); + } + + // Find an existing override for "**/*.ts" + let tsOverride = packageJson.eslintConfig.overrides.find( override => { + return Array.isArray( override.files ) && override.files.includes( '**/*.ts' ); + } ); + + if ( !tsOverride ) { + // Create a new override for "**/*.ts" + tsOverride = { + files: [ '**/*.ts' ], + parserOptions: { + project: [ `../${repoName}/tsconfig.json` ] + } + }; + packageJson.eslintConfig.overrides.push( tsOverride ); + console.log( `Added new override for "**/*.ts" in "${repoName}".` ); + } + else { + // Ensure parserOptions.project exists and includes the required path + if ( !tsOverride.parserOptions ) { + tsOverride.parserOptions = { + project: [ `../${repoName}/tsconfig.json` ] + }; + console.log( `Added parserOptions to existing override in "${repoName}".` ); + } + else { + if ( !tsOverride.parserOptions.project ) { + tsOverride.parserOptions.project = [ `../${repoName}/tsconfig.json` ]; + console.log( `Added project to parserOptions in "${repoName}".` ); + } + else { + // Ensure the project path is included + const projectPath = `../${repoName}/tsconfig.json`; + if ( !Array.isArray( tsOverride.parserOptions.project ) ) { + tsOverride.parserOptions.project = [ tsOverride.parserOptions.project ]; + } + if ( !tsOverride.parserOptions.project.includes( projectPath ) ) { + tsOverride.parserOptions.project.push( projectPath ); + console.log( `Appended project path to parserOptions in "${repoName}".` ); + } + else { + console.log( `parserOptions.project already includes the path in "${repoName}".` ); + } + } + } + } + + // Write the updated package.json back to the file + try { + const formattedPackageJson = JSON.stringify( packageJson, null, 2 ) + '\n'; + await fs.writeFile( packageJsonPath, formattedPackageJson, 'utf-8' ); + console.log( `Updated package.json in "${repoName}".\n` ); + } + catch( err ) { + console.error( `Error writing package.json in "${repoName}": ${err.message}` ); + continue; + } + } + + console.log( 'All applicable repositories have been processed.' ); + } + catch( err ) { + console.error( `An unexpected error occurred: ${err.message}` ); + process.exit( 1 ); + } +} + +// Execute the main function +main(); \ No newline at end of file diff --git a/js/scripts/convertToProjectReferences.js b/js/scripts/convertToProjectReferences.js new file mode 100644 index 000000000..dae4e44fa --- /dev/null +++ b/js/scripts/convertToProjectReferences.js @@ -0,0 +1,126 @@ +// Copyright 2024, University of Colorado Boulder + +/** + * Description: Iterates through a list of repositories, checks for package.json and tsconfig.json, + * and updates tsconfig.json to include project references based on phet.phetLibs. + * + * TODO: https://github.com/phetsims/chipper/issues/1356 delete script + * + * @author Sam Reid (PhET Interactive Simulations) + */ + +// eslint-disable-next-line no-property-in-require-statement +const fs = require( 'fs' ).promises; +const path = require( 'path' ); +const os = require( 'os' ); + +/** + * Utility function to check if a file exists. + * @param {string} filepath - Path to the file. + * @returns {Promise} - True if exists, else false. + */ +async function fileExists( filepath ) { + try { + await fs.access( filepath ); + return true; + } + catch( err ) { + return false; + } +} + +/** + * Main function to execute the script logic. + */ +async function main() { + try { + const homeDir = os.homedir(); + const rootDir = path.join( homeDir, 'phet', 'root' ); + const activeReposPath = path.join( rootDir, 'perennial', 'data', 'active-repos' ); + + // Read the list of active repositories + const reposData = await fs.readFile( activeReposPath, 'utf-8' ); + const repoNames = reposData.split( /\r?\n/ ).map( line => line.trim() ).filter( line => line.length > 0 ); + + console.log( `Found ${repoNames.length} active repositories.` ); + + for ( const repoName of repoNames ) { + const repoPath = path.join( rootDir, repoName ); + const packageJsonPath = path.join( repoPath, 'package.json' ); + const tsconfigPath = path.join( repoPath, 'tsconfig.json' ); + + const hasPackageJson = await fileExists( packageJsonPath ); + const hasTsconfig = await fileExists( tsconfigPath ); + + if ( !hasPackageJson || !hasTsconfig ) { + console.warn( `Skipping repository "${repoName}" as it ${!hasPackageJson ? 'lacks package.json' : ''}${!hasPackageJson && !hasTsconfig ? ' and ' : ''}${!hasTsconfig ? 'lacks tsconfig.json' : ''}.` ); + continue; + } + + console.log( `Processing repository: ${repoName}` ); + + // Read and parse package.json + let packageJson; + try { + const packageData = await fs.readFile( packageJsonPath, 'utf-8' ); + packageJson = JSON.parse( packageData ); + } + catch( err ) { + console.error( `Error reading or parsing package.json in "${repoName}": ${err.message}` ); + continue; + } + + // Extract phetLibs + let phetLibs = []; + if ( packageJson.phet && Array.isArray( packageJson.phet.phetLibs ) ) { + phetLibs = packageJson.phet.phetLibs; + } + + // Read and parse tsconfig.json + let tsconfig; + try { + const tsconfigData = await fs.readFile( tsconfigPath, 'utf-8' ); + tsconfig = JSON.parse( tsconfigData ); + } + catch( err ) { + console.error( `Error reading or parsing tsconfig.json in "${repoName}": ${err.message}` ); + continue; + } + + // Construct references array + const references = []; + + if ( phetLibs.length > 0 ) { + for ( const lib of phetLibs ) { + references.push( { path: `../${lib}/tsconfig.json` } ); + } + } + + // Always add buildjson reference + references.push( { path: '../chipper/tsconfig/buildjson' } ); + + // Add or update "references" field + tsconfig.references = references; + + // Write the updated tsconfig.json back to the file + try { + const formattedTsconfig = JSON.stringify( tsconfig, null, 2 ) + '\n'; + await fs.writeFile( tsconfigPath, formattedTsconfig, 'utf-8' ); + console.log( `Updated tsconfig.json in "${repoName}".` ); + } + catch( err ) { + console.error( `Error writing tsconfig.json in "${repoName}": ${err.message}` ); + continue; + } + } + + console.log( 'All applicable repositories have been processed.' ); + } + catch( err ) { + console.error( `An unexpected error occurred: ${err.message}` ); + process.exit( 1 ); + } +} + +// Execute the main function +main(); \ No newline at end of file diff --git a/package.json b/package.json index b5785c4dc..32fe6245b 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,12 @@ "**/*.ts", "**/*.tsx" ], - "parser": "@typescript-eslint/parser" + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": [ + "../chipper/tsconfig.json" + ] + } }, { "files": [ @@ -99,13 +104,26 @@ "@typescript-eslint/no-require-imports": "off", "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/no-floating-promises": "off" + }, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": [ + "../chipper/tsconfig.json" + ] } }, { "files": [ - "./js/sim-tests/**/*" + "./js/sim-tests/**/*", + "./test/**/*" ], - "extends": "./eslint/sim_eslintrc.js" + "extends": "./eslint/sim_eslintrc.js", + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": [ + "../chipper/tsconfig.json" + ] + } } ] } diff --git a/tsconfig-core.json b/tsconfig-core.json index 1a46b486f..f585e7653 100644 --- a/tsconfig-core.json +++ b/tsconfig-core.json @@ -20,7 +20,7 @@ "outDir": "../chipper/dist/tsc/outDir", /* Redirect output structure to the directory. */ "rootDir": "../", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - "composite": false, /* Enable project compilation (project references) */ + "composite": true, /* Enable project compilation (project references) */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ // "removeComments": true, /* Do not emit comments to output. */ "noEmit": false, /* Emit outputs. */ diff --git a/tsconfig.json b/tsconfig.json index f1d144387..80972964d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,12 +4,18 @@ "js/**/*", "images/**/*", "mipmaps/**/*", - "sounds/**/*" + "sounds/**/*", + "test/**/*" ], "compilerOptions": { "module": "NodeNext", "esModuleInterop": true, "allowSyntheticDefaultImports": true, "moduleResolution": "NodeNext" - } + }, + "references": [ + { + "path": "../chipper/tsconfig/buildjson" + } + ] } \ No newline at end of file diff --git a/tsconfig/all/tsconfig.json b/tsconfig/all/tsconfig.json index 051cc823e..8f6ca705b 100644 --- a/tsconfig/all/tsconfig.json +++ b/tsconfig/all/tsconfig.json @@ -3,142 +3,569 @@ // Explicitly list all entry points that we want to type check. // Imported images/mipmaps/sounds are still type checked. // This structure was determined in https://github.com/phetsims/chipper/issues/1245 + + "references": [ + { + "path": "../buildjson" + }, + { + "path": "../../../acid-base-solutions" + }, + { + "path": "../../../alpenglow" + }, + { + "path": "../../../aqua" + }, + { + "path": "../../../area-builder" + }, + { + "path": "../../../area-model-algebra" + }, + { + "path": "../../../area-model-common" + }, + { + "path": "../../../area-model-decimals" + }, + { + "path": "../../../area-model-introduction" + }, + { + "path": "../../../area-model-multiplication" + }, + { + "path": "../../../arithmetic" + }, + { + "path": "../../../atomic-interactions" + }, + { + "path": "../../../axon" + }, + { + "path": "../../../balancing-act" + }, + { + "path": "../../../balancing-chemical-equations" + }, + { + "path": "../../../balloons-and-static-electricity" + }, + { + "path": "../../../bamboo" + }, + { + "path": "../../../beers-law-lab" + }, + { + "path": "../../../bending-light" + }, + { + "path": "../../../binder" + }, + { + "path": "../../../blackbody-spectrum" + }, + { + "path": "../../../blast" + }, + { + "path": "../../../brand" + }, + { + "path": "../../../build-a-fraction" + }, + { + "path": "../../../build-a-molecule" + }, + { + "path": "../../../build-a-nucleus" + }, + { + "path": "../../../build-an-atom" + }, + { + "path": "../../../bumper" + }, + { + "path": "../../../buoyancy" + }, + { + "path": "../../../buoyancy-basics" + }, + { + "path": "../../../calculus-grapher" + }, + { + "path": "../../../capacitor-lab-basics" + }, + { + "path": "../../../center-and-variability" + }, + { + "path": "../../../chains" + }, + { + "path": "../../../charges-and-fields" + }, + { + "path": "../../../chipper" + }, + { + "path": "../../../circuit-construction-kit-ac" + }, + { + "path": "../../../circuit-construction-kit-ac-virtual-lab" + }, + { + "path": "../../../circuit-construction-kit-black-box-study" + }, + { + "path": "../../../circuit-construction-kit-common" + }, + { + "path": "../../../circuit-construction-kit-dc" + }, + { + "path": "../../../circuit-construction-kit-dc-virtual-lab" + }, + { + "path": "../../../collision-lab" + }, + { + "path": "../../../color-vision" + }, + { + "path": "../../../concentration" + }, + { + "path": "../../../coulombs-law" + }, + { + "path": "../../../counting-common" + }, + { + "path": "../../../curve-fitting" + }, + { + "path": "../../../density" + }, + { + "path": "../../../density-buoyancy-common" + }, + { + "path": "../../../description-demo" + }, + { + "path": "../../../diffusion" + }, + { + "path": "../../../dot" + }, + { + "path": "../../../eating-exercise-and-energy" + }, + { + "path": "../../../energy-forms-and-changes" + }, + { + "path": "../../../energy-skate-park" + }, + { + "path": "../../../energy-skate-park-basics" + }, + { + "path": "../../../equality-explorer" + }, + { + "path": "../../../equality-explorer-basics" + }, + { + "path": "../../../equality-explorer-two-variables" + }, + { + "path": "../../../estimation" + }, + { + "path": "../../../example-sim" + }, + { + "path": "../../../expression-exchange" + }, + { + "path": "../../../faradays-electromagnetic-lab" + }, + { + "path": "../../../faradays-law" + }, + { + "path": "../../../fluid-pressure-and-flow" + }, + { + "path": "../../../forces-and-motion-basics" + }, + { + "path": "../../../fourier-making-waves" + }, + { + "path": "../../../fraction-comparison" + }, + { + "path": "../../../fraction-matcher" + }, + { + "path": "../../../fractions-common" + }, + { + "path": "../../../fractions-equality" + }, + { + "path": "../../../fractions-intro" + }, + { + "path": "../../../fractions-mixed-numbers" + }, + { + "path": "../../../friction" + }, + { + "path": "../../../function-builder" + }, + { + "path": "../../../function-builder-basics" + }, + { + "path": "../../../gas-properties" + }, + { + "path": "../../../gases-intro" + }, + { + "path": "../../../gene-expression-essentials" + }, + { + "path": "../../../generator" + }, + { + "path": "../../../geometric-optics" + }, + { + "path": "../../../geometric-optics-basics" + }, + { + "path": "../../../graphing-lines" + }, + { + "path": "../../../graphing-quadratics" + }, + { + "path": "../../../graphing-slope-intercept" + }, + { + "path": "../../../gravity-and-orbits" + }, + { + "path": "../../../gravity-force-lab" + }, + { + "path": "../../../gravity-force-lab-basics" + }, + { + "path": "../../../greenhouse-effect" + }, + { + "path": "../../../griddle" + }, + { + "path": "../../../hookes-law" + }, + { + "path": "../../../interaction-dashboard" + }, + { + "path": "../../../inverse-square-law-common" + }, + { + "path": "../../../isotopes-and-atomic-mass" + }, + { + "path": "../../../john-travoltage" + }, + { + "path": "../../../joist" + }, + { + "path": "../../../keplers-laws" + }, + { + "path": "../../../kite" + }, + { + "path": "../../../least-squares-regression" + }, + { + "path": "../../../magnet-and-compass" + }, + { + "path": "../../../magnets-and-electromagnets" + }, + { + "path": "../../../make-a-ten" + }, + { + "path": "../../../masses-and-springs" + }, + { + "path": "../../../masses-and-springs-basics" + }, + { + "path": "../../../mean-share-and-balance" + }, + { + "path": "../../../mobius" + }, + { + "path": "../../../models-of-the-hydrogen-atom" + }, + { + "path": "../../../molarity" + }, + { + "path": "../../../molecule-polarity" + }, + { + "path": "../../../molecule-shapes" + }, + { + "path": "../../../molecule-shapes-basics" + }, + { + "path": "../../../molecules-and-light" + }, + { + "path": "../../../my-solar-system" + }, + { + "path": "../../../natural-selection" + }, + { + "path": "../../../neuron" + }, + { + "path": "../../../nitroglycerin" + }, + { + "path": "../../../normal-modes" + }, + { + "path": "../../../number-compare" + }, + { + "path": "../../../number-line-common" + }, + { + "path": "../../../number-line-distance" + }, + { + "path": "../../../number-line-integers" + }, + { + "path": "../../../number-line-operations" + }, + { + "path": "../../../number-pairs" + }, + { + "path": "../../../number-play" + }, + { + "path": "../../../number-suite-common" + }, + { + "path": "../../../ohms-law" + }, + { + "path": "../../../optics-lab" + }, + { + "path": "../../../pendulum-lab" + }, +// { +// "path": "../../../perennial" +// }, +// { +// "path": "../../../perennial-alias" +// }, + { + "path": "../../../ph-scale" + }, + { + "path": "../../../ph-scale-basics" + }, + { + "path": "../../../phet-core" + }, + { + "path": "../../../phet-io" + }, + { + "path": "../../../phet-io-sim-specific" + }, + { + "path": "../../../phet-io-test-sim" + }, + { + "path": "../../../phet-io-wrapper-haptics" + }, + { + "path": "../../../phet-io-wrappers" + }, +// { +// "path": "../../../phet-lib" +// }, +// { +// "path": "../../../phet-vite-demo" +// }, + { + "path": "../../../phetcommon" + }, + { + "path": "../../../phetmarks" + }, + { + "path": "../../../plinko-probability" + }, + { + "path": "../../../projectile-data-lab" + }, + { + "path": "../../../projectile-sampling-distributions" + }, + { + "path": "../../../projectile-motion" + }, + { + "path": "../../../proportion-playground" + }, + { + "path": "../../../quadrilateral" + }, + { + "path": "../../../quantum-measurement" + }, + { + "path": "../../../query-string-machine" + }, + { + "path": "../../../ratio-and-proportion" + }, + { + "path": "../../../reactants-products-and-leftovers" + }, + { + "path": "../../../resistance-in-a-wire" + }, + { + "path": "../../../rutherford-scattering" + }, + { + "path": "../../../scenery" + }, + { + "path": "../../../scenery-phet" + }, + { + "path": "../../../sherpa" + }, + { + "path": "../../../shred" + }, + { + "path": "../../../simula-rasa" + }, + { + "path": "../../../soccer-common" + }, + { + "path": "../../../solar-system-common" + }, + { + "path": "../../../sound-waves" + }, + { + "path": "../../../states-of-matter" + }, + { + "path": "../../../states-of-matter-basics" + }, + { + "path": "../../../studio" + }, + { + "path": "../../../sun" + }, + { + "path": "../../../tambo" + }, + { + "path": "../../../tandem" + }, + { + "path": "../../../tangible" + }, + { + "path": "../../../tappi" + }, + { + "path": "../../../trig-tour" + }, + { + "path": "../../../twixt" + }, + { + "path": "../../../under-pressure" + }, + { + "path": "../../../unit-rates" + }, + { + "path": "../../../utterance-queue" + }, + { + "path": "../../../vector-addition" + }, + { + "path": "../../../vector-addition-equations" + }, + { + "path": "../../../vegas" + }, + { + "path": "../../../vibe" + }, + { + "path": "../../../wave-interference" + }, + { + "path": "../../../wave-on-a-string" + }, + { + "path": "../../../waves-intro" + }, + { + "path": "../../../wilder" + }, + { + "path": "../../../xray-diffraction" + } + ], "include": [ - "../../../acid-base-solutions/js/**/*", - "../../../alpenglow/js/**/*", - "../../../aqua/js/**/*", - "../../../area-model-algebra/js/**/*", - "../../../area-model-multiplication/js/**/*", - "../../../arithmetic/js/**/*", - "../../../axon/js/**/*", - "../../../balancing-act/js/**/*", - "../../../balancing-act/images/**/*", - "../../../balancing-chemical-equations/js/**/*", - "../../../balloons-and-static-electricity/js/**/*", - "../../../bamboo/js/**/*", - "../../../beers-law-lab/js/**/*", - "../../../bending-light/js/**/*", - "../../../brand/adapted-from-phet/js/Brand.ts", - "../../../brand/adapted-from-phet/images/**/*", - "../../../brand/phet/js/Brand.ts", - "../../../brand/phet/images/**/*", - "../../../brand/phet-io/js/Brand.ts", - "../../../brand/phet-io/images/**/*", - "../../../build-a-nucleus/js/**/*", - "../../../buoyancy/js/**/*", - "../../../buoyancy-basics/js/**/*", - "../../../calculus-grapher/js/**/*", - "../../../center-and-variability/js/**/*", - "../../../center-and-variability/images/**/*", - "../../../chipper/phet-types.d.ts", - "../../../chipper/phet-types-module.d.ts", - "../../../chipper/js/**/*", - "../../../circuit-construction-kit-ac/js/**/*", - "../../../circuit-construction-kit-ac-virtual-lab/js/**/*", - "../../../circuit-construction-kit-common/js/**/*", - "../../../circuit-construction-kit-dc/js/**/*", - "../../../circuit-construction-kit-dc-virtual-lab/js/**/*", - "../../../concentration/js/**/*", - "../../../counting-common/js/**/*", - "../../../density/js/**/*", - "../../../density-buoyancy-common/js/**/*", - "../../../description-demo/js/**/*", - "../../../diffusion/js/**/*", - "../../../dot/js/**/*", - "../../../energy-skate-park/js/**/*", - "../../../energy-skate-park-basics/js/**/*", - "../../../equality-explorer/js/**/*", - "../../../equality-explorer-basics/js/**/*", - "../../../equality-explorer-two-variables/js/**/*", - "../../../faradays-electromagnetic-lab/js/**/*", - "../../../fourier-making-waves/js/**/*", - "../../../forces-and-motion-basics/js/**/*", - "../../../function-builder/js/**/*", - "../../../function-builder-basics/js/**/*", - "../../../gases-intro/js/**/*", - "../../../gas-properties/js/**/*", - "../../../generator/js/**/*", - "../../../geometric-optics/js/**/*", - "../../../geometric-optics-basics/js/**/*", - "../../../graphing-quadratics/js/**/*", - "../../../graphing-lines/js/**/*", - "../../../graphing-lines/images/**/*", - "../../../graphing-slope-intercept/js/**/*", - "../../../graphing-slope-intercept/images/**/*", - "../../../gravity-and-orbits/js/**/*", - "../../../greenhouse-effect/js/**/*", - "../../../griddle/js/**/*", - "../../../hookes-law/js/**/*", - "../../../joist/js/**/*", - "../../../keplers-laws/js/**/*", - "../../../kite/js/**/*", - "../../../magnet-and-compass/js/**/*", - "../../../magnets-and-electromagnets/js/**/*", - "../../../mean-share-and-balance/js/**/*", - "../../../mean-share-and-balance/images/**/*", - "../../../mobius/js/**/*", - "../../../models-of-the-hydrogen-atom/js/**/*", - "../../../molecule-polarity/js/**/*", - "../../../my-solar-system/js/**/*", - "../../../natural-selection/js/**/*", - "../../../nitroglycerin/js/**/*", - "../../../normal-modes/js/**/*", - "../../../number-compare/js/**/*", - "../../../number-line-common/js/**/*", - "../../../number-line-distance/js/**/*", - "../../../number-line-integers/js/**/*", - "../../../number-line-operations/js/**/*", - "../../../number-play/js/**/*", - "../../../number-pairs/js/**/*", - "../../../number-suite-common/js/**/*", "../../../perennial/js/scripts/collate-lint.ts", "../../../perennial-alias/js/scripts/collate-lint.ts", "../../../perennial-alias/js/common/ChipperVersion.d.ts", "../../../perennial-alias/js/common/ReleaseBranch.d.ts", - "../../../ph-scale/js/**/*", - "../../../ph-scale-basics/js/**/*", - "../../../phet-core/js/**/*", - "../../../phet-io/js/**/*", - "../../../phet-io-sim-specific/repos/**/*", - "../../../phet-io-test-sim/js/**/*", - "../../../phet-io-wrappers/js/**/*", - "../../../phet-io-wrappers/common/**/*", - "../../../phet-lib/common/**/*", - "../../../phetcommon/js/**/*", - "../../../phetmarks/js/**/*", - "../../../projectile-data-lab/js/**/*", - "../../../projectile-motion/js/**/*", - "../../../projectile-sampling-distributions/js/**/*", - "../../../quadrilateral/js/**/*", - "../../../quake/cordova-plugin-native-vibration/types/index.d.ts", - "../../../quantum-measurement/js/**/*", - "../../../ratio-and-proportion/js/**/*", - "../../../reactants-products-and-leftovers/js/**/*", - "../../../scenery/js/**/*", - "../../../shred/js/**/*", - "../../../scenery-phet/js/**/*", - "../../../simula-rasa/js/**/*", - "../../../soccer-common/js/**/*", - "../../../soccer-common/images/**/*", - "../../../solar-system-common/js/**/*", - "../../../sound-waves/js/**/*", - "../../../studio/js/**/*", - "../../../sun/js/**/*", - "../../../tambo/js/**/*", - "../../../tappi/js/ContinuousPatternVibrationController.ts", - "../../../tappi/js/VibrationManageriOS.ts", - "../../../tappi/js/VibrationPatterns.ts", - "../../../tappi/js/tappi-main.ts", - "../../../tappi/js/main.ts", - "../../../tandem/js/**/*", - "../../../tangible/js/**/*", - "../../../twixt/js/**/*", - "../../../unit-rates/js/**/*", - "../../../utterance-queue/js/**/*", - "../../../vector-addition-equations/js/**/*", - "../../../vector-addition/js/**/*", - "../../../vegas/js/**/*", - "../../../wave-interference/js/**/*", - "../../../wilder/js/**/*" + "../../../quake/cordova-plugin-native-vibration/types/index.d.ts" ] } \ No newline at end of file diff --git a/tsconfig/buildjson/tsconfig.json b/tsconfig/buildjson/tsconfig.json new file mode 100644 index 000000000..25ffa3ded --- /dev/null +++ b/tsconfig/buildjson/tsconfig.json @@ -0,0 +1,63 @@ +{ + "extends": "../../tsconfig-core.json", + // Entry points from build.json, see chipper/build.json + "include": [ + "../../../axon/js/**/*", + "../../../brand/adapted-from-phet/images/**/*", + "../../../brand/adapted-from-phet/js/Brand.ts", + "../../../brand/js/TBrand.ts", + "../../../brand/js/brand.ts", + "../../../brand/js/getLinks.ts", + "../../../brand/phet-io/images/**/*", + "../../../brand/phet-io/js/Brand.ts", + "../../../brand/phet/images/**/*", + "../../../brand/phet/js/Brand.ts", + "../../../chipper/js/LocalizedString.ts", + "../../../chipper/js/LocalizedStringProperty.ts", + "../../../chipper/js/chipper.ts", + "../../../chipper/js/data/localeInfoModule.js", + "../../../chipper/js/getStringModule.ts", + "../../../chipper/js/sim-tests/qunitStart.js", + "../../../chipper/js/grunt/tasks/util/getOption.ts", + "../../../chipper/phet-types-module.d.ts", + "../../../chipper/phet-types.d.ts", + "../../../dot/js/**/*", + "../../../joist/images/**/*", + "../../../joist/js/**/*", + "../../../joist/sounds/**/*", + "../../../kite/js/**/*", + "../../../perennial-alias/js/scripts/collate-lint.ts", + "../../../phet-core/js/**/*", + + // It's OK to list private repo phet-io files here, even though open source clients cannot check them out. + // They are only checked if they are present at runtime + "../../../phet-io/js/PhetioStateEngine.ts", + "../../../phet-io/js/dataStream.ts", + "../../../phet-io/js/phetio.ts", + "../../../phet-io/js/phetioCommandProcessor.ts", + "../../../phet-io/js/phetioDevSaveLoad.ts", + "../../../phet-io/js/phetioEngine.ts", + + "../../../phetcommon/js/**/*", + "../../../phetmarks/js/**/*", + "../../../scenery-phet/images/**/*", + "../../../scenery-phet/js/**/*", + "../../../scenery-phet/mipmaps/**/*", + "../../../scenery-phet/sounds/**/*", + "../../../scenery/js/**/*", + "../../../sherpa/js/fontawesome-4/checkEmptySolidShape.js", + "../../../sherpa/js/fontawesome-4/checkSquareOSolidShape.js", + "../../../sherpa/js/fontawesome-4/scissorsShape.js", + "../../../sherpa/js/fontawesome-5/**/*", + "../../../sherpa/lib/game-up-camera-1.0.0.js", + "../../../sherpa/lib/himalaya-1.1.0.js", + "../../../sherpa/lib/lodash-4.17.4.min.js", + "../../../sun/js/**/*", + "../../../tambo/images/**/*", + "../../../tambo/js/**/*", + "../../../tambo/sounds/**/*", + "../../../tandem/js/**/*", + "../../../twixt/js/**/*", + "../../../utterance-queue/js/**/*" + ] +} \ No newline at end of file