From 659dbbb4a415400293c5b5e75f7422da0e6ae083 Mon Sep 17 00:00:00 2001 From: thinca Date: Thu, 14 Jul 2022 03:22:16 +0900 Subject: [PATCH] docs: update links to main branch --- CHANGELOG.md | 2 +- docs/CHANGELOG-historical.md | 2 +- docs/api.md | 18 +++++++++--------- docs/bundling.md | 2 +- docs/examples.md | 2 +- lib/command.ts | 2 +- lib/utils/process-argv.ts | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ff64a168..efa41c433 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -269,4 +269,4 @@ All notable changes to this project will be documented in this file. See [standa * **yargs:** add missing command(module) signature ([#1707](https://www.github.com/yargs/yargs/issues/1707)) ([0f81024](https://www.github.com/yargs/yargs/commit/0f810245494ccf13a35b7786d021b30fc95ecad5)), closes [#1704](https://www.github.com/yargs/yargs/issues/1704) -[Older CHANGELOG Entries](https://github.com/yargs/yargs/blob/master/docs/CHANGELOG-historical.md) +[Older CHANGELOG Entries](https://github.com/yargs/yargs/blob/main/docs/CHANGELOG-historical.md) diff --git a/docs/CHANGELOG-historical.md b/docs/CHANGELOG-historical.md index fc42f5d91..14979a5ad 100644 --- a/docs/CHANGELOG-historical.md +++ b/docs/CHANGELOG-historical.md @@ -293,7 +293,7 @@ cript import to prevent a future major release warning ([#1441](https://www.gith * options with leading '+' or '0' now parse as strings * dropping Node 6 which hits end of life in April 2019 -* see [yargs-parser@12.0.0 CHANGELOG](https://github.com/yargs/yargs-parser/blob/master/CHANGELOG.md#breaking-changes) +* see [yargs-parser@12.0.0 CHANGELOG](https://github.com/yargs/yargs-parser/blob/main/CHANGELOG.md#breaking-changes) * we now warn if the yargs stanza package.json is used. diff --git a/docs/api.md b/docs/api.md index 4b3bde377..dc588100c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -5,14 +5,14 @@ For more details refer to the official [API reference](https://yargs.js.org/docs document on the yargs.js.org website. This document is the Yargs API reference. There are more documentation files in -[`docs` in the Yargs source tree](https://github.com/yargs/yargs/tree/master/docs): +[`docs` in the Yargs source tree](https://github.com/yargs/yargs/tree/main/docs): -- [Examples](https://github.com/yargs/yargs/blob/master/docs/examples.md) -- [Advanced Topics](https://github.com/yargs/yargs/blob/master/docs/advanced.md) -- [TypeScript usage examples](https://github.com/yargs/yargs/blob/master/docs/typescript.md) -- [Browser usage example](https://github.com/yargs/yargs/blob/master/docs/browser.md) -- [Bundling](https://github.com/yargs/yargs/blob/master/docs/bundling.md) -- [Parsing Tricks](https://github.com/yargs/yargs/blob/master/docs/tricks.md) +- [Examples](https://github.com/yargs/yargs/blob/main/docs/examples.md) +- [Advanced Topics](https://github.com/yargs/yargs/blob/main/docs/advanced.md) +- [TypeScript usage examples](https://github.com/yargs/yargs/blob/main/docs/typescript.md) +- [Browser usage example](https://github.com/yargs/yargs/blob/main/docs/browser.md) +- [Bundling](https://github.com/yargs/yargs/blob/main/docs/bundling.md) +- [Parsing Tricks](https://github.com/yargs/yargs/blob/main/docs/tricks.md) API reference @@ -340,7 +340,7 @@ yargs ***Note:*** `.parse()` and `.argv` should only be used at the top level, not inside a command's builder function. -Please see [Advanced Topics: Commands](https://github.com/yargs/yargs/blob/master/docs/advanced.md#commands) for a thorough +Please see [Advanced Topics: Commands](https://github.com/yargs/yargs/blob/main/docs/advanced.md#commands) for a thorough discussion of the advanced features exposed in the Command API. .completion([cmd], [description], [fn]) @@ -1368,7 +1368,7 @@ builder, handler, or middleware is used. If the arguments have not been parsed, this property is `false`. If the arguments have been parsed, this contain detailed parsed arguments. See -the documentation in [yargs-parser `.detailed()`](https://github.com/yargs/yargs-parser/blob/master/README.md#requireyargs-parserdetailedargs-opts) +the documentation in [yargs-parser `.detailed()`](https://github.com/yargs/yargs-parser/blob/main/README.md#requireyargs-parserdetailedargs-opts) for details of this object .parserConfiguration(obj) diff --git a/docs/bundling.md b/docs/bundling.md index 4afa821cd..66208750a 100644 --- a/docs/bundling.md +++ b/docs/bundling.md @@ -6,7 +6,7 @@ standalone distributions. ### You might not need to bundle Newer releases of yargs can run directly in modern browsers, take a look at -[Running yargs in the browser](https://github.com/yargs/yargs/blob/master/docs/browser.md). +[Running yargs in the browser](https://github.com/yargs/yargs/blob/main/docs/browser.md). ## ncc diff --git a/docs/examples.md b/docs/examples.md index ece17f2ed..42f2d81e2 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -2,7 +2,7 @@ See the [Example Folder](/example) for more demonstrations of Yargs in the wild. We would love fixes to old examples and pull -requests for fancy new examples, [help contribute!](https://github.com/yargs/yargs/blob/master/contributing.md). +requests for fancy new examples, [help contribute!](https://github.com/yargs/yargs/blob/main/contributing.md). With yargs, the options be just a hash! ------------------------------------------------------------------- diff --git a/lib/command.ts b/lib/command.ts index 8b59119b4..243786fa3 100644 --- a/lib/command.ts +++ b/lib/command.ts @@ -135,7 +135,7 @@ export class CommandInstance { } // The 'cmd' provided was a string, we apply the command DSL: - // https://github.com/yargs/yargs/blob/master/docs/advanced.md#advanced-topics + // https://github.com/yargs/yargs/blob/main/docs/advanced.md#advanced-topics if (typeof cmd === 'string') { // parse positionals out of cmd string const parsedCommand = parseCommand(cmd); diff --git a/lib/utils/process-argv.ts b/lib/utils/process-argv.ts index a0d6d91f2..3cad6386d 100644 --- a/lib/utils/process-argv.ts +++ b/lib/utils/process-argv.ts @@ -10,13 +10,13 @@ function getProcessArgvBinIndex() { function isBundledElectronApp() { // process.defaultApp is either set by electron in an electron unbundled app, or undefined - // see https://github.com/electron/electron/blob/master/docs/api/process.md#processdefaultapp-readonly + // see https://github.com/electron/electron/blob/main/docs/api/process.md#processdefaultapp-readonly return isElectronApp() && !(process as ElectronProcess).defaultApp; } function isElectronApp() { // process.versions.electron is either set by electron, or undefined - // see https://github.com/electron/electron/blob/master/docs/api/process.md#processversionselectron-readonly + // see https://github.com/electron/electron/blob/main/docs/api/process.md#processversionselectron-readonly return !!(process as ElectronProcess).versions.electron; }