Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move our typescript system to perennial #364

Closed
7 of 10 tasks
zepumph opened this issue Sep 27, 2024 · 6 comments
Closed
7 of 10 tasks

Move our typescript system to perennial #364

zepumph opened this issue Sep 27, 2024 · 6 comments

Comments

@zepumph
Copy link
Member

zepumph commented Sep 27, 2024

From phetsims/chipper#1464. Instead of using tsc from chipper, we need this to be in perennial so we can use typescript in perennial.

  • Also phet-core/types should move to perennial let's chat in How/Should perennial be able to use code from phet-core, like IntentionalAny? #371
  • Move check.ts from grunt check to perennial (done in Delete tsconfig/all and replace it with a script like grunt check --all chipper#1487
  • Copy chipper/tsconfig history to perennial/tsconfig
  • New thing in chipper's grunt file to forward to perennial-alias. For linting and type checking.
  • lint and lint-everything and type checking should use __dirname so it works in perennial and alias
  • move chipper's package.json's typescript entry to perennial. rm -rf node modules for a thorough test
  • search for usages of tsc and move to perennial. Use grunt check too
  • update documentation about how tsc works.
  • eslint may have a peer dependency on this, just check it and be aware. Notify @zepumph if lint problems like that are discovered.
  • Delete chipper/tsconfig/ and point all usage sites to perennial-alias
@zepumph
Copy link
Member Author

zepumph commented Oct 21, 2024

Looking at this now.

zepumph added a commit that referenced this issue Oct 21, 2024
Signed-off-by: Michael Kauzmann <[email protected]>
zepumph added a commit that referenced this issue Oct 21, 2024
Signed-off-by: Michael Kauzmann <[email protected]>
zepumph added a commit to phetsims/chipper that referenced this issue Oct 21, 2024
zepumph added a commit that referenced this issue Oct 21, 2024
Signed-off-by: Michael Kauzmann <[email protected]>
@zepumph zepumph assigned samreid and unassigned zepumph Oct 21, 2024
samreid added a commit to phetsims/chipper that referenced this issue Oct 21, 2024
samreid added a commit to phetsims/chipper that referenced this issue Oct 21, 2024
@samreid
Copy link
Member

samreid commented Oct 21, 2024

~/phet/root/density$ node ../chipper/js/scripts/hook-pre-commit.js
node:internal/process/promises:391
    triggerUncaughtException(err, true /* fromPromise */);
    ^

AssertionError [ERR_ASSERTION]: repo provided does not have a tsconfig.json: null
    at check (/Users/samreid/phet/root/perennial-alias/js/grunt/check.ts:87:3)
    at <anonymous> (/Users/samreid/phet/root/chipper/js/scripts/hook-pre-commit-task.ts:85:27)
    at repo (/Users/samreid/phet/root/chipper/js/scripts/hook-pre-commit-task.ts:188:1)
    at Object.<anonymous> (/Users/samreid/phet/root/chipper/js/scripts/hook-pre-commit-task.ts:188:5)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Object.transformer (/Users/samreid/phet/root/perennial-alias/node_modules/tsx/dist/register-DpmFHar1.cjs:2:1186)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
    at Module._load (node:internal/modules/cjs/loader:1127:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}

Node.js v22.6.0


@samreid
Copy link
Member

samreid commented Oct 21, 2024

Most steps done, I'll check in with @zepumph and we cannot do final steps until merge to main.

samreid added a commit to phetsims/chipper that referenced this issue Oct 22, 2024
@zepumph
Copy link
Member Author

zepumph commented Oct 22, 2024

zepumph added a commit that referenced this issue Oct 22, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Oct 22, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Oct 22, 2024
zepumph added a commit that referenced this issue Oct 22, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Oct 22, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Oct 22, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Oct 22, 2024
@zepumph zepumph removed their assignment Oct 22, 2024
zepumph added a commit that referenced this issue Oct 23, 2024
zepumph added a commit to phetsims/phet-info that referenced this issue Oct 23, 2024
zepumph added a commit to phetsims/chipper that referenced this issue Oct 23, 2024
@zepumph
Copy link
Member Author

zepumph commented Oct 23, 2024

All that is left here:

  • Move tsconfig/buildtools/ back to chipper

zepumph added a commit to phetsims/aqua that referenced this issue Oct 23, 2024
samreid pushed a commit to phetsims/chipper that referenced this issue Oct 23, 2024
samreid pushed a commit to phetsims/chipper that referenced this issue Oct 23, 2024
samreid added a commit to phetsims/chipper that referenced this issue Oct 23, 2024
@samreid
Copy link
Member

samreid commented Oct 23, 2024

I moved tsconfig/buildtools/ back to chipper. While I was here I converted copy-history-to-repo from *.js to *.ts and ran it with sage run. Closing.

@samreid samreid closed this as completed Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants