Skip to content
Snippets Groups Projects

dev(release): use ts-node, add top-level shortuct

Merged Warren Gifford requested to merge release/ts-node into main

Created by: bobheadxi

Slight improvements for one of the items https://github.com/sourcegraph/sourcegraph/issues/16207 :

Would be nice to have a more "CLI-like" experience

  • Use ts-node, which removes the need for a separate build step
    • this seems reasonably speedy, ~1.5s for command runs after the first. I think being able to avoid "forgot to build" scenarios is much more valuable
    • this also kind of negates the need for https://github.com/sourcegraph/sourcegraph/issues/15729 but if we want to change this more (e.g. declare config in a ts class that implements the Config interface) I would do that in a separate PR. I'm not sure why I didn't think of ts-node before but I woke up from a nap just now and thought, "doesn't ts-node exist?"
  • Add a top-level yarn run release shortcut that does the exact same thing
    • For example, try yarn run release _test:config from project root. For the lazy

thoughts

I'm not sure what else to cover here - we could introduce flags, but there's not much that requires flags right now (there's another item in #16207 (closed) for secrets management, another potential use of flags)

I'm a bit unsure about having this be a properly global CLI, since it is inherently tied to the Sourcegraph commit (most notably through the config)

We could add a dev bash script so that we can use a marginally shorter dev/release.sh [...] but I feel like the gains from that is marginal

Open to more ideas here!

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: codecov[bot]

    Codecov Report

    Merging #16519 (37960a9) into main (ec87b1b) will increase coverage by 0.00%. The diff coverage is n/a.

    @@           Coverage Diff           @@
    ##             main   #16519   +/-   ##
    =======================================
      Coverage   52.69%   52.69%           
    =======================================
      Files        1670     1670           
      Lines       83587    83587           
      Branches     7441     7498   +57     
    =======================================
    + Hits        44045    44048    +3     
    + Misses      35672    35670    -2     
    + Partials     3870     3869    -1     
    Flag Coverage Δ
    go 52.29% <ø> (+<0.01%) :arrow_up:
    integration 29.32% <ø> (-0.04%) :arrow_down:
    storybook 27.76% <ø> (ø)
    typescript 53.67% <ø> (ø)
    unit 34.16% <ø> (ø)
    Impacted Files Coverage Δ
    cmd/repo-updater/repos/types.go 69.37% <0.00%> (+0.62%) :arrow_up:
    .../internal/codeintel/resolvers/graphql/locations.go 85.56% <0.00%> (+2.06%) :arrow_up:
Please register or sign in to reply
Loading