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

feat: migrate to typescript #72

Closed
wants to merge 44 commits into from
Closed

Conversation

Shinigami92
Copy link
Member

@Shinigami92 Shinigami92 commented Jan 10, 2022

This is the base branch of the TS migration

Please do not squash-merge this branch

How to test this PR

Use npm build and then run npx mocha test/<module>.unit.js to test the specific module
datatype is already working as an example!

We will create distinct PRs for each module and base them on this PR so a review can be simply made
After that we merge all together and then look that all (untouched) tests are running

List of PRs

image

Legend:

  • red = not tackled yet
  • green = in base branch or ready to be reviewed
  • blue = in draft PR
GraphViz Source
digraph ModuleGraph {
  # Colors:
  # red = not tackled yet
  # green = in base branch or ready to be reviewed
  # blue = in draft PR

  address[color=red]
  animal[color=blue]
  commerce[color=blue]
  company[color=red]
  database[color=green]
  datatype[color=green]
  date[color=green]
  fake[color=blue]
  finance[color=red]
  git[color=blue]
  hacker[color=blue]
  helpers[color=blue]
  iban[color=red]
  image[color=blue]
  internet[color=blue]
  locales[color=red]
  lorem[color=blue]
  mersenne[color=green]
  music[color=blue]
  name[color=blue]
  phone_number[color=red]
  random[color=blue]
  system[color=blue]
  time[color=green]
  unique[color=red]
  vehicle[color=red]
  word[color=blue]
  "_definitions"[color=black]
    
  datatype -> mersenne
  datatype -> datatype
  datatype -> random
  time
  git -> hacker
  git -> datatype
  git -> date
  git -> fake
  git -> random
  fake -> "*"
  hacker -> random
  hacker -> "_definitions"
  hacker -> helpers
  date -> datatype
  date -> "_definitions"
  date -> random
  helpers -> random
  helpers -> datatype
  helpers -> helpers
  helpers -> name
  helpers -> internet
  helpers -> address
  helpers -> phone
  helpers -> company
  helpers -> lorem
  helpers -> date
  helpers -> finance
  helpers -> "_definitions"
  lorem -> "_definitions"
  lorem -> random
  lorem -> lorem
  lorem -> datatype
  lorem -> fake
  database -> random
  database -> "_definitions"
  system -> random
  system -> system
  system -> "_definitions"
  system -> fake
  system -> datatype
  random -> mersenne
  random -> datatype
  random -> random
  random -> fake
  random -> image
  random -> locales
  image -> random
  image -> internet
  image -> datatype
  image -> image
  internet -> random
  internet -> "_definitions"
  internet -> helpers
  internet -> internet
  internet -> name
  internet -> datatype
  internet -> word
  name -> "_definitions"
  name -> datatype
  name -> random
  name -> locales
  name -> locale
  name -> name
  animal -> random
  animal -> "_definitions"
  commerce -> "_definitions"
  commerce -> random
  commerce -> datatype
  commerce -> commerce
  music -> "_definitions"
  music -> random
}

@Shinigami92 Shinigami92 added the p: 1-normal Nothing urgent label Jan 10, 2022
@Shinigami92 Shinigami92 self-assigned this Jan 10, 2022
@ericjeker
Copy link
Contributor

Hi @Shinigami92,

Did you already add a tsconfig.json? I can't see it anywhere.

@Shinigami92
Copy link
Member Author

Hi @Shinigami92,

Did you already add a tsconfig.json? I can't see it anywhere.

It's a draft PR for a reason 😅

@Shinigami92 Shinigami92 mentioned this pull request Jan 11, 2022
@ericjeker
Copy link
Contributor

Ahah, OK no worries. 🙈
I have set up this one below for TypeDoc if you wanna use it. Or should I put that in a separate PR so we can quickly merge it?

{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "skipLibCheck": true,
    "strict": true,
    "target": "es2016",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true
  },
}

@Shinigami92
Copy link
Member Author

A PR based on this PR would be helpful here
Then we can better review it and test stuff out

@Shinigami92 Shinigami92 changed the title feat: rewrite datatype to ts feat: migrate to typescript Jan 11, 2022
This was referenced Jan 12, 2022
src/datatype.ts Show resolved Hide resolved
src/mersenne.ts Show resolved Hide resolved
@Shinigami92 Shinigami92 force-pushed the migrate-to-typescript branch 3 times, most recently from fc36e2f to 7b02094 Compare January 13, 2022 14:24
@netlify
Copy link

netlify bot commented Jan 13, 2022

✔️ Deploy Preview for vigilant-wescoff-04e480 ready!

🔨 Explore the source changes: 23e4498

🔍 Inspect the deploy log: https://app.netlify.com/sites/vigilant-wescoff-04e480/deploys/61e1de10954bd3000731c030

😎 Browse the preview: https://deploy-preview-72--vigilant-wescoff-04e480.netlify.app

@Shinigami92 Shinigami92 added the do NOT merge yet Do not merge this PR into the target branch yet label Jan 13, 2022
Copy link
Member

@damienwebdev damienwebdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Shinigami92 Shinigami92 removed the do NOT merge yet Do not merge this PR into the target branch yet label Jan 14, 2022
@Shinigami92 Shinigami92 marked this pull request as ready for review January 14, 2022 18:53
Copy link
Member

@damienwebdev damienwebdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@damienwebdev damienwebdev linked an issue Jan 14, 2022 that may be closed by this pull request
@damienwebdev
Copy link
Member

damienwebdev commented Jan 14, 2022

Rebased into main as 2cc42f2

@ST-DDT ST-DDT deleted the migrate-to-typescript branch March 7, 2022 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite in typescript and emit usable types
7 participants