phetsims / chipper

Tools for developing and building PhET interactive simulations.
MIT License
11 stars 14 forks source link

Delete tsconfig/all and replace it with a script like `grunt tsc-all` #1487

Open samreid opened 1 day ago

samreid commented 1 day ago

tsconfig/all/tsconfig.json is liable to get stale, and we would like to be able to type check all without having to cd over there.

This will affect:

Don't forget to add jab tsc-all --clean which can clean then type check.

samreid commented 17 hours ago

minor in progress patch (watch out for formatting)

```diff Subject: [PATCH] --- Index: chipper/tsconfig/all/tsconfig.json =================================================================== diff --git a/chipper/tsconfig/all/tsconfig.json b/chipper/tsconfig/all/tsconfig.json deleted file mode 100644 --- a/chipper/tsconfig/all/tsconfig.json (revision 425b1d053f0be663a0d366d21b06392e82d0dccf) +++ /dev/null (revision 425b1d053f0be663a0d366d21b06392e82d0dccf) @@ -1,566 +0,0 @@ -/** - * 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 - * @author Michael Kauzmann (PhET Interactive Simulations) - * @author Sam Reid (PhET Interactive Simulations) - */ -{ - "references": [ - { - "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/tsconfig.json" - // }, - // { - // "path": "../../../phet-vite-demo/tsconfig.json" - // }, - { - "path": "../../../phetcommon" - }, - { - "path": "../../../phetmarks" - }, - { - "path": "../../../plinko-probability" - }, - { - "path": "../../../projectile-data-lab" - }, - { - "path": "../../../projectile-sampling-distributions" - }, - { - "path": "../../../projectile-motion" - }, - { - "path": "../../../proportion-playground" - }, - { - "path": "../../../quadrilateral" - }, - { - "path": "../../../quake" - }, - { - "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" - } - ] -} \ No newline at end of file Index: phet-info/checklists/delete-repo-checklist.md IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/phet-info/checklists/delete-repo-checklist.md b/phet-info/checklists/delete-repo-checklist.md --- a/phet-info/checklists/delete-repo-checklist.md (revision 5277a2947ee7b8c5f1c669f9b3d878234cca4ef2) +++ b/phet-info/checklists/delete-repo-checklist.md (date 1728748016587) @@ -35,7 +35,6 @@ - [ ] If archiving, update the repo's README.md file to indicate why it is archived - [ ] Remove from github labels tracker/tool in phet-info (see its README) - [ ] Remove from `responsible_dev.json`. -- [ ] Remove from chipper/tsconfig/all/tsconfig.json (if present) We should explicitly state whether something needs to be done to delete the directory from aqua, build-server, and phettest, or whether these directories get automatically deleted, or just hang around forever with no consequences Index: phet-info/doc/typescript-quick-start.md IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/phet-info/doc/typescript-quick-start.md b/phet-info/doc/typescript-quick-start.md --- a/phet-info/doc/typescript-quick-start.md (revision 5277a2947ee7b8c5f1c669f9b3d878234cca4ef2) +++ b/phet-info/doc/typescript-quick-start.md (date 1728748016568) @@ -38,13 +38,6 @@ "sounds/**/*", ``` -2. To add support for your repo to type-check along with the rest of the project add it - to `chipper/tsconfig/all/tsconfig.json`. - -```json -"../../../{{REPO}}/js/**/*" -``` - Congratulations! Now the repo is TypeScript-capable. You can commit these changes if you wish. ### Transpile TypeScript Index: phet-info/checklists/new-repo-checklist.md IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/phet-info/checklists/new-repo-checklist.md b/phet-info/checklists/new-repo-checklist.md --- a/phet-info/checklists/new-repo-checklist.md (revision 5277a2947ee7b8c5f1c669f9b3d878234cca4ef2) +++ b/phet-info/checklists/new-repo-checklist.md (date 1728748016575) @@ -71,7 +71,6 @@ run `grunt update`. - [ ] Add the sim to [responsible_dev.json](https://github.com/phetsims/phet-info/blob/main/sim-info/responsible_dev.json). -- [ ] Add the sim to chipper/tsconfig/all/tsconfig.json - [ ] If applicable, add corresponding dependencies from `phetLibs` in package.json to "references" in tsconfig.json. ## Steps to create a different type of repo @@ -123,4 +122,3 @@ - [ ] If using IDEA/Webstorm (pre-2018), add the git source root for the repository. - [ ] Add the repo to [responsible_dev.json](https://github.com/phetsims/phet-info/blob/main/sim-info/responsible_dev.json). -- [ ] Add the repo to chipper/tsconfig/all/tsconfig.json Index: phet-info/checklists/rename-repo-checklist.md IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/phet-info/checklists/rename-repo-checklist.md b/phet-info/checklists/rename-repo-checklist.md --- a/phet-info/checklists/rename-repo-checklist.md (revision 5277a2947ee7b8c5f1c669f9b3d878234cca4ef2) +++ b/phet-info/checklists/rename-repo-checklist.md (date 1728748016581) @@ -15,7 +15,6 @@ - [ ] Change entry in [responsible_dev.json](https://github.com/phetsims/phet-info/blob/main/sim-info/responsible_dev.json). - [ ] If applicable, "refresh perennial" on phettest. -- [ ] Add the sim to chipper/tsconfig/all/tsconfig.json - [ ] Remove old repo directories in `chipper/dist/js`, `chipper/dist/declarations`, and `chipper/dist/js-cache-status.json` and and restart your transpiler. - [ ] Run `rm -rf {{OLD_REPO}}` from the phetsims directory ```