Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace non-inclusive terms with alternatives in internal scripts #10234

Merged
merged 1 commit into from Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/build.js
Expand Up @@ -37,7 +37,7 @@ const TS_FILES_PATTERN = '**/*.ts';
const IGNORE_PATTERN = '**/__{tests,mocks}__/**';
const PACKAGES_DIR = path.resolve(__dirname, '../packages');

const INLINE_REQUIRE_BLACKLIST = /packages\/expect|(jest-(circus|diff|get-type|jasmine2|matcher-utils|message-util|regex-util|snapshot))|pretty-format\//;
const INLINE_REQUIRE_EXCLUDE_LIST = /packages\/expect|(jest-(circus|diff|get-type|jasmine2|matcher-utils|message-util|regex-util|snapshot))|pretty-format\//;

const transformOptions = require('../babel.config.js');

Expand Down Expand Up @@ -101,8 +101,8 @@ function buildFile(file, silent) {
const options = Object.assign({}, transformOptions);
options.plugins = options.plugins.slice();

if (INLINE_REQUIRE_BLACKLIST.test(file)) {
// The modules in the blacklist are injected into the user's sandbox
if (INLINE_REQUIRE_EXCLUDE_LIST.test(file)) {
// The excluded modules are injected into the user's sandbox
// We need to guard some globals there.
options.plugins.push(
require.resolve('./babel-plugin-jest-native-globals'),
Expand Down
2 changes: 1 addition & 1 deletion scripts/checkCopyrightHeaders.js
Expand Up @@ -148,7 +148,7 @@ function check() {

${invalidFiles.join('\n ')}

Please include the header or blacklist the files in \`scripts/checkCopyrightHeaders.js\``);
Please include the header or exclude the files in \`scripts/checkCopyrightHeaders.js\``);
process.exit(1);
}
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/cleanE2e.js
Expand Up @@ -11,15 +11,15 @@ const {normalize, resolve} = require('path');
const {sync: glob} = require('glob');
const {sync: rimraf} = require('rimraf');

const blacklist = [
const excludedModules = [
'e2e/global-setup-node-modules/node_modules/',
'e2e/presets/js/node_modules/',
'e2e/presets/json/node_modules/',
].map(dir => normalize(dir));

const e2eNodeModules = glob('e2e/*/node_modules/')
.concat(glob('e2e/*/*/node_modules/'))
.filter(dir => !blacklist.includes(dir))
.filter(dir => !excludedModules.includes(dir))
.map(dir => resolve(__dirname, '..', dir))
.sort();

Expand Down