Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

feat: support src/command/index cmd #141

Merged
merged 3 commits into from
Aug 3, 2020
Merged

feat: support src/command/index cmd #141

merged 3 commits into from
Aug 3, 2020

Conversation

RasPhilCo
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 29, 2020

Codecov Report

Merging #141 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #141   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files           1       1           
  Lines          10      10           
  Branches        2       2           
======================================
  Misses         10      10           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07bcfaa...2298b69. Read the comment docs.

@RasPhilCo RasPhilCo merged commit 90ac072 into master Aug 3, 2020
@RasPhilCo RasPhilCo deleted the default-cmd branch August 3, 2020 17:37
@G-Rath
Copy link

G-Rath commented Oct 23, 2020

@chadian @RasPhilCo just FYI this is a very breaking change, that I don't really understand at all nor know how I can work around, in part because there's no issue, description, changelog entry, etc.

@RasPhilCo
Copy link
Contributor Author

RasPhilCo commented Dec 19, 2020

@G-Rath I backtested this before merging, what breaks?

@RasPhilCo
Copy link
Contributor Author

Ref oclif/oclif#277 (comment)

@G-Rath
Copy link

G-Rath commented Dec 19, 2020

At the time of posting I was very swamped with work, so while the problem is obvious to me now, it wasn't at the time.

Basically, this change means that if there's an index.js/ts file it's assumed to be the default command to run - I think on paper this is a reasonable implementation for the feature of having a "default command", but it's assuming you've not already got such a file which I do.

I'm using index.ts as a barral export to allow me to import commands as import { MyCommand } from '@src/commands' - this means this change is breaking for my project as it takes the first command being exported and uses that as the default command.

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

Successfully merging this pull request may close these issues.

None yet

3 participants