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

refactor: bump TypeScript version to 5.0 #1395

Merged
merged 5 commits into from
May 17, 2023
Merged

refactor: bump TypeScript version to 5.0 #1395

merged 5 commits into from
May 17, 2023

Conversation

samestep
Copy link
Collaborator

@samestep samestep commented May 16, 2023

Description

Followup to #1394. Apparently TypeScript 5.0 changes the import sort order used by prettier-plugin-organize-imports, so this PR runs yarn format to account for that. Then the other issues were our usage of suppressImplicitAnyIndexErrors (see below) and incompatibility of TypeDoc (which I upgraded).

Implementation strategy and design decisions

To fix the implicit any index errors, I made some code changes. Notable ones include:

  • I added an isKeyOf function in utils/Util which acts like the in operator but also tells TypeScript that the key is a key of the object.
  • I deleted more dragging code because it's still broken and I didn't want to bother fixing those type errors.
  • I deleted the valueADNums function and replaced its usage with a call to mapShape.
  • I removed the Path case from extractPoints because it was broken, and also removed Path from the type signatures of the functions that call extractPoints.

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have reviewed any generated registry diagram changes

@samestep samestep changed the title build(deps): bump TypeScript version to 5.0 refactor: bump TypeScript version to 5.0 May 16, 2023
@cloudflare-pages
Copy link

cloudflare-pages bot commented May 16, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 926401a
Status: ✅  Deploy successful!
Preview URL: https://71db0aa2.penrose-72l.pages.dev
Branch Preview URL: https://typescript-5-0.penrose-72l.pages.dev

View logs

@samestep samestep requested a review from wodeni May 16, 2023 20:59
@samestep samestep marked this pull request as ready for review May 16, 2023 20:59
@github-actions
Copy link

github-actions bot commented May 16, 2023

± Registry diff

📊 Performance

Key

Note that each bar component rounds up to the nearest 100ms, so each full bar is an overestimate by up to 400ms.

     0s   1s   2s   3s   4s   5s   6s   7s   8s   9s
     |    |    |    |    |    |    |    |    |    |
name ▝▀▀▀▀▀▀▀▀▀▀▀▚▄▄▄▄▄▄▄▄▄▞▀▀▀▀▀▀▀▀▀▀▀▀▚▄▄▄▄▄▄▄▄▄▖
      compilation labelling optimization rendering

Data

                                                                  0s   1s   2s   3s   4s   5s   6s   7s
                                                                  |    |    |    |    |    |    |    |
3d-projection-fake-3d-linear-algebra                              ▝▞▖
acquaintanceship-graph-simple-graph                               ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▚▀▀▀▀▀▀▀▀▀▀▚
allShapes-allShapes                                               ▝▚▚▄
angle-equivalence-triangle-mesh-2d                                ▝▀▀▞▀▀▖
arpanet-simple-curved-graph-dots                                  ▝▀▀▀▀▀▀▀▀▀▀▀▀▞▀▀▀▀▀▀▀▚
arrowheads-arrowheads                                             ▝▞▖
blobs-blobs                                                       ▝▀▀▀▀▀▀▀▀▀▀▀▀▞▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▖
caffeine-structural-formula                                       ▝▀▀▀▞▖
call-directed-graph-directed-multigraph                           ▝▀▀▀▀▀▀▀▚▀▀▀▖
call-undirected-graph-pseudograph                                 ▝▀▀▀▀▀▞▀▖
center-shrink-circle-animation                                    ▝▞▖
circle-example-euclidean                                          ▝▀▀▞▖
closest-point-test-closest-point                                  ▝▀▀▀▀▀▀▀▚▚
collinear-euclidean                                               ▝▀▚▚
communications-network-one-way-links-graph-simple-directed-graph  ▝▀▀▀▀▀▞▀▖
complete-bipartite-graphs-simple-graph                            ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▞▀▀▀▖
complete-graphs-simple-graph                                      ▝▀▀▀▀▀▀▀▀▀▀▞▀▀▖
computer-network-diagnostic-links-graph-pseudograph               ▝▀▀▀▀▀▞▖
computer-network-graph-simple-graph                               ▝▀▀▀▞▚
computer-network-multiple-links-graph-pseudograph                 ▝▀▀▀▀▚▚
computer-network-multiple-one-way-links-graph-directed-multigraph ▝▀▀▀▀▀▀▀▚▀▀▖
concyclic-pair-triangle-mesh-2d                                   ▝▀▚▚
congruent-triangles-euclidean                                     ▝▀▀▀▞▖
continuousmap-continuousmap                                       ▝▚▚
cotan-formula-triangle-mesh-2d                                    ▝▀▚▀▖
cube-graphs-simple-graph                                          ▝▀▀▀▀▀▀▀▀▀▀▀▞▀▀▀▖
cubic-bezier-closed-elastic-curve                                 ▝▀▀▞▀▖
cubic-bezier-cubic-bezier                                         ▝▀▚▞▀▖
cubic-bezier-open-elastic-curve                                   ▝▀▀▞▀▖
cycle-graphs-simple-graph                                         ▝▀▀▀▀▀▀▀▞▀▚
glutamine-molecules-basic                                         ▝▀▚▚
half-adder-distinctive-shape                                      ▝▀▞▖
halfedge-mesh-triangle-mesh-2d                                    ▝▀▚▚
hybrid-topology-graph-simple-graph                                ▝▀▀▞▖
hypercube-network-graph-simple-graph                              ▝▀▀▀▀▚▚
hypergraph-hypergraph                                             ▝▀▀▀▚▀▀▀▀▀▀▀▀▀▀▖
incenter-triangle-euclidean                                       ▝▀▚▚
influence-graph-simple-directed-graph                             ▝▀▀▚▚
jobs-trained-matching-graph-simple-graph                          ▝▀▀▀▚▀▚
jobs-trained-no-matching-graph-simple-graph                       ▝▀▀▀▚▀▖
lagrange-bases-lagrange-bases                                     ▝▚▚
linear-array-graph-simple-graph                                   ▝▀▀▞▖
lines-around-rect-rect-line-dist                                  ▝▚▚
matrix-matrix-addition-matrix-ops                                 ▝▚▚
matrix-matrix-division-elementwise-matrix-ops                     ▝▚▚
matrix-matrix-multiplication-elementwise-matrix-ops               ▝▀▞▖
matrix-matrix-multiplication-matrix-ops                           ▝▀▞▖
matrix-matrix-subtraction-matrix-ops                              ▝▀▞▖
matrix-transpose-matrix-ops                                       ▝▚▚
matrix-vector-left-multiplication-matrix-ops                      ▝▚▚
matrix-vector-right-multiplication-matrix-ops                     ▝▚▚
mesh-network-graph-simple-graph                                   ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▞▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▚
midsegment-triangles-euclidean                                    ▝▀▚▚
mobius-mobius                                                     ▝▞▖
module-dependency-graph-simple-directed-graph                     ▝▀▀▀▀▚▚
niche-overlap-graph-simple-graph                                  ▝▀▀▀▀▀▚▚
nitricacid-lewis                                                  ▝▀▀▀▞▀▚
non-convex-non-convex                                             ▝▀▞▖
nyc-subway-simple-curved-graph-boxes                              ▝▀▀▀▀▀▀▀▚▀▀▀▀▖
one-water-molecule-atoms-and-bonds                                ▝▞▖
parallel-lines-euclidean                                          ▝▀▚▚
persistent-homology-persistent-homology                           ▝▀▀▀▚▀▀▀▀▀▀▀▀▀▚▖
points-around-line-shape-distance                                 ▝▀▚▚
points-around-polyline-shape-distance                             ▝▀▀▚▚
points-around-star-shape-distance                                 ▝▀▀▀▚▚
precedence-graph-simple-directed-graph                            ▝▀▀▀▞▖
protein-interaction-graph-simple-graph                            ▝▀▀▀▀▀▀▀▞▀▀▀▖
quaternion-group-group-theory-cayley-graph                        ▝▀▚▚
quaternion-group-group-theory-multiplication-table                ▝▀▀▀▚▞▖
relative-orientation-triangle-mesh-2d                             ▝▀▞▖
ring-topology-graph-simple-graph                                  ▝▀▚▚
round-robin-graph-simple-directed-graph                           ▝▀▀▀▀▚▀▖
scalar-vector-division-matrix-ops                                 ▝▚▚
scalar-vector-left-multiplication-matrix-ops                      ▝▚▚
scalar-vector-right-multiplication-matrix-ops                     ▝▚▚
sec5-ex32-simple-curved-graph                                     ▝▀▀▀▀▀▀▞▀▀▀▀▀▖
siggraph-teaser-euclidean-teaser                                  ▝▀▀▞▖
star-topology-graph-simple-graph                                  ▝▀▀▞▖
tree-tree                                                         ▝▀▞▖
tree-venn                                                         ▝▀▚▚
tree-venn-3d                                                      ▝▚▚
triangle-centers-triangle-mesh-2d                                 ▝▀▞▖
two-triangles-triangle-mesh-3d                                    ▝▚▚
two-vectors-perp-vectors-dashed                                   ▝▚▚
union-graph-simple-graph                                          ▝▀▀▚▚
vector-vector-addition-matrix-ops                                 ▝▚▚
vector-vector-division-elementwise-matrix-ops                     ▝▚▚
vector-vector-multiplication-elementwise-matrix-ops               ▝▚▚
vector-vector-outerproduct-matrix-ops                             ▝▚▚
vector-vector-subtraction-matrix-ops                              ▝▚▚
vector-wedge-exterior-algebra                                     ▝▚▚
wet-floor-atoms-and-bonds                                         ▝▀▞▀▖
wheel-graphs-simple-graph                                         ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▞▀▀▖
word-cloud-example-word-cloud                                     ▝▀▞▖
wos-laplace-estimator-walk-on-spheres                             ▝▀▚▚
wos-nested-estimator-walk-on-spheres                              ▝▀▀▚▀▀▚
wos-offcenter-estimator-walk-on-spheres                           ▝▀▚▀▖
wos-poisson-estimator-walk-on-spheres                             ▝▀▚▀▖

@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Merging #1395 (43e128e) into main (de70455) will increase coverage by 0.48%.
The diff coverage is 61.76%.

❗ Current head 43e128e differs from pull request most recent head 926401a. Consider uploading reports for the commit 926401a to get more accurate results

@@            Coverage Diff             @@
##             main    #1395      +/-   ##
==========================================
+ Coverage   64.48%   64.97%   +0.48%     
==========================================
  Files          64       64              
  Lines        7569     7494      -75     
  Branches     1793     1761      -32     
==========================================
- Hits         4881     4869      -12     
+ Misses       2559     2498      -61     
+ Partials      129      127       -2     
Impacted Files Coverage Δ
packages/core/src/compiler/Domain.ts 84.02% <ø> (ø)
packages/core/src/compiler/Substance.ts 91.71% <ø> (ø)
packages/core/src/contrib/ConstraintsUtils.ts 78.57% <ø> (ø)
packages/core/src/contrib/Functions.ts 40.96% <ø> (-0.03%) ⬇️
packages/core/src/contrib/Minkowski.ts 98.16% <ø> (ø)
packages/core/src/contrib/Objectives.ts 22.78% <ø> (ø)
packages/core/src/contrib/Queries.ts 90.78% <ø> (ø)
packages/core/src/contrib/Utils.ts 53.16% <ø> (+1.31%) ⬆️
packages/core/src/index.ts 49.61% <ø> (ø)
packages/core/src/renderer/AttrHelper.ts 49.00% <0.00%> (ø)
... and 11 more

Copy link
Member

@wodeni wodeni left a comment

Choose a reason for hiding this comment

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

Looks good!

More of a note to future self: this PR further removes code for dragging (#644).

@samestep samestep merged commit b4ae329 into main May 17, 2023
10 checks passed
@samestep samestep deleted the typescript-5.0 branch May 17, 2023 16:07
@wodeni wodeni mentioned this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants