Skip to content

Commit

Permalink
Try to revert unwanted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pyamada-atlassian committed Jul 8, 2024
1 parent ba269a7 commit 9f6de63
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions flow-typed/npm/@swc/core_v1.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ declare module '@swc/core' {
* presence of the filename.
* - Options like "test", "exclude", and "ignore" require the filename
* for string/RegExp matching.
* - swc.config.js files are loaded relative to the file being compiled.
* - .swcrc files are loaded relative to the file being compiled.
* If this option is omitted, Swc will behave as if swcrc: false has been set.
*/
filename?: string,
Expand All @@ -317,27 +317,27 @@ declare module '@swc/core' {
*
* "root" - Passes the "root" value through as unchanged.
* "upward" - Walks upward from the "root" directory, looking for a directory
* containing a swc.config.js file, and throws an error if a swc.config.js
* containing a .swcrc file, and throws an error if a .swcrc
* is not found.
* "upward-optional" - Walk upward from the "root" directory, looking for
* a directory containing a swc.config.js file, and falls back to "root"
* if a swc.config.js is not found.
* a directory containing a .swcrc file, and falls back to "root"
* if a .swcrc is not found.
*
*
* "root" is the default mode because it avoids the risk that Swc
* will accidentally load a swc.config.js that is entirely outside
* will accidentally load a .swcrc that is entirely outside
* of the current project folder. If you use "upward-optional",
* be aware that it will walk up the directory structure all the
* way to the filesystem root, and it is always possible that someone
* will have a forgotten swc.config.js in their home directory,
* will have a forgotten .swcrc in their home directory,
* which could cause unexpected errors in your builds.
*
*
* Users with monorepo project structures that run builds/tests on a
* per-package basis may well want to use "upward" since monorepos
* often have a swc.config.js in the project root. Running Swc
* often have a .swcrc in the project root. Running Swc
* in a monorepo subdirectory without "upward", will cause Swc
* to skip loading any swc.config.js files in the project root,
* to skip loading any .swcrc files in the project root,
* which can lead to unexpected errors and compilation failure.
*/
rootMode?: 'root' | 'upward' | 'upward-optional',
Expand All @@ -353,19 +353,19 @@ declare module '@swc/core' {
envName?: string,

/**
* Defaults to searching for a default `swc.config.js` file, but can
* Defaults to searching for a default `.swcrc` file, but can
* be passed the path of any JS or JSON5 config file.
*
*
* NOTE: This option does not affect loading of swc.config.js files,
* so while it may be tempting to do configFile: "./foo/swc.config.js",
* it is not recommended. If the given swc.config.js is loaded via the
* NOTE: This option does not affect loading of .swcrc files,
* so while it may be tempting to do configFile: "./foo/.swcrc",
* it is not recommended. If the given .swcrc is loaded via the
* standard file-relative logic, you'll end up loading the same
* config file twice, merging it with itself. If you are linking
* a specific config file, it is recommended to stick with a
* naming scheme that is independent of the "swcrc" name.
*
* Defaults to `path.resolve(opts.root, "swc.config.js")`
* Defaults to `path.resolve(opts.root, ".swcrc")`
*/
configFile?: string | boolean,

Expand All @@ -374,7 +374,7 @@ declare module '@swc/core' {
*
* A swcrc value passed in the programmatic options will override one set within a configuration file.
*
* Note: swc.config.js files are only loaded if the current "filename" is inside of
* Note: .swcrc files are only loaded if the current "filename" is inside of
* a package that matches one of the "swcrcRoots" packages.
*
*
Expand Down Expand Up @@ -494,7 +494,7 @@ declare module '@swc/core' {
|};
declare export type Swcrc = Config | Config[];
/**
* swc.config.js
* .swcrc
*/
declare export type Config = {|
/**
Expand Down

0 comments on commit 9f6de63

Please sign in to comment.