Skip to content

Commit

Permalink
change a config name moduleHiddenFile -> watchHiddenFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
sat0yu committed Sep 12, 2018
1 parent cf40138 commit 8790d0b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## master

- `[jest-ci]` Add `moduleHiddenFiles` to allowed watch mode configs ([#6962](https://github.com/facebook/jest/pull/6962))
- `[jest-ci]` Add `watchHiddenFiles` to allowed watch mode configs ([#6962](https://github.com/facebook/jest/pull/6962))

## 23.6.0

Expand Down
2 changes: 1 addition & 1 deletion TestUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ const DEFAULT_PROJECT_CONFIG: ProjectConfig = {
},
moduleDirectories: [],
moduleFileExtensions: ['js'],
moduleHiddenFiles: ['.gitignore'],
moduleLoader: '/test_module_loader_path',
moduleNameMapper: [],
modulePathIgnorePatterns: [],
Expand Down Expand Up @@ -116,6 +115,7 @@ const DEFAULT_PROJECT_CONFIG: ProjectConfig = {
transform: [],
transformIgnorePatterns: [],
unmockedModulePathPatterns: null,
watchHiddenFiles: ['.gitignore'],
watchPathIgnorePatterns: [],
};

Expand Down
12 changes: 6 additions & 6 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,6 @@ An array of file extensions your modules use. If you require modules without spe

If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest).

### `moduleHiddenFiles` [array<string>]

Default: `[".gitignore"]`

An array of hidden files your modules use. Jest detects also any changes in the specified hidden files

### `moduleNameMapper` [object<string, string>]

Default: `null`
Expand Down Expand Up @@ -934,6 +928,12 @@ Default: `false`

Indicates whether each individual test should be reported during the run. All errors will also still be shown on the bottom after execution.

### `watchHiddenFiles` [array<string>]

Default: `[".gitignore"]`

An array of hidden files your modules use. Jest detects also any changes in the specified hidden files

### `watchPathIgnorePatterns` [array<string>]

Default: `[]`
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/__snapshots__/show_config.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports[`--showConfig outputs config info and exits 1`] = `
\\"jsx\\",
\\"node\\"
],
\\"moduleHiddenFiles\\": [
\\"watchHiddenFiles\\": [
\\".gitignore\\"
],
\\"moduleNameMapper\\": {},
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-config/src/Defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default ({
},
moduleDirectories: ['node_modules'],
moduleFileExtensions: ['js', 'json', 'jsx', 'node'],
moduleHiddenFiles: ['.gitignore'],
moduleNameMapper: {},
modulePathIgnorePatterns: [],
noStackTrace: false,
Expand Down Expand Up @@ -80,6 +79,7 @@ export default ({
useStderr: false,
verbose: null,
watch: false,
watchHiddenFiles: ['.gitignore'],
watchPathIgnorePatterns: [],
watchman: true,
}: DefaultOptions);
2 changes: 1 addition & 1 deletion packages/jest-config/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ const getConfigs = (
haste: options.haste,
moduleDirectories: options.moduleDirectories,
moduleFileExtensions: options.moduleFileExtensions,
moduleHiddenFiles: options.moduleHiddenFiles,
moduleLoader: options.moduleLoader,
moduleNameMapper: options.moduleNameMapper,
modulePathIgnorePatterns: options.modulePathIgnorePatterns,
Expand Down Expand Up @@ -199,6 +198,7 @@ const getConfigs = (
transform: options.transform,
transformIgnorePatterns: options.transformIgnorePatterns,
unmockedModulePathPatterns: options.unmockedModulePathPatterns,
watchHiddenFiles: options.watchHiddenFiles,
watchPathIgnorePatterns: options.watchPathIgnorePatterns,
}),
});
2 changes: 1 addition & 1 deletion packages/jest-runtime/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class Runtime {
console: options && options.console,
extensions: [Snapshot.EXTENSION].concat(config.moduleFileExtensions),
hasteImplModulePath: config.haste.hasteImplModulePath,
hiddenFiles: config.moduleHiddenFiles,
hiddenFiles: config.watchHiddenFiles,
ignorePattern,
maxWorkers: (options && options.maxWorkers) || 1,
mocksPattern: escapePathForRegex(path.sep + '__mocks__' + path.sep),
Expand Down
6 changes: 3 additions & 3 deletions types/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export type DefaultOptions = {|
detectOpenHandles: boolean,
moduleDirectories: Array<string>,
moduleFileExtensions: Array<string>,
moduleHiddenFiles: Array<string>,
moduleNameMapper: {[key: string]: string},
modulePathIgnorePatterns: Array<string>,
noStackTrace: boolean,
Expand Down Expand Up @@ -86,6 +85,7 @@ export type DefaultOptions = {|
verbose: ?boolean,
watch: boolean,
watchman: boolean,
watchHiddenFiles: Array<string>,
|};

export type InitialOptions = {
Expand Down Expand Up @@ -124,7 +124,6 @@ export type InitialOptions = {
mapCoverage?: boolean,
moduleDirectories?: Array<string>,
moduleFileExtensions?: Array<string>,
moduleHiddenFiles?: Array<string>,
moduleLoader?: Path,
moduleNameMapper?: {[key: string]: string},
modulePathIgnorePatterns?: Array<string>,
Expand Down Expand Up @@ -180,6 +179,7 @@ export type InitialOptions = {
watch?: boolean,
watchAll?: boolean,
watchman?: boolean,
watchHiddenFiles?: Array<string>,
watchPlugins?: Array<string | [string, Object]>,
};

Expand Down Expand Up @@ -258,7 +258,6 @@ export type ProjectConfig = {|
haste: HasteConfig,
moduleDirectories: Array<string>,
moduleFileExtensions: Array<string>,
moduleHiddenFiles: Array<string>,
moduleLoader: Path,
moduleNameMapper: Array<[string, string]>,
modulePathIgnorePatterns: Array<string>,
Expand Down Expand Up @@ -288,6 +287,7 @@ export type ProjectConfig = {|
timers: 'real' | 'fake',
transform: Array<[string, Path]>,
transformIgnorePatterns: Array<Glob>,
watchHiddenFiles: Array<string>,
watchPathIgnorePatterns: Array<string>,
unmockedModulePathPatterns: ?Array<string>,
|};

0 comments on commit 8790d0b

Please sign in to comment.