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

internal: migrate off nimbus #1609

Merged
merged 31 commits into from
Dec 21, 2022
Merged

internal: migrate off nimbus #1609

merged 31 commits into from
Dec 21, 2022

Conversation

williaster
Copy link
Collaborator

@williaster williaster commented Dec 16, 2022

🏠 Internal

This PR migrates our development config / dependencies off of https://github.com/airbnb/nimbus which is no longer maintained and is more blackbox than we want.

Migrating off this will unblock things like #1578 and also allow us to upgrade beyond TS@3.8 which is the latest version @airbnb/config-typescript supports.

  • babel

    • remove @airbnb/config-babel + add equivalent deps
    • update scripts
      • fix build:workspaces script / update documentation
    • runs without error locally
    • compiles both cjs + esm
    • transforms typescript types to prop-types
  • eslint

    • remove @airbnb/config-eslint + add equivalent deps
    • update scripts
    • upgrade lint configs
      • fix breaking lint rules changes
    • apply lint fixes
      • --fix
      • manual
  • typescript

    • remove @airbnb/config-typescript + add equivalent deps
    • update scripts
    • commit tsconfig*s
    • add updateReferences script
    • types are generated / within-repo dependencies work correctly
  • prettier

    • remove @airbnb/config-prettier + add equivalent deps
    • update scripts
    • config + ignore files are respected/found
    • runs in parallel
    • fix deprecated jsxBracketSameLine option
    • add prettier to CI (separate PR)
  • jest

    • remove @airbnb/config-jest + add equivalent deps
    • update scripts
    • implement setup files
    • tests pass locally
  • remove @airbnb/nimbus

  • ci passes 🎉 🍹

    • update to node>=16.10.0

@williaster williaster changed the title internal(dev/babel): migrate off nimbus internal: migrate off nimbus Dec 16, 2022
@@ -31,12 +31,12 @@
"private": true,
"scripts": {
"babel": "yarn run babel:cjs && yarn run babel:esm",
"babel:cjs": "nimbus babel --clean --workspaces=\"@visx/!(demo)\"",
"babel:esm": "nimbus babel --clean --workspaces=\"@visx/!(demo)\" --esm",
"babel:cjs": "lerna exec --ignore @visx/demo --parallel -- babel --root-mode upward --delete-dir-on-start src/ --out-dir lib --extensions .ts,.tsx",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

a big plus of nimbus was parallelization – prob have to use lerna for this

@JayWelsh
Copy link
Contributor

Just want to say thank you so much for doing something about this!

root: true,
extends: [
// these are relics of nimbus, we could definitely simplify + consolidate
'./config-eslint/base.js',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this config is kind of out of control but I don't think trying to simplify it in this PR is a good idea given the amount of changes already here

Copy link

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

IIRC, prettier should be able to fix all the missing newline at EOF errors, too?

@williaster williaster marked this pull request as ready for review December 20, 2022 03:08
@github-actions
Copy link

github-actions bot commented Dec 20, 2022

Size Changes

Package Diff ESM Prev ESM CJS Prev CJS
visx-annotation -0.1% 33.14 KB 33.18 KB 45.97 KB 46.13 KB
visx-axis +0.3% 21.35 KB 21.28 KB 25.85 KB 25.86 KB
visx-bounds 🔻 -10.7% 2.88 KB 3.22 KB 3.29 KB 3.64 KB
visx-brush -6.1% 52.87 KB 56.3 KB 56.93 KB 60.4 KB
visx-chord -0.2% 3.4 KB 3.4 KB 4.58 KB 4.61 KB
visx-clip-path +0.5% 4.42 KB 4.4 KB 5.92 KB 5.92 KB
visx-drag -0.6% 12.46 KB 12.53 KB 14.06 KB 16.43 KB
visx-event +1.9% 3.79 KB 3.72 KB 5.07 KB 5.08 KB
visx-geo +0.7% 13.2 KB 13.11 KB 16.35 KB 16.31 KB
visx-glyph +0.5% 14.82 KB 14.75 KB 19.52 KB 19.54 KB
visx-gradient +0.4% 17.78 KB 17.71 KB 22.31 KB 22.32 KB
visx-grid -1.0% 18.54 KB 18.72 KB 22.13 KB 22.5 KB
visx-group +0.1% 1.61 KB 1.61 KB 2.21 KB 2.22 KB
visx-heatmap -0.3% 7.22 KB 7.24 KB 8.53 KB 8.56 KB
visx-hierarchy -1.0% 11.81 KB 11.92 KB 17.49 KB 17.69 KB
visx-legend -0.5% 26.31 KB 26.44 KB 33.23 KB 33.48 KB
visx-marker +0.6% 8.94 KB 8.89 KB 11.08 KB 11.07 KB
visx-mock-data -0.0% 318.4 KB 318.43 KB 321.76 KB 321.84 KB
visx-network -0.3% 4.56 KB 4.58 KB 6.65 KB 6.71 KB
visx-pattern -1.2% 11.42 KB 11.55 KB 15.39 KB 15.58 KB
visx-point 🔻 -20.8% 1003 B 1.24 KB 1.78 KB 2.05 KB
visx-react-spring +0.5% 13.67 KB 13.6 KB 17.31 KB 18.42 KB
visx-responsive -7.5% 20.4 KB 22.05 KB 25.61 KB 27.31 KB
visx-scale +0.7% 18.21 KB 18.08 KB 29.62 KB 29.68 KB
visx-shape -0.5% 84.88 KB 85.28 KB 106.27 KB 106.98 KB
visx-stats -0.7% 13.42 KB 13.51 KB 14.96 KB 15.07 KB
visx-text -0.6% 8.37 KB 8.42 KB 9.88 KB 11.08 KB
visx-threshold -0.1% 2.84 KB 2.84 KB 3.72 KB 3.73 KB
visx-tooltip -5.3% 14.63 KB 15.44 KB 20.97 KB 24.1 KB
visx-voronoi +0.0% 2.26 KB 2.26 KB 2.95 KB 2.96 KB
visx-wordcloud -1.5% 2.56 KB 2.6 KB 3.37 KB 4.56 KB
visx-xychart +0.2% 173.24 KB 172.81 KB 233.59 KB 245.36 KB
visx-zoom -0.1% 15.7 KB 15.72 KB 18.69 KB 18.73 KB

Compared to master. File sizes are unminified and ungzipped.

View raw build stats

Previous (master)

{
  "visx-annotation": {
    "esm": 33978,
    "lib": 47235
  },
  "visx-axis": {
    "esm": 21788,
    "lib": 26480
  },
  "visx-bounds": {
    "esm": 3301,
    "lib": 3732
  },
  "visx-brush": {
    "esm": 57656,
    "lib": 61852
  },
  "visx-chord": {
    "esm": 3486,
    "lib": 4716
  },
  "visx-clip-path": {
    "esm": 4502,
    "lib": 6062
  },
  "visx-curve": {
    "esm": 323,
    "lib": 1464
  },
  "visx-demo": {
    "esm": 0,
    "lib": 0
  },
  "visx-drag": {
    "esm": 12834,
    "lib": 16829
  },
  "visx-event": {
    "esm": 3807,
    "lib": 5200
  },
  "visx-geo": {
    "esm": 13425,
    "lib": 16705
  },
  "visx-glyph": {
    "esm": 15109,
    "lib": 20013
  },
  "visx-gradient": {
    "esm": 18135,
    "lib": 22853
  },
  "visx-grid": {
    "esm": 19171,
    "lib": 23038
  },
  "visx-group": {
    "esm": 1646,
    "lib": 2274
  },
  "visx-heatmap": {
    "esm": 7414,
    "lib": 8770
  },
  "visx-hierarchy": {
    "esm": 12209,
    "lib": 18111
  },
  "visx-legend": {
    "esm": 27079,
    "lib": 34279
  },
  "visx-marker": {
    "esm": 9101,
    "lib": 11337
  },
  "visx-mock-data": {
    "esm": 326069,
    "lib": 329564
  },
  "visx-network": {
    "esm": 4690,
    "lib": 6869
  },
  "visx-pattern": {
    "esm": 11826,
    "lib": 15957
  },
  "visx-point": {
    "esm": 1266,
    "lib": 2095
  },
  "visx-react-spring": {
    "esm": 13928,
    "lib": 18860
  },
  "visx-responsive": {
    "esm": 22582,
    "lib": 27962
  },
  "visx-scale": {
    "esm": 18512,
    "lib": 30389
  },
  "visx-shape": {
    "esm": 87327,
    "lib": 109552
  },
  "visx-stats": {
    "esm": 13830,
    "lib": 15432
  },
  "visx-text": {
    "esm": 8621,
    "lib": 11351
  },
  "visx-threshold": {
    "esm": 2911,
    "lib": 3820
  },
  "visx-tooltip": {
    "esm": 15808,
    "lib": 24683
  },
  "visx-visx": {
    "esm": 1524,
    "lib": 4551
  },
  "visx-voronoi": {
    "esm": 2313,
    "lib": 3033
  },
  "visx-wordcloud": {
    "esm": 2661,
    "lib": 4673
  },
  "visx-xychart": {
    "esm": 176957,
    "lib": 251251
  },
  "visx-zoom": {
    "esm": 16099,
    "lib": 19179
  }
}

Current

{
  "visx-annotation": {
    "esm": 33937,
    "lib": 47074
  },
  "visx-axis": {
    "esm": 21861,
    "lib": 26466
  },
  "visx-bounds": {
    "esm": 2948,
    "lib": 3371
  },
  "visx-brush": {
    "esm": 54136,
    "lib": 58297
  },
  "visx-chord": {
    "esm": 3478,
    "lib": 4691
  },
  "visx-clip-path": {
    "esm": 4524,
    "lib": 6062
  },
  "visx-curve": {
    "esm": 323,
    "lib": 1462
  },
  "visx-demo": {
    "esm": 0,
    "lib": 0
  },
  "visx-drag": {
    "esm": 12756,
    "lib": 14402
  },
  "visx-event": {
    "esm": 3878,
    "lib": 5194
  },
  "visx-geo": {
    "esm": 13515,
    "lib": 16741
  },
  "visx-glyph": {
    "esm": 15177,
    "lib": 19992
  },
  "visx-gradient": {
    "esm": 18202,
    "lib": 22847
  },
  "visx-grid": {
    "esm": 18982,
    "lib": 22665
  },
  "visx-group": {
    "esm": 1648,
    "lib": 2267
  },
  "visx-heatmap": {
    "esm": 7394,
    "lib": 8731
  },
  "visx-hierarchy": {
    "esm": 12093,
    "lib": 17910
  },
  "visx-legend": {
    "esm": 26944,
    "lib": 34024
  },
  "visx-marker": {
    "esm": 9152,
    "lib": 11350
  },
  "visx-mock-data": {
    "esm": 326040,
    "lib": 329480
  },
  "visx-network": {
    "esm": 4674,
    "lib": 6809
  },
  "visx-pattern": {
    "esm": 11689,
    "lib": 15763
  },
  "visx-point": {
    "esm": 1003,
    "lib": 1818
  },
  "visx-react-spring": {
    "esm": 14000,
    "lib": 17725
  },
  "visx-responsive": {
    "esm": 20892,
    "lib": 26221
  },
  "visx-scale": {
    "esm": 18649,
    "lib": 30334
  },
  "visx-shape": {
    "esm": 86912,
    "lib": 108820
  },
  "visx-stats": {
    "esm": 13738,
    "lib": 15320
  },
  "visx-text": {
    "esm": 8567,
    "lib": 10114
  },
  "visx-threshold": {
    "esm": 2907,
    "lib": 3806
  },
  "visx-tooltip": {
    "esm": 14976,
    "lib": 21474
  },
  "visx-visx": {
    "esm": 1524,
    "lib": 4487
  },
  "visx-voronoi": {
    "esm": 2314,
    "lib": 3021
  },
  "visx-wordcloud": {
    "esm": 2620,
    "lib": 3455
  },
  "visx-xychart": {
    "esm": 177399,
    "lib": 239197
  },
  "visx-zoom": {
    "esm": 16077,
    "lib": 19135
  }
}

@williaster
Copy link
Collaborator Author

williaster commented Dec 20, 2022

Woot! Finally got CI to pass. Looked at the CI times and the TS task almost doubled because we lost some of the parallelization we got with nimbus. Everything else was mostly unchanged, though, and we can try to tune TS more in the future.

image

Edit: the new TS build time maybe isn't that different from the typical range. Here's another build with nimbus from today where the time here is the same as the non-nimbus build
image

@williaster williaster merged commit fa743a4 into master Dec 21, 2022
@williaster williaster deleted the chris--bye-nimbus branch December 21, 2022 00:16
@github-actions
Copy link

🎉 This PR is included in version v2.17.0-alpha.0 of the packages modified 🎉

@JayWelsh
Copy link
Contributor

Great work @williaster ! You've saved the day! 🥇 🥳

@github-actions
Copy link

🎉 This PR is included in version v2.17.0 of the packages modified 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants