-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gatsby-cli): enable set packagemanager (#26856)
* Address configuration issues related to package manager selection * fix linting * use the right cli * clean up yargs * change console log * missing comma * find the eslint bug * think it was this * add everything back * change logic a bit, shouldn't also set telemetry * add whitespace * ignore TS error for the moment to validate the logic * switch order of validate script commands * Update packages/gatsby-cli/src/init-starter.ts Co-authored-by: Ward Peeters <[email protected]> * use pathExists * use pathExists * We want to keep the lock files * set package manager to yarn for gatsby new tests * fix tests and remove yarn.lock from official starters * might be a typescript issue * use positional arguments instead * adjust tests * fix plugin command top level error * run in gatsby project * make it a one off test like feedback * update links to .com and rename as options * remove unused prompt code * Allow for package-manager as key * decouple publish starters script from CLI version by keeping yarn import * Update scripts/publish-starters.sh Co-authored-by: Ward Peeters <[email protected]> Co-authored-by: Laurie Barth <[email protected]> Co-authored-by: Ward Peeters <[email protected]> Co-authored-by: Laurie Barth <[email protected]> Co-authored-by: gatsbybot <[email protected]>
- Loading branch information
1 parent
390ae17
commit 5658b87
Showing
6 changed files
with
142 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { GatsbyCLI } from "../test-helpers" | ||
|
||
const MAX_TIMEOUT = 2147483647 | ||
jest.setTimeout(MAX_TIMEOUT) | ||
|
||
describe(`gatsby options`, () => { | ||
it(`Prints the options`, () => { | ||
const [status, logs] = GatsbyCLI.from(`gatsby-sites/gatsby-build`).invoke(`options`) | ||
|
||
logs.should.contain(`Package Manager`) | ||
logs.should.contain(`Telemetry enabled`) | ||
expect(status).toBe(0) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters